a67702f83e8b0bd5fd6f53ea74ee7ad2f2739d17
[vswitchperf.git] / conf / integration / 01_testcases.conf
1 # Copyright 2015-2016 Intel Corporation.
2 #
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
6 #
7 #   http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
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']
18
19 #
20 # Generic test configuration options are described at conf/01_testcases.conf
21 #
22
23 #
24 # Options specific to integration testcases are described below:
25 #
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.
29 #                                   # Values:
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".
34 #
35 # biDirectional testing for OP2P is not yet supported.
36 # biDirectional must be set to False.
37 #
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.
47
48 #
49 # Common TestSteps parts ("macros")
50 #
51
52 # P2P 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'}],
59 ]
60
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'],
68 ]
69
70 # PVP and PVVP macros
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    vm1 ports
76     ['vswitch', 'add_vport', 'int_br0'],            # STEP 4
77 ]
78
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'],
85 ]
86
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'}],
92 ]
93
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
101
102 STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [
103     ['vswitch', 'add_vport', 'int_br0'],            # STEP 5    vm2 ports
104     ['vswitch', 'add_vport', 'int_br0'],            # STEP 6
105 ]
106
107 STEP_VSWITCH_PVVP_FINIT = [
108     ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'],  # vm2 ports
109     ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
110 ] + STEP_VSWITCH_PVP_FINIT
111
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'}],
119 ]
120
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
130
131 STEP_VSWITCH_2PHY_2VM_INIT = STEP_VSWITCH_PVVP_INIT
132
133 STEP_VSWITCH_2PHY_2VM_FINIT = STEP_VSWITCH_PVVP_FINIT
134
135 STEP_VSWITCH_2_PARALLEL_VM_FLOWS_INIT  = [
136             # Setup Flows to reply ICMPv6 and similar packets, so to
137             # avoid flooding the internal port with their re-transmissions
138             ['vswitch', 'add_flow', 'int_br0', \
139                 {'priority': '1', 'dl_src': '00:00:00:00:00:01', \
140                 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
141             ['vswitch', 'add_flow', 'int_br0', \
142                 {'priority': '1', 'dl_src': '00:00:00:00:00:02', \
143                 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
144             ['vswitch', 'add_flow', 'int_br0', \
145                 {'priority': '1', 'dl_src': '00:00:00:00:00:03', \
146                 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
147             ['vswitch', 'add_flow', 'int_br0', \
148                 {'priority': '1', 'dl_src': '00:00:00:00:00:04', \
149                 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
150             # Forward UDP packets depending on dest port
151             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
152                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
153                 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
154             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
155                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
156                 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
157             # Send VM outputs to phy port #2
158             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
159                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
160             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
161                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
162 ]
163
164 STEP_VSWITCH_2PHY_4VM_INIT = STEP_VSWITCH_2PHY_2VM_INIT + [
165     ['vswitch', 'add_vport', 'int_br0'],            # STEP 7    vm3 ports
166     ['vswitch', 'add_vport', 'int_br0'],            # STEP 8
167     ['vswitch', 'add_vport', 'int_br0'],            # STEP 9    vm4 ports
168     ['vswitch', 'add_vport', 'int_br0'],            # STEP 10
169 ]
170
171 STEP_VSWITCH_2PHY_4VM_FINIT = [
172     ['vswitch', 'del_port', 'int_br0', '#STEP[7][0]'],  # vm3 ports
173     ['vswitch', 'del_port', 'int_br0', '#STEP[8][0]'],
174     ['vswitch', 'del_port', 'int_br0', '#STEP[9][0]'],  # vm4 ports
175     ['vswitch', 'del_port', 'int_br0', '#STEP[10][0]'],
176 ] + STEP_VSWITCH_2PHY_2VM_FINIT
177
178 STEP_VSWITCH_FLOWS_FINIT = [
179     ['vswitch', 'dump_flows', 'int_br0'],
180     ['vswitch', 'del_flow', 'int_br0'],
181 ]
182
183 STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT = [
184             # Setup Flows to reply ICMPv6 and similar packets, so to
185             # avoid flooding the internal port with their re-transmissions
186             ['vswitch', 'add_flow', 'int_br0', \
187                 {'priority': '1', 'dl_src': '00:00:00:00:00:01', \
188                 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
189             ['vswitch', 'add_flow', 'int_br0', \
190                 {'priority': '1', 'dl_src': '00:00:00:00:00:02', \
191                 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
192             ['vswitch', 'add_flow', 'int_br0', \
193                 {'priority': '1', 'dl_src': '00:00:00:00:00:03', \
194                 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
195             ['vswitch', 'add_flow', 'int_br0', \
196                 {'priority': '1', 'dl_src': '00:00:00:00:00:04', \
197                 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
198             ['vswitch', 'add_flow', 'int_br0', \
199                 {'priority': '1', 'dl_src': '00:00:00:00:00:05', \
200                 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}],
201             ['vswitch', 'add_flow', 'int_br0', \
202                 {'priority': '1', 'dl_src': '00:00:00:00:00:06', \
203                 'actions': ['output:#STEP[8][1]'], 'idle_timeout': '0'}],
204             ['vswitch', 'add_flow', 'int_br0', \
205                 {'priority': '1', 'dl_src': '00:00:00:00:00:07', \
206                 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}],
207             ['vswitch', 'add_flow', 'int_br0', \
208                 {'priority': '1', 'dl_src': '00:00:00:00:00:08', \
209                 'actions': ['output:#STEP[10][1]'], 'idle_timeout': '0'}],
210             # Forward UDP packets depending on dest port
211             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
212                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
213                 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
214             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
215                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
216                 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
217             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
218                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '2', \
219                 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}],
220             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
221                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '3', \
222                 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}],
223             # Send VM outputs to phy port #2
224             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
225                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
226             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
227                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
228             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[8][1]', \
229                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
230             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[10][1]', \
231                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
232 ]
233
234 STEP_VSWITCH_2PHY_6VM_INIT = STEP_VSWITCH_2PHY_4VM_INIT + [
235             ['vswitch', 'add_vport', 'int_br0'],        # STEP 11   vm5    vhu8
236             ['vswitch', 'add_vport', 'int_br0'],        # STEP 12          vhu9
237             ['vswitch', 'add_vport', 'int_br0'],        # STEP 13   vm6    vhu10
238             ['vswitch', 'add_vport', 'int_br0'],        # STEP 14          vhu11
239 ]
240
241 STEP_VSWITCH_6_PARALLEL_VM_FLOWS_INIT = STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT + [
242             ['vswitch', 'add_flow', 'int_br0', \
243                 {'priority': '1', 'dl_src': '00:00:00:00:00:09', \
244                 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}],
245             ['vswitch', 'add_flow', 'int_br0', \
246                 {'priority': '1', 'dl_src': '00:00:00:00:00:0a', \
247                 'actions': ['output:#STEP[12][1]'], 'idle_timeout': '0'}],
248             ['vswitch', 'add_flow', 'int_br0', \
249                 {'priority': '1', 'dl_src': '00:00:00:00:00:0b', \
250                 'actions': ['output:#STEP[13][1]'], 'idle_timeout': '0'}],
251             ['vswitch', 'add_flow', 'int_br0', \
252                 {'priority': '1', 'dl_src': '00:00:00:00:00:0c', \
253                 'actions': ['output:#STEP[14][1]'], 'idle_timeout': '0'}],
254             # Forward UDP packets depending on dest port
255             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
256                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '4', \
257                 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}],
258             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
259                 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '5', \
260                 'actions': ['output:#STEP[13][1]'], 'idle_timeout': '0'}],
261             # Send VM outputs to phy port #2
262             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[12][1]', \
263                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
264             ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[14][1]', \
265                 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
266 ]
267
268 STEP_VSWITCH_2PHY_6VM_FINIT = [
269             ['vswitch', 'del_port', 'int_br0', '#STEP[11][0]'],  # vm5 ports
270             ['vswitch', 'del_port', 'int_br0', '#STEP[12][0]'],
271             ['vswitch', 'del_port', 'int_br0', '#STEP[13][0]'],  # vm6 ports
272             ['vswitch', 'del_port', 'int_br0', '#STEP[14][0]'],
273 ] + STEP_VSWITCH_2PHY_4VM_FINIT
274
275 #
276 # Definition of integration tests
277 #
278 INTEGRATION_TESTS = [
279     {
280         "Name": "overlay_p2p_mod_tput",
281         "Traffic Type": "rfc2544",
282         "Deployment": "ptunp",
283         "biDirectional": 'True',
284         "Tunnel Type": "vxlan",
285         "Description": ("Tunneling Throughput RFC2544 Test."
286                        "The encap and decap are performed inside the "
287                        "virtual switch itself in each direction to avoid "
288                        "the need of ingress overlay traffic."),
289     },
290     {
291         "Name": "overlay_p2p_tput",
292         "Traffic Type": "rfc2544",
293         "Deployment": "op2p",
294         "biDirectional": 'False',
295         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
296         "Tunnel Operation": "encapsulation",
297         "Description": "Overlay Encapsulation Throughput RFC2544 Test",
298     },
299     {
300         "Name": "overlay_p2p_cont",
301         "Traffic Type": "continuous",
302         "Deployment": "op2p",
303         "biDirectional": 'False',
304         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
305         "Tunnel Operation": "encapsulation",
306         "Description": "Overlay Encapsulation Continuous Stream",
307     },
308     {
309         "Name": "overlay_p2p_decap_tput",
310         "Traffic Type": "rfc2544",
311         "Deployment": "op2p",
312         "biDirectional": 'False',
313         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
314         "Tunnel Operation": "decapsulation",
315         "Description": "Overlay Decapsulation Throughput RFC2544 Test",
316     },
317     {
318         "Name": "overlay_p2p_decap_cont",
319         "Traffic Type": "continuous",
320         "Deployment": "op2p",
321         "biDirectional": 'False',
322         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
323         "Tunnel Operation": "decapsulation",
324         "Description": "Overlay Decapsulation Continuous Stream",
325     },
326     {
327         "Name": "vswitch_add_del_bridge",
328         "Deployment": "clean",
329         "Description": "vSwitch - add and delete bridge",
330         "TestSteps": [
331                         ['vswitch', 'add_switch', 'int_br0'],
332                         ['vswitch', 'del_switch', 'int_br0'],
333                      ]
334     },
335     {
336         "Name": "vswitch_add_del_bridges",
337         "Deployment": "clean",
338         "Description": "vSwitch - add and delete bridges",
339         "TestSteps": [
340                         ['vswitch', 'add_switch', 'int_br0'],
341                         ['vswitch', 'add_switch', 'int_br1'],
342                         ['vswitch', 'del_switch', 'int_br0'],
343                         ['vswitch', 'del_switch', 'int_br1'],
344                      ]
345     },
346     {
347         "Name": "vswitch_add_del_phy_port",
348         "Deployment": "clean",
349         "Description": "vSwitch - add and delete physical port",
350         "TestSteps": [
351                         ['vswitch', 'add_switch', 'int_br0'],
352                         ['vswitch', 'add_phy_port', 'int_br0'],
353                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
354                         ['vswitch', 'del_switch', 'int_br0'],
355                      ]
356     },
357     {
358         "Name": "vswitch_add_del_phy_ports",
359         "Deployment": "clean",
360         "Description": "vSwitch - add and delete physical ports",
361         "TestSteps": [
362                         ['vswitch', 'add_switch', 'int_br0'],
363                         ['vswitch', 'add_phy_port', 'int_br0'],
364                         ['vswitch', 'add_phy_port', 'int_br0'],
365                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
366                         ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
367                         ['vswitch', 'del_switch', 'int_br0'],
368                      ]
369     },
370     {
371         "Name": "vswitch_add_del_vport",
372         "Deployment": "clean",
373         "Description": "vSwitch - add and delete virtual port",
374         "TestSteps": [
375                         ['vswitch', 'add_switch', 'int_br0'],
376                         ['vswitch', 'add_vport', 'int_br0'],
377                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
378                         ['vswitch', 'del_switch', 'int_br0'],
379                      ]
380     },
381     {
382         "Name": "vswitch_add_del_vports",
383         "Deployment": "clean",
384         "Description": "vSwitch - add and delete virtual ports",
385         "TestSteps": [
386                         ['vswitch', 'add_switch', 'int_br0'],
387                         ['vswitch', 'add_vport', 'int_br0'],
388                         ['vswitch', 'add_vport', 'int_br0'],
389                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
390                         ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
391                         ['vswitch', 'del_switch', 'int_br0'],
392                      ]
393     },
394     {
395         "Name": "vswitch_add_del_flow",
396         "Deployment": "clean",
397         "Description": "vSwitch - add and delete flow",
398         "TestSteps": [
399                         ['vswitch', 'add_switch', 'int_br0'],
400                         ['vswitch', 'add_phy_port', 'int_br0'],
401                         ['vswitch', 'add_phy_port', 'int_br0'],
402                         ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
403                         ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
404                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
405                         ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
406                         ['vswitch', 'del_switch', 'int_br0'],
407                      ]
408     },
409     {
410         "Name": "vswitch_add_del_flows",
411         "Deployment": "clean",
412         "Description": "vSwitch - add and delete flows",
413         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
414                      STEP_VSWITCH_P2P_FLOWS_FINIT
415     },
416     {
417         "Name": "vswitch_p2p_tput",
418         "Deployment": "clean",
419         "Description": "vSwitch - configure switch and execute RFC2544 throughput test",
420         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
421                      [
422                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
423                      ] +
424                      STEP_VSWITCH_P2P_FLOWS_FINIT
425     },
426     {
427         "Name": "vswitch_p2p_back2back",
428         "Deployment": "clean",
429         "Description": "vSwitch - configure switch and execute RFC2544 back2back test",
430         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
431                      [
432                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
433                      ] +
434                      STEP_VSWITCH_P2P_FLOWS_FINIT
435     },
436     {
437         "Name": "vswitch_p2p_cont",
438         "Deployment": "clean",
439         "Description": "vSwitch - configure switch and execute continuous stream test",
440         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
441                      [
442                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
443                      ] +
444                      STEP_VSWITCH_P2P_FLOWS_FINIT
445     },
446     {
447         "Name": "vswitch_pvp",
448         "Deployment": "clean",
449         "Description": "vSwitch - configure switch and one vnf",
450         "TestSteps": STEP_VSWITCH_PVP_INIT +
451                      [
452                         ['vnf', 'start'],
453                         ['vnf', 'stop'],
454                      ] +
455                      STEP_VSWITCH_PVP_FINIT
456     },
457     {
458         "Name": "vswitch_pvp_tput",
459         "Deployment": "clean",
460         "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
461         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
462                      [
463                         ['vnf', 'start'],
464                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
465                         ['vnf', 'stop'],
466                      ] +
467                      STEP_VSWITCH_PVP_FLOWS_FINIT
468     },
469     {
470         "Name": "vswitch_pvp_back2back",
471         "Deployment": "clean",
472         "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test",
473         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
474                      [
475                         ['vnf', 'start'],
476                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
477                         ['vnf', 'stop'],
478                      ] +
479                      STEP_VSWITCH_PVP_FLOWS_FINIT
480     },
481     {
482         "Name": "vswitch_pvp_cont",
483         "Deployment": "clean",
484         "Description": "vSwitch - configure switch, vnf and execute continuous stream test",
485         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
486                      [
487                         ['vnf', 'start'],
488                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
489                         ['vnf', 'stop'],
490                      ] +
491                      STEP_VSWITCH_PVP_FLOWS_FINIT
492     },
493     {
494         "Name": "vswitch_pvp_all",
495         "Deployment": "clean",
496         "Description": "vSwitch - configure switch, vnf and execute all test types",
497         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
498                      [
499                         ['vnf', 'start'],
500                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
501                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
502                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
503                         ['vnf', 'stop'],
504                      ] +
505                      STEP_VSWITCH_PVP_FLOWS_FINIT
506     },
507     {
508         "Name": "vswitch_pvvp",
509         "Deployment": "clean",
510         "Description": "vSwitch - configure switch and two vnfs",
511         "TestSteps": STEP_VSWITCH_PVVP_INIT +
512                      [
513                         ['vnf1', 'start'],
514                         ['vnf2', 'start'],
515                         ['vnf1', 'stop'],
516                         ['vnf2', 'stop'],
517                      ] +
518                      STEP_VSWITCH_PVVP_FINIT
519     },
520     {
521         "Name": "vswitch_pvvp_tput",
522         "Deployment": "clean",
523         "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test",
524         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
525                      [
526                         ['vnf1', 'start'],
527                         ['vnf2', 'start'],
528                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
529                         ['vnf1', 'stop'],
530                         ['vnf2', 'stop'],
531                      ] +
532                      STEP_VSWITCH_PVVP_FLOWS_FINIT
533     },
534     {
535         "Name": "vswitch_pvvp_back2back",
536         "Deployment": "clean",
537         "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test",
538         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
539                      [
540                         ['vnf1', 'start'],
541                         ['vnf2', 'start'],
542                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
543                         ['vnf1', 'stop'],
544                         ['vnf2', 'stop'],
545                      ] +
546                      STEP_VSWITCH_PVVP_FLOWS_FINIT
547     },
548     {
549         "Name": "vswitch_pvvp_cont",
550         "Deployment": "clean",
551         "Description": "vSwitch - configure switch, two chained vnfs and execute continuous stream test",
552         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
553                      [
554                         ['vnf1', 'start'],
555                         ['vnf2', 'start'],
556                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
557                         ['vnf1', 'stop'],
558                         ['vnf2', 'stop'],
559                      ] +
560                      STEP_VSWITCH_PVVP_FLOWS_FINIT
561     },
562     {
563         "Name": "vswitch_pvvp_all",
564         "Deployment": "clean",
565         "Description": "vSwitch - configure switch, two chained vnfs and execute all test types",
566         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
567                      [
568                         ['vnf1', 'start'],
569                         ['vnf2', 'start'],
570                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
571                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
572                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
573                         ['vnf1', 'stop'],
574                         ['vnf2', 'stop'],
575                      ] +
576                      STEP_VSWITCH_PVVP_FLOWS_FINIT
577     },
578     {
579       # Topology: 2 Parallel PVP connections
580       # To run a Linux bridge as a loopback in the Guest use:
581       #     --test-params "guest_loopback=linux_bridge" --integration 2pvp_udp_dest_flows
582         "Name": "2pvp_udp_dest_flows",
583         "Description": "Continuous TC with 2 Parallel VMs, flows on UDP Dest Port",
584         "Deployment": "clean",
585         "Stream Type": "L4",
586         "MultiStream": 2,
587         "TestSteps": STEP_VSWITCH_2PHY_2VM_INIT +
588             STEP_VSWITCH_2_PARALLEL_VM_FLOWS_INIT + [
589             # Start 2 VMs
590             ['vnf1', 'start'],
591             ['vnf2', 'start'],
592             ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'False'}],
593             ['vnf1', 'stop'],
594             ['vnf2', 'stop'],
595             # Clean up
596         ] + STEP_VSWITCH_FLOWS_FINIT +
597             STEP_VSWITCH_2PHY_2VM_FINIT
598     },
599     {
600       # Topology: 4 Parallel PVP connections
601       # To run a Linux bridge as a loopback in the Guest use:
602       #     --test-params "guest_loopback=linux_bridge" --integration 4pvp_udp_dest_flows
603         "Name": "4pvp_udp_dest_flows",
604         "Description": "Continuous TC with 4 Parallel VMs, flows on UDP Dest Port",
605         "Deployment": "clean",
606         "Stream Type": "L4",
607         "MultiStream": 4,
608         "TestSteps": STEP_VSWITCH_2PHY_4VM_INIT +
609             STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT + [
610             # Start 4 VMs
611             ['vnf1', 'start'],
612             ['vnf2', 'start'],
613             ['vnf3', 'start'],
614             ['vnf4', 'start'],
615             ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'False'}],
616             ['vnf1', 'stop'],
617             ['vnf2', 'stop'],
618             ['vnf3', 'stop'],
619             ['vnf4', 'stop'],
620             # Clean up
621         ] + STEP_VSWITCH_FLOWS_FINIT +
622             STEP_VSWITCH_2PHY_4VM_FINIT
623     },
624     {
625       # Topology: 6 Parallel PVP connections
626       # To run a Linux bridge as a loopback in the Guest use:
627       #     --test-params "guest_loopback=linux_bridge" --integration 6pvp_udp_dest_flows
628         "Name": "6pvp_udp_dest_flows",
629         "Description": "Continuous TC with 6 Parallel VMs, flows on UDP Dest Port",
630         "Deployment": "clean",
631         "Stream Type": "L4",
632         "MultiStream": 6,
633         "TestSteps": STEP_VSWITCH_2PHY_6VM_INIT +
634             STEP_VSWITCH_6_PARALLEL_VM_FLOWS_INIT + [
635             # Start VMs
636             ['vnf1', 'start'],
637             ['vnf2', 'start'],
638             ['vnf3', 'start'],
639             ['vnf4', 'start'],
640             ['vnf5', 'start'],
641             ['vnf6', 'start'],
642             ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'False'}],
643             ['vnf1', 'stop'],
644             ['vnf2', 'stop'],
645             ['vnf3', 'stop'],
646             ['vnf4', 'stop'],
647             ['vnf5', 'stop'],
648             ['vnf6', 'stop'],
649         ] + STEP_VSWITCH_FLOWS_FINIT +
650         STEP_VSWITCH_2PHY_6VM_FINIT
651     },
652 ]
653
654 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
655 #    {
656 #        "Name": "ovs_vanilla_linux_bridge_pvp_cont",
657 #        "Deployment": "clean",
658 #        "Description": "vSwitch - configure OVS Vanilla, QemuVirtioNet with linux bridge and execute continuous stream test",
659 #        "vSwitch" : "OvsVanilla",
660 #        "VNF" : "QemuVirtioNet",
661 #        "Trafficgen": "IxNet",
662 #        "Parameters": {"guest_loopback" : "linux_bridge"},
663 #        "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
664 #                     [
665 #                        ['vnf', 'start'],
666 #                        ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
667 #                        ['vnf', 'stop'],
668 #                     ] +
669 #                     STEP_VSWITCH_PVP_FLOWS_FINIT
670 #    },