CSIT-870 Kubernetes/Ligato integration
[csit.git] / resources / libraries / robot / performance / performance_setup.robot
1 # Copyright (c) 2017 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.DUTSetup
16 | Resource | resources/libraries/robot/performance/performance_configuration.robot
17 | Resource | resources/libraries/robot/performance/performance_utils.robot
18 | Documentation | Performance suite keywords - Suite and test setups and
19 | ... | teardowns.
20
21 *** Keywords ***
22
23 # Keywords used in setups and teardowns
24
25 | Set variables in 2-node circular topology
26 | | [Documentation]
27 | | ... | Compute path for testing on two given nodes in circular
28 | | ... | topology and set corresponding suite variables.
29 | | ...
30 | | ... | _NOTE:_ This KW sets following suite variables:
31 | | ... | - tg - TG node
32 | | ... | - tg_if1 - 1st TG interface towards DUT.
33 | | ... | - tg_if2 - 2nd TG interface towards DUT.
34 | | ... | - dut1 - DUT1 node
35 | | ... | - dut1_if1 - 1st DUT interface towards TG.
36 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
37 | | ...
38 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
39 | | Compute Path | always_same_link=${FALSE}
40 | | ${tg_if1} | ${tg}= | First Interface
41 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
42 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
43 | | ${tg_if2} | ${tg}= | Last Interface
44 | | Set Suite Variable | ${tg}
45 | | Set Suite Variable | ${tg_if1}
46 | | Set Suite Variable | ${tg_if2}
47 | | Set Suite Variable | ${dut1}
48 | | Set Suite Variable | ${dut1_if1}
49 | | Set Suite Variable | ${dut1_if2}
50
51 | Set variables in 3-node circular topology
52 | | [Documentation]
53 | | ... | Compute path for testing on three given nodes in circular
54 | | ... | topology and set corresponding suite variables.
55 | | ...
56 | | ... | _NOTE:_ This KW sets following suite variables:
57 | | ... | - tg - TG node
58 | | ... | - tg_if1 - TG interface towards DUT1.
59 | | ... | - tg_if2 - TG interface towards DUT2.
60 | | ... | - dut1 - DUT1 node
61 | | ... | - dut1_if1 - DUT1 interface towards TG.
62 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
63 | | ... | - dut2 - DUT2 node
64 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
65 | | ... | - dut2_if2 - DUT2 interface towards TG.
66 | | ...
67 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
68 | | ... | ${nodes['TG']}
69 | | Compute Path
70 | | ${tg_if1} | ${tg}= | Next Interface
71 | | ${dut1_if1} | ${dut1}= | Next Interface
72 | | ${dut1_if2} | ${dut1}= | Next Interface
73 | | ${dut2_if1} | ${dut2}= | Next Interface
74 | | ${dut2_if2} | ${dut2}= | Next Interface
75 | | ${tg_if2} | ${tg}= | Next Interface
76 | | Set Suite Variable | ${tg}
77 | | Set Suite Variable | ${tg_if1}
78 | | Set Suite Variable | ${tg_if2}
79 | | Set Suite Variable | ${dut1}
80 | | Set Suite Variable | ${dut1_if1}
81 | | Set Suite Variable | ${dut1_if2}
82 | | Set Suite Variable | ${dut2}
83 | | Set Suite Variable | ${dut2_if1}
84 | | Set Suite Variable | ${dut2_if2}
85
86 | Set variables in 2-node circular topology with DUT interface model
87 | | [Documentation]
88 | | ... | Compute path for testing on two given nodes in circular topology
89 | | ... | based on interface model provided as an argument and set
90 | | ... | corresponding suite variables.
91 | | ...
92 | | ... | *Arguments:*
93 | | ... | - iface_model - Interface model. Type: string
94 | | ...
95 | | ... | _NOTE:_ This KW sets following suite variables:
96 | | ... | - tg - TG node
97 | | ... | - tg_if1 - 1st TG interface towards DUT.
98 | | ... | - tg_if2 - 2nd TG interface towards DUT.
99 | | ... | - dut1 - DUT1 node
100 | | ... | - dut1_if1 - 1st DUT interface towards TG.
101 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
102 | | ...
103 | | ... | *Example:*
104 | | ...
105 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
106 | | ... | \| Intel-X520-DA2 \|
107 | | ...
108 | | [Arguments] | ${iface_model}
109 | | ...
110 | | ${iface_model_list}= | Create list | ${iface_model}
111 | | Append Node | ${nodes['TG']}
112 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
113 | | Append Node | ${nodes['TG']}
114 | | Compute Path | always_same_link=${FALSE}
115 | | ${tg_if1} | ${tg}= | First Interface
116 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
117 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
118 | | ${tg_if2} | ${tg}= | Last Interface
119 | | Set Suite Variable | ${tg}
120 | | Set Suite Variable | ${tg_if1}
121 | | Set Suite Variable | ${tg_if2}
122 | | Set Suite Variable | ${dut1}
123 | | Set Suite Variable | ${dut1_if1}
124 | | Set Suite Variable | ${dut1_if2}
125
126 | Set variables in 3-node circular topology with DUT interface model
127 | | [Documentation]
128 | | ... | Compute path for testing on three given nodes in circular topology
129 | | ... | based on interface model provided as an argument and set
130 | | ... | corresponding suite variables.
131 | | ...
132 | | ... | *Arguments:*
133 | | ... | - iface_model - Interface model. Type: string
134 | | ...
135 | | ... | _NOTE:_ This KW sets following suite variables:
136 | | ... | - tg - TG node
137 | | ... | - tg_if1 - TG interface towards DUT1.
138 | | ... | - tg_if2 - TG interface towards DUT2.
139 | | ... | - dut1 - DUT1 node
140 | | ... | - dut1_if1 - DUT1 interface towards TG.
141 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
142 | | ... | - dut2 - DUT2 node
143 | | ... | - dut2_if1 - DUT2 interface towards TG.
144 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
145 | | ...
146 | | ... | *Example:*
147 | | ...
148 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
149 | | ... | \| Intel-X520-DA2 \|
150 | | ...
151 | | [Arguments] | ${iface_model}
152 | | ...
153 | | ${iface_model_list}= | Create list | ${iface_model}
154 | | Append Node | ${nodes['TG']}
155 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
156 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
157 | | Append Node | ${nodes['TG']}
158 | | Compute Path
159 | | ${tg_if1} | ${tg}= | Next Interface
160 | | ${dut1_if1} | ${dut1}= | Next Interface
161 | | ${dut1_if2} | ${dut1}= | Next Interface
162 | | ${dut2_if1} | ${dut2}= | Next Interface
163 | | ${dut2_if2} | ${dut2}= | Next Interface
164 | | ${tg_if2} | ${tg}= | Next Interface
165 | | Set Suite Variable | ${tg}
166 | | Set Suite Variable | ${tg_if1}
167 | | Set Suite Variable | ${tg_if2}
168 | | Set Suite Variable | ${dut1}
169 | | Set Suite Variable | ${dut1_if1}
170 | | Set Suite Variable | ${dut1_if2}
171 | | Set Suite Variable | ${dut2}
172 | | Set Suite Variable | ${dut2_if1}
173 | | Set Suite Variable | ${dut2_if2}
174
175 | Tear down guest VM with dpdk-testpmd
176 | | [Documentation]
177 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
178 | | ... | Argument is dictionary of all qemu nodes running with its names.
179 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
180 | | ...
181 | | ... | *Arguments:*
182 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
183 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
184 | | ...
185 | | ... | *Example:*
186 | | ...
187 | | ... | \| Tear down guest VM with dpdk-testpmd \| ${node['DUT1']} \
188 | | ... | \| ${dut_vm_refs} \|
189 | | ...
190 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
191 | | ${vms_number}= | Get Length | ${dut_vm_refs}
192 | | ${index}= | Set Variable | ${0}
193 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
194 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
195 | | | ${index}= | Evaluate | ${index} + 1
196 | | | Dpdk Testpmd Stop | ${vm}
197 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
198 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
199 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
200
201 | Tear down guest VM
202 | | [Documentation]
203 | | ... | Stop all qemu processes running on ${dut_node}.
204 | | ... | Argument is dictionary of all qemu nodes running with its names.
205 | | ...
206 | | ... | *Arguments:*
207 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
208 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
209 | | ...
210 | | ... | *Example:*
211 | | ...
212 | | ... | \| Tear down guest VM \| ${node['DUT1']} \
213 | | ... | \| ${dut_vm_refs} \|
214 | | ...
215 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
216 | | ${vms_number}= | Get Length | ${dut_vm_refs}
217 | | ${index}= | Set Variable | ${0}
218 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
219 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
220 | | | ${index}= | Evaluate | ${index} + 1
221 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
222 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
223 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
224
225 # Suite setups
226
227 | Set up 2-node performance topology with DUT's NIC model
228 | | [Documentation]
229 | | ... | Suite preparation phase that setup default startup configuration of
230 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
231 | | ... | variables used in test cases based on interface model provided as an
232 | | ... | argument. Initializes traffic generator.
233 | | ...
234 | | ... | *Arguments:*
235 | | ... | - topology_type - Topology type. Type: string
236 | | ... | - nic_model - Interface model. Type: string
237 | | ...
238 | | ... | *Example:*
239 | | ...
240 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
241 | | ...
242 | | [Arguments] | ${topology_type} | ${nic_model}
243 | | ...
244 | | Set variables in 2-node circular topology with DUT interface model
245 | | ... | ${nic_model}
246 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
247 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
248
249 | Set up 2-node-switched performance topology with DUT's NIC model
250 | | [Documentation]
251 | | ... | Suite preparation phase that setup default startup configuration of
252 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
253 | | ... | variables used in test cases based on interface model provided as an
254 | | ... | argument. Initializes traffic generator.
255 | | ...
256 | | ... | *Arguments:*
257 | | ... | - topology_type - Topology type. Type: string
258 | | ... | - nic_model - Interface model. Type: string
259 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
260 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
261 | | ...
262 | | ... | *Example:*
263 | | ...
264 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
265 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
266 | | ...
267 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
268 | | ... | ${tg_if2_dest_mac}
269 | | ...
270 | | Set variables in 2-node circular topology with DUT interface model
271 | | ... | ${nic_model}
272 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
273 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
274 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
275
276 | Set up 3-node performance topology with DUT's NIC model
277 | | [Documentation]
278 | | ... | Suite preparation phase that setup default startup configuration of
279 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
280 | | ... | variables used in test cases based on interface model provided as an
281 | | ... | argument. Initializes traffic generator.
282 | | ...
283 | | ... | *Arguments:*
284 | | ... | - topology_type - Topology type. Type: string
285 | | ... | - nic_model - Interface model. Type: string
286 | | ...
287 | | ... | *Example:*
288 | | ...
289 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
290 | | ... | \| Intel-X520-DA2 \|
291 | | ...
292 | | [Arguments] | ${topology_type} | ${nic_model}
293 | | ...
294 | | Set variables in 3-node circular topology with DUT interface model
295 | | ... | ${nic_model}
296 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
297 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
298
299 | Set up DPDK 2-node performance topology with DUT's NIC model
300 | | [Documentation]
301 | | ... | Updates interfaces on all nodes and setup global
302 | | ... | variables used in test cases based on interface model provided as an
303 | | ... | argument. Initializes traffic generator. Initializes DPDK test
304 | | ... | environment.
305 | | ...
306 | | ... | *Arguments:*
307 | | ... | - topology_type - Topology type. Type: string
308 | | ... | - nic_model - Interface model. Type: string
309 | | ...
310 | | ... | *Example:*
311 | | ...
312 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
313 | | ... | \| L2 \| Intel-X520-DA2 \|
314 | | ...
315 | | [Arguments] | ${topology_type} | ${nic_model}
316 | | ...
317 | | Set variables in 2-node circular topology with DUT interface model
318 | | ... | ${nic_model}
319 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
320 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
321 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
322
323 | Set up DPDK 3-node performance topology with DUT's NIC model
324 | | [Documentation]
325 | | ... | Updates interfaces on all nodes and setup global
326 | | ... | variables used in test cases based on interface model provided as an
327 | | ... | argument. Initializes traffic generator. Initializes DPDK test
328 | | ... | environment.
329 | | ...
330 | | ... | *Arguments:*
331 | | ... | - topology_type - Topology type. Type: string
332 | | ... | - nic_model - Interface model. Type: string
333 | | ...
334 | | ... | *Example:*
335 | | ...
336 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
337 | | ...
338 | | [Arguments] | ${topology_type} | ${nic_model}
339 | | ...
340 | | Set variables in 3-node circular topology with DUT interface model
341 | | ... | ${nic_model}
342 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
343 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
344 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
345 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
346
347 | Set up IPSec performance test suite
348 | | [Documentation]
349 | | ... | Suite preparation phase that sets default startup configuration of
350 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
351 | | ... | variables used in test cases based on interface model provided as an
352 | | ... | argument. Initializes traffic generator.
353 | | ... | Then it configures crypto device and kernel module on all DUTs.
354 | | ...
355 | | ... | *Arguments:*
356 | | ... | - topology_type - Topology type. Type: string
357 | | ... | - nic_model - Interface model. Type: string
358 | | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
359 | | ... | (Optional). Type: string, default value: HW_cryptodev
360 | | ...
361 | | ... | *Example:*
362 | | ...
363 | | ... | \| Set up IPSec performance test suite \| L2 \
364 | | ... | \| Intel-X520-DA2 \|
365 | | ...
366 | | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
367 | | ...
368 | | Set up 3-node performance topology with DUT's NIC model
369 | | ... | ${topology_type} | ${nic_model}
370 | | ${numvfs}= | Set Variable If
371 | | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
372 | | ... | '${crypto_type}' == 'SW_cryptodev' | ${0}
373 | | Configure crypto device on all DUTs | force_init=${True} | numvfs=${numvfs}
374 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
375 | | ... | Configure kernel module on all DUTs | igb_uio | force_load=${True}
376
377 | Set up performance topology with containers
378 | | [Documentation]
379 | | ... | Suite preparation phase that starts containers
380 | | ...
381 | | Set Suite Variable | @{container_groups} | @{EMPTY}
382 | | Construct VNF containers on all DUTs
383 | | Acquire all 'VNF' containers
384 | | Create all 'VNF' containers
385 | | Configure VPP in all 'VNF' containers
386 | | Install VPP in all 'VNF' containers
387
388 # Suite teardowns
389
390 | Tear down 3-node performance topology
391 | | [Documentation]
392 | | ... | Suite teardown phase with traffic generator teardown.
393 | | ...
394 | | Teardown traffic generator | ${tg}
395
396 | Tear down 3-node performance topology with container
397 | | [Documentation]
398 | | ... | Suite teardown phase with traffic generator teardown and container
399 | | ... | destroy.
400 | | ...
401 | | Teardown traffic generator | ${tg}
402 | | :FOR | ${group} | IN | @{container_groups}
403 | | | Destroy all '${group}' containers
404
405 | Tear down 2-node performance topology
406 | | [Documentation]
407 | | ... | Suite teardown phase with traffic generator teardown.
408 | | ...
409 | | Teardown traffic generator | ${tg}
410
411 | Tear down 2-node performance topology with container
412 | | [Documentation]
413 | | ... | Suite teardown phase with traffic generator teardown and container
414 | | ... | destroy.
415 | | ...
416 | | Teardown traffic generator | ${tg}
417 | | :FOR | ${group} | IN | @{container_groups}
418 | | | Destroy all '${group}' containers
419
420 # Tests setups
421
422 | Set up performance test
423 | | [Documentation] | Common test setup for performance tests.
424 | | ...
425 | | Reset VAT History On All DUTs | ${nodes}
426 | | Create base startup configuration of VPP on all DUTs
427
428 | Set up performance test with Ligato Kubernetes
429 | | [Documentation] | Common test setup for performance tests with Ligato \
430 | | ... | Kubernetes.
431 | | ...
432 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
433 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
434 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
435 | | Apply Kubernetes resource on all duts | ${nodes}
436 | | ... | configmaps/vswitch-agent-cfg.yaml
437 | | Apply Kubernetes resource on all duts | ${nodes}
438 | | ... | configmaps/vnf-agent-cfg.yaml
439 | | Apply Kubernetes resource on all duts | ${nodes}
440 | | ... | pods/contiv-sfc-controller.yaml
441 | | Apply Kubernetes resource on all duts | ${nodes}
442 | | ... | pods/contiv-vswitch.yaml
443
444 # Tests teardowns
445
446 | Tear down performance discovery test
447 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
448 | | ... | tests.
449 | | ...
450 | | ... | *Arguments:*
451 | | ... | - rate - Rate for sending packets. Type: string
452 | | ... | - framesize - L2 Frame Size [B]. Type: integer
453 | | ... | - topology_type - Topology type. Type: string
454 | | ...
455 | | ... | *Example:*
456 | | ...
457 | | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
458 | | ... | \| 3-node-IPv4 \|
459 | | ...
460 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
461 | | ...
462 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
463 | | Show VAT History On All DUTs | ${nodes}
464 | | Show statistics on all DUTs | ${nodes}
465 | | Run Keyword If Test Failed
466 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
467 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
468
469 | Tear down performance ndrchk test
470 | | [Documentation] | Common test teardown for ndrchk performance tests.
471 | | ...
472 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
473 | | Show VAT History On All DUTs | ${nodes}
474 | | Show statistics on all DUTs | ${nodes}
475
476 | Tear down performance pdrchk test
477 | | [Documentation] | Common test teardown for pdrchk performance tests.
478 | | ...
479 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
480 | | Show VAT History On All DUTs | ${nodes}
481 | | Show statistics on all DUTs | ${nodes}
482
483 | Tear down performance test with vhost and VM with dpdk-testpmd
484 | | [Documentation] | Common test teardown for performance tests which use
485 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
486 | | ...
487 | | ... | *Arguments:*
488 | | ... | - rate - Rate for sending packets. Type: string
489 | | ... | - framesize - L2 Frame Size [B]. Type: integer
490 | | ... | - topology_type - Topology type. Type: string
491 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
492 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
493 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
494 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
495 | | ...
496 | | ... | *Example:*
497 | | ...
498 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
499 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
500 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
501 | | ...
502 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
503 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
504 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
505 | | ...
506 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
507 | | Show VAT History On All DUTs | ${nodes}
508 | | Show VPP vhost on all DUTs | ${nodes}
509 | | Show statistics on all DUTs | ${nodes}
510 | | Run Keyword If Test Failed
511 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
512 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
513 | | Run keyword unless | ${dut1_node}==${None}
514 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
515 | | Run keyword unless | ${dut2_node}==${None}
516 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
517
518 | Tear down performance pdrchk test with vhost and VM with dpdk-testpmd
519 | | [Documentation] | Common test teardown for performance pdrchk tests which \
520 | | ... | use vhost(s) and VM(s) with dpdk-testpmd.
521 | | ...
522 | | ... | *Arguments:*
523 | | ... | - rate - Rate for sending packets. Type: string
524 | | ... | - framesize - L2 Frame Size [B]. Type: integer
525 | | ... | - topology_type - Topology type. Type: string
526 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
527 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
528 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
529 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
530 | | ...
531 | | ... | *Example:*
532 | | ...
533 | | ... | \| Tear down performance pdrchk test with vhost and VM with \
534 | | ... | dpdk-testpmd \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \
535 | | ... | \| ${dut_vm_refs} \| ${node['DUT2']} \| ${dut_vm_refs} \|
536 | | ...
537 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
538 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
539 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
540 | | ...
541 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
542 | | Show VAT History On All DUTs | ${nodes}
543 | | Show VPP vhost on all DUTs | ${nodes}
544 | | Show statistics on all DUTs | ${nodes}
545 | | Run keyword unless | ${dut1_node}==${None}
546 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
547 | | Run keyword unless | ${dut2_node}==${None}
548 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
549
550 | Tear down DPDK 3-node performance topology
551 | | [Documentation]
552 | | ... | Suite teardown phase with traffic generator teardown.
553 | | ... | Cleanup DPDK test environment.
554 | | ...
555 | | Teardown traffic generator | ${tg}
556 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
557 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
558
559 | Tear down DPDK 2-node performance topology
560 | | [Documentation]
561 | | ... | Suite teardown phase with traffic generator teardown.
562 | | ... | Cleanup DPDK test environment.
563 | | ...
564 | | Teardown traffic generator | ${tg}
565 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
566
567 | Tear down performance discovery test with NAT
568 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
569 | | ... | tests with NAT feature used.
570 | | ...
571 | | ... | *Arguments:*
572 | | ... | - rate - Rate for sending packets. Type: string
573 | | ... | - framesize - L2 Frame Size [B]. Type: integer
574 | | ... | - traffic_profile - Traffic profile. Type: string
575 | | ...
576 | | ... | *Example:*
577 | | ...
578 | | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
579 | | ... | \| ${traffic_profile} \|
580 | | ...
581 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
582 | | ...
583 | | Tear down performance discovery test | ${rate} | ${framesize}
584 | | ... | ${traffic_profile}
585 | | Show NAT verbose | ${dut1}
586 | | Show NAT verbose | ${dut2}
587
588 | Tear down performance test with ACL
589 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
590 | | ... | tests with ACL feature used.
591 | | ...
592 | | ... | *Arguments:*
593 | | ... | - rate - Rate for sending packets. Type: string
594 | | ... | - framesize - L2 Frame Size [B]. Type: integer
595 | | ... | - traffic_profile - Traffic profile. Type: string
596 | | ...
597 | | ... | *Example:*
598 | | ...
599 | | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
600 | | ... | \| ${traffic_profile} \|
601 | | ...
602 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
603 | | ...
604 | | Tear down performance discovery test | ${rate} | ${framesize}
605 | | ... | ${traffic_profile}
606 | | Vpp Log Plugin Acl Settings | ${dut1}
607 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
608 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
609
610 | Tear down performance test with MACIP ACL
611 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
612 | | ... | tests with MACIP ACL feature used.
613 | | ...
614 | | ... | *Arguments:*
615 | | ... | - rate - Rate for sending packets. Type: string
616 | | ... | - framesize - L2 Frame Size [B]. Type: integer
617 | | ... | - traffic_profile - Traffic profile. Type: string
618 | | ...
619 | | ... | *Example:*
620 | | ...
621 | | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
622 | | ... | \| ${traffic_profile} \|
623 | | ...
624 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
625 | | ...
626 | | Tear down performance discovery test | ${rate} | ${framesize}
627 | | ... | ${traffic_profile}
628 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
629 | | ... | Vpp Log Macip Acl Settings | ${dut1}
630 | | Run Keyword And Ignore Error
631 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
632
633 | Tear down performance test with Ligato Kubernetes
634 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
635 | | ... | tests with Ligato Kubernetes.
636 | | ...
637 | | Run Keyword If Test Failed
638 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
639 | | Run Keyword If Test Failed
640 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
641 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit