FIX: Remove eth_avf and portX_vifY interfaces from topo in TC/TS tear down
[csit.git] / resources / libraries / robot / shared / suite_teardown.robot
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:
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 """Keywords used in suite teardowns."""
15
16 *** Settings ***
17 | Library | resources.libraries.python.DPDK.DPDKTools
18 | Library | resources.libraries.python.TrafficGenerator
19 | ...
20 | Documentation | Suite teardown keywords.
21
22 *** Keywords ***
23 | Tear down suite
24 | | [Documentation]
25 | | ... | Common suite teardown for tests.
26 | | ...
27 | | ... | *Arguments:*
28 | | ... | - ${actions} - Additional teardown action. Type: list
29 | | ...
30 | | [Arguments] | @{actions}
31 | | ...
32 | | :FOR | ${action} | IN | @{actions}
33 | | | Run Keyword | Additional Suite Tear Down Action For ${action}
34
35 | Additional Suite Tear Down Action For performance
36 | | [Documentation]
37 | | ... | Additional teardown for suites which uses performance measurement.
38 | | ...
39 | | Teardown traffic generator | ${tg}
40
41 | Additional Suite Tear Down Action For dpdk
42 | | [Documentation]
43 | | ... | Additional teardown for suites which uses dpdk.
44 | | ...
45 | | :FOR | ${dut} | IN | @{duts}
46 | | | Cleanup DPDK Environment
47 | | | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}
48
49 | Additional Suite Tear Down Action For vifs
50 | | [Documentation]
51 | | ... | Additional teardown for suites which uses Virtual Interfaces.
52 | | ...
53 | | Remove All Added VIF Ports On All DUTs From Topology | ${nodes}