45a8f1f93a5070d1d98fa0d1fadbcca2252ca02f
[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-pairs": [
84       {
85         "id": "gpe-entry-locator-1",
86         "locator-pair": {
87             "local-locator": "192.168.6.2",
88             "remote-locator": "192.168.7.3",
89             "weight": 0
90         }
91       },
92       {
93         "id": "gpe-entry-locator-2",
94         "locator-pair": {
95             "local-locator": "192.168.5.2",
96             "remote-locator": "192.168.5.3",
97             "weight": 1
98         }
99       }
100     ]
101 }
102
103 negative_mapping_ip6 = {
104     "id": "lispgpe_negative6",
105     "dp-table": 1,
106     "vni": 0,
107     "local-eid": {
108         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
109         "virtual-network-id": 0,
110         "ipv6-prefix": "10::/64"
111     },
112     "remote-eid": {
113         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
114         "virtual-network-id": 0,
115         "ipv6-prefix": "11::/64"
116     },
117     "action": "send-map-request"
118 }
119
120 positive_mapping_ip6 = {
121     "id": "lispgpe_positive6",
122     "dp-table": 1,
123     "vni": 0,
124     "local-eid": {
125         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
126         "virtual-network-id": 0,
127         "ipv6-prefix": "12::/64"
128     },
129     "remote-eid": {
130         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
131         "virtual-network-id": 0,
132         "ipv6-prefix": "13::/64"
133     },
134     "locator-pairs": [
135       {
136         "id": "gpe-entry-locator-1",
137         "locator-pair": {
138             "local-locator": "13::10",
139             "remote-locator": "13::11",
140             "weight": 0
141         }
142       },
143       {
144         "id": "gpe-entry-locator-2",
145         "locator-pair": {
146             "local-locator": "14::10",
147             "remote-locator": "14::11",
148             "weight": 1
149         }
150       }
151     ]
152 }
153
154 # variables for traffic test
155 dut_to_tg_if1_ip4 = "192.168.0.1"
156 dut_to_tg_if2_ip4 = "192.168.1.1"
157 tg_to_dut_if2_ip4 = "192.168.1.2"
158 src_ip4 = "192.168.0.2"
159 dst_ip4 = "192.168.2.2"
160 prefix_len4 = 24
161
162 local_eid4 = "192.168.0.0/24"
163 remote_eid4 = "192.168.2.0/24"
164 src_rloc4 = dut_to_tg_if2_ip4
165 dst_rloc4 = tg_to_dut_if2_ip4
166
167 lisp_traffic_ip4 = {
168     "id": "lispgpe_traffic_ip4",
169     "dp-table": 0,
170     "vni": 0,
171     "local-eid": {
172         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
173         "virtual-network-id": 0,
174         "ipv4-prefix": local_eid4
175     },
176     "remote-eid": {
177         "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
178         "virtual-network-id": 0,
179         "ipv4-prefix": remote_eid4
180     },
181     "locator-pairs": [
182       {
183         "id": "gpe-entry-locator-1",
184         "locator-pair": {
185             "local-locator": src_rloc4,
186             "remote-locator": dst_rloc4,
187             "weight": 0
188         }
189       }
190     ]
191 }
192
193 dut_to_tg_if1_ip6 = "10::1"
194 dut_to_tg_if2_ip6 = "11::1"
195 tg_to_dut_if2_ip6 = "11::2"
196 src_ip6 = "10::2"
197 dst_ip6 = "12::2"
198 prefix_len6 = 64
199
200 local_eid6 = "10::/64"
201 remote_eid6 = "12::/64"
202 src_rloc6 = dut_to_tg_if2_ip6
203 dst_rloc6 = tg_to_dut_if2_ip6
204
205 lisp_traffic_ip6 = {
206     "id": "lispgpe_traffic_ip6",
207     "dp-table": 0,
208     "vni": 0,
209     "local-eid": {
210         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
211         "virtual-network-id": 0,
212         "ipv6-prefix": local_eid6
213     },
214     "remote-eid": {
215         "address-type": "ietf-lisp-address-types:ipv6-prefix-afi",
216         "virtual-network-id": 0,
217         "ipv6-prefix": remote_eid6
218     },
219     "locator-pairs": [
220       {
221         "id": "gpe-entry-locator-1",
222         "locator-pair": {
223             "local-locator": src_rloc6,
224             "remote-locator": dst_rloc6,
225             "weight": 0
226         }
227       }
228     ]
229 }