1 # Copyright 2015-2018 Intel Corporation, Tieto and others.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 # Generic test configuration options are described at conf/01_testcases.conf
20 # Options specific to integration testcases are described below:
22 # Required for OP2P tests
23 # "Tunnel Type": ["vxlan"|"gre"|"geneve"] # Tunnel Type defines tunneling protocol to use.
24 # # It can be overridden by cli option TUNNEL_TYPE.
26 # # "vxlan" - iteration of destination MAC address
27 # # "gre" - iteration of destination IP address
28 # # "geneve" - iteration of destination UDP port
29 # # Default value is "vxlan".
31 # bidirectional testing for OP2P is not yet supported.
32 # TRAFFIC['bidir'] must be set to 'False'.
35 # Common TestSteps parts ("macros")
41 STEP_VSWITCH_P2P_INIT = [
42 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
43 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
44 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
47 STEP_VSWITCH_P2P_FINIT = [
48 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
49 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
50 ['vswitch', 'del_switch', 'int_br0'],
53 STEP_VSWITCH_P2P_CONNECTIONS_INIT = STEP_VSWITCH_P2P_INIT + [
54 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'],
55 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]'],
58 STEP_VSWITCH_P2P_CONNECTIONS_FINIT = [
59 ['vswitch', 'dump_connections', 'int_br0'],
60 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'],
61 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]'],
62 ] + STEP_VSWITCH_P2P_FINIT
64 # P2P OVS specific macros
65 STEP_VSWITCH_P2P_FLOWS_INIT = STEP_VSWITCH_P2P_INIT + [
66 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
67 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
70 STEP_VSWITCH_P2P_FLOWS_FINIT = [
71 ['vswitch', 'dump_flows', 'int_br0'],
72 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
73 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
74 ] + STEP_VSWITCH_P2P_FINIT
79 STEP_VSWITCH_PVP_INIT = STEP_VSWITCH_P2P_INIT + [
80 ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1 ports
81 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
84 STEP_VSWITCH_PVP_FINIT = [
85 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1 ports
86 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
87 ] + STEP_VSWITCH_P2P_FINIT
89 STEP_VSWITCH_PVP_CONNECTIONS_INIT = STEP_VSWITCH_PVP_INIT + [
90 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'],
91 ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]'],
92 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]'],
93 ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'],
96 STEP_VSWITCH_PVP_CONNECTIONS_FINIT = [
97 ['vswitch', 'dump_connections', 'int_br0'],
98 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'],
99 ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]'],
100 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]'],
101 ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'],
102 ] + STEP_VSWITCH_PVP_FINIT
104 # PVP OVS specific macros
105 STEP_VSWITCH_PVP_FLOWS_INIT = STEP_VSWITCH_PVP_INIT + [
106 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
107 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
108 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
109 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
112 STEP_VSWITCH_PVP_FLOWS_FINIT = [
113 ['vswitch', 'dump_flows', 'int_br0'],
114 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
115 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[4][1]'}],
116 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
117 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
118 ] + STEP_VSWITCH_PVP_FINIT
123 STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [
124 ['vswitch', 'add_vport', 'int_br0'], # STEP 5 vm2 ports
125 ['vswitch', 'add_vport', 'int_br0'], # STEP 6
128 STEP_VSWITCH_PVVP_FINIT = [
129 ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], # vm2 ports
130 ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
131 ] + STEP_VSWITCH_PVP_FINIT
133 STEP_VSWITCH_PVVP_CONNECTIONS_INIT = STEP_VSWITCH_PVVP_INIT + [
134 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'],
135 ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]'],
136 ['vswitch', 'add_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]'],
137 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]'],
138 ['vswitch', 'add_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]'],
139 ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'],
142 STEP_VSWITCH_PVVP_CONNECTIONS_FINIT = [
143 ['vswitch', 'dump_connections', 'int_br0'],
144 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'],
145 ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]'],
146 ['vswitch', 'del_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]'],
147 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]'],
148 ['vswitch', 'del_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]'],
149 ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'],
150 ] + STEP_VSWITCH_PVVP_FINIT
152 # PVVP OVS specific macros
153 STEP_VSWITCH_PVVP_FLOWS_INIT = STEP_VSWITCH_PVVP_INIT + [
154 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
155 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
156 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
157 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
158 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[5][1]', 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
159 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
162 STEP_VSWITCH_PVVP_FLOWS_FINIT = [
163 ['vswitch', 'dump_flows', 'int_br0'],
164 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
165 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[4][1]'}],
166 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[6][1]'}],
167 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
168 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[5][1]'}],
169 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
170 ] + STEP_VSWITCH_PVVP_FINIT
173 # Definition of integration tests
175 INTEGRATION_TESTS = [
177 "Name": "overlay_p2p_mod_tput",
178 "Deployment": "ptunp",
179 "Tunnel Type": "vxlan",
180 "Description": ("Tunneling Throughput RFC2544 Test."
181 "The encap and decap are performed inside the "
182 "virtual switch itself in each direction to avoid "
183 "the need of ingress overlay traffic."),
185 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
187 "traffic_type" : "rfc2544_throughput",
193 "Name": "overlay_p2p_tput",
194 "Deployment": "op2p",
195 "Tunnel Operation": "encapsulation",
196 "Description": "Overlay Encapsulation Throughput RFC2544 Test",
198 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
200 "traffic_type" : "rfc2544_throughput",
206 "Name": "overlay_p2p_cont",
207 "Deployment": "op2p",
208 "Tunnel Operation": "encapsulation",
209 "Description": "Overlay Encapsulation RFC2544 Continuous Stream",
211 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
213 "traffic_type" : "rfc2544_continuous",
219 "Name": "overlay_p2p_decap_tput",
220 "Deployment": "op2p",
221 "Tunnel Operation": "decapsulation",
222 "Description": "Overlay Decapsulation Throughput RFC2544 Test",
224 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
226 "traffic_type" : "rfc2544_throughput",
232 "Name": "overlay_p2p_decap_cont",
233 "Deployment": "op2p",
234 "Tunnel Operation": "decapsulation",
235 "Description": "Overlay Decapsulation RFC2544 Continuous Stream",
237 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
239 "traffic_type" : "rfc2544_continuous",
245 "Name": "vswitch_add_del_bridge",
246 "Deployment": "clean",
247 "Description": "vSwitch - add and delete bridge",
249 ['vswitch', 'add_switch', 'int_br0'],
250 ['vswitch', 'del_switch', 'int_br0'],
254 "Name": "vswitch_add_del_bridges",
255 "Deployment": "clean",
256 "Description": "vSwitch - add and delete bridges",
258 ['vswitch', 'add_switch', 'int_br0'],
259 ['vswitch', 'add_switch', 'int_br1'],
260 ['vswitch', 'del_switch', 'int_br0'],
261 ['vswitch', 'del_switch', 'int_br1'],
265 "Name": "vswitch_add_del_phy_port",
266 "Deployment": "clean",
267 "Description": "vSwitch - add and delete physical port",
269 ['vswitch', 'add_switch', 'int_br0'],
270 ['vswitch', 'add_phy_port', 'int_br0'],
271 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
272 ['vswitch', 'del_switch', 'int_br0'],
276 "Name": "vswitch_add_del_phy_ports",
277 "Deployment": "clean",
278 "Description": "vSwitch - add and delete physical ports",
280 ['vswitch', 'add_switch', 'int_br0'],
281 ['vswitch', 'add_phy_port', 'int_br0'],
282 ['vswitch', 'add_phy_port', 'int_br0'],
283 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
284 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
285 ['vswitch', 'del_switch', 'int_br0'],
289 "Name": "vswitch_add_del_vport",
290 "Deployment": "clean",
291 "Description": "vSwitch - add and delete virtual port",
293 ['vswitch', 'add_switch', 'int_br0'],
294 ['vswitch', 'add_vport', 'int_br0'],
295 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
296 ['vswitch', 'del_switch', 'int_br0'],
300 "Name": "vswitch_add_del_vports",
301 "Deployment": "clean",
302 "Description": "vSwitch - add and delete virtual ports",
304 ['vswitch', 'add_switch', 'int_br0'],
305 ['vswitch', 'add_vport', 'int_br0'],
306 ['vswitch', 'add_vport', 'int_br0'],
307 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
308 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
309 ['vswitch', 'del_switch', 'int_br0'],
313 "Name": "vswitch_add_del_connection",
314 "Deployment": "clean",
315 "Description": "vSwitch - add and delete connection",
317 ['vswitch', 'add_switch', 'int_br0'],
318 ['vswitch', 'add_phy_port', 'int_br0'],
319 ['vswitch', 'add_phy_port', 'int_br0'],
320 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'],
321 ['vswitch', 'dump_connections', 'int_br0'],
322 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'],
323 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
324 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
325 ['vswitch', 'del_switch', 'int_br0'],
329 "Name": "vswitch_vports_add_del_connection",
330 "Deployment": "clean",
331 "Description": "vSwitch - add and delete connection",
332 "Description": "vSwitch - configure switch with vports, add and delete connection",
334 ['vswitch', 'add_switch', 'int_br0'],
335 ['vswitch', 'add_vport', 'int_br0'],
336 ['vswitch', 'add_vport', 'int_br0'],
337 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'],
338 ['vswitch', 'dump_connections', 'int_br0'],
339 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'],
340 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
341 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
342 ['vswitch', 'del_switch', 'int_br0'],
346 "Name": "vswitch_add_del_connections",
347 "Deployment": "clean",
348 "Description": "vSwitch - add and delete connections",
349 "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT +
350 STEP_VSWITCH_P2P_CONNECTIONS_FINIT
353 "Name": "vswitch_add_del_flow",
354 "Deployment": "clean",
355 "Description": "OVS: vSwitch - add and delete flow",
357 ['vswitch', 'add_switch', 'int_br0'],
358 ['vswitch', 'add_phy_port', 'int_br0'],
359 ['vswitch', 'add_phy_port', 'int_br0'],
360 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
361 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
362 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
363 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
364 ['vswitch', 'del_switch', 'int_br0'],
368 "Name": "vswitch_vports_add_del_flow",
369 "Deployment": "clean",
370 "Description": "OVS: vSwitch - configure switch with vports, add and delete flow",
372 ['vswitch', 'add_switch', 'int_br0'],
373 ['vswitch', 'add_vport', 'int_br0'],
374 ['vswitch', 'add_vport', 'int_br0'],
375 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
376 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
377 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
378 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
379 ['vswitch', 'del_switch', 'int_br0'],
383 "Name": "vswitch_add_del_flows",
384 "Deployment": "clean",
385 "Description": "OVS: vSwitch - add and delete flows",
386 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
387 STEP_VSWITCH_P2P_FLOWS_FINIT
390 "Name": "vswitch_p2p_tput",
391 "Deployment": "clean",
392 "Description": "vSwitch - configure switch and execute RFC2544 throughput test",
393 "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT +
395 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}],
397 STEP_VSWITCH_P2P_CONNECTIONS_FINIT
400 "Name": "vswitch_p2p_back2back",
401 "Deployment": "clean",
402 "Description": "vSwitch - configure switch and execute RFC2544 back2back test",
403 "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT +
405 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}],
407 STEP_VSWITCH_P2P_CONNECTIONS_FINIT
410 "Name": "vswitch_p2p_cont",
411 "Deployment": "clean",
412 "Description": "vSwitch - configure switch and execute RFC2544 continuous stream test",
413 "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT +
415 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}],
417 STEP_VSWITCH_P2P_CONNECTIONS_FINIT
420 "Name": "vswitch_pvp",
421 "Deployment": "clean",
422 "Description": "vSwitch - configure switch and one vnf",
423 "TestSteps": STEP_VSWITCH_PVP_INIT +
428 STEP_VSWITCH_PVP_FINIT
431 "Name": "vswitch_vports_pvp",
432 "Deployment": "clean",
433 "Description": "vSwitch - configure switch with vports and one vnf",
435 ['vswitch', 'add_switch', 'int_br0'],
436 ['vswitch', 'add_vport', 'int_br0'],
437 ['vswitch', 'add_vport', 'int_br0'],
440 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
441 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
442 ['vswitch', 'del_switch', 'int_br0'],
446 "Name": "vswitch_pvp_tput",
447 "Deployment": "clean",
448 "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
449 "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT +
452 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}],
455 STEP_VSWITCH_PVP_CONNECTIONS_FINIT
458 "Name": "vswitch_pvp_back2back",
459 "Deployment": "clean",
460 "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test",
461 "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT +
464 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}],
467 STEP_VSWITCH_PVP_CONNECTIONS_FINIT
470 "Name": "vswitch_pvp_cont",
471 "Deployment": "clean",
472 "Description": "vSwitch - configure switch, vnf and execute RFC2544 continuous stream test",
473 "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT +
476 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}],
479 STEP_VSWITCH_PVP_CONNECTIONS_FINIT
482 "Name": "vswitch_pvp_all",
483 "Deployment": "clean",
484 "Description": "vSwitch - configure switch, vnf and execute all test types",
485 "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT +
488 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}],
489 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}],
490 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}],
493 STEP_VSWITCH_PVP_CONNECTIONS_FINIT
496 "Name": "vswitch_pvvp",
497 "Deployment": "clean",
498 "Description": "vSwitch - configure switch and two vnfs",
499 "TestSteps": STEP_VSWITCH_PVVP_INIT +
506 STEP_VSWITCH_PVVP_FINIT
509 "Name": "vswitch_pvvp_tput",
510 "Deployment": "clean",
511 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test",
512 "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT +
516 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}],
520 STEP_VSWITCH_PVVP_CONNECTIONS_FINIT
523 "Name": "vswitch_pvvp_back2back",
524 "Deployment": "clean",
525 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test",
526 "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT +
530 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}],
534 STEP_VSWITCH_PVVP_CONNECTIONS_FINIT
537 "Name": "vswitch_pvvp_cont",
538 "Deployment": "clean",
539 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 continuous stream test",
540 "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT +
544 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}],
548 STEP_VSWITCH_PVVP_CONNECTIONS_FINIT
551 "Name": "vswitch_pvvp_all",
552 "Deployment": "clean",
553 "Description": "vSwitch - configure switch, two chained vnfs and execute all test types",
554 "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT +
558 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}],
559 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}],
560 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}],
564 STEP_VSWITCH_PVVP_CONNECTIONS_FINIT
567 "Name": "vswitch_p4vp_tput",
568 "Description": "4 chained vnfs, execute RFC2544 throughput test, deployment pvvp4",
569 "Deployment": "pvvp4",
572 "traffic_type" : "rfc2544_throughput",
577 "Name": "vswitch_p4vp_back2back",
578 "Description": "4 chained vnfs, execute RFC2544 back2back test, deployment pvvp4",
579 "Deployment": "pvvp4",
582 "traffic_type" : "rfc2544_back2back",
587 "Name": "vswitch_p4vp_cont",
588 "Description": "4 chained vnfs, execute RFC2544 continuous stream test, deployment pvvp4",
589 "Deployment": "pvvp4",
592 "traffic_type" : "rfc2544_continuous",
597 "Name": "vswitch_p4vp_all",
598 "Description": "4 chained vnfs, execute RFC2544 throughput tests, deployment pvvp4",
599 "Deployment": "pvvp4",
602 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput'}],
603 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back'}],
604 ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous'}],
608 # Topology: 2 Parallel PVP connections
609 # To run a Linux bridge as a loopback in the Guest use:
610 # --test-params "GUEST_LOOPBACK=['linux_bridge']" --integration 2pvp_udp_dest_flows
611 # or add "Parameters" option to the test definition:
612 # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],},
613 "Name": "2pvp_udp_dest_flows",
614 "Description": "RFC2544 Continuous TC with 2 Parallel VMs, flows on UDP Dest Port, deployment pvpv2",
615 "Deployment": "pvpv2",
618 "traffic_type" : "rfc2544_continuous",
623 # Topology: 4 Parallel PVP connections
624 # To run a Linux bridge as a loopback in the Guest use:
625 # --test-params "GUEST_LOOPBACK=['linux_bridge']" --integration 4pvp_udp_dest_flows
626 # or add "Parameters" option to the test definition:
627 # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],},
628 "Name": "4pvp_udp_dest_flows",
629 "Description": "RFC2544 Continuous TC with 4 Parallel VMs, flows on UDP Dest Port, deployment pvpv4",
630 "Deployment": "pvpv4",
633 "traffic_type" : "rfc2544_continuous",
638 # Topology: 6 Parallel PVP connections
639 # To run a Linux bridge as a loopback in the Guest use:
640 # --test-params "GUEST_LOOPBACK=['linux_bridge']" --integration 6pvp_udp_dest_flows
641 # or add "Parameters" option to the test definition:
642 # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],},
643 "Name": "6pvp_udp_dest_flows",
644 "Description": "RFC2544 Continuous TC with 6 Parallel VMs, flows on UDP Dest Port, deployment pvpv6",
645 "Deployment": "pvpv6",
648 "traffic_type" : "rfc2544_continuous",
653 # Testcase for verification of vHost User NUMA awareness feature
654 # introduced in DPDK v2.2. Test case will execute two VNFs, each
655 # pinned to different NUMA slot. After that it will verify that
656 # QEMU and PMD threads serving its interfaces are co-located
657 # at the same NUMA slot.
660 # * architecture with at least 2 NUMA slots
661 # * OVS with DPDK support and DPDK v2.2 and newer
662 # * OVS configuration utilizing both NUMA slots
664 # Example of OVS configuration valid for DPDK v16.04 and cores
665 # split between NUMA slots as follows:
666 # node 0 cpus: 0 1 2 3 4 5 6 7 8 9
667 # node 1 cpus: 10 11 12 13 14 15 16 17 18 19
669 # VSWITCH_PMD_CPU_MASK = '1010'
670 # VSWITCHD_DPDK_CONFIG = {
671 # 'dpdk-init' : 'true',
672 # 'dpdk-lcore-mask' : '0x4004',
673 # 'pmd-cpu-mask' : 'FF0FF',
674 # 'dpdk-socket-mem' : '1024,1024',
677 "Name": "vhost_numa_awareness",
678 "Deployment": "clean",
679 "Description": "vSwitch DPDK - verify that PMD threads are served "
680 "by the same NUMA slot as QEMU instances",
681 "vSwitch" : "OvsDpdkVhost",
682 "TestSteps": STEP_VSWITCH_PVVP_INIT + # STEP 0-6
684 # check that at least 2 numa slots are available
685 ['tools', 'exec_shell', 'numactl -H', 'available: ([0-9]+)'], # STEP 7
686 ['tools', 'assert', '#STEP[-1][0]>1'], # STEP 8
687 # store last 2 cores from numa slot 0
688 ['tools', 'exec_shell', 'numactl -H', 'node 0 cpus:.*\s+(\\d+) (\\d+)$'], # STEP 9
689 # store last 2 cores from numa slot 1
690 ['tools', 'exec_shell', 'numactl -H', 'node 1 cpus:.*\s+(\\d+) (\\d+)$'], # STEP 10
691 # pin VNF1 to 1st NUMA slot and VNF2 to 2nd NUMA slot
692 ['settings', 'setValue', 'GUEST_CORE_BINDING', # STEP 11
693 [("#STEP[-2][0][0]", "#STEP[-2][0][1]"),
694 ("#STEP[-1][0][0]", "#STEP[-1][0][1]")]
697 ['vnf1', 'start'], # STEP 12
698 ['vnf2', 'start'], # STEP 13
699 # read paths to ovs utilities
700 ['settings', 'getValue', 'TOOLS'], # STEP 14
701 # check that PMD thread serving VNF1 runs at NUMA slot 0
702 ## i.e. get numa slot ID serving dpdhvhostuser0...
703 ['tools', 'exec_shell', "sudo #STEP[-1]['ovs-appctl'] " # STEP 15
704 "dpif-netdev/pmd-rxq-show | "
705 "sed -e '/dpdkvhostuser0/,$d' | tac",
706 'pmd thread numa_id ([0-9])+'
708 ## ...and check that it is NUMA slot 0
709 ['tools', 'assert', '#STEP[-1][0]==0'], # STEP 16
710 # check that PMD thread serving VNF2 runs at NUMA slot 1
711 ## i.e. get numa slot ID serving dpdhvhostuser2...
712 ['tools', 'exec_shell', "sudo #STEP[-3]['ovs-appctl'] " # STEP 17
713 "dpif-netdev/pmd-rxq-show | "
714 "sed -e '/dpdkvhostuser2/,$d' | tac",
715 'pmd thread numa_id ([0-9])+'
717 ## ...and check that it is NUMA slot 1
718 ['tools', 'assert', '#STEP[-1][0]==1'], # STEP 18
720 ['vnf2', 'stop'], # STEP 19
721 ['vnf1', 'stop'], # STEP 20
723 STEP_VSWITCH_PVVP_FINIT # STEP 21...
726 # Testcase to demonstrate 1 port connection between DUT and IXIA traffic
727 # generator. Testcase will enforce IxNet trafficgen and it will configure
728 # both ports to the value of TRAFFICGEN_IXIA_PORT1 to indicate one port
730 # Please note, that it is essential to ensure that TRAFFICGEN_IXIA_PORT1
731 # is physically connected to the first NIC from WHITELIST_NICS list.
732 "Name": "ixnet_pvp_tput_1nic",
733 "Deployment": "clean",
734 "Description": "PVP Scenario with 1 port towards IXIA",
736 "TRAFFICGEN" : "IxNet",
738 "traffic_type" : "rfc2544_throughput",
739 # we are using one port, thus it's already a bidir connection
744 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
745 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
746 ['vswitch', 'add_vport', 'int_br0'], # STEP 2
747 ['vswitch', 'add_vport', 'int_br0'], # STEP 3
748 ['vswitch', 'add_flow', 'int_br0',
749 {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'],
750 'idle_timeout': '0'}], # STEP 4
751 ['vswitch', 'add_flow', 'int_br0',
752 {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'],
753 'idle_timeout': '0'}], # STEP 5
754 ['vnf', 'start'], # STEP 6
755 ['settings', 'getValue', 'TRAFFICGEN_IXIA_PORT1'], # STEP 7
756 ['settings', 'setValue', 'TRAFFICGEN_IXIA_PORT2', '#STEP[-1]'],
757 ['trafficgen', 'send_traffic', {}],
758 ['vswitch', 'dump_flows', 'int_br0'],
759 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
760 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
761 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
762 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
763 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
764 ['vswitch', 'del_switch', 'int_br0'],
768 # VPP tests used by VERIFY and MERGE jobs by OPNFV Jenkins
771 "Name": "vswitch_version_vpp",
772 "Deployment": "clean",
773 "Description": "VPP: vSwitch - determine VPP version and fail if it is not possible.",
774 "vSwitch" : "VppDpdkVhost",
776 ['vswitch', 'run_vppctl', ['show', 'version', 'verbose'], '|Version:\s+(v\d+\.\d+)'],
777 ['tools', 'assert', 'len(#STEP[-1][0])'],
781 # END of VPP tests used by VERIFY and MERGE jobs by OPNFV Jenkins
785 # Examples of functional testcases with traffic capture validation
787 # Capture Example 1 - Traffic capture inside VM (PVP scenario)
788 # This TestCase will modify VLAN ID set by the traffic generator to the new value.
789 # Correct VLAN ID settings is verified by inspection of captured frames.
791 "Name": "capture_pvp_modify_vid",
793 "Description": "Test and verify VLAN ID modification by Open vSwitch",
795 "VSWITCH" : "OvsDpdkVhost", # works also for Vanilla OVS
796 "TRAFFICGEN_DURATION" : 5,
798 "traffic_type" : "rfc2544_continuous",
807 "GUEST_LOOPBACK" : ['linux_bridge'],
810 # replace original flows with vlan ID modification
811 ['!vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '1', 'actions': ['mod_vlan_vid:4','output:3']}],
812 ['!vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '2', 'actions': ['mod_vlan_vid:4','output:4']}],
813 ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
814 # verify that received frames have modified vlan ID
815 ['VNF0', 'execute_and_wait', 'tcpdump -i eth0 -c 5 -w dump.pcap vlan 4 &'],
816 ['trafficgen', 'send_traffic',{}],
817 ['!VNF0', 'execute_and_wait', 'tcpdump -qer dump.pcap vlan 4 2>/dev/null | wc -l','|^(\d+)$'],
818 ['tools', 'assert', '#STEP[-1][0] == 5'],
822 # Capture Example 2 - Setup with 2 NICs, where traffic is captured after it is
823 # processed by NIC under the test (2nd NIC). See documentation for further details.
824 # This TestCase will strip VLAN headers from traffic sent by the traffic generator.
825 # The removal of VLAN headers is verified by inspection of captured frames.
827 # NOTE: This setup expects a DUT with two NICs with two ports each. First NIC is
828 # connected to the traffic generator (standard VSPERF setup). Ports of a second NIC
829 # are interconnected by a patch cable. PCI addresses of all four ports have to be
830 # properly configured in the WHITELIST_NICS parameter.
831 _CAPTURE_P2P2P_OVS_ACTION = ''
832 _CAPTURE_P2P2P_SETUP = [
833 # restore original NICS configuration, so we can refer to NICS elements
834 ['settings', 'resetValue', 'WHITELIST_NICS'],
835 ['settings', 'resetValue', 'NICS'],
836 # create and configure two bridges to forward traffic through NIC under
837 # the test and back to the traffic generator
839 ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'],
840 ['tools', 'exec_shell', 'sudo ip addr flush dev $NICS[0]["device"]'],
841 ['tools', 'exec_shell', 'sudo ip link set dev $NICS[0]["device"] up'],
842 ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME $NICS[0]["device"]'],
843 ['tools', 'exec_shell', 'sudo $TOOLS["bind-tool"] --bind igb_uio $NICS[3]["pci"]'],
844 ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME dpdk0 -- '
845 'set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[3]["pci"]'],
846 ['tools', 'exec_shell', '$TOOLS["ovs-ofctl"] add-flow $VSWITCH_BRIDGE_NAME in_port=1,action='
847 '$_CAPTURE_P2P2P_OVS_ACTION,output:2'],
849 ['vswitch', 'add_switch', 'br1'],
850 ['tools', 'exec_shell', 'sudo ip addr flush dev $NICS[2]["device"]'],
851 ['tools', 'exec_shell', 'sudo ip link set dev $NICS[2]["device"] up'],
852 ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port br1 $NICS[2]["device"]'],
853 ['tools', 'exec_shell', 'sudo ip addr flush dev $NICS[1]["device"]'],
854 ['tools', 'exec_shell', 'sudo ip link set dev $NICS[1]["device"] up'],
855 ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port br1 $NICS[1]["device"]'],
856 ['vswitch', 'add_flow', 'br1', {'in_port': '1', 'actions': ['output:2']}],
858 ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
859 ['vswitch', 'dump_flows', 'br1'],
861 INTEGRATION_TESTS += [
863 "Name": "capture_p2p2p_strip_vlan_ovs",
864 "Deployment": "clean",
865 "Description": "P2P Continuous Stream",
867 "_CAPTURE_P2P2P_OVS_ACTION" : 'strip_vlan',
870 "traffic_type" : "rfc2544_continuous",
873 'srcmac': "ca:fe:00:00:00:00",
874 'dstmac': "00:00:00:00:00:01"
883 # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver
884 'WHITELIST_NICS' : [],
887 "TestSteps": _CAPTURE_P2P2P_SETUP + [
888 # capture traffic after processing by NIC under the test (after possible egress HW offloading)
889 ['tools', 'exec_shell_background', 'tcpdump -i $NICS[2]["device"] -c 5 -w capture.pcap '
890 'ether src $TRAFFIC["l2"]["srcmac"]'],
891 ['trafficgen', 'send_traffic', {}],
892 ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'],
893 ['vswitch', 'dump_flows', 'br1'],
894 # there must be 5 captured frames...
895 ['tools', 'exec_shell', 'tcpdump -r capture.pcap | wc -l', '|^(\d+)$'],
896 ['tools', 'assert', '#STEP[-1][0] == 5'],
897 # ...but no vlan headers
898 ['tools', 'exec_shell', 'tcpdump -r capture.pcap vlan | wc -l', '|^(\d+)$'],
899 ['tools', 'assert', '#STEP[-1][0] == 0'],
902 # Capture Example 3 - Traffic capture by traffic generator.
903 # This TestCase uses OVS flow to add VLAN tag with given ID into every
904 # frame send by traffic generator. Correct frame modificaiton is verified by
905 # inspection of packet capture received by T-Rex.
907 "Name": "capture_p2p_add_vlan_ovs_trex",
908 "Deployment": "clean",
909 "Description": "OVS: Test VLAN tag modification and verify it by traffic capture",
910 "vSwitch" : "OvsDpdkVhost", # works also for Vanilla OVS
912 "TRAFFICGEN" : "Trex",
913 "TRAFFICGEN_TREX_LEARNING_MODE" : True,
915 "traffic_type" : "burst",
918 # enable capture of five RX frames
927 "TestSteps" : STEP_VSWITCH_P2P_INIT + [
928 # replace standard L2 flows by flows, which will add VLAN tag with ID 3
929 ['!vswitch', 'add_flow', 'int_br0', {'in_port': '1', 'actions': ['mod_vlan_vid:3','output:2']}],
930 ['!vswitch', 'add_flow', 'int_br0', {'in_port': '2', 'actions': ['mod_vlan_vid:3','output:1']}],
931 ['vswitch', 'dump_flows', 'int_br0'],
932 ['trafficgen', 'send_traffic', {}],
933 ['trafficgen', 'get_results'],
934 # verify that captured frames have vlan tag with ID 3
935 ['tools', 'exec_shell', 'tcpdump -qer $RESULTS_PATH/#STEP[-1][0]["capture_rx"] vlan 3 '
936 '2>/dev/null | wc -l', '|^(\d+)$'],
937 # number of received frames with expected VLAN id must match the number of captured frames
938 ['tools', 'assert', '#STEP[-1][0] == 5'],
939 ] + STEP_VSWITCH_P2P_FINIT,
942 # End of examples of functional testcases with traffic capture validation
946 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
948 # "Name": "ovs_vanilla_linux_bridge_pvp_cont",
949 # "Deployment": "clean",
950 # "Description": "vSwitch - configure OVS Vanilla, QemuVirtioNet with linux bridge and execute continuous stream test",
951 # "vSwitch" : "OvsVanilla",
952 # "VNF" : "QemuVirtioNet",
953 # "Trafficgen": "IxNet",
954 # "Parameters": {"GUEST_LOOPBACK" : ["linux_bridge"],},
955 # "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT +
958 # ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}],
961 # STEP_VSWITCH_PVP_CONNECTIONS_FINIT