Improve test tag string parsing
[csit.git] / resources / test_data / honeycomb / lisp / lisp_gpe.py
1 # Copyright (c) 2017 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 """Test variables for LISP GPE test suite."""
15
16 negative_mapping_ip4 = {
17     "id": "lispgpe_negative",
18     "dp-table": 1,
19     "vni": 0,
20     "local-eid": {
21         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
22         "virtual-network-id": 0,
23         "ipv4-prefix": "192.168.0.0/24"
24     },
25     "remote-eid": {
26         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
27         "virtual-network-id": 0,
28         "ipv4-prefix": "192.168.1.0/24"
29     },
30     "action": "send-map-request"
31 }
32
33 # used for update operation
34 negative_mapping_ip4_edit = {
35     "id": "lispgpe_negative",
36     "dp-table": 1,
37     "vni": 0,
38     "local-eid": {
39         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
40         "virtual-network-id": 0,
41         "ipv4-prefix": "192.168.2.0/24"
42     },
43     "remote-eid": {
44         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
45         "virtual-network-id": 0,
46         "ipv4-prefix": "192.168.3.0/24"
47     },
48     "action": "send-map-request"
49 }
50
51 # used for multiple entries
52 negative_mapping_ip4_2 = {
53     "id": "lispgpe_negative_2",
54     "dp-table": 1,
55     "vni": 0,
56     "local-eid": {
57         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
58         "virtual-network-id": 0,
59         "ipv4-prefix": "192.168.2.0/24"
60     },
61     "remote-eid": {
62         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
63         "virtual-network-id": 0,
64         "ipv4-prefix": "192.168.3.0/24"
65     },
66     "action": "send-map-request"
67 }
68
69 positive_mapping_ip4 = {
70     "id": "lispgpe_positive",
71     "dp-table": 1,
72     "vni": 0,
73     "local-eid": {
74         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
75         "virtual-network-id": 0,
76         "ipv4-prefix": "192.168.4.0/24"
77     },
78     "remote-eid": {
79         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
80         "virtual-network-id": 0,
81         "ipv4-prefix": "192.168.5.0/24"
82     },
83     "locator-pair": [
84       {
85             "local-locator": "192.168.6.2",
86             "remote-locator": "192.168.7.3",
87             "weight": 0
88
89       },
90     {
91             "local-locator": "192.168.5.2",
92             "remote-locator": "192.168.5.3",
93             "weight": 1
94         }
95
96     ]
97 }
98
99 negative_mapping_ip6 = {
100     "id": "lispgpe_negative6",
101     "dp-table": 1,
102     "vni": 0,
103     "local-eid": {
104         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
105         "virtual-network-id": 0,
106         "ipv6-prefix": "10::/64"
107     },
108     "remote-eid": {
109         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
110         "virtual-network-id": 0,
111         "ipv6-prefix": "11::/64"
112     },
113     "action": "send-map-request"
114 }
115
116 positive_mapping_ip6 = {
117     "id": "lispgpe_positive6",
118     "dp-table": 1,
119     "vni": 0,
120     "local-eid": {
121         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
122         "virtual-network-id": 0,
123         "ipv6-prefix": "12::/64"
124     },
125     "remote-eid": {
126         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
127         "virtual-network-id": 0,
128         "ipv6-prefix": "13::/64"
129     },
130     "locator-pair": [
131       {
132             "local-locator": "13::10",
133             "remote-locator": "13::11",
134             "weight": 0
135       },
136       {
137             "local-locator": "14::10",
138             "remote-locator": "14::11",
139             "weight": 1
140       }
141     ]
142 }
143
144 # variables for traffic test
145 dut_to_tg_if1_ip4 = "192.168.0.1"
146 dut_to_tg_if2_ip4 = "192.168.1.1"
147 tg_to_dut_if2_ip4 = "192.168.1.2"
148 src_ip4 = "192.168.0.2"
149 dst_ip4 = "192.168.2.2"
150 prefix_len4 = 24
151
152 local_eid4 = "192.168.0.0/24"
153 remote_eid4 = "192.168.2.0/24"
154 src_rloc4 = dut_to_tg_if2_ip4
155 dst_rloc4 = tg_to_dut_if2_ip4
156
157 lisp_traffic_ip4 = {
158     "id": "lispgpe_traffic_ip4",
159     "dp-table": 0,
160     "vni": 0,
161     "local-eid": {
162         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
163         "virtual-network-id": 0,
164         "ipv4-prefix": local_eid4
165     },
166     "remote-eid": {
167         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
168         "virtual-network-id": 0,
169         "ipv4-prefix": remote_eid4
170     },
171     "locator-pair": [
172       {
173             "local-locator": src_rloc4,
174             "remote-locator": dst_rloc4,
175             "weight": 0
176       }
177     ]
178 }
179
180 dut_to_tg_if1_ip6 = "10::1"
181 dut_to_tg_if2_ip6 = "11::1"
182 tg_to_dut_if2_ip6 = "11::2"
183 src_ip6 = "10::2"
184 dst_ip6 = "12::2"
185 prefix_len6 = 64
186
187 local_eid6 = "10::/64"
188 remote_eid6 = "12::/64"
189 src_rloc6 = dut_to_tg_if2_ip6
190 dst_rloc6 = tg_to_dut_if2_ip6
191
192 lisp_traffic_ip6 = {
193     "id": "lispgpe_traffic_ip6",
194     "dp-table": 0,
195     "vni": 0,
196     "local-eid": {
197         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
198         "virtual-network-id": 0,
199         "ipv6-prefix": local_eid6
200     },
201     "remote-eid": {
202         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
203         "virtual-network-id": 0,
204         "ipv6-prefix": remote_eid6
205     },
206     "locator-pair": [
207       {
208             "local-locator": src_rloc6,
209             "remote-locator": dst_rloc6,
210             "weight": 0
211       }
212     ]
213 }