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_mod_tput",
137 "Traffic Type": "rfc2544",
138 "Deployment": "ptunp",
139 "biDirectional": 'True',
140 "Tunnel Type": "vxlan",
141 "Description": ("Tunneling Throughput RFC2544 Test."
142 "The encap and decap are performed inside the "
143 "virtual switch itself in each direction to avoid "
144 "the need of ingress overlay traffic."),
147 "Name": "overlay_p2p_tput",
148 "Traffic Type": "rfc2544",
149 "Deployment": "op2p",
150 "biDirectional": 'False',
151 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
152 "Tunnel Operation": "encapsulation",
153 "Description": "Overlay Encapsulation Throughput RFC2544 Test",
156 "Name": "overlay_p2p_cont",
157 "Traffic Type": "continuous",
158 "Deployment": "op2p",
159 "biDirectional": 'False',
160 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
161 "Tunnel Operation": "encapsulation",
162 "Description": "Overlay Encapsulation Continuous Stream",
165 "Name": "overlay_p2p_decap_tput",
166 "Traffic Type": "rfc2544",
167 "Deployment": "op2p",
168 "biDirectional": 'False',
169 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
170 "Tunnel Operation": "decapsulation",
171 "Description": "Overlay Decapsulation Throughput RFC2544 Test",
174 "Name": "overlay_p2p_decap_cont",
175 "Traffic Type": "continuous",
176 "Deployment": "op2p",
177 "biDirectional": 'False',
178 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
179 "Tunnel Operation": "decapsulation",
180 "Description": "Overlay Decapsulation Continuous Stream",
183 "Name": "vswitch_add_del_bridge",
184 "Deployment": "clean",
185 "Description": "vSwitch - add and delete bridge",
187 ['vswitch', 'add_switch', 'int_br0'],
188 ['vswitch', 'del_switch', 'int_br0'],
192 "Name": "vswitch_add_del_bridges",
193 "Deployment": "clean",
194 "Description": "vSwitch - add and delete bridges",
196 ['vswitch', 'add_switch', 'int_br0'],
197 ['vswitch', 'add_switch', 'int_br1'],
198 ['vswitch', 'del_switch', 'int_br0'],
199 ['vswitch', 'del_switch', 'int_br1'],
203 "Name": "vswitch_add_del_phy_port",
204 "Deployment": "clean",
205 "Description": "vSwitch - add and delete physical port",
207 ['vswitch', 'add_switch', 'int_br0'],
208 ['vswitch', 'add_phy_port', 'int_br0'],
209 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
210 ['vswitch', 'del_switch', 'int_br0'],
214 "Name": "vswitch_add_del_phy_ports",
215 "Deployment": "clean",
216 "Description": "vSwitch - add and delete physical ports",
218 ['vswitch', 'add_switch', 'int_br0'],
219 ['vswitch', 'add_phy_port', 'int_br0'],
220 ['vswitch', 'add_phy_port', 'int_br0'],
221 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
222 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
223 ['vswitch', 'del_switch', 'int_br0'],
227 "Name": "vswitch_add_del_vport",
228 "Deployment": "clean",
229 "Description": "vSwitch - add and delete virtual port",
231 ['vswitch', 'add_switch', 'int_br0'],
232 ['vswitch', 'add_vport', 'int_br0'],
233 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
234 ['vswitch', 'del_switch', 'int_br0'],
238 "Name": "vswitch_add_del_vports",
239 "Deployment": "clean",
240 "Description": "vSwitch - add and delete virtual ports",
242 ['vswitch', 'add_switch', 'int_br0'],
243 ['vswitch', 'add_vport', 'int_br0'],
244 ['vswitch', 'add_vport', 'int_br0'],
245 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
246 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
247 ['vswitch', 'del_switch', 'int_br0'],
251 "Name": "vswitch_add_del_flow",
252 "Deployment": "clean",
253 "Description": "vSwitch - add and delete flow",
255 ['vswitch', 'add_switch', 'int_br0'],
256 ['vswitch', 'add_phy_port', 'int_br0'],
257 ['vswitch', 'add_phy_port', 'int_br0'],
258 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
259 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
260 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
261 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
262 ['vswitch', 'del_switch', 'int_br0'],
266 "Name": "vswitch_add_del_flows",
267 "Deployment": "clean",
268 "Description": "vSwitch - add and delete flows",
269 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
270 STEP_VSWITCH_P2P_FLOWS_FINIT
273 "Name": "vswitch_p2p_tput",
274 "Deployment": "clean",
275 "Description": "vSwitch - configure switch and execute RFC2544 throughput test",
276 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
278 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
280 STEP_VSWITCH_P2P_FLOWS_FINIT
283 "Name": "vswitch_p2p_back2back",
284 "Deployment": "clean",
285 "Description": "vSwitch - configure switch and execute RFC2544 back2back test",
286 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
288 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
290 STEP_VSWITCH_P2P_FLOWS_FINIT
293 "Name": "vswitch_p2p_cont",
294 "Deployment": "clean",
295 "Description": "vSwitch - configure switch and execute continuous stream test",
296 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
298 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
300 STEP_VSWITCH_P2P_FLOWS_FINIT
303 "Name": "vswitch_pvp",
304 "Deployment": "clean",
305 "Description": "vSwitch - configure switch and one vnf",
306 "TestSteps": STEP_VSWITCH_PVP_INIT +
311 STEP_VSWITCH_PVP_FINIT
314 "Name": "vswitch_pvp_tput",
315 "Deployment": "clean",
316 "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
317 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
320 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
323 STEP_VSWITCH_PVP_FLOWS_FINIT
326 "Name": "vswitch_pvp_back2back",
327 "Deployment": "clean",
328 "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test",
329 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
332 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
335 STEP_VSWITCH_PVP_FLOWS_FINIT
338 "Name": "vswitch_pvp_cont",
339 "Deployment": "clean",
340 "Description": "vSwitch - configure switch, vnf and execute continuous stream test",
341 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
344 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
347 STEP_VSWITCH_PVP_FLOWS_FINIT
350 "Name": "vswitch_pvp_all",
351 "Deployment": "clean",
352 "Description": "vSwitch - configure switch, vnf and execute all test types",
353 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
356 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
357 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
358 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
361 STEP_VSWITCH_PVP_FLOWS_FINIT
364 "Name": "vswitch_pvvp",
365 "Deployment": "clean",
366 "Description": "vSwitch - configure switch and two vnfs",
367 "TestSteps": STEP_VSWITCH_PVVP_INIT +
374 STEP_VSWITCH_PVVP_FINIT
377 "Name": "vswitch_pvvp_tput",
378 "Deployment": "clean",
379 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test",
380 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
384 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
388 STEP_VSWITCH_PVVP_FLOWS_FINIT
391 "Name": "vswitch_pvvp_back2back",
392 "Deployment": "clean",
393 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test",
394 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
398 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
402 STEP_VSWITCH_PVVP_FLOWS_FINIT
405 "Name": "vswitch_pvvp_cont",
406 "Deployment": "clean",
407 "Description": "vSwitch - configure switch, two chained vnfs and execute continuous stream test",
408 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
412 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
416 STEP_VSWITCH_PVVP_FLOWS_FINIT
419 "Name": "vswitch_pvvp_all",
420 "Deployment": "clean",
421 "Description": "vSwitch - configure switch, two chained vnfs and execute all test types",
422 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
426 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
427 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
428 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
432 STEP_VSWITCH_PVVP_FLOWS_FINIT
436 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
438 # "Name": "ovs_vanilla_linux_bridge_pvp_cont",
439 # "Deployment": "clean",
440 # "Description": "vSwitch - configure OVS Vanilla, QemuVirtioNet with linux bridge and execute continuous stream test",
441 # "vSwitch" : "OvsVanilla",
442 # "VNF" : "QemuVirtioNet",
443 # "Trafficgen": "IxNet",
444 # "Parameters": {"guest_loopback" : "linux_bridge"},
445 # "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
448 # ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
451 # STEP_VSWITCH_PVP_FLOWS_FINIT