HC Test: improve functional suite setup and teardown
[csit.git] / tests / func / honeycomb / mgmt-cfg-vxlangpe-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 to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17
18 # Parameters to be set on existing interface
19 | ${vxlan_gpe_existing_if}= | ${interface}
20 | &{vxlan_gpe_base_wrong_interface_settings}=
21 | ... | name=${vxlan_gpe_existing_if}
22 | ... | type=iana-if-type:ethernetCsmacd
23 | ... | description=for testing purposes
24 | ... | enabled=true
25 | ... | link-up-down-trap-enable=enabled
26 | &{vxlan_gpe_wrong_interface_settings}=
27 | ... | local=192.168.50.77
28 | ... | remote=192.168.50.72
29 | ... | vni=${9}
30 | ... | next-protocol=wrong_ipv4
31 | ... | encap-vrf-id=${0}
32 | ... | decap-vrf-id=${0}
33
34 *** Settings ***
35 | Resource | resources/libraries/robot/default.robot
36 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
37 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
38 | Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot
39 # Import additional VxLAN GPE settings from resource file
40 | Variables | resources/test_data/honeycomb/vxlan_gpe.py
41 | ...
42 | Documentation | *Honeycomb VxLAN-GPE management test suite.*
43 | ...
44 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
45 | ...
46 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
47 | ...
48 # Disabled due to VPP-875: Configuring VxLAN GPE tunnel crashes VPP
49 #| Force Tags | HC_FUNC
50
51 *** Test Cases ***
52 | TC01: Honeycomb creates VxLAN GPE tunnel
53 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel.
54 | | ...
55 | | Given interface Operational Data From Honeycomb Should Be empty
56 | | ... | ${node} | ${vxlan_gpe_if1}
57 | | And interface Operational Data From VAT Should Be empty
58 | | ... | ${node} | ${vxlan_gpe_if1}
59 | | When Honeycomb creates VxLAN GPE interface
60 | | ... | ${node} | ${vxlan_gpe_if1}
61 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
62 | | Then VxLAN GPE Operational Data From Honeycomb Should Be
63 | | ... | ${node} | ${vxlan_gpe_if1}
64 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
65 | | And VxLAN GPE Operational Data From VAT Should Be
66 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
67 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
68 | | ... | ${node} | ${vxlan_gpe_if1}
69
70 | TC02: Honeycomb removes VxLAN GPE tunnel
71 | | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel.
72 | | ...
73 | | Given VxLAN GPE Operational Data From Honeycomb Should Be
74 | | ... | ${node} | ${vxlan_gpe_if1}
75 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
76 | | VxLAN GPE Operational Data From VAT Should Be
77 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
78 | | When Honeycomb removes VxLAN GPE interface
79 | | ... | ${node} | ${vxlan_gpe_if1}
80 | | Then VxLAN GPE Operational Data From Honeycomb Should Be empty
81 | | ... | ${node} | ${vxlan_gpe_if1}
82 | | And VxLAN GPE Operational Data From VAT Should Be empty
83 | | ... | ${node}
84
85 | TC03: Honeycomb sets wrong interface type while creating VxLAN GPE tunnel
86 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
87 | | ... | with a wrong interface type set.
88 | | ...
89 | | Given interface Operational Data From Honeycomb Should Be empty
90 | | ... | ${node} | ${vxlan_gpe_if2}
91 | | And interface Operational Data From VAT Should Be empty
92 | | ... | ${node} | ${vxlan_gpe_if2}
93 | | When Honeycomb fails to create VxLAN GPE interface
94 | | ... | ${node} | ${vxlan_gpe_if2}
95 | | ... | ${vxlan_gpe_wrong_type_base_settings} | ${vxlan_gpe_settings}
96 | | Then interface Operational Data From Honeycomb Should Be empty
97 | | ... | ${node} | ${vxlan_gpe_if2}
98 | | And interface Operational Data From VAT Should Be empty
99 | | ... | ${node} | ${vxlan_gpe_if2}
100
101 | TC04: Honeycomb sets wrong protocol while creating VxLAN GPE tunnel
102 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
103 | | ... | with a wrong next-protocol set.
104 | | ...
105 | | Given interface Operational Data From Honeycomb Should Be empty
106 | | ... | ${node} | ${vxlan_gpe_if3}
107 | | And interface Operational Data From VAT Should Be empty
108 | | ... | ${node} | ${vxlan_gpe_if3}
109 | | When Honeycomb fails to create VxLAN GPE interface
110 | | ... | ${node} | ${vxlan_gpe_if3}
111 | | ... | ${vxlan_gpe_wrong_protocol_base_settings}
112 | | ... | ${vxlan_gpe_wrong_protocol_settings}
113 | | Then interface Operational Data From Honeycomb Should Be empty
114 | | ... | ${node} | ${vxlan_gpe_if3}
115 | | And interface Operational Data From VAT Should Be empty
116 | | ... | ${node} | ${vxlan_gpe_if3}
117
118 | TC05: Honeycomb sets VxLAN GPE tunnel on existing interface with wrong type
119 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
120 | | ... | on existing interface with wrong type.
121 | | ...
122 | | Given VxLAN GPE Operational Data From VAT Should Be empty
123 | | ... | ${node}
124 | | When Honeycomb fails to create VxLAN GPE interface
125 | | ... | ${node} | ${vxlan_gpe_existing_if}
126 | | ... | ${vxlan_gpe_base_wrong_interface_settings}
127 | | ... | ${vxlan_gpe_wrong_interface_settings}
128 | | Then VxLAN GPE Operational Data From VAT Should Be empty
129 | | ... | ${node}
130
131 | TC06: Honeycomb creates VxLAN GPE tunnel with ipv6
132 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel\
133 | | ... | with IPv6 addresses.
134 | | ...
135 | | Given VxLAN GPE Operational Data From VAT Should Be empty
136 | | ... | ${node}
137 | | And VxLAN GPE Operational Data From Honeycomb Should Be empty
138 | | ... | ${node} | ${vxlan_gpe_if5}
139 | | When Honeycomb creates VxLAN GPE interface
140 | | ... | ${node} | ${vxlan_gpe_if5}
141 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
142 | | Then VxLAN GPE Operational Data From Honeycomb Should Be
143 | | ... | ${node} | ${vxlan_gpe_if5}
144 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
145 | | And Run Keyword And Continue On Failure
146 | | ... | VxLAN GPE Operational Data From VAT Should Be
147 | | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings}
148 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
149 | | ... | ${node} | ${vxlan_gpe_if5}
150
151 | TC07: Honeycomb creates a second VxLAN GPE tunnel with ipv6
152 | | [Documentation] | Check if Honeycomb API can configure another VxLAN\
153 | | ... | GPE tunnel with IPv6 addresses.
154 | | ...
155 | | Given interface Operational Data From Honeycomb Should Be empty
156 | | ... | ${node} | ${vxlan_gpe_if6}
157 | | And interface Operational Data From VAT Should Be empty
158 | | ... | ${node} | ${vxlan_gpe_if6}
159 | | When Honeycomb creates VxLAN GPE interface
160 | | ... | ${node} | ${vxlan_gpe_if6}
161 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
162 | | Then VxLAN GPE Operational Data From Honeycomb Should Be
163 | | ... | ${node} | ${vxlan_gpe_if6}
164 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
165 | | And VxLAN GPE Operational Data From VAT Should Be
166 | | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2}
167 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
168 | | ... | ${node} | ${vxlan_gpe_if6}