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 Interface State Is | ${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 run keyword and continue on failure
49 | | ... | Sub-interface configuration from Honeycomb should be
50 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
51 | | And run keyword and continue on failure
52 | | ... | Sub-interface configuration from VAT should be
53 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
54 | | And sub-interface indices from Honeycomb and VAT should correspond
55 | | ... | ${node} | ${super_if} | ${sub_if_id}
57 | Honeycomb sets interface and sub-interface up
58 | | [Documentation] | Honeycomb changes the state of interface up and then \
59 | | ... | changes the state of its sub-interface up, in this order.
61 | | Given interface state from Honeycomb should be
62 | | ... | ${node} | ${super_if} | down
63 | | And interface state from VAT should be
64 | | ... | ${node} | ${super_if} | down
65 | | When Honeycomb sets interface state
66 | | ... | ${node} | ${super_if} | up
67 | | Then interface state from Honeycomb should be
68 | | ... | ${node} | ${super_if} | up
69 | | And interface state from VAT should be
70 | | ... | ${node} | ${super_if} | up
71 | | Given run keyword and continue on failure
72 | | ... | Sub-interface state from Honeycomb should be
73 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
74 | | And run keyword and continue on failure
75 | | ... | Sub-interface state from VAT should be
76 | | ... | ${node} | ${sub_if_name} | down | down
77 | | When Honeycomb sets the sub-interface up
78 | | ... | ${node} | ${super_if} | ${sub_if_id}
79 | | Then run keyword and continue on failure
80 | | ... | Sub-interface state from Honeycomb should be
81 | | ... | ${node} | ${super_if} | ${sub_if_id} | up | up
82 | | And sub-interface state from VAT should be
83 | | ... | ${node} | ${sub_if_name} | up | up
85 | Honeycomb sets sub-interface down while its super-interface is up
86 | | [Documentation] | Honeycomb sets the sub-interface down while its \
87 | | ... | super-interface is up. It must be possible.
89 | | [Teardown] | Set super and sub interfaces up
90 | | ... | ${node} | ${super_if} | ${sub_if_id}
92 | | Given sub-interface state from Honeycomb should be
93 | | ... | ${node} | ${super_if} | ${sub_if_id} | up | up
94 | | And sub-interface state from VAT should be
95 | | ... | ${node} | ${sub_if_name} | up | up
96 | | And interface state from Honeycomb should be
97 | | ... | ${node} | ${super_if} | up
98 | | And interface state from VAT should be
99 | | ... | ${node} | ${super_if} | up
100 | | When Honeycomb sets the sub-interface down
101 | | ... | ${node} | ${super_if} | ${sub_if_id}
102 | | Then sub-interface state from Honeycomb should be
103 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
104 | | And sub-interface state from VAT should be
105 | | ... | ${node} | ${sub_if_name} | down | down
106 | | And interface state from Honeycomb should be
107 | | ... | ${node} | ${super_if} | up
108 | | And interface state from VAT should be
109 | | ... | ${node} | ${super_if} | up
111 | Honeycomb sets interface and sub-interface down
112 | | [Documentation] | Honeycomb changes the state of interface down and then \
113 | | ... | changes the state of its sub-interface down, in this order.
115 | | [Teardown] | Set super and sub interfaces down
116 | | ... | ${node} | ${super_if} | ${sub_if_id}
118 | | Given interface state from Honeycomb should be
119 | | ... | ${node} | ${super_if} | up
120 | | And interface state from VAT should be
121 | | ... | ${node} | ${super_if} | up
122 | | When Honeycomb sets interface state
123 | | ... | ${node} | ${super_if} | down
124 | | Then interface state from Honeycomb should be
125 | | ... | ${node} | ${super_if} | down
126 | | And interface state from VAT should be
127 | | ... | ${node} | ${super_if} | down
128 | | Given sub-interface state from Honeycomb should be
129 | | ... | ${node} | ${super_if} | ${sub_if_id} | up | down
130 | | And sub-interface state from VAT should be
131 | | ... | ${node} | ${sub_if_name} | up | down
132 | | When Honeycomb sets the sub-interface down
133 | | ... | ${node} | ${super_if} | ${sub_if_id}
134 | | Then sub-interface state from Honeycomb should be
135 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
136 | | And sub-interface state from VAT should be
137 | | ... | ${node} | ${sub_if_name} | down | down
139 | Honeycomb fails to set sub-interface up while its super-interface is down
140 | | [Documentation] | Honeycomb tries to set the sub-interface up while its \
141 | | ... | super-interface is down. It must not be possible.
143 | | Given interface state from Honeycomb should be
144 | | ... | ${node} | ${super_if} | down
145 | | And interface state from VAT should be
146 | | ... | ${node} | ${super_if} | down
147 | | And sub-interface state from Honeycomb should be
148 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
149 | | And sub-interface state from VAT should be
150 | | ... | ${node} | ${sub_if_name} | down | down
151 | | When Honeycomb fails to set sub-interface up
152 | | ... | ${node} | ${super_if} | ${sub_if_id}
153 | | Then interface state from Honeycomb should be
154 | | ... | ${node} | ${super_if} | down
155 | | And interface state from VAT should be
156 | | ... | ${node} | ${super_if} | down
157 | | And sub-interface state from Honeycomb should be
158 | | ... | ${node} | ${super_if} | ${sub_if_id} | down | down
159 | | And sub-interface state from VAT should be
160 | | ... | ${node} | ${sub_if_name} | down | down
162 | Honeycomb fails to delete sub-interface
163 | | [Documentation] | Check if Honeycomb can delete an existing sub-interface.
165 | | [Setup] | Set super and sub interfaces down
166 | | ... | ${node} | ${super_if} | ${sub_if_id}
168 | | Given sub-interface configuration from Honeycomb should be
169 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
170 | | And sub-interface configuration from VAT should be
171 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
172 | | When Honeycomb fails to remove all sub-interfaces
173 | | ... | ${node} | ${super_if}
174 | | Then sub-interface configuration from Honeycomb should be
175 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
176 | | And sub-interface configuration from VAT should be
177 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
179 | Honeycomb adds sub-interface to new bridge domain
180 | | [Documentation] | Check if Honeycomb adds a sub-interface to bridge domain.
182 | | [Setup] | Set super and sub interfaces down
183 | | ... | ${node} | ${super_if} | ${sub_if_id}
185 | | Given sub-interface configuration from Honeycomb should be
186 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper}
187 | | And sub-interface configuration from VAT should be
188 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
189 | | When Honeycomb creates L2 bridge domain
190 | | ... | ${node} | ${bd_name} | ${bd_settings}
191 | | Then bridge domain configuration from Honeycomb should be
192 | | ... | ${node} | ${bd_name} | ${bd_settings}
193 | | When Honeycomb adds sub-interface to bridge domain
194 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
195 | | Then sub-interface bridge domain configuration from Honeycomb should be
196 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings}
197 | | And sub-interface bridge domain configuration from VAT should be
198 | | ... | ${node} | ${sub_if_name} | ${sub_bd_settings}
199 | | And sub-interface configuration from VAT should be
200 | | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper}
202 | Honeycomb enables tag-rewrite pop 1
203 | | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
204 | | ... | parameters correctly. Case: pop 1.
206 | | [Teardown] | Honeycomb disables tag rewrite
207 | | ... | ${node} | ${super_if} | ${sub_if_id}
209 | | Given rewrite tag from Honeycomb should be empty
210 | | ... | ${node} | ${super_if} | ${sub_if_id}
211 | | When Honeycomb configures tag rewrite
212 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
213 | | Then rewrite tag from Honeycomb should be
214 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
215 | | And rewrite tag from VAT should be
216 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
218 | Honeycomb enables tag-rewrite push
219 | | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
220 | | ... | parameters correctly. Case: push.
222 | | [Teardown] | Honeycomb disables tag rewrite
223 | | ... | ${node} | ${super_if} | ${sub_if_id}
225 | | Given rewrite tag from Honeycomb should be empty
226 | | ... | ${node} | ${super_if} | ${sub_if_id}
227 | | When Honeycomb configures tag rewrite
228 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push}
229 | | Then rewrite tag from Honeycomb should be
230 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper}
231 | | And rewrite tag from VAT should be
232 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT}
234 | Honeycomb enables tag-rewrite translate 1-2
235 | | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \
236 | | ... | parameters correctly. Case: translate 1-2.
238 | | [Teardown] | Honeycomb disables tag rewrite
239 | | ... | ${node} | ${super_if} | ${sub_if_id}
241 | | Given rewrite tag from Honeycomb should be empty
242 | | ... | ${node} | ${super_if} | ${sub_if_id}
243 | | When Honeycomb configures tag rewrite
244 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2}
245 | | Then rewrite tag from Honeycomb should be
246 | | ... | ${node} | ${super_if} | ${sub_if_id}
247 | | ... | ${tag_rewrite_translate_1_2_oper}
248 | | And rewrite tag from VAT should be
249 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT}
251 | Honeycomb disables tag-rewrite
252 | | [Documentation] | Check if Honeycomb disables the tag-rewrite.
254 | | [Teardown] | Honeycomb disables tag rewrite
255 | | ... | ${node} | ${super_if} | ${sub_if_id}
257 | | When Honeycomb configures tag rewrite
258 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
259 | | Then rewrite tag from Honeycomb should be
260 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
261 | | When Honeycomb configures tag rewrite
262 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}
263 | | Then rewrite tag from Honeycomb should be empty
264 | | ... | ${node} | ${super_if} | ${sub_if_id}
265 | | And rewrite tag from VAT should be
266 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
268 | Honeycomb enables tag-rewrite pop 1 again
269 | | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it \
270 | | ... | was disabled by Honeycomb.
272 | | [Teardown] | Honeycomb disables tag rewrite
273 | | ... | ${node} | ${super_if} | ${sub_if_id}
275 | | Given rewrite tag from Honeycomb should be empty
276 | | ... | ${node} | ${super_if} | ${sub_if_id}
277 | | When Honeycomb configures tag rewrite
278 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
279 | | Then rewrite tag from Honeycomb should be
280 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
281 | | And rewrite tag from VAT should be
282 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
284 | Honeycomb modifies the tag-rewrite
285 | | [Documentation] | Honeycomb sets the tag-rewrite:
286 | | ... | 1. pop 1, then
287 | | ... | 2. push, then
288 | | ... | 3. translate 1 - 2
289 | | ... | Then Honeycomb disables the tag-rewrite.
291 | | [Teardown] | Honeycomb disables tag rewrite
292 | | ... | ${node} | ${super_if} | ${sub_if_id}
294 | | Given rewrite tag from Honeycomb should be empty
295 | | ... | ${node} | ${super_if} | ${sub_if_id}
296 | | When Honeycomb configures tag rewrite
297 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1}
298 | | Then rewrite tag from Honeycomb should be
299 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper}
300 | | And rewrite tag from VAT should be
301 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT}
302 | | When Honeycomb configures tag rewrite
303 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push}
304 | | Then rewrite tag from Honeycomb should be
305 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper}
306 | | And rewrite tag from VAT should be
307 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT}
308 | | When Honeycomb configures tag rewrite
309 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2}
310 | | Then rewrite tag from Honeycomb should be
311 | | ... | ${node} | ${super_if} | ${sub_if_id}
312 | | ... | ${tag_rewrite_translate_1_2_oper}
313 | | And rewrite tag from VAT should be
314 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT}
315 | | When Honeycomb configures tag rewrite
316 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}
317 | | Then rewrite tag from Honeycomb should be empty
318 | | ... | ${node} | ${super_if} | ${sub_if_id}
319 | | And rewrite tag from VAT should be
320 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
322 | Honeycomb fails to set wrong vlan-type in tag-rewrite
323 | | [Documentation] | Check that Honeycomb does not accept wrong values of \
324 | | ... | vlan-type in tag-rewrite.
326 | | Given rewrite tag from Honeycomb should be empty
327 | | ... | ${node} | ${super_if} | ${sub_if_id}
328 | | When Honeycomb fails to set wrong rewrite tag
329 | | ... | ${node} | ${super_if} | ${sub_if_id}
330 | | ... | ${tag_rewrite_translate_1_2_wrong}
331 | | Then rewrite tag from Honeycomb should be empty
332 | | ... | ${node} | ${super_if} | ${sub_if_id}
333 | | And rewrite tag from VAT should be
334 | | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT}
336 | Honeycomb configures sub-interface ipv4 address
337 | | [Documentation] | Check if Honeycomb can configure an ipv4 address on the\
338 | | ... | sub-interface.
340 | | Given sub-interface ipv4 address from Honeycomb should be empty
341 | | ... | ${node} | ${super_if} | ${sub_if_id}
342 | | And sub-interface ipv4 address from VAT should be empty
343 | | ... | ${node} | ${sub_if_name}
344 | | When Honeycomb sets sub-interface ipv4 address
345 | | ... | ${node} | ${super_if} | ${sub_if_id}
346 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
347 | | Then sub-interface ipv4 address from Honeycomb should be
348 | | ... | ${node} | ${super_if} | ${sub_if_id}
349 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
350 | | And sub-interface ipv4 address from VAT should be
351 | | ... | ${node} | ${sub_if_name}
352 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
354 #TODO: Remove "continue on failure" once VPP bug VPP-132 is fixed.
355 | Honeycomb removes sub-interface ipv4 address
356 | | [Documentation] | Check if Honeycomb can remove configured ipv4 addresses\
357 | | ... | from the sub-interface.
359 | | Given sub-interface ipv4 address from Honeycomb should be
360 | | ... | ${node} | ${super_if} | ${sub_if_id}
361 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
362 | | Run Keyword And Continue On Failure
363 | | ... | And sub-interface ipv4 address from VAT should be
364 | | ... | ${node} | ${sub_if_name}
365 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
366 | | When Honeycomb removes all sub-interface ipv4 addresses
367 | | ... | ${node} | ${super_if} | ${sub_if_id}
368 | | Then sub-interface ipv4 address from Honeycomb should be empty
369 | | ... | ${node} | ${super_if} | ${sub_if_id}
370 | | And sub-interface ipv4 address from VAT should be empty
371 | | ... | ${node} | ${sub_if_name}
373 | Honeycomb modifies existing sub-interface ipv4 address
374 | | [Documentation] | Check if Honeycomb can modify an ipv4 address already\
375 | | ... | configured on the sub-interface.
376 | | [Teardown] | Honeycomb removes all sub-interface ipv4 addresses
377 | | ... | ${node} | ${super_if} | ${sub_if_id}
378 | | Given sub-interface ipv4 address from Honeycomb should be empty
379 | | ... | ${node} | ${super_if} | ${sub_if_id}
380 | | And sub-interface ipv4 address from VAT should be empty
381 | | ... | ${node} | ${sub_if_name}
382 | | When Honeycomb sets sub-interface ipv4 address
383 | | ... | ${node} | ${super_if} | ${sub_if_id}
384 | | ... | ${ipv4['address']} | ${ipv4['prefix-length']}
385 | | And Honeycomb sets sub-interface ipv4 address
386 | | ... | ${node} | ${super_if} | ${sub_if_id}
387 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
388 | | Then sub-interface ipv4 address from Honeycomb should be
389 | | ... | ${node} | ${super_if} | ${sub_if_id}
390 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
391 | | And sub-interface ipv4 address from VAT should be
392 | | ... | ${node} | ${sub_if_name}
393 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
396 | Set super and sub interfaces up
397 | | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \
398 | | ... | this order.
400 | | ... | *Arguments:*
401 | | ... | - node - Information about a DUT node. Type: dictionary
402 | | ... | - super_interface - Super interface. Type: string
403 | | ... | - identifier - Sub-interface identifier. Type: integer or string
406 | | ... | \| Set super and sub interfaces up\
407 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
409 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
411 | | Honeycomb sets interface state
412 | | ... | ${node} | ${super_interface} | up
413 | | Honeycomb sets the sub-interface up
414 | | ... | ${node} | ${super_interface} | ${identifier}
416 | Set super and sub interfaces down
417 | | [Documentation] | Honeycomb sets super-interface and sub-interface down, in\
418 | | ... | this order.
420 | | ... | *Arguments:*
421 | | ... | - node - Information about a DUT node. Type: dictionary
422 | | ... | - super_interface - Super interface. Type: string
423 | | ... | - identifier - Sub-interface identifier. Type: integer or string
426 | | ... | \| Set super and sub interfaces down\
427 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
429 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
431 | | Honeycomb sets interface state
432 | | ... | ${node} | ${super_interface} | down
433 | | Honeycomb sets the sub-interface down
434 | | ... | ${node} | ${super_interface} | ${identifier}
436 | Honeycomb disables tag rewrite
437 | | [Documentation] |
439 | | ... | *Arguments:*
440 | | ... | - node - Information about a DUT node. Type: dictionary
441 | | ... | - super_if - Super-interface. Type: string
442 | | ... | - identifier - Sub-interface ID. Type: integer or string
445 | | ... | \| Honeycomb disables tag rewrite \
446 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
448 | | [Arguments] | ${node} | ${super_if} | ${sub_if_id}
450 | | Honeycomb configures tag rewrite
451 | | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled}