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.
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 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 | | ... | Get Core Files on All Nodes | ${nodes}
38 | | Run Keyword If Test Failed
39 | | ... | Verify VPP PID in Teardown
40 | | Run Keyword If Test Failed
41 | | ... | VPP Show Memory On All DUTs | ${nodes}
42 | | FOR | ${action} | IN | @{actions}
43 | | | Run Keyword | Additional Test Tear Down Action For ${action}
45 | | Clean Sockets On All Nodes | ${nodes}
47 | Additional Test Tear Down Action For performance
49 | | ... | Additional teardown for tests which uses performance measurement.
51 | | Run Keyword If Test Failed
52 | | ... | Send traffic at specified rate | ${PERF_TRIAL_DURATION} | 10000pps
53 | | ... | ${frame_size} | ${traffic_profile} | pkt_trace=${True}
55 | Additional Test Tear Down Action For packet_trace
57 | | ... | Additional teardown for tests which uses packet trace.
59 | | Show Packet Trace on All DUTs | ${nodes}
61 | Additional Test Tear Down Action For container
63 | | ... | Additional teardown for tests which uses containers.
65 | | FOR | ${container_group} | IN | @{container_groups}
66 | | | Destroy all '${container_group}' containers
69 | Additional Test Tear Down Action For vhost
71 | | ... | Additional teardown for tests which uses vhost(s) and VM(s).
73 | | Show VPP vhost on all DUTs | ${nodes}
74 | | ${vnf_status} | ${value}= | Run Keyword And Ignore Error
75 | | ... | Keyword Should Exist | vnf_manager.Kill All VMs
76 | | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs
78 | Additional Test Tear Down Action For nat
80 | | ... | Additional teardown for tests which uses NAT feature.
82 | | FOR | ${dut} | IN | @{duts}
83 | | | Run Keyword If Test Failed
84 | | | ... | Show NAT verbose | ${nodes['${dut}']}
87 | Additional Test Tear Down Action For namespace
89 | | ... | Additional teardown for tests which uses namespace.
91 | | FOR | ${dut} | IN | @{duts}
92 | | | Clean Up Namespaces | ${nodes['${dut}']}
95 | Additional Test Tear Down Action For linux_bridge
97 | | ... | Additional teardown for tests which uses linux_bridge.
99 | | FOR | ${dut} | IN | @{duts}
100 | | | Linux Del Bridge | ${nodes['${dut}']} | ${bid_TAP}
103 | Additional Test Tear Down Action For acl
105 | | ... | Additional teardown for tests which uses ACL feature.
107 | | Run Keyword If Test Failed
108 | | ... | Vpp Log Plugin Acl Settings | ${dut1}
109 | | Run Keyword If Test Failed
110 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
112 | Additional Test Tear Down Action For macipacl
114 | | ... | Additional teardown for tests which uses MACIP ACL feature.
116 | | Run Keyword If Test Failed
117 | | ... | Vpp Log Macip Acl Settings | ${dut1}
118 | | Run Keyword If Test Failed
119 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
121 | Additional Test Tear Down Action For classify
123 | | ... | Additional teardown for tests which uses classify tables.
125 | | Run Keyword If Test Failed
126 | | ... | Show Classify Tables Verbose on all DUTs | ${nodes}
128 | Additional Test Tear Down Action For srv6
130 | | ... | Additional teardown for tests which uses SRv6.
132 | | Run Keyword If Test Failed
133 | | ... | Show SR Policies on all DUTs | ${nodes}
134 | | Run Keyword If Test Failed
135 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
136 | | Run Keyword If Test Failed
137 | | ... | Show SR LocalSIDs on all DUTs | ${nodes}