Merge "hugepage_doc: Add hugepage configuration info to installation doc"
[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
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
104     ['vswitch', 'add_vport', 'int_br0'],            # STEP 6
105 ]
106
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
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 #
132 # Definition of integration tests
133 #
134 INTEGRATION_TESTS = [
135     {
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",
143     },
144     {
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",
152     },
153     {
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",
161     },
162     {
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",
170     },
171     {
172         "Name": "vswitch_add_del_bridge",
173         "Deployment": "clean",
174         "Description": "vSwitch - add and delete bridge",
175         "TestSteps": [
176                         ['vswitch', 'add_switch', 'int_br0'],
177                         ['vswitch', 'del_switch', 'int_br0'],
178                      ]
179     },
180     {
181         "Name": "vswitch_add_del_bridges",
182         "Deployment": "clean",
183         "Description": "vSwitch - add and delete bridges",
184         "TestSteps": [
185                         ['vswitch', 'add_switch', 'int_br0'],
186                         ['vswitch', 'add_switch', 'int_br1'],
187                         ['vswitch', 'del_switch', 'int_br0'],
188                         ['vswitch', 'del_switch', 'int_br1'],
189                      ]
190     },
191     {
192         "Name": "vswitch_add_del_phy_port",
193         "Deployment": "clean",
194         "Description": "vSwitch - add and delete physical port",
195         "TestSteps": [
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'],
200                      ]
201     },
202     {
203         "Name": "vswitch_add_del_phy_ports",
204         "Deployment": "clean",
205         "Description": "vSwitch - add and delete physical ports",
206         "TestSteps": [
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'],
213                      ]
214     },
215     {
216         "Name": "vswitch_add_del_vport",
217         "Deployment": "clean",
218         "Description": "vSwitch - add and delete virtual port",
219         "TestSteps": [
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'],
224                      ]
225     },
226     {
227         "Name": "vswitch_add_del_vports",
228         "Deployment": "clean",
229         "Description": "vSwitch - add and delete virtual ports",
230         "TestSteps": [
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'],
237                      ]
238     },
239     {
240         "Name": "vswitch_add_del_flow",
241         "Deployment": "clean",
242         "Description": "vSwitch - add and delete flow",
243         "TestSteps": [
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'],
252                      ]
253     },
254     {
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
260     },
261     {
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 +
266                      [
267                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
268                      ] +
269                      STEP_VSWITCH_P2P_FLOWS_FINIT
270     },
271     {
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 +
276                      [
277                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
278                      ] +
279                      STEP_VSWITCH_P2P_FLOWS_FINIT
280     },
281     {
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 +
286                      [
287                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
288                      ] +
289                      STEP_VSWITCH_P2P_FLOWS_FINIT
290     },
291     {
292         "Name": "vswitch_pvp",
293         "Deployment": "clean",
294         "Description": "vSwitch - configure switch and one vnf",
295         "TestSteps": STEP_VSWITCH_PVP_INIT +
296                      [
297                         ['vnf', 'start'],
298                         ['vnf', 'stop'],
299                      ] +
300                      STEP_VSWITCH_PVP_FINIT
301     },
302     {
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 +
307                      [
308                         ['vnf', 'start'],
309                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
310                         ['vnf', 'stop'],
311                      ] +
312                      STEP_VSWITCH_PVP_FLOWS_FINIT
313     },
314     {
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 +
319                      [
320                         ['vnf', 'start'],
321                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
322                         ['vnf', 'stop'],
323                      ] +
324                      STEP_VSWITCH_PVP_FLOWS_FINIT
325     },
326     {
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 +
331                      [
332                         ['vnf', 'start'],
333                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
334                         ['vnf', 'stop'],
335                      ] +
336                      STEP_VSWITCH_PVP_FLOWS_FINIT
337     },
338     {
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 +
343                      [
344                         ['vnf', 'start'],
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}],
348                         ['vnf', 'stop'],
349                      ] +
350                      STEP_VSWITCH_PVP_FLOWS_FINIT
351     },
352     {
353         "Name": "vswitch_pvvp",
354         "Deployment": "clean",
355         "Description": "vSwitch - configure switch and two vnfs",
356         "TestSteps": STEP_VSWITCH_PVVP_INIT +
357                      [
358                         ['vnf1', 'start'],
359                         ['vnf2', 'start'],
360                         ['vnf1', 'stop'],
361                         ['vnf2', 'stop'],
362                      ] +
363                      STEP_VSWITCH_PVVP_FINIT
364     },
365     {
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 +
370                      [
371                         ['vnf1', 'start'],
372                         ['vnf2', 'start'],
373                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : True}],
374                         ['vnf1', 'stop'],
375                         ['vnf2', 'stop'],
376                      ] +
377                      STEP_VSWITCH_PVVP_FLOWS_FINIT
378     },
379     {
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 +
384                      [
385                         ['vnf1', 'start'],
386                         ['vnf2', 'start'],
387                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : True}],
388                         ['vnf1', 'stop'],
389                         ['vnf2', 'stop'],
390                      ] +
391                      STEP_VSWITCH_PVVP_FLOWS_FINIT
392     },
393     {
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 +
398                      [
399                         ['vnf1', 'start'],
400                         ['vnf2', 'start'],
401                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
402                         ['vnf1', 'stop'],
403                         ['vnf2', 'stop'],
404                      ] +
405                      STEP_VSWITCH_PVVP_FLOWS_FINIT
406     },
407     {
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 +
412                      [
413                         ['vnf1', 'start'],
414                         ['vnf2', 'start'],
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}],
418                         ['vnf1', 'stop'],
419                         ['vnf2', 'stop'],
420                      ] +
421                      STEP_VSWITCH_PVVP_FLOWS_FINIT
422     },
423 ]
424
425 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
426 #    {
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 +
435 #                     [
436 #                        ['vnf', 'start'],
437 #                        ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : True}],
438 #                        ['vnf', 'stop'],
439 #                     ] +
440 #                     STEP_VSWITCH_PVP_FLOWS_FINIT
441 #    },