d761cabe52a940702376f6b1a295c6a0392c828e
[csit.git] / tests / func / honeycomb / 130_nat.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 And Clear Persisted Configuration | ${node}
25 | Force Tags | honeycomb_sanity
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 | | And NAT Entries From VAT Should Be | ${node} | ${entry1_vat}
35
36 | TC02: Honeycomb removes NAT entry
37 | | [Documentation] | Honeycomb removes a configured static NAT entry.
38 | | Given NAT Entries From Honeycomb Should Be | ${node} | ${entry1}
39 | | And NAT Entries From VAT Should Be | ${node} | ${entry1_vat}
40 | | When Honeycomb Configures NAT Entry | ${node} | ${NONE}
41 | | Then NAT configuration from Honeycomb should be empty
42 | | ... | ${node} | ${nat_empty}
43
44 | TC03: Honeycomb configures multiple NAT entries
45 | | [Documentation] | Honeycomb configures two static NAT entries.
46 | | [Teardown] | Honeycomb Configures NAT Entry | ${node} | ${NONE}
47 | | Given NAT configuration from Honeycomb should be empty
48 | | ... | ${node} | ${nat_empty}
49 | | When Honeycomb Configures NAT Entry | ${node} | ${entry1} | ${0} | ${1}
50 | | And Honeycomb Configures NAT Entry | ${node} | ${entry2} | ${0} | ${2}
51 | | Then NAT Entries From Honeycomb Should Be
52 | | ... | ${node} | ${entry1_2_oper} | ${0}
53 | | And NAT Entries From VAT Should Be | ${node} | ${entry1_2_vat}
54
55 | TC04: Honeycomb enables NAT on interface - inbound
56 | | [Documentation] | Honeycomb configures NAT on an interface\
57 | | ... | in inbound direction.
58 # Interface config not visible in VAT - https://jira.fd.io/browse/HC2VPP-8
59 | | [Tags] | EXPECTED_FAILING
60 | | Given NAT Interface Configuration From Honeycomb Should Be Empty
61 | | ... | ${node} | ${interface} | inbound
62 | | And NAT Interface Configuration From Honeycomb Should Be Empty
63 | | ... | ${node} | ${interface} | outbound
64 | | When Honeycomb Configures NAT On Interface
65 | | ... | ${node} | ${interface} | inbound
66 | | Then NAT Interface Configuration From Honeycomb Should Be
67 | | ... | ${node} | ${interface} | inbound
68 | | And NAT Interface Configuration From VAT Should Be
69 | | ... | ${node} | ${nat_interface_vat_in}
70 | | And NAT Interface Configuration From Honeycomb Should be empty
71 | | ... | ${node} | ${interface} | outbound
72
73 | TC05: Honeycomb removes NAT interface configuration
74 | | [Documentation] | Honeycomb removes NAT configuration from an interface.
75 | | Given NAT Interface Configuration From Honeycomb Should Be
76 | | ... | ${node} | ${interface} | inbound
77 | | And NAT Interface Configuration From Honeycomb Should Be empty
78 | | ... | ${node} | ${interface} | outbound
79 | | When Honeycomb removes NAT interface configuration
80 | | ... | ${node} | ${interface} | inbound
81 | | Then NAT Interface Configuration From Honeycomb Should Be empty
82 | | ... | ${node} | ${interface} | inbound
83 | | And NAT Interface Configuration From Honeycomb Should Be empty
84 | | ... | ${node} | ${interface} | outbound
85
86 | TC06: Honeycomb enables NAT on interface - outbound
87 | | [Documentation] | Honeycomb configures NAT on an interface\
88 | | ... | in outbound direction.
89 # Interface config not visible in VAT - https://jira.fd.io/browse/HC2VPP-8
90 | | [Tags] | EXPECTED_FAILING
91 | | [Teardown] | Honeycomb removes NAT interface configuration
92 | | ... | ${node} | ${interface} | outbound
93 | | Given NAT Interface Configuration From Honeycomb Should Be empty
94 | | ... | ${node} | ${interface} | inbound
95 | | And NAT Interface Configuration From Honeycomb Should Be empty
96 | | ... | ${node} | ${interface} | outbound
97 | | When Honeycomb Configures NAT on Interface
98 | | ... | ${node} | ${interface} | outbound
99 | | Then NAT Interface Configuration From Honeycomb Should Be empty
100 | | ... | ${node} | ${interface} | inbound
101 | | And NAT Interface Configuration From Honeycomb Should Be
102 | | ... | ${node} | ${interface} | outbound
103 | | And NAT Interface Configuration From VAT Should Be
104 | | ... | ${node} | ${nat_interface_vat_out}