1 # Copyright 2015-2016 Intel Corporation.
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.
15 # The 1st value of SUPPORTED_TUNNELING_PROTO is used as the default
16 # tunneling protocol for OP2P tests.
17 SUPPORTED_TUNNELING_PROTO = ['vxlan', 'gre', 'geneve']
20 # Generic test configuration options are described at conf/01_testcases.conf
24 # Options specific to integration testcases are described below:
26 # Required for OP2P tests
27 # "Tunnel Type": ["vxlan"|"gre"|"geneve"] # Tunnel Type defines tunneling protocol to use.
28 # # It can be overridden by cli option tunnel_type.
30 # # "vxlan" - iteration of destination MAC address
31 # # "gre" - iteration of destination IP address
32 # # "geneve" - iteration of destination UDP port
33 # # Default value is "vxlan".
35 # biDirectional testing for OP2P is not yet supported.
36 # biDirectional must be set to False.
38 # "TestSteps": [] # Definition of integration test steps.
39 # # In case that this list is defined, then
40 # # vsperf will execute defined test steps
41 # # one by one. It can be used to configure
42 # # vswitch, insert flows and transmit traffic.
43 # # It is possible to refer to result of any
44 # # previous step through #STEP[i][j] macro.
45 # # Where i is a number of step (starts from 0)
46 # # and j is index of result returned by step i.
49 # Common TestSteps parts ("macros")
53 STEP_VSWITCH_P2P_FLOWS_INIT = [
54 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
55 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
56 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
57 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
58 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
61 STEP_VSWITCH_P2P_FLOWS_FINIT = [
62 ['vswitch', 'dump_flows', 'int_br0'],
63 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
64 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
65 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
66 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
67 ['vswitch', 'del_switch', 'int_br0'],
71 STEP_VSWITCH_PVP_INIT = [
72 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
73 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
74 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
75 ['vswitch', 'add_vport', 'int_br0'], # STEP 3
76 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
79 STEP_VSWITCH_PVP_FINIT = [
80 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
81 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
82 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
83 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
84 ['vswitch', 'del_switch', 'int_br0'],
87 STEP_VSWITCH_PVP_FLOWS_INIT = STEP_VSWITCH_PVP_INIT + [
88 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
89 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
90 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
91 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
94 STEP_VSWITCH_PVP_FLOWS_FINIT = [
95 ['vswitch', 'dump_flows', 'int_br0'],
96 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
97 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[4][1]'}],
98 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
99 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
100 ] + STEP_VSWITCH_PVP_FINIT
102 STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [
103 ['vswitch', 'add_vport', 'int_br0'], # STEP 5
104 ['vswitch', 'add_vport', 'int_br0'], # STEP 6
107 STEP_VSWITCH_PVVP_FINIT = [
108 ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'],
109 ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
110 ] + STEP_VSWITCH_PVP_FINIT
112 STEP_VSWITCH_PVVP_FLOWS_INIT = STEP_VSWITCH_PVVP_INIT + [
113 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
114 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
115 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
116 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
117 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[5][1]', 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
118 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
121 STEP_VSWITCH_PVVP_FLOWS_FINIT = [
122 ['vswitch', 'dump_flows', 'int_br0'],
123 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
124 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[4][1]'}],
125 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[6][1]'}],
126 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
127 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[5][1]'}],
128 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
129 ] + STEP_VSWITCH_PVVP_FINIT
132 # Definition of integration tests
134 INTEGRATION_TESTS = [
136 "Name": "overlay_p2p_tput",
137 "Traffic Type": "rfc2544",
138 "Deployment": "op2p",
139 "biDirectional": False,
140 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
141 "Tunnel Operation": "encapsulation",
142 "Description": "Overlay Encapsulation Throughput RFC2544 Test",
145 "Name": "overlay_p2p_cont",
146 "Traffic Type": "continuous",
147 "Deployment": "op2p",
148 "biDirectional": False,
149 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
150 "Tunnel Operation": "encapsulation",
151 "Description": "Overlay Encapsulation Continuous Stream",
154 "Name": "overlay_p2p_decap_tput",
155 "Traffic Type": "rfc2544",
156 "Deployment": "op2p",
157 "biDirectional": False,
158 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
159 "Tunnel Operation": "decapsulation",
160 "Description": "Overlay Decapsulation Throughput RFC2544 Test",
163 "Name": "overlay_p2p_decap_cont",
164 "Traffic Type": "continuous",
165 "Deployment": "op2p",
166 "biDirectional": False,
167 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
168 "Tunnel Operation": "decapsulation",
169 "Description": "Overlay Decapsulation Continuous Stream",
172 "Name": "vswitch_add_del_bridge",
173 "Deployment": "clean",
174 "Description": "vSwitch - add and delete bridge",
176 ['vswitch', 'add_switch', 'int_br0'],
177 ['vswitch', 'del_switch', 'int_br0'],
181 "Name": "vswitch_add_del_bridges",
182 "Deployment": "clean",
183 "Description": "vSwitch - add and delete bridges",
185 ['vswitch', 'add_switch', 'int_br0'],
186 ['vswitch', 'add_switch', 'int_br1'],
187 ['vswitch', 'del_switch', 'int_br0'],
188 ['vswitch', 'del_switch', 'int_br1'],
192 "Name": "vswitch_add_del_phy_port",
193 "Deployment": "clean",
194 "Description": "vSwitch - add and delete physical port",
196 ['vswitch', 'add_switch', 'int_br0'],
197 ['vswitch', 'add_phy_port', 'int_br0'],
198 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
199 ['vswitch', 'del_switch', 'int_br0'],
203 "Name": "vswitch_add_del_phy_ports",
204 "Deployment": "clean",
205 "Description": "vSwitch - add and delete physical ports",
207 ['vswitch', 'add_switch', 'int_br0'],
208 ['vswitch', 'add_phy_port', 'int_br0'],
209 ['vswitch', 'add_phy_port', 'int_br0'],
210 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
211 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
212 ['vswitch', 'del_switch', 'int_br0'],
216 "Name": "vswitch_add_del_vport",
217 "Deployment": "clean",
218 "Description": "vSwitch - add and delete virtual port",
220 ['vswitch', 'add_switch', 'int_br0'],
221 ['vswitch', 'add_vport', 'int_br0'],
222 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
223 ['vswitch', 'del_switch', 'int_br0'],
227 "Name": "vswitch_add_del_vports",
228 "Deployment": "clean",
229 "Description": "vSwitch - add and delete virtual ports",
231 ['vswitch', 'add_switch', 'int_br0'],
232 ['vswitch', 'add_vport', 'int_br0'],
233 ['vswitch', 'add_vport', 'int_br0'],
234 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
235 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
236 ['vswitch', 'del_switch', 'int_br0'],
240 "Name": "vswitch_add_del_flow",
241 "Deployment": "clean",
242 "Description": "vSwitch - add and delete flow",
244 ['vswitch', 'add_switch', 'int_br0'],
245 ['vswitch', 'add_phy_port', 'int_br0'],
246 ['vswitch', 'add_phy_port', 'int_br0'],
247 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
248 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
249 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
250 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
251 ['vswitch', 'del_switch', 'int_br0'],
255 "Name": "vswitch_add_del_flows",
256 "Deployment": "clean",
257 "Description": "vSwitch - add and delete flows",
258 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
259 STEP_VSWITCH_P2P_FLOWS_FINIT
262 "Name": "vswitch_p2p_tput",
263 "Deployment": "clean",
264 "Description": "vSwitch - configure switch and execute RFC2544 throughput test",
265 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
267 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
269 STEP_VSWITCH_P2P_FLOWS_FINIT
272 "Name": "vswitch_p2p_back2back",
273 "Deployment": "clean",
274 "Description": "vSwitch - configure switch and execute RFC2544 back2back test",
275 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
277 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
279 STEP_VSWITCH_P2P_FLOWS_FINIT
282 "Name": "vswitch_p2p_cont",
283 "Deployment": "clean",
284 "Description": "vSwitch - configure switch and execute continuous stream test",
285 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
287 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
289 STEP_VSWITCH_P2P_FLOWS_FINIT
292 "Name": "vswitch_pvp",
293 "Deployment": "clean",
294 "Description": "vSwitch - configure switch and one vnf",
295 "TestSteps": STEP_VSWITCH_PVP_INIT +
300 STEP_VSWITCH_PVP_FINIT
303 "Name": "vswitch_pvp_tput",
304 "Deployment": "clean",
305 "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
306 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
309 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
312 STEP_VSWITCH_PVP_FLOWS_FINIT
315 "Name": "vswitch_pvp_back2back",
316 "Deployment": "clean",
317 "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test",
318 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
321 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
324 STEP_VSWITCH_PVP_FLOWS_FINIT
327 "Name": "vswitch_pvp_cont",
328 "Deployment": "clean",
329 "Description": "vSwitch - configure switch, vnf and execute continuous stream test",
330 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
333 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
336 STEP_VSWITCH_PVP_FLOWS_FINIT
339 "Name": "vswitch_pvp_all",
340 "Deployment": "clean",
341 "Description": "vSwitch - configure switch, vnf and execute all test types",
342 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
345 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
346 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
347 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
350 STEP_VSWITCH_PVP_FLOWS_FINIT
353 "Name": "vswitch_pvvp",
354 "Deployment": "clean",
355 "Description": "vSwitch - configure switch and two vnfs",
356 "TestSteps": STEP_VSWITCH_PVVP_INIT +
363 STEP_VSWITCH_PVVP_FINIT
366 "Name": "vswitch_pvvp_tput",
367 "Deployment": "clean",
368 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test",
369 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
373 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
377 STEP_VSWITCH_PVVP_FLOWS_FINIT
380 "Name": "vswitch_pvvp_back2back",
381 "Deployment": "clean",
382 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test",
383 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
387 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
391 STEP_VSWITCH_PVVP_FLOWS_FINIT
394 "Name": "vswitch_pvvp_cont",
395 "Deployment": "clean",
396 "Description": "vSwitch - configure switch, two chained vnfs and execute continuous stream test",
397 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
401 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
405 STEP_VSWITCH_PVVP_FLOWS_FINIT
408 "Name": "vswitch_pvvp_all",
409 "Deployment": "clean",
410 "Description": "vSwitch - configure switch, two chained vnfs and execute all test types",
411 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
415 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
416 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
417 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
421 STEP_VSWITCH_PVVP_FLOWS_FINIT
425 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
427 # "Name": "ovs_vanilla_linux_bridge_pvp_cont",
428 # "Deployment": "clean",
429 # "Description": "vSwitch - configure OVS Vanilla, QemuVirtioNet with linux bridge and execute continuous stream test",
430 # "vSwitch" : "OvsVanilla",
431 # "VNF" : "QemuVirtioNet",
432 # "Trafficgen": "IxNet",
433 # "Test Parameters": {"guest_loopback" : "linux_bridge"},
434 # "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
437 # ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
440 # STEP_VSWITCH_PVP_FLOWS_FINIT