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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
17 | Resource | resources/libraries/robot/honeycomb/sub_interface.robot
18 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
19 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
20 | Variables | resources/test_data/honeycomb/sub_interfaces.py
21 | Suite Teardown | Run keywords
22 | ... | Run Keyword If Any Tests Failed
23 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
24 | ... | AND | Honeycomb removes all bridge domains | ${node}
25 | Force Tags | honeycomb_sanity
26 | Documentation | *Honeycomb sub-interface management test suite.*
28 | ... | This test suite tests if it is posible to create, modify and \
29 | ... | delete a sub-interface.
32 # Test interface 1 and its sub-interface parameters:
33 | ${super_if}= | ${node['interfaces']['port1']['name']}
34 | ${sub_if_id}= | ${sub_if_1_settings['identifier']}
35 | ${sub_if_name}= | ${super_if}.${sub_if_id}
38 | Honycomb creates sub-interface
39 | | [Documentation] | Check if Honeycomb creates a sub-interface.
41 | | Given Honeycomb sets interface state | ${node} | ${super_if} | down
42 | | And sub-interface configuration from Honeycomb should be empty
43 | | ... | ${node} | ${super_if} | ${sub_if_id}
44 | | And interface configuration from VAT should be empty
45 | | ... | ${node} | ${sub_if_name}
46 | | When Honeycomb creates sub-interface | ${node} | ${super_if}
47 | | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings}
48 | | Then Sub-interface configuration from Honeycomb should be
49 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
50 | | And Sub-interface configuration from VAT should be
51 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
52 | | And sub-interface indices from Honeycomb and VAT should correspond
53 | | ... | ${node} | ${super_if} | ${sub_if_id}
55 | Honeycomb sets interface and sub-interface up
56 | | [Documentation] | Honeycomb changes the state of interface\
57 | | ... | and of its sub-interface to up.
59 | | Given interface state from Honeycomb should be
60 | | ... | ${node} | ${super_if} | down
61 | | And interface state from VAT should be
62 | | ... | ${node} | ${super_if} | down
63 | | Sub-interface state from Honeycomb should be
64 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
65 | | Sub-interface state from VAT should be
66 | | ... | ${node} | ${sub_if_name} | down | down
67 | | When Honeycomb sets interface state
68 | | ... | ${node} | ${super_if} | up
69 | | Then interface state from Honeycomb should be
70 | | ... | ${node} | ${super_if} | up
71 | | And interface state from VAT should be
72 | | ... | ${node} | ${super_if} | up
73 | | When Honeycomb sets the sub-interface up
74 | | ... | ${node} | ${super_if} | ${sub_if_id}
75 | | Then Sub-interface state from Honeycomb should be
76 | | ... | ${node} | ${super_if} | ${sub_if_id} | up | up
77 | | And sub-interface state from VAT should be
78 | | ... | ${node} | ${sub_if_name} | up | up
80 | Honeycomb sets sub-interface down while its super-interface is up
81 | | [Documentation] | Honeycomb sets the sub-interface down while its \
82 | | ... | super-interface is up. It must be possible.
84 | | [Teardown] | Set super and sub interfaces up
85 | | ... | ${node} | ${super_if} | ${sub_if_id}
87 | | Given sub-interface state from Honeycomb should be
88 | | ... | ${node} | ${super_if} | ${sub_if_id} | up | up
89 | | And sub-interface state from VAT should be
90 | | ... | ${node} | ${sub_if_name} | up | up
91 | | And interface state from Honeycomb should be
92 | | ... | ${node} | ${super_if} | up
93 | | And interface state from VAT should be
94 | | ... | ${node} | ${super_if} | up
95 | | When Honeycomb sets the sub-interface down
96 | | ... | ${node} | ${super_if} | ${sub_if_id}
97 | | Then interface state from Honeycomb should be
98 | | ... | ${node} | ${super_if} | up
99 | | And interface state from VAT should be
100 | | ... | ${node} | ${super_if} | up
101 | | And sub-interface state from Honeycomb should be
102 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | up
103 | | And sub-interface state from VAT should be
104 | | ... | ${node} | ${sub_if_name} | down | up
106 | Honeycomb sets interface and sub-interface down
107 | | [Documentation] | Honeycomb changes the state of interface down and then \
108 | | ... | changes the state of its sub-interface down, in this order.
110 | | [Teardown] | Set super and sub interfaces down
111 | | ... | ${node} | ${super_if} | ${sub_if_id}
113 | | Given interface state from Honeycomb should be
114 | | ... | ${node} | ${super_if} | up
115 | | And interface state from VAT should be
116 | | ... | ${node} | ${super_if} | up
117 | | When Honeycomb sets interface state
118 | | ... | ${node} | ${super_if} | down
119 | | Then interface state from Honeycomb should be
120 | | ... | ${node} | ${super_if} | down
121 | | And interface state from VAT should be
122 | | ... | ${node} | ${super_if} | down
123 | | Given sub-interface state from Honeycomb should be
124 | | ... | ${node} | ${super_if} | ${sub_if_id} | up | down
125 | | And sub-interface state from VAT should be
126 | | ... | ${node} | ${sub_if_name} | up | down
127 | | When Honeycomb sets the sub-interface down
128 | | ... | ${node} | ${super_if} | ${sub_if_id}
129 | | Then sub-interface state from Honeycomb should be
130 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
131 | | And sub-interface state from VAT should be
132 | | ... | ${node} | ${sub_if_name} | down | down
134 | Honeycomb fails to set sub-interface up while its super-interface is down
135 | | [Documentation] | Honeycomb tries to set the sub-interface up while its \
136 | | ... | super-interface is down. It must not be possible.
138 | | Given interface state from Honeycomb should be
139 | | ... | ${node} | ${super_if} | down
140 | | And interface state from VAT should be
141 | | ... | ${node} | ${super_if} | down
142 | | And sub-interface state from Honeycomb should be
143 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
144 | | And sub-interface state from VAT should be
145 | | ... | ${node} | ${sub_if_name} | down | down
146 | | When Honeycomb fails to set sub-interface up
147 | | ... | ${node} | ${super_if} | ${sub_if_id}
148 | | Then interface state from Honeycomb should be
149 | | ... | ${node} | ${super_if} | down
150 | | And interface state from VAT should be
151 | | ... | ${node} | ${super_if} | down
152 | | And sub-interface state from Honeycomb should be
153 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
154 | | And sub-interface state from VAT should be
155 | | ... | ${node} | ${sub_if_name} | down | down
157 | Honeycomb fails to delete sub-interface
158 | | [Documentation] | Check if Honeycomb can delete an existing sub-interface.
160 | | [Setup] | Set super and sub interfaces down
161 | | ... | ${node} | ${super_if} | ${sub_if_id}
163 | | Given sub-interface configuration from Honeycomb should be
164 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
165 | | And sub-interface configuration from VAT should be
166 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
167 | | When Honeycomb fails to remove all sub-interfaces
168 | | ... | ${node} | ${super_if}
169 | | Then sub-interface configuration from Honeycomb should be
170 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
171 | | And sub-interface configuration from VAT should be
172 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
174 | Honeycomb adds sub-interface to new bridge domain
175 | | [Documentation] | Check if Honeycomb adds a sub-interface to bridge domain.
177 | | [Setup] | Set super and sub interfaces down
178 | | ... | ${node} | ${super_if} | ${sub_if_id}
180 | | Given sub-interface configuration from Honeycomb should be
181 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
182 | | And sub-interface configuration from VAT should be
183 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
184 | | When Honeycomb creates first L2 bridge domain
185 | | ... | ${node} | ${bd_name} | ${bd_settings}
186 | | Then bridge domain configuration from Honeycomb should be
187 | | ... | ${node} | ${bd_name} | ${bd_settings}
188 | | When Honeycomb adds sub-interface to bridge domain
189 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
190 | | Then sub-interface bridge domain configuration from Honeycomb should be
191 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
192 | | And sub-interface bridge domain configuration from VAT should be
193 | | ... | ${node} | ${sub_if_name} | ${sub_bd_settings}
194 | | And sub-interface configuration from VAT should be
195 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
197 | Honeycomb enables tag-rewrite pop 1
198 | | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
199 | | ... | parameters correctly. Case: pop 1.
201 | | [Teardown] | Honeycomb disables tag rewrite
202 | | ... | ${node} | ${super_if} | ${sub_if_id}
204 | | Given rewrite tag from Honeycomb should be empty
205 | | ... | ${node} | ${super_if} | ${sub_if_id}
206 | | When Honeycomb configures tag rewrite
207 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
208 | | Then rewrite tag from Honeycomb should be
209 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
210 | | And rewrite tag from VAT should be
211 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
213 | Honeycomb enables tag-rewrite push
214 | | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
215 | | ... | parameters correctly. Case: push.
217 | | [Teardown] | Honeycomb disables tag rewrite
218 | | ... | ${node} | ${super_if} | ${sub_if_id}
220 | | Given rewrite tag from Honeycomb should be empty
221 | | ... | ${node} | ${super_if} | ${sub_if_id}
222 | | When Honeycomb configures tag rewrite
223 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push}
224 | | Then rewrite tag from Honeycomb should be
225 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper}
226 | | And rewrite tag from VAT should be
227 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT}
229 | Honeycomb enables tag-rewrite translate 1-2
230 | | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
231 | | ... | parameters correctly. Case: translate 1-2.
233 | | [Teardown] | Honeycomb disables tag rewrite
234 | | ... | ${node} | ${super_if} | ${sub_if_id}
236 | | Given rewrite tag from Honeycomb should be empty
237 | | ... | ${node} | ${super_if} | ${sub_if_id}
238 | | When Honeycomb configures tag rewrite
239 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2}
240 | | Then rewrite tag from Honeycomb should be
241 | | ... | ${node} | ${super_if} | ${sub_if_id}
242 | | ... | ${tag_rewrite_translate_1_2_oper}
243 | | And rewrite tag from VAT should be
244 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT}
246 | Honeycomb disables tag-rewrite
247 | | [Documentation] | Check if Honeycomb disables the tag-rewrite.
249 | | [Teardown] | Honeycomb disables tag rewrite
250 | | ... | ${node} | ${super_if} | ${sub_if_id}
252 | | When Honeycomb configures tag rewrite
253 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
254 | | Then rewrite tag from Honeycomb should be
255 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
256 | | When Honeycomb configures tag rewrite
257 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}
258 | | Then rewrite tag from Honeycomb should be empty
259 | | ... | ${node} | ${super_if} | ${sub_if_id}
260 | | And rewrite tag from VAT should be
261 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
263 | Honeycomb enables tag-rewrite pop 1 again
264 | | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it \
265 | | ... | was disabled by Honeycomb.
267 | | [Teardown] | Honeycomb disables tag rewrite
268 | | ... | ${node} | ${super_if} | ${sub_if_id}
270 | | Given rewrite tag from Honeycomb should be empty
271 | | ... | ${node} | ${super_if} | ${sub_if_id}
272 | | When Honeycomb configures tag rewrite
273 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
274 | | Then rewrite tag from Honeycomb should be
275 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
276 | | And rewrite tag from VAT should be
277 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
279 | Honeycomb modifies the tag-rewrite
280 | | [Documentation] | Honeycomb sets the tag-rewrite:
281 | | ... | 1. pop 1, then
282 | | ... | 2. push, then
283 | | ... | 3. translate 1 - 2
284 | | ... | Then Honeycomb disables the tag-rewrite.
286 | | [Teardown] | Honeycomb disables tag rewrite
287 | | ... | ${node} | ${super_if} | ${sub_if_id}
289 | | Given rewrite tag from Honeycomb should be empty
290 | | ... | ${node} | ${super_if} | ${sub_if_id}
291 | | When Honeycomb configures tag rewrite
292 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
293 | | Then rewrite tag from Honeycomb should be
294 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
295 | | And rewrite tag from VAT should be
296 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
297 | | When Honeycomb configures tag rewrite
298 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push}
299 | | Then rewrite tag from Honeycomb should be
300 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper}
301 | | And rewrite tag from VAT should be
302 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT}
303 | | When Honeycomb configures tag rewrite
304 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2}
305 | | Then rewrite tag from Honeycomb should be
306 | | ... | ${node} | ${super_if} | ${sub_if_id}
307 | | ... | ${tag_rewrite_translate_1_2_oper}
308 | | And rewrite tag from VAT should be
309 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT}
310 | | When Honeycomb configures tag rewrite
311 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}
312 | | Then rewrite tag from Honeycomb should be empty
313 | | ... | ${node} | ${super_if} | ${sub_if_id}
314 | | And rewrite tag from VAT should be
315 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
317 | Honeycomb fails to set wrong vlan-type in tag-rewrite
318 | | [Documentation] | Check that Honeycomb does not accept wrong values of \
319 | | ... | vlan-type in tag-rewrite.
321 | | Given rewrite tag from Honeycomb should be empty
322 | | ... | ${node} | ${super_if} | ${sub_if_id}
323 | | When Honeycomb fails to set wrong rewrite tag
324 | | ... | ${node} | ${super_if} | ${sub_if_id}
325 | | ... | ${tag_rewrite_translate_1_2_wrong}
326 | | Then rewrite tag from Honeycomb should be empty
327 | | ... | ${node} | ${super_if} | ${sub_if_id}
328 | | And rewrite tag from VAT should be
329 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
331 | Honeycomb configures sub-interface ipv4 address
332 | | [Documentation] | Check if Honeycomb can configure an ipv4 address on the\
333 | | ... | sub-interface.
335 | | Given sub-interface ipv4 address from Honeycomb should be empty
336 | | ... | ${node} | ${super_if} | ${sub_if_id}
337 | | And sub-interface ipv4 address from VAT should be empty
338 | | ... | ${node} | ${sub_if_name}
339 | | When Honeycomb sets sub-interface ipv4 address
340 | | ... | ${node} | ${super_if} | ${sub_if_id}
341 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
342 | | Then sub-interface ipv4 address from Honeycomb should be
343 | | ... | ${node} | ${super_if} | ${sub_if_id}
344 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
345 | | And sub-interface ipv4 address from VAT should be
346 | | ... | ${node} | ${sub_if_name}
347 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
349 | Honeycomb removes sub-interface ipv4 address
350 | | [Documentation] | Check if Honeycomb can remove configured ipv4 addresses\
351 | | ... | from the sub-interface.
353 | | Given sub-interface ipv4 address from Honeycomb should be
354 | | ... | ${node} | ${super_if} | ${sub_if_id}
355 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
356 | | Run Keyword And Continue On Failure
357 | | ... | And sub-interface ipv4 address from VAT should be
358 | | ... | ${node} | ${sub_if_name}
359 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
360 | | When Honeycomb removes all sub-interface ipv4 addresses
361 | | ... | ${node} | ${super_if} | ${sub_if_id}
362 | | Then sub-interface ipv4 address from Honeycomb should be empty
363 | | ... | ${node} | ${super_if} | ${sub_if_id}
364 | | And sub-interface ipv4 address from VAT should be empty
365 | | ... | ${node} | ${sub_if_name}
367 | Honeycomb modifies existing sub-interface ipv4 address
368 | | [Documentation] | Check if Honeycomb can modify an ipv4 address already\
369 | | ... | configured on the sub-interface.
370 | | [Teardown] | Honeycomb removes all sub-interface ipv4 addresses
371 | | ... | ${node} | ${super_if} | ${sub_if_id}
372 | | Given sub-interface ipv4 address from Honeycomb should be empty
373 | | ... | ${node} | ${super_if} | ${sub_if_id}
374 | | And sub-interface ipv4 address from VAT should be empty
375 | | ... | ${node} | ${sub_if_name}
376 | | When Honeycomb sets sub-interface ipv4 address
377 | | ... | ${node} | ${super_if} | ${sub_if_id}
378 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
379 | | And Honeycomb sets sub-interface ipv4 address
380 | | ... | ${node} | ${super_if} | ${sub_if_id}
381 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
382 | | Then sub-interface ipv4 address from Honeycomb should be
383 | | ... | ${node} | ${super_if} | ${sub_if_id}
384 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
385 | | And sub-interface ipv4 address from VAT should be
386 | | ... | ${node} | ${sub_if_name}
387 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
390 | Set super and sub interfaces up
391 | | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \
392 | | ... | this order.
394 | | ... | *Arguments:*
395 | | ... | - node - Information about a DUT node. Type: dictionary
396 | | ... | - super_interface - Super interface. Type: string
397 | | ... | - identifier - Sub-interface identifier. Type: integer or string
400 | | ... | \| Set super and sub interfaces up\
401 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
403 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
405 | | Honeycomb sets interface state
406 | | ... | ${node} | ${super_interface} | up
407 | | Honeycomb sets the sub-interface up
408 | | ... | ${node} | ${super_interface} | ${identifier}
410 | Set super and sub interfaces down
411 | | [Documentation] | Honeycomb sets super-interface and sub-interface down, in\
412 | | ... | this order.
414 | | ... | *Arguments:*
415 | | ... | - node - Information about a DUT node. Type: dictionary
416 | | ... | - super_interface - Super interface. Type: string
417 | | ... | - identifier - Sub-interface identifier. Type: integer or string
420 | | ... | \| Set super and sub interfaces down\
421 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
423 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
425 | | Honeycomb sets interface state
426 | | ... | ${node} | ${super_interface} | down
427 | | Honeycomb sets the sub-interface down
428 | | ... | ${node} | ${super_interface} | ${identifier}
430 | Honeycomb disables tag rewrite
431 | | [Documentation] |
433 | | ... | *Arguments:*
434 | | ... | - node - Information about a DUT node. Type: dictionary
435 | | ... | - super_if - Super-interface. Type: string
436 | | ... | - identifier - Sub-interface ID. Type: integer or string
439 | | ... | \| Honeycomb disables tag rewrite \
440 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
442 | | [Arguments] | ${node} | ${super_if} | ${sub_if_id}
444 | | Honeycomb configures tag rewrite
445 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}