1 # Copyright (c) 2020 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.
14 """Keywords used in test teardowns."""
17 | Resource | resources/libraries/robot/shared/container.robot
18 | Library | resources.libraries.python.PapiHistory
19 | Library | resources.libraries.python.topology.Topology
20 | Variables | resources/libraries/python/Constants.py
22 | Documentation | Test teardown keywords.
27 | | ... | Common test teardown for VPP tests.
29 | | ... | *Arguments:*
30 | | ... | - ${actions} - Additional teardown action. Type: list
32 | | [Arguments] | @{actions}
34 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
35 | | Show PAPI History On All DUTs | ${nodes}
36 | | Run Keyword If Test Failed
37 | | ... | Show Log On All DUTs | ${nodes}
38 | | Run Keyword If Test Failed
39 | | ... | Get Core Files on All Nodes | ${nodes}
40 | | Run Keyword If Test Failed
41 | | ... | Verify VPP PID in Teardown
42 | | Run Keyword If Test Failed
43 | | ... | VPP Show Memory On All DUTs | ${nodes}
44 | | FOR | ${action} | IN | @{actions}
45 | | | Run Keyword | Additional Test Tear Down Action For ${action}
47 | | Clean Sockets On All Nodes | ${nodes}
51 | | ... | Common test teardown for raw tests.
53 | | ... | *Arguments:*
54 | | ... | - ${actions} - Additional teardown action. Type: list
56 | | [Arguments] | @{actions}
58 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
59 | | FOR | ${action} | IN | @{actions}
60 | | | Run Keyword | Additional Test Tear Down Action For ${action}
62 | | Clean Sockets On All Nodes | ${nodes}
64 | Additional Test Tear Down Action For performance
66 | | ... | Additional teardown for tests which uses performance measurement.
68 | | Run Keyword If Test Failed
69 | | ... | Send traffic at specified rate | ${1.0} | 10000
70 | | ... | ${frame_size} | ${traffic_profile} | trial_multiplicity=${1}
71 | | ... | extended_debug=${True}
73 | Additional Test Tear Down Action For packet_trace
75 | | ... | Additional teardown for tests which uses packet trace.
77 | | Show Packet Trace on All DUTs | ${nodes}
79 | Additional Test Tear Down Action For container
81 | | ... | Additional teardown for tests which uses containers.
83 | | FOR | ${container_group} | IN | @{container_groups}
84 | | | Destroy all '${container_group}' containers
87 | Additional Test Tear Down Action For vhost
89 | | ... | Additional teardown for tests which uses vhost(s) and VM(s).
91 | | Show VPP vhost on all DUTs | ${nodes}
92 | | ${vnf_status} | ${value}= | Run Keyword And Ignore Error
93 | | ... | Keyword Should Exist | vnf_manager.Kill All VMs
94 | | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs
96 | Additional Test Tear Down Action For vhost-pt
98 | | ... | Additional teardown for tests which uses pci-passtrough and VM(s).
100 | | ${vnf_status} | ${value}= | Run Keyword And Ignore Error
101 | | ... | Keyword Should Exist | vnf_manager.Kill All VMs
102 | | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs
104 | Additional Test Tear Down Action For nat
106 | | ... | Additional teardown for tests which uses NAT feature.
108 | | FOR | ${dut} | IN | @{duts}
109 | | | Run Keyword If Test Failed
110 | | | ... | Show NAT verbose | ${nodes['${dut}']}
113 | Additional Test Tear Down Action For namespace
115 | | ... | Additional teardown for tests which uses namespace.
117 | | FOR | ${dut} | IN | @{duts}
118 | | | Clean Up Namespaces | ${nodes['${dut}']}
121 | Additional Test Tear Down Action For linux_bridge
123 | | ... | Additional teardown for tests which uses linux_bridge.
125 | | FOR | ${dut} | IN | @{duts}
126 | | | Linux Del Bridge | ${nodes['${dut}']} | ${bid_TAP}
129 | Additional Test Tear Down Action For acl
131 | | ... | Additional teardown for tests which uses ACL feature.
133 | | Run Keyword If Test Failed
134 | | ... | Vpp Log Plugin Acl Settings | ${dut1}
135 | | Run Keyword If Test Failed
136 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
138 | Additional Test Tear Down Action For macipacl
140 | | ... | Additional teardown for tests which uses MACIP ACL feature.
142 | | Run Keyword If Test Failed
143 | | ... | Vpp Log Macip Acl Settings | ${dut1}
144 | | Run Keyword If Test Failed
145 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
147 | Additional Test Tear Down Action For classify
149 | | ... | Additional teardown for tests which uses classify tables.
151 | | Run Keyword If Test Failed
152 | | ... | Show Classify Tables Verbose on all DUTs | ${nodes}
154 | Additional Test Tear Down Action For srv6
156 | | ... | Additional teardown for tests which uses SRv6.
158 | | Run Keyword If Test Failed
159 | | ... | Show SR Policies on all DUTs | ${nodes}
160 | | Run Keyword If Test Failed
161 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
162 | | Run Keyword If Test Failed
163 | | ... | Show SR LocalSIDs on all DUTs | ${nodes}