CSIT-577 HC Test: Scripts for test jobs using ODL client
[csit.git] / resources / test_data / honeycomb / nsh.py
1 # Copyright (c) 2016 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 test suite."""
15
16 nsh_entry1 = {
17     "nsh-entry": [{
18         "name": "entry1",
19         "version": 0,
20         "length": 6,
21         "md-type": "md-type1",
22         "next-protocol": "ethernet",
23         "nsp": 184,
24         "nsi": 255,
25         "c1": 1,
26         "c2": 2,
27         "c3": 3,
28         "c4": 4
29     }]
30 }
31
32 nsh_entry1_oper = {
33     "nsh-entry": [{
34         "name": "entry1",
35         "version": 0,
36         "length": 6,
37         "md-type": "vpp-nsh:md-type1",
38         "next-protocol": "vpp-nsh:ethernet",
39         "nsp": 184,
40         "nsi": 255,
41         "c1": 1,
42         "c2": 2,
43         "c3": 3,
44         "c4": 4
45     }]
46 }
47
48 nsh_entry2 = {
49     "nsh-entry": [{
50         "name": "entry2",
51         "version": 0,
52         "length": 5,
53         "md-type": "md-type1",
54         "next-protocol": "ethernet",
55         "nsp": 183,
56         "nsi": 254,
57         "c1": 2,
58         "c2": 3,
59         "c3": 4,
60         "c4": 5
61     }]
62 }
63
64 nsh_entry2_oper = {
65     "nsh-entry": [{
66         "name": "entry2",
67         "version": 0,
68         "length": 5,
69         "md-type": "vpp-nsh:md-type1",
70         "next-protocol": "vpp-nsh:ethernet",
71         "nsp": 183,
72         "nsi": 254,
73         "c1": 2,
74         "c2": 3,
75         "c3": 4,
76         "c4": 5
77     }]
78 }
79
80 # Settings for VxLAN GPE interfaces, needed to configure NSH maps
81 vxlan_gpe_if1 = 'vxlan_gpe_test1'
82 vxlan_gpe_base_settings1 = {
83     'name': vxlan_gpe_if1,
84     'description': 'for testing NSH',
85     'enabled': True,
86     'link-up-down-trap-enable': 'enabled'
87 }
88 vxlan_gpe_settings1 = {
89     'local': '192.168.0.1',
90     'remote': '192.168.0.2',
91     'vni': 5,
92     'next-protocol': 'ethernet',
93     'encap-vrf-id': 0,
94     'decap-vrf-id': 0
95 }
96
97 vxlan_gpe_if2 = 'vxlan_gpe_test2'
98 vxlan_gpe_base_settings2 = {
99     'name': vxlan_gpe_if2,
100     'description': 'for testing NSH',
101     'enabled': True,
102     'link-up-down-trap-enable': 'enabled'
103 }
104 vxlan_gpe_settings2 = {
105     'local': '192.168.1.1',
106     'remote': '192.168.1.2',
107     'vni': 6,
108     'next-protocol': 'ethernet',
109     'encap-vrf-id': 0,
110     'decap-vrf-id': 0
111 }
112
113
114 nsh_map1 = {
115     "nsh-map": [{
116         "name": "map1",
117         "nsp": 184,
118         "nsi": 255,
119         "mapped-nsp": 183,
120         "mapped-nsi": 254,
121         "nsh-action": "push",
122         "encap-type": "vxlan-gpe",
123         "encap-if-name": vxlan_gpe_if1
124     }]
125 }
126
127 nsh_map1_oper = {
128     "nsh-map": [{
129         "name": "map1",
130         "nsp": 184,
131         "nsi": 255,
132         "mapped-nsp": 183,
133         "mapped-nsi": 254,
134         "nsh-action": "vpp-nsh:push",
135         "encap-type": "vpp-nsh:vxlan-gpe",
136         "encap-if-name": vxlan_gpe_if1
137     }]
138 }
139
140 nsh_map1_edit = {
141     "nsh-map": [{
142         "name": "map1_edit",
143         "nsp": 184,
144         "nsi": 255,
145         "mapped-nsp": 184,
146         "mapped-nsi": 253,
147         "nsh-action": "push",
148         "encap-type": "vxlan-gpe",
149         "encap-if-name": vxlan_gpe_if1
150     }]
151 }
152
153 nsh_map1_edit_oper = {
154     "nsh-map": [{
155         "name": "map1_edit",
156         "nsp": 184,
157         "nsi": 255,
158         "mapped-nsp": 184,
159         "mapped-nsi": 253,
160         "nsh-action": "vpp-nsh:push",
161         "encap-type": "vpp-nsh:vxlan-gpe",
162         "encap-if-name": vxlan_gpe_if1
163     }]
164 }
165
166 nsh_map2 = {
167     "nsh-map": [{
168         "name": "map2",
169         "nsp": 183,
170         "nsi": 254,
171         "mapped-nsp": 182,
172         "mapped-nsi": 253,
173         "nsh-action": "vpp-nsh:push",
174         "encap-type": "vpp-nsh:vxlan-gpe",
175         "encap-if-name": vxlan_gpe_if2
176     }]
177 }
178
179 nsh_map2_oper = {
180     "nsh-map": [{
181         "name": "map2",
182         "nsp": 183,
183         "nsi": 254,
184         "mapped-nsp": 182,
185         "mapped-nsi": 253,
186         "nsh-action": "vpp-nsh:push",
187         "encap-type": "vpp-nsh:vxlan-gpe",
188         "encap-if-name": vxlan_gpe_if2
189     }]
190 }