HC Test: add test for vlan sub-interface exact tag match
[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 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 | | Given NAT Interface Configuration From Honeycomb Should Be Empty
59 | | ... | ${node} | ${interface} | inbound
60 | | And NAT Interface Configuration From Honeycomb Should Be Empty
61 | | ... | ${node} | ${interface} | outbound
62 | | When Honeycomb Configures NAT On Interface
63 | | ... | ${node} | ${interface} | inbound
64 | | Then NAT Interface Configuration From Honeycomb Should Be
65 | | ... | ${node} | ${interface} | inbound
66 | | And NAT Interface Configuration From VAT Should Be
67 | | ... | ${node} | ${nat_interface_vat_in}
68 | | And NAT Interface Configuration From Honeycomb Should be empty
69 | | ... | ${node} | ${interface} | outbound
70
71 | TC05: Honeycomb removes NAT interface configuration
72 | | [Documentation] | Honeycomb removes NAT configuration from an interface.
73 | | Given NAT Interface Configuration From Honeycomb Should Be
74 | | ... | ${node} | ${interface} | inbound
75 | | And NAT Interface Configuration From Honeycomb Should Be empty
76 | | ... | ${node} | ${interface} | outbound
77 | | When Honeycomb removes NAT interface configuration
78 | | ... | ${node} | ${interface} | inbound
79 | | Then NAT Interface Configuration From Honeycomb Should Be empty
80 | | ... | ${node} | ${interface} | inbound
81 | | And NAT Interface Configuration From Honeycomb Should Be empty
82 | | ... | ${node} | ${interface} | outbound
83
84 | TC06: Honeycomb enables NAT on interface - outbound
85 | | [Documentation] | Honeycomb configures NAT on an interface\
86 | | ... | in outbound direction.
87 | | [Teardown] | Honeycomb removes NAT interface configuration
88 | | ... | ${node} | ${interface} | outbound
89 | | Given NAT Interface Configuration From Honeycomb Should Be empty
90 | | ... | ${node} | ${interface} | inbound
91 | | And NAT Interface Configuration From Honeycomb Should Be empty
92 | | ... | ${node} | ${interface} | outbound
93 | | When Honeycomb Configures NAT on Interface
94 | | ... | ${node} | ${interface} | outbound
95 | | Then NAT Interface Configuration From Honeycomb Should Be empty
96 | | ... | ${node} | ${interface} | inbound
97 | | And NAT Interface Configuration From Honeycomb Should Be
98 | | ... | ${node} | ${interface} | outbound
99 | | And NAT Interface Configuration From VAT Should Be
100 | | ... | ${node} | ${nat_interface_vat_out}