CSIT-664: Refactor setups and teardowns
[csit.git] / tests / func / honeycomb / mgmt-cfg-snat44-apihc-apivat-func.robot
1 # Copyright (c) 2016 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 *** Variables***
15 | ${interface}= | ${node['interfaces']['port1']['name']}
16
17 *** Settings ***
18 | Resource | resources/libraries/robot/default.robot
19 | Resource | resources/libraries/robot/honeycomb/nat.robot
20 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
21 | Variables | resources/test_data/honeycomb/nat.py | ${node} | ${interface}
22 | ...
23 | Documentation | *Honeycomb NAT test suite.*
24 | ...
25 | Suite Teardown | Run Keyword If Any Tests Failed
26 | ... | Restart Honeycomb and VPP | ${node}
27 | ...
28 | Force Tags | HC_FUNC
29
30 *** Test Cases ***
31 | TC01: Honeycomb configures NAT entry
32 | | [Documentation] | Honeycomb configures a static NAT entry.
33 | | ...
34 | | Given NAT Operational Data From Honeycomb Should Be empty
35 | | ... | ${node} | ${nat_empty}
36 | | When Honeycomb Configures NAT Entry | ${node} | ${entry1}
37 | | Then NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
38
39 | TC02: Honeycomb removes NAT entry
40 | | [Documentation] | Honeycomb removes a configured static NAT entry.
41 | | ...
42 | | Given NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
43 | | When Honeycomb Configures NAT Entry | ${node} | ${NONE}
44 | | Then NAT Operational Data From Honeycomb Should Be empty
45 | | ... | ${node} | ${nat_empty}
46
47 | TC03: Honeycomb configures multiple NAT entries
48 | | [Documentation] | Honeycomb configures two static NAT entries.
49 | | ...
50 | | [Teardown] | Honeycomb Configures NAT Entry | ${node} | ${NONE}
51 | | ...
52 | | Given NAT Operational Data From Honeycomb Should Be empty
53 | | ... | ${node} | ${nat_empty}
54 | | When Honeycomb Configures NAT Entry | ${node} | ${entry1} | ${0} | ${1}
55 | | And Honeycomb Configures NAT Entry | ${node} | ${entry2} | ${0} | ${2}
56 | | Then NAT Entries From Honeycomb Should Be
57 | | ... | ${node} | ${entry1_2_oper} | ${0}
58
59 | TC04: Honeycomb enables NAT on interface - inbound
60 | | [Documentation] | Honeycomb configures NAT on an interface\
61 | | ... | in inbound direction.
62 | | ...
63 | | Given NAT Interface Operational Data From Honeycomb Should Be Empty
64 | | ... | ${node} | ${interface} | inbound
65 | | And NAT Interface Operational Data From Honeycomb Should Be Empty
66 | | ... | ${node} | ${interface} | outbound
67 | | When Honeycomb Configures NAT On Interface
68 | | ... | ${node} | ${interface} | inbound
69 | | Then NAT Interface Operational Data From Honeycomb Should Be
70 | | ... | ${node} | ${interface} | inbound
71 | | And NAT Interface Operational Data From Honeycomb Should Be empty
72 | | ... | ${node} | ${interface} | outbound
73
74 | TC05: Honeycomb removes NAT interface configuration
75 | | [Documentation] | Honeycomb removes NAT configuration from an interface.
76 | | ...
77 | | Given NAT Interface Operational Data From Honeycomb Should Be
78 | | ... | ${node} | ${interface} | inbound
79 | | And NAT Interface Operational Data From Honeycomb Should Be empty
80 | | ... | ${node} | ${interface} | outbound
81 | | When Honeycomb removes NAT interface configuration
82 | | ... | ${node} | ${interface} | inbound
83 | | Then NAT Interface Operational Data From Honeycomb Should Be empty
84 | | ... | ${node} | ${interface} | inbound
85 | | And NAT Interface Operational Data From Honeycomb Should Be empty
86 | | ... | ${node} | ${interface} | outbound
87
88 | TC06: Honeycomb enables NAT on interface - outbound
89 | | [Documentation] | Honeycomb configures NAT on an interface\
90 | | ... | in outbound direction.
91 | | ...
92 | | [Teardown] | Honeycomb removes NAT interface configuration
93 | | ... | ${node} | ${interface} | outbound
94 | | ...
95 | | Given NAT Interface Operational Data From Honeycomb Should Be empty
96 | | ... | ${node} | ${interface} | inbound
97 | | And NAT Interface Operational Data From Honeycomb Should Be empty
98 | | ... | ${node} | ${interface} | outbound
99 | | When Honeycomb Configures NAT on Interface
100 | | ... | ${node} | ${interface} | outbound
101 | | Then NAT Interface Operational Data From Honeycomb Should Be empty
102 | | ... | ${node} | ${interface} | inbound
103 | | And NAT Interface Operational Data From Honeycomb Should Be
104 | | ... | ${node} | ${interface} | outbound