2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.netvirt.aclservice.tests;
11 import java.util.HashMap;
17 // Disabling checkstyle:linelength for readability purpose.
18 @SuppressWarnings("checkstyle:linelength")
19 public final class IdHelper {
20 private static Map<String, Integer> idCacheMap = new HashMap<>();
22 private IdHelper() { }
25 idCacheMap.put("UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1001);
26 idCacheMap.put("TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1002);
27 idCacheMap.put("ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6", 1003);
28 idCacheMap.put("ETHERnullEgress987_IPv4_FlowAfterRuleDeleted", 1003);
29 idCacheMap.put("ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1004);
30 idCacheMap.put("ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1005);
31 idCacheMap.put("ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Ingress987_IPv4_FlowAfterRuleDeleted", 1005);
32 idCacheMap.put("UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1006);
33 idCacheMap.put("UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1007);
34 idCacheMap.put("UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1008);
35 idCacheMap.put("TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1009);
36 idCacheMap.put("TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1010);
37 idCacheMap.put("TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1011);
38 idCacheMap.put("ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1012);
39 idCacheMap.put("ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22", 1013);
40 idCacheMap.put("ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1014);
41 idCacheMap.put("ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21", 1015);
42 idCacheMap.put("ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1016);
43 idCacheMap.put("ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1017);
44 idCacheMap.put("UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 1018);
45 idCacheMap.put("TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1019);
46 idCacheMap.put("TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1020);
47 idCacheMap.put("TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1021);
48 idCacheMap.put("TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1022);
49 idCacheMap.put("TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1023);
50 idCacheMap.put("TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1024);
51 idCacheMap.put("TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1025);
52 idCacheMap.put("TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1026);
53 idCacheMap.put("ETHERnull_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 61010);
54 idCacheMap.put("ETHERnull_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress987_IPv4_FlowAfterRuleDeleted", 61010);
55 idCacheMap.put("UDP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress98785cc3048-abc3-43cc-89b3-377341426ac7", 61010);
56 idCacheMap.put("ICMP_V4_DESTINATION_23__remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 61010);
57 idCacheMap.put("TCP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 61010);
58 idCacheMap.put("85cc3048-abc3-43cc-89b3-377341426ac5", 1 << 1);
59 idCacheMap.put("85cc3048-abc3-43cc-89b3-377341426ac8", 2 << 1);
60 idCacheMap.put("ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.100/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1027);
61 idCacheMap.put("ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:A4_10.0.0.101/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1028);
62 idCacheMap.put("ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:A4_10.0.0.101/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6", 1029);
63 idCacheMap.put("TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Egress98785cc3048-abc3-43cc-89b3-377341426a21", 1028);
64 idCacheMap.put("TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Egress98785cc3048-abc3-43cc-89b3-377341426a21", 1029);
65 idCacheMap.put("TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426a22", 1029);
69 public static Integer getId(String key) {
70 Integer value = idCacheMap.get(key);
72 throw new IllegalArgumentException(key);