1 # Copyright (c) 2019 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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 | Variables | resources/libraries/python/topology.py
16 | Variables | resources/libraries/python/PapiHistory.py
18 | Library | Collections
19 | Library | OperatingSystem
22 | Library | resources.libraries.python.CoreDumpUtil
23 | Library | resources.libraries.python.CpuUtils
24 | Library | resources.libraries.python.DUTSetup
25 | Library | resources.libraries.python.L2Util
26 | Library | resources.libraries.python.SchedUtils
27 | Library | resources.libraries.python.Tap
28 | Library | resources.libraries.python.TGSetup
29 | Library | resources.libraries.python.PapiHistory
30 | Library | resources.libraries.python.VppCounters
31 | Library | resources.libraries.python.VPPUtil
32 | Library | resources.libraries.python.Trace
33 | Library | resources.libraries.python.topology.Topology
35 | Resource | resources/libraries/robot/shared/container.robot
36 | Resource | resources/libraries/robot/vm/qemu.robot
39 | Configure all DUTs before test
40 | | [Documentation] | Setup all DUTs in topology before test execution.
42 | | Setup All DUTs | ${nodes}
44 | Configure all TGs for traffic script
45 | | [Documentation] | Prepare all TGs before traffic scripts execution.
47 | | All TGs Set Interface Default Driver | ${nodes}
49 | Show Vpp Errors On All DUTs
50 | | [Documentation] | Show VPP errors verbose on all DUTs.
52 | | ${duts}= | Get Matches | ${nodes} | DUT*
53 | | :FOR | ${dut} | IN | @{duts}
54 | | | Vpp Show Errors | ${nodes['${dut}']}
56 | Show VPP trace dump on all DUTs
57 | | [Documentation] | Save API trace and dump output on all DUTs.
59 | | ${duts}= | Get Matches | ${nodes} | DUT*
60 | | :FOR | ${dut} | IN | @{duts}
61 | | | Vpp api trace save | ${nodes['${dut}']}
62 | | | Vpp api trace dump | ${nodes['${dut}']}
64 | Show Bridge Domain Data On All DUTs
65 | | [Documentation] | Show Bridge Domain data on all DUTs.
67 | | ${duts}= | Get Matches | ${nodes} | DUT*
68 | | :FOR | ${dut} | IN | @{duts}
69 | | | Vpp Get Bridge Domain Data | ${nodes['${dut}']}
71 | Setup Scheduler Policy for Vpp On All DUTs
72 | | [Documentation] | Set realtime scheduling policy (SCHED_RR) with priority 1
73 | | ... | on all VPP worker threads on all DUTs.
75 | | ${duts}= | Get Matches | ${nodes} | DUT*
76 | | :FOR | ${dut} | IN | @{duts}
77 | | | Set VPP Scheduling rr | ${nodes['${dut}']}
79 | Configure crypto device on all DUTs
80 | | [Documentation] | Verify if Crypto QAT device virtual functions are
81 | | ... | initialized on all DUTs. If parameter force_init is set to True, then
82 | | ... | try to initialize/disable.
84 | | ... | *Arguments:*
85 | | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx.
86 | | ... | Type: string, default value: HW_DH895xcc
87 | | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs
88 | | ... | Type: integer, default value: ${32}
89 | | ... | - force_init - Force to initialize. Type: boolean
93 | | ... | \| Configure crypto device on all DUTs \| HW_DH895xcc \| ${32} \|
95 | | [Arguments] | ${crypto_type} | ${numvfs} | ${force_init}=${False}
97 | | ${duts}= | Get Matches | ${nodes} | DUT*
98 | | :FOR | ${dut} | IN | @{duts}
99 | | | Crypto Device Verify | ${nodes['${dut}']} | ${crypto_type}
100 | | | ... | ${numvfs} | force_init=${force_init}
102 | Configure AVF interfaces on all DUTs
103 | | [Documentation] | Configure virtual functions for AVF interfaces on PCI
104 | | ... | interface on all DUTs.
106 | | ... | *Arguments:*
107 | | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs
108 | | ... | (Optional). Type: integer, default value: ${1}
109 | | ... | - traffic_type - A value affecting behavior, such as spoofing.
110 | | ... | (Optional). Type: string, default value: L2
111 | | ... | Note: This is NOT the usual traffic profile
112 | | ... | (which is python module name to initialize TG with).
116 | | ... | \| Configure AVF device on all DUTs \| ${1} \| L2 \|
118 | | [Arguments] | ${numvfs}=${1} | ${traffic_type}=L2
120 | | ${duts}= | Get Matches | ${nodes} | DUT*
121 | | :FOR | ${dut} | IN | @{duts}
122 | | | ${if1_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if1}
123 | | | ... | numvfs=${numvfs} | traffic_type=${traffic_type}
124 | | | ${if2_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if2}
125 | | | ... | numvfs=${numvfs} | traffic_type=${traffic_type}
126 # Currently only one AVF is supported.
127 | | | Set Suite Variable | ${${dut}_if1_vf0} | ${if1_avf_arr[0]}
128 | | | Set Suite Variable | ${${dut}_if2_vf0} | ${if2_avf_arr[0]}
130 | Configure kernel module on all DUTs
131 | | [Documentation] | Verify if specific kernel module is loaded on all DUTs.
132 | | ... | If parameter force_load is set to True, then try to load.
134 | | ... | *Arguments:*
135 | | ... | - module - Module to verify. Type: string
136 | | ... | - force_load - Try to load module. Type: boolean
140 | | ... | \| Configure kernel module on all DUTs \| ${True} \|
142 | | [Arguments] | ${module} | ${force_load}=${False}
144 | | Verify Kernel Module on All DUTs | ${nodes} | ${module}
145 | | ... | force_load=${force_load}
147 | Create base startup configuration of VPP on all DUTs
148 | | [Documentation] | Create base startup configuration of VPP to all DUTs.
150 | | ${duts}= | Get Matches | ${nodes} | DUT*
151 | | :FOR | ${dut} | IN | @{duts}
152 | | | Import Library | resources.libraries.python.VppConfigGenerator
153 | | | ... | WITH NAME | ${dut}
154 | | | Run keyword | ${dut}.Set Node | ${nodes['${dut}']}
155 | | | Run keyword | ${dut}.Add Unix Log
156 | | | Run keyword | ${dut}.Add Unix CLI Listen
157 | | | Run keyword | ${dut}.Add Unix Nodaemon
158 | | | Run keyword | ${dut}.Add Unix Coredump
159 | | | Run keyword | ${dut}.Add DPDK No Tx Checksum Offload
160 | | | Run keyword | ${dut}.Add DPDK Log Level | debug
161 | | | Run keyword | ${dut}.Add DPDK Uio Driver
162 | | | Run keyword | ${dut}.Add Heapsize | 4G
163 | | | Run keyword | ${dut}.Add Statseg size | 4G
164 | | | Run keyword | ${dut}.Add Plugin | disable | default
165 | | | Run keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable}
166 | | | Run keyword | ${dut}.Add IP6 Hash Buckets | 2000000
167 | | | Run keyword | ${dut}.Add IP6 Heap Size | 4G
168 | | | Run keyword | ${dut}.Add IP Heap Size | 4G
170 | Add worker threads and rxqueues to all DUTs
171 | | [Documentation] | Setup worker threads and rxqueues in vpp startup
172 | | ... | configuration on all DUTs. Based on the SMT configuration of DUT if
173 | | ... | enabled keyword will automatically map also the sibling logical cores.
174 | | ... | Keyword will automatically set the appropriate test TAGs in format
175 | | ... | mTnC, where m=logical_core_count and n=physical_core_count.
177 | | ... | *Arguments:*
178 | | ... | - phy_cores - Number of physical cores to use. Type: integer
179 | | ... | - rx_queues - Number of RX queues. Type: integer
183 | | ... | \| Add worker threads and rxqueues to all DUTs \| ${1} \| ${1} \|
185 | | [Arguments] | ${phy_cores} | ${rx_queues}=${None}
187 | | ${cpu_count_int} | Convert to Integer | ${phy_cores}
188 | | ${thr_count_int} | Convert to Integer | ${phy_cores}
189 | | ${num_mbufs_int} | Convert to Integer | 16384
190 | | ${duts}= | Get Matches | ${nodes} | DUT*
191 | | :FOR | ${dut} | IN | @{duts}
192 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
193 | | | ... | Variable Should Exist | ${${dut}_if1}
194 | | | @{if_list}= | Run Keyword If | '${if1_status}' == 'PASS'
195 | | | ... | Create List | ${${dut}_if1}
196 | | | ... | ELSE | Create List | ${${dut}_if1_1} | ${${dut}_if1_2}
197 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
198 | | | ... | Variable Should Exist | ${${dut}_if2}
199 | | | Run Keyword If | '${if2_status}' == 'PASS'
200 | | | ... | Append To List | ${if_list} | ${${dut}_if2}
202 | | | ... | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2}
203 | | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list}
204 | | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']}
205 | | | ${cpu_main}= | Cpu list per node str | ${nodes['${dut}']} | ${numa}
206 | | | ... | skip_cnt=${1} | cpu_cnt=${1}
207 | | | ${cpu_wt}= | Cpu list per node str | ${nodes['${dut}']} | ${numa}
208 | | | ... | skip_cnt=${2} | cpu_cnt=${cpu_count_int} | smt_used=${smt_used}
209 | | | ${thr_count_int}= | Run keyword if | ${smt_used}
210 | | | ... | Evaluate | int(${cpu_count_int}*2)
211 | | | ... | ELSE | Set variable | ${thr_count_int}
212 | | | ${rxq_count_int}= | Run keyword if | ${rx_queues}
213 | | | ... | Set variable | ${rx_queues}
214 | | | ... | ELSE | Evaluate | int(${thr_count_int}/2)
215 | | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0
216 | | | ... | Set variable | ${1}
217 | | | ... | ELSE | Set variable | ${rxq_count_int}
218 | | | ${num_mbufs_int}= | Evaluate | int(${num_mbufs_int}*${rxq_count_int})
219 | | | Run keyword | ${dut}.Add CPU Main Core | ${cpu_main}
220 | | | Run keyword | ${dut}.Add CPU Corelist Workers | ${cpu_wt}
221 | | | Run keyword | ${dut}.Add DPDK Dev Default RXQ | ${rxq_count_int}
222 # Temporarily desabling due to API changes:
223 # https://gerrit.fd.io/r/#/c/16638/
224 #| | | Run keyword | ${dut}.Add DPDK Num Mbufs | ${num_mbufs_int}
225 | | | Run keyword if | ${thr_count_int} > 1
226 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD
227 | | | Set Tags | ${thr_count_int}T${cpu_count_int}C
228 | | Set Test Variable | ${smt_used}
229 | | Set Test Variable | ${thr_count_int}
230 | | Set Test Variable | ${cpu_count_int}
231 | | Set Test Variable | ${rxq_count_int}
233 | Create Kubernetes VSWITCH startup config on all DUTs
234 | | [Documentation] | Create base startup configuration of VSWITCH in Kubernetes
235 | | ... | deploy to all DUTs.
237 | | ... | *Arguments:*
238 | | ... | - ${jumbo} - Jumbo packet. Type: boolean
239 | | ... | - ${phy_cores} - Physical cores. Type: integer
240 | | ... | - ${rxq} - RX queues. Type: integer
244 | | ... | \| Create Kubernetes VSWITCH startup config on all DUTs \| ${True} \
245 | | ... | \| ${1} \| ${1}
247 | | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${jumbo}=${False}
249 | | ${cpu_count_int} | Convert to Integer | ${phy_cores}
250 | | ${thr_count_int} | Convert to Integer | ${phy_cores}
251 | | ${num_mbufs_int} | Convert to Integer | 16384
252 | | ${duts}= | Get Matches | ${nodes} | DUT*
253 | | :FOR | ${dut} | IN | @{duts}
254 | | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']}
255 | | | ... | ${${dut}_if1} | ${${dut}_if2}
256 | | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']}
257 | | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
258 | | | ${if2_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
259 | | | ${thr_count_int}= | Run keyword if | ${smt_used}
260 | | | ... | Evaluate | int(${cpu_count_int}*2)
261 | | | ... | ELSE | Set variable | ${thr_count_int}
262 | | | ${rxq_count_int}= | Run keyword if | ${rx_queues}
263 | | | ... | Set variable | ${rx_queues}
264 | | | ... | ELSE | Evaluate | int(${thr_count_int}/2)
265 | | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0
266 | | | ... | Set variable | ${1}
267 | | | ... | ELSE | Set variable | ${rxq_count_int}
268 | | | ${num_mbufs_int}= | Evaluate | int(${num_mbufs_int}*${rxq_count_int})
269 | | | ${config}= | Run keyword | Create Kubernetes VSWITCH startup config
270 | | | ... | node=${nodes['${dut}']} | phy_cores=${phy_cores}
271 | | | ... | cpu_node=${numa} | jumbo=${jumbo} | rxq_count_int=${rxq_count_int}
272 | | | ... | num_mbufs_int=${num_mbufs_int}
273 | | | ... | filename=/tmp/vswitch.conf | if1=${if1_pci} | if2=${if2_pci}
274 | | | Run keyword if | ${thr_count_int} > 1
275 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD
276 | | | Set Tags | ${thr_count_int}T${cpu_count_int}C
277 | | Set Test Variable | ${smt_used}
278 | | Set Test Variable | ${thr_count_int}
279 | | Set Test Variable | ${cpu_count_int}
280 | | Set Test Variable | ${rxq_count_int}
282 | Create Kubernetes VNF'${i}' startup config on all DUTs
283 | | [Documentation] | Create base startup configuration of VNF in Kubernetes
284 | | ... | deploy to all DUTs.
286 | | ${i_int}= | Convert To Integer | ${i}
287 | | ${cpu_skip}= | Evaluate | ${vswitch_cpus}+${system_cpus}
288 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
289 | | ... | ${dut1_if1} | ${dut1_if2}
290 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
291 | | ... | ${dut2_if1} | ${dut2_if2}
292 | | ${config}= | Run keyword | Create Kubernetes VNF startup config
293 | | ... | node=${dut1} | phy_cores=${vnf_cpus} | cpu_node=${dut1_numa}
294 | | ... | cpu_skip=${cpu_skip} | filename=/tmp/vnf${i}.conf
296 | | ${config}= | Run keyword | Create Kubernetes VNF startup config
297 | | ... | node=${dut2} | phy_cores=${vnf_cpus} | cpu_node=${dut2_numa}
298 | | ... | cpu_skip=${cpu_skip} | filename=/tmp/vnf${i}.conf
301 | Add no multi seg to all DUTs
302 | | [Documentation] | Add No Multi Seg to VPP startup configuration to all DUTs.
304 | | ${duts}= | Get Matches | ${nodes} | DUT*
305 | | :FOR | ${dut} | IN | @{duts}
306 | | | Run keyword | ${dut}.Add DPDK No Multi Seg
308 | Add DPDK no PCI to all DUTs
309 | | [Documentation] | Add DPDK no-pci to VPP startup configuration to all DUTs.
311 | | ${duts}= | Get Matches | ${nodes} | DUT*
312 | | :FOR | ${dut} | IN | @{duts}
313 | | | Run keyword | ${dut}.Add DPDK no PCI
315 | Add DPDK dev default RXD to all DUTs
316 | | [Documentation] | Add DPDK num-rx-desc to VPP startup configuration to all
319 | | ... | *Arguments:*
320 | | ... | - rxd - Number of RX descriptors. Type: string
324 | | ... | \| Add DPDK dev default RXD to all DUTs \| ${rxd} \|
326 | | [Arguments] | ${rxd}
328 | | ${duts}= | Get Matches | ${nodes} | DUT*
329 | | :FOR | ${dut} | IN | @{duts}
330 | | | Run keyword | ${dut}.Add DPDK Dev Default RXD | ${rxd}
332 | Add DPDK dev default TXD to all DUTs
333 | | [Documentation] | Add DPDK num-tx-desc to VPP startup configuration to all
336 | | ... | *Arguments:*
337 | | ... | - txd - Number of TX descriptors. Type: string
341 | | ... | \| Add DPDK dev default TXD to all DUTs \| ${txd} \|
343 | | [Arguments] | ${txd}
345 | | ${duts}= | Get Matches | ${nodes} | DUT*
346 | | :FOR | ${dut} | IN | @{duts}
347 | | | Run keyword | ${dut}.Add DPDK Dev Default TXD | ${txd}
349 | Add DPDK Uio Driver on all DUTs
350 | | [Documentation] | Add DPDK uio driver to VPP startup configuration on all
353 | | ... | *Arguments:*
354 | | ... | - uio_driver - Required uio driver. Type: string
358 | | ... | \| Add DPDK Uio Driver on all DUTs \| igb_uio \|
360 | | [Arguments] | ${uio_driver}
362 | | ${duts}= | Get Matches | ${nodes} | DUT*
363 | | :FOR | ${dut} | IN | @{duts}
364 | | | Run keyword | ${dut}.Add DPDK Uio Driver | ${uio_driver}
366 | Add NAT to all DUTs
367 | | [Documentation] | Add NAT configuration to all DUTs.
369 | | ${duts}= | Get Matches | ${nodes} | DUT*
370 | | :FOR | ${dut} | IN | @{duts}
371 | | | Run keyword | ${dut}.Add NAT
373 | Add cryptodev to all DUTs
374 | | [Documentation] | Add Cryptodev to VPP startup configuration to all DUTs.
376 | | ... | *Arguments:*
377 | | ... | - count - Number of QAT devices. Type: integer
381 | | ... | \| Add cryptodev to all DUTs \| ${4} \|
383 | | [Arguments] | ${count}
384 | | ${duts}= | Get Matches | ${nodes} | DUT*
385 | | :FOR | ${dut} | IN | @{duts}
386 | | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']}
387 | | | ${thr_count_int}= | Run keyword if | ${smt_used}
388 | | | ... | Evaluate | int(${count}*2)
389 | | | ... | ELSE | Set variable | ${count}
390 | | | Run keyword | ${dut}.Add DPDK Cryptodev | ${thr_count_int}
392 | Add DPDK SW cryptodev on DUTs in 3-node single-link circular topology
393 | | [Documentation] | Add required number of SW crypto devices of given type
394 | | ... | to VPP startup configuration on all DUTs in 3-node single-link
395 | | ... | circular topology.
397 | | ... | *Arguments:*
398 | | ... | - sw_pmd_type - PMD type of SW crypto device. Type: string
399 | | ... | - count - Number of SW crypto devices. Type: string
403 | | ... | \| Add DPDK SW cryptodev on DUTs in 3-node single-link circular\
404 | | ... | topology \| aesni-mb \| ${2} \|
406 | | [Arguments] | ${sw_pmd_type} | ${count}
407 | | ${smt_used}= | Is SMT enabled | ${nodes['DUT1']['cpuinfo']}
408 | | ${thr_count_int}= | Run keyword if | ${smt_used}
409 | | ... | Evaluate | int(${count}*2)
410 | | ... | ELSE | Set variable | ${count}
411 | | ${socket_id}= | Get Interface Numa Node | ${nodes['DUT1']} | ${dut1_if2}
412 | | Run keyword | DUT1.Add DPDK SW Cryptodev | ${sw_pmd_type} | ${socket_id}
413 | | ... | ${thr_count_int}
414 | | ${smt_used}= | Is SMT enabled | ${nodes['DUT2']['cpuinfo']}
415 | | ${thr_count_int}= | Run keyword if | ${smt_used}
416 | | ... | Evaluate | int(${count}*2)
417 | | ... | ELSE | Set variable | ${count}
418 | | ${socket_id}= | Get Interface Numa Node | ${nodes['DUT2']} | ${dut2_if1}
419 | | Run keyword | DUT2.Add DPDK SW Cryptodev | ${sw_pmd_type} | ${socket_id}
420 | | ... | ${thr_count_int}
422 | Apply startup configuration on all VPP DUTs
423 | | [Documentation] | Write startup configuration and restart VPP on all DUTs.
425 | | ... | *Arguments:*
426 | | ... | - restart_vpp - Whether to restart VPP (Optional). Type: boolean
430 | | ... | \| Apply startup configuration on all VPP DUTs \| ${False} \|
432 | | [Arguments] | ${restart_vpp}=${True}
434 | | ${duts}= | Get Matches | ${nodes} | DUT*
435 | | :FOR | ${dut} | IN | @{duts}
436 | | | Run keyword | ${dut}.Apply Config | restart_vpp=${restart_vpp}
437 | | Enable Coredump Limit VPP on All DUTs | ${nodes}
438 | | Update All Interface Data On All Nodes | ${nodes} | skip_tg=${True}
441 | | [Documentation] | Get PIDs of VPP processes from all DUTs in topology and\
442 | | ... | set it as a test variable. The PIDs are stored as dictionary items\
443 | | ... | where the key is the host and the value is the PID.
445 | | ${setup_vpp_pids}= | Get VPP PIDs | ${nodes}
446 | | ${keys}= | Get Dictionary Keys | ${setup_vpp_pids}
447 | | :FOR | ${key} | IN | @{keys}
448 | | | ${pid}= | Get From Dictionary | ${setup_vpp_pids} | ${key}
449 | | | Run Keyword If | $pid is None | FAIL | No VPP PID found on node ${key}
450 | | | Run Keyword If | ',' in '${pid}'
451 | | | ... | FAIL | More then one VPP PID found on node ${key}: ${pid}
452 | | Set Test Variable | ${setup_vpp_pids}
454 | Verify VPP PID in Teardown
455 | | [Documentation] | Check if the VPP PIDs on all DUTs are the same at the end\
456 | | ... | of test as they were at the begining. If they are not, only a message\
457 | | ... | is printed on console and to log. The test will not fail.
459 | | ${teardown_vpp_pids}= | Get VPP PIDs | ${nodes}
460 | | ${err_msg}= | Catenate | ${SUITE NAME} - ${TEST NAME}
461 | | ... | \nThe VPP PIDs are not equal!\nTest Setup VPP PIDs:
462 | | ... | ${setup_vpp_pids}\nTest Teardown VPP PIDs: ${teardown_vpp_pids}
463 | | ${rc} | ${msg}= | Run keyword and ignore error
464 | | ... | Dictionaries Should Be Equal
465 | | ... | ${setup_vpp_pids} | ${teardown_vpp_pids}
466 | | Run Keyword And Return If | '${rc}'=='FAIL' | Log | ${err_msg}
467 | | ... | console=yes | level=WARN
469 | Set up functional test
470 | | [Documentation] | Common test setup for functional tests.
472 | | Configure all DUTs before test
474 | | Configure all TGs for traffic script
475 | | Update All Interface Data On All Nodes | ${nodes}
476 | | Reset PAPI History On All DUTs | ${nodes}
478 | Tear down functional test
479 | | [Documentation] | Common test teardown for functional tests.
481 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
482 | | Show Packet Trace on All DUTs | ${nodes}
483 | | Show PAPI History On All DUTs | ${nodes}
484 | | Vpp Show Errors On All DUTs | ${nodes}
485 | | Verify VPP PID in Teardown
487 | Set up VPP device test
488 # TODO: Generalize this KW if it will not diverge from Functional derivate too
490 | | [Documentation] | Common test setup for vpp-device tests.
492 | | Configure all DUTs before test
494 | | Configure all TGs for traffic script
495 | | Update All Interface Data On All Nodes | ${nodes} | skip_tg_udev=${True}
496 | | Reset PAPI History On All DUTs | ${nodes}
498 | Tear down VPP device test
499 # TODO: Generalize this KW if it will not diverge from Functional derivate too
501 | | [Documentation] | Common test teardown for vpp-device tests.
503 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
504 | | Show Packet Trace on All DUTs | ${nodes}
505 | | Show PAPI History On All DUTs | ${nodes}
506 | | Vpp Show Errors On All DUTs | ${nodes}
507 | | Verify VPP PID in Teardown
509 | Tear down LISP functional test
510 | | [Documentation] | Common test teardown for functional tests with LISP.
512 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
513 | | Show Packet Trace on All DUTs | ${nodes}
514 | | Show PAPI History On All DUTs | ${nodes}
515 | | Show Vpp Settings | ${nodes['DUT1']}
516 | | Show Vpp Settings | ${nodes['DUT2']}
517 | | Vpp Show Errors On All DUTs | ${nodes}
518 | | Verify VPP PID in Teardown
520 | Tear down LISP functional test with QEMU
521 | | [Documentation] | Common test teardown for functional tests with LISP and\
524 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
525 | | Show Packet Trace on All DUTs | ${nodes}
526 | | Show PAPI History On All DUTs | ${nodes}
527 | | Show Vpp Settings | ${nodes['DUT1']}
528 | | Show Vpp Settings | ${nodes['DUT2']}
529 | | Vpp Show Errors On All DUTs | ${nodes}
531 | | Verify VPP PID in Teardown
533 | Set up TAP functional test
534 | | [Documentation] | Common test setup for functional tests with TAP.
536 | | Set up functional test
537 | | Clean Up Namespaces | ${nodes['DUT1']}
539 | Set up functional test with containers
541 | | ... | Common test setup for functional tests with containers.
543 | | ... | *Arguments:*
544 | | ... | - chains: Total number of chains (Optional). Type: integer, default
545 | | ... | value: ${1}
546 | | ... | - nodeness: Total number of nodes per chain (Optional). Type: integer,
547 | | ... | default value: ${1}
549 | | ... | _NOTE:_ This KW sets following test case variables:
550 | | ... | - dcr_uuid - Parent container UUID.
551 | | ... | - dcr_root - Parent container overlay.
555 | | ... | \| Set up functional test with containers \| 1 \| 1 \|
557 | | [Arguments] | ${chains}=${1} | ${nodeness}=${1}
559 | | Set Test Variable | @{container_groups} | @{EMPTY}
560 | | Set Test Variable | ${container_group} | CNF
561 | | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
562 | | ... | engine=${container_engine} | WITH NAME | ${container_group}
564 | | ${dcr_uuid}= | Get Environment Variable | CSIT_DUT1_UUID
565 | | ${dcr_root}= | Run Keyword | Get Docker Mergeddir | ${nodes['DUT1']}
566 | | ... | ${dcr_uuid}
567 | | Set Test Variable | ${dcr_uuid}
568 | | Set Test Variable | ${dcr_root}
570 | | Construct chains of containers on all DUTs | ${chains} | ${nodeness}
571 | | ... | nested=${True}
572 | | Acquire all '${container_group}' containers
573 | | Create all '${container_group}' containers
574 | | Configure VPP in all '${container_group}' containers
575 | | Start VPP in all '${container_group}' containers
576 | | Append To List | ${container_groups} | ${container_group}
578 | Tear down TAP functional test
579 | | [Documentation] | Common test teardown for functional tests with TAP.
581 | | Tear down functional test
582 | | Clean Up Namespaces | ${nodes['DUT1']}
584 | Tear down TAP functional test with Linux bridge
585 | | [Documentation] | Common test teardown for functional tests with TAP and
586 | | ... | a Linux bridge.
588 | | ... | *Arguments:*
589 | | ... | - bid_TAP - Bridge name. Type: string
593 | | ... | \| Tear down TAP functional test with Linux bridge \| ${bid_TAP} \|
595 | | [Arguments] | ${bid_TAP}
597 | | Tear down functional test
598 | | Linux Del Bridge | ${nodes['DUT1']} | ${bid_TAP}
599 | | Clean Up Namespaces | ${nodes['DUT1']}
601 | Tear down functional test with container
603 | | ... | Common test teardown for functional tests which uses containers.
605 | | :FOR | ${container_group} | IN | @{container_groups}
606 | | | Destroy all '${container_group}' containers
608 | Stop VPP Service on DUT
609 | | [Documentation] | Stop the VPP service on the specified node.
611 | | ... | *Arguments:*
612 | | ... | - node - information about a DUT node. Type: dictionary
616 | | ... | \| Stop VPP Service on DUT \| ${nodes['DUT1']} \|
618 | | [Arguments] | ${node}
619 | | Stop VPP Service | ${node}
621 | Start VPP Service on DUT
622 | | [Documentation] | Start the VPP service on the specified node.
624 | | ... | *Arguments:*
625 | | ... | - node - information about a DUT node. Type: dictionary
629 | | ... | \| Start VPP Service on DUT \| ${nodes['DUT1']} \|
631 | | [Arguments] | ${node}
632 | | Start VPP Service | ${node}