CSIT-405: Honeycomb test update and cleanup
[csit.git] / tests / func / honeycomb / 031_vxlan_gpe.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 | Documentation | *Honeycomb VxLAN-GPE management test suite.*
42 | Force Tags | honeycomb_sanity
43 | Suite Teardown | Run Keyword If Any Tests Failed
44 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
45
46 *** Test Cases ***
47 # TODO: Remove "continue on failure" once VPP bugs (VPP-217, VPP-156) are fixed.
48 | Honeycomb creates VxLAN GPE tunnel
49 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel.
50 | | ...
51 | | Given interface configuration from Honeycomb should be empty
52 | | ... | ${node} | ${vxlan_gpe_if1}
53 | | And interface configuration from VAT should be empty
54 | | ... | ${node} | ${vxlan_gpe_if1}
55 | | When Honeycomb creates VxLAN GPE interface
56 | | ... | ${node} | ${vxlan_gpe_if1}
57 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
58 | | Then VxLAN GPE configuration from Honeycomb should be
59 | | ... | ${node} | ${vxlan_gpe_if1}
60 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
61 | | And run keyword and continue on failure
62 | | ... | VxLAN GPE configuration from VAT should be
63 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
64 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
65 | | ... | ${node} | ${vxlan_gpe_if1}
66
67 | Honeycomb removes VxLAN GPE tunnel
68 | | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel.
69 | | ...
70 | | Run Keyword And Continue On Failure
71 | | ... | Given VxLAN GPE configuration from Honeycomb should be
72 | | ... | ${node} | ${vxlan_gpe_if1}
73 | | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings}
74 | | Run Keyword And Continue On Failure
75 | | ... | And VxLAN GPE configuration from VAT should be
76 | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings}
77 | | When Honeycomb removes VxLAN GPE interface
78 | | ... | ${node} | ${vxlan_gpe_if1}
79 | | Then VxLAN GPE configuration from Honeycomb should be empty
80 | | ... | ${node} | ${vxlan_gpe_if1}
81 | | And VxLAN GPE configuration from VAT should be empty
82 | | ... | ${node}
83
84 | Honeycomb sets wrong interface type while creating VxLAN GPE tunnel
85 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
86 | | ... | with a wrong interface type set.
87 | | ...
88 | | Given interface configuration from Honeycomb should be empty
89 | | ... | ${node} | ${vxlan_gpe_if2}
90 | | And interface configuration from VAT should be empty
91 | | ... | ${node} | ${vxlan_gpe_if2}
92 | | When Honeycomb fails to create VxLAN GPE interface
93 | | ... | ${node} | ${vxlan_gpe_if2}
94 | | ... | ${vxlan_gpe_wrong_type_base_settings} | ${vxlan_gpe_settings}
95 | | Then interface configuration from Honeycomb should be empty
96 | | ... | ${node} | ${vxlan_gpe_if2}
97 | | And interface configuration from VAT should be empty
98 | | ... | ${node} | ${vxlan_gpe_if2}
99
100 | Honeycomb sets wrong protocol while creating VxLAN GPE tunnel
101 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
102 | | ... | with a wrong next-protocol set.
103 | | ...
104 | | Given interface configuration from Honeycomb should be empty
105 | | ... | ${node} | ${vxlan_gpe_if3}
106 | | And interface configuration from VAT should be empty
107 | | ... | ${node} | ${vxlan_gpe_if3}
108 | | When Honeycomb fails to create VxLAN GPE interface
109 | | ... | ${node} | ${vxlan_gpe_if3}
110 | | ... | ${vxlan_gpe_wrong_protocol_base_settings}
111 | | ... | ${vxlan_gpe_wrong_protocol_settings}
112 | | Then interface configuration from Honeycomb should be empty
113 | | ... | ${node} | ${vxlan_gpe_if3}
114 | | And interface configuration from VAT should be empty
115 | | ... | ${node} | ${vxlan_gpe_if3}
116
117 | Honeycomb sets VxLAN GPE tunnel on existing interface with wrong type
118 | | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\
119 | | ... | on existing interface with wrong type.
120 | | ...
121 | | Given VxLAN GPE configuration from VAT should be empty
122 | | ... | ${node}
123 | | When Honeycomb fails to create VxLAN GPE interface
124 | | ... | ${node} | ${vxlan_gpe_existing_if}
125 | | ... | ${vxlan_gpe_base_wrong_interface_settings}
126 | | ... | ${vxlan_gpe_wrong_interface_settings}
127 | | Then VxLAN GPE configuration from VAT should be empty
128 | | ... | ${node}
129
130 | Honeycomb creates VxLAN GPE tunnel with ipv6
131 | | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel\
132 | | ... | with IPv6 addresses.
133 | | ...
134 | | Given VxLAN GPE configuration from VAT should be empty
135 | | ... | ${node}
136 | | And VxLAN GPE configuration from Honeycomb should be empty
137 | | ... | ${node} | ${vxlan_gpe_if5}
138 | | When Honeycomb creates VxLAN GPE interface
139 | | ... | ${node} | ${vxlan_gpe_if5}
140 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
141 | | Then VxLAN GPE configuration from Honeycomb should be
142 | | ... | ${node} | ${vxlan_gpe_if5}
143 | | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings}
144 | | And Run Keyword And Continue On Failure
145 | | ... | VxLAN GPE configuration from VAT should be
146 | | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings}
147 | | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond
148 | | ... | ${node} | ${vxlan_gpe_if5}
149
150 | Honeycomb creates a second VxLAN GPE tunnel with ipv6
151 | | [Documentation] | Check if Honeycomb API can configure another VxLAN\
152 | | ... | GPE tunnel with IPv6 addresses.
153 | | ...
154 | | Given interface configuration from Honeycomb should be empty
155 | | ... | ${node} | ${vxlan_gpe_if6}
156 | | And interface configuration from VAT should be empty
157 | | ... | ${node} | ${vxlan_gpe_if6}
158 | | When Honeycomb creates VxLAN GPE interface
159 | | ... | ${node} | ${vxlan_gpe_if6}
160 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
161 | | Then VxLAN GPE configuration from Honeycomb should be
162 | | ... | ${node} | ${vxlan_gpe_if6}
163 | | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2}
164 | | And run keyword and continue on failure
165 | | ... | VxLAN GPE configuration 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}