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 | | Show Log On All DUTs | ${nodes}
37 | | Run Keyword If Test Failed
38 | | ... | Get Core Files on All Nodes | ${nodes}
39 | | Run Keyword If Test Failed
40 | | ... | Verify VPP PID in Teardown
41 | | :FOR | ${action} | IN | @{actions}
42 | | | Run Keyword | Additional Test Tear Down Action For ${action}
43 | | Clean Sockets On All Nodes | ${nodes}
45 | Additional Test Tear Down Action For performance
47 | | ... | Additional teardown for tests which uses performance measurement.
49 | | Run Keyword If Test Failed
50 | | ... | Send traffic at specified rate | ${PERF_TRIAL_DURATION} | 10000pps
51 | | ... | ${frame_size} | ${traffic_profile} | pkt_trace=${True}
53 | Additional Test Tear Down Action For packet_trace
55 | | ... | Additional teardown for tests which uses packet trace.
57 | | Show Packet Trace on All DUTs | ${nodes}
59 | Additional Test Tear Down Action For container
61 | | ... | Additional teardown for tests which uses containers.
63 | | :FOR | ${container_group} | IN | @{container_groups}
64 | | | Destroy all '${container_group}' containers
66 | Additional Test Tear Down Action For vhost
68 | | ... | Additional teardown for tests which uses vhost(s) and VM(s).
70 | | Show VPP vhost on all DUTs | ${nodes}
71 | | ${vnf_status} | ${value}= | Run Keyword And Ignore Error
72 | | ... | Keyword Should Exist | vnf_manager.Kill All VMs
73 | | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs
75 | Additional Test Tear Down Action For nat
77 | | ... | Additional teardown for tests which uses NAT feature.
79 | | :FOR | ${dut} | IN | @{duts}
80 | | | Run Keyword If Test Failed
81 | | | ... | Show NAT verbose | ${nodes['${dut}']}
83 | Additional Test Tear Down Action For namespace
85 | | ... | Additional teardown for tests which uses namespace.
87 | | :FOR | ${dut} | IN | @{duts}
88 | | | Clean Up Namespaces | ${nodes['${dut}']}
90 | Additional Test Tear Down Action For linux_bridge
92 | | ... | Additional teardown for tests which uses linux_bridge.
94 | | :FOR | ${dut} | IN | @{duts}
95 | | | Linux Del Bridge | ${nodes['${dut}']} | ${bid_TAP}
97 | Additional Test Tear Down Action For acl
99 | | ... | Additional teardown for tests which uses ACL feature.
101 | | Run Keyword If Test Failed
102 | | ... | Vpp Log Plugin Acl Settings | ${dut1}
103 | | Run Keyword If Test Failed
104 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
106 | Additional Test Tear Down Action For macipacl
108 | | ... | Additional teardown for tests which uses MACIP ACL feature.
110 | | Run Keyword If Test Failed
111 | | ... | Vpp Log Macip Acl Settings | ${dut1}
112 | | Run Keyword If Test Failed
113 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
115 | Additional Test Tear Down Action For classify
117 | | ... | Additional teardown for tests which uses classify tables.
119 | | Run Keyword If Test Failed
120 | | ... | Show Classify Tables Verbose on all DUTs | ${nodes}
122 | Additional Test Tear Down Action For srv6
124 | | ... | Additional teardown for tests which uses SRv6.
126 | | Run Keyword If Test Failed
127 | | ... | Show SR Policies on all DUTs | ${nodes}
128 | | Run Keyword If Test Failed
129 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
130 | | Run Keyword If Test Failed
131 | | ... | Show SR LocalSIDs on all DUTs | ${nodes}