HC Test: address and cleanup test failures
[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 | Documentation | *Honeycomb NAT test suite.*
23 | Suite Teardown | Run Keyword If Any Tests Failed
24 | ... | Restart Honeycomb and VPP | ${node}
25 | Force Tags | honeycomb_sanity | honeycomb_odl
26
27 *** Test Cases ***
28 | TC01: Honeycomb configures NAT entry
29 | | [Documentation] | Honeycomb configures a static NAT entry.
30 | | Given NAT configuration from Honeycomb should be empty
31 | | ... | ${node} | ${nat_empty}
32 | | When Honeycomb Configures NAT Entry | ${node} | ${entry1}
33 | | Then NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
34
35 | TC02: Honeycomb removes NAT entry
36 | | [Documentation] | Honeycomb removes a configured static NAT entry.
37 | | Given NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
38 | | When Honeycomb Configures NAT Entry | ${node} | ${NONE}
39 | | Then NAT configuration from Honeycomb should be empty
40 | | ... | ${node} | ${nat_empty}
41
42 | TC03: Honeycomb configures multiple NAT entries
43 | | [Documentation] | Honeycomb configures two static NAT entries.
44 | | [Teardown] | Honeycomb Configures NAT Entry | ${node} | ${NONE}
45 | | Given NAT configuration from Honeycomb should be empty
46 | | ... | ${node} | ${nat_empty}
47 | | When Honeycomb Configures NAT Entry | ${node} | ${entry1} | ${0} | ${1}
48 | | And Honeycomb Configures NAT Entry | ${node} | ${entry2} | ${0} | ${2}
49 | | Then NAT Entries From Honeycomb Should Be
50 | | ... | ${node} | ${entry1_2_oper} | ${0}
51
52 | TC04: Honeycomb enables NAT on interface - inbound
53 | | [Documentation] | Honeycomb configures NAT on an interface\
54 | | ... | in inbound direction.
55 | | Given NAT Interface Configuration From Honeycomb Should Be Empty
56 | | ... | ${node} | ${interface} | inbound
57 | | And NAT Interface Configuration From Honeycomb Should Be Empty
58 | | ... | ${node} | ${interface} | outbound
59 | | When Honeycomb Configures NAT On Interface
60 | | ... | ${node} | ${interface} | inbound
61 | | Then NAT Interface Configuration From Honeycomb Should Be
62 | | ... | ${node} | ${interface} | inbound
63 | | And NAT Interface Configuration From Honeycomb Should be empty
64 | | ... | ${node} | ${interface} | outbound
65
66 | TC05: Honeycomb removes NAT interface configuration
67 | | [Documentation] | Honeycomb removes NAT configuration from an interface.
68 | | Given NAT Interface Configuration From Honeycomb Should Be
69 | | ... | ${node} | ${interface} | inbound
70 | | And NAT Interface Configuration From Honeycomb Should Be empty
71 | | ... | ${node} | ${interface} | outbound
72 | | When Honeycomb removes NAT interface configuration
73 | | ... | ${node} | ${interface} | inbound
74 | | Then NAT Interface Configuration From Honeycomb Should Be empty
75 | | ... | ${node} | ${interface} | inbound
76 | | And NAT Interface Configuration From Honeycomb Should Be empty
77 | | ... | ${node} | ${interface} | outbound
78
79 | TC06: Honeycomb enables NAT on interface - outbound
80 | | [Documentation] | Honeycomb configures NAT on an interface\
81 | | ... | in outbound direction.
82 | | [Teardown] | Honeycomb removes NAT interface configuration
83 | | ... | ${node} | ${interface} | outbound
84 | | Given NAT Interface Configuration From Honeycomb Should Be empty
85 | | ... | ${node} | ${interface} | inbound
86 | | And NAT Interface Configuration From Honeycomb Should Be empty
87 | | ... | ${node} | ${interface} | outbound
88 | | When Honeycomb Configures NAT on Interface
89 | | ... | ${node} | ${interface} | outbound
90 | | Then NAT Interface Configuration From Honeycomb Should Be empty
91 | | ... | ${node} | ${interface} | inbound
92 | | And NAT Interface Configuration From Honeycomb Should Be
93 | | ... | ${node} | ${interface} | outbound