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 | Library | resources.libraries.python.InterfaceUtil
16 | Library | resources.libraries.python.L2Util
17 | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
18 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
19 | Documentation | Keywords used to manipulate sub-interfaces.
22 | Honeycomb creates sub-interface
23 | | [Documentation] | Create a sub-interface using Honeycomb API.
25 | | ... | *Arguments:*
26 | | ... | - node - Information about a DUT node. Type: dictionary
27 | | ... | - super_interface - Super-interface where a sub-interface will be\
28 | | ... | created. Type: string
29 | | ... | - match - Match type. Type: string
30 | | ... | - tags - List of tags to be set while creating the sub-interface.\
32 | | ... | - sub_interface_settings - Sub-inteface parameters to be set while\
33 | | ... | creating the sub-interface. Type: dictionary
36 | | ... | \| Honeycomb creates sub-interface\
37 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0\
38 | | ... | \| vlan-tagged-exact-match \| ${sub_if_1_tags}\
39 | | ... | \| ${sub_if_1_settings} \|
41 | | [Arguments] | ${node} | ${super_interface}
42 | | ... | ${match} | ${tags} | ${sub_interface_settings}
44 | | Honeycomb Create sub interface | ${node} | ${super_interface}
45 | | ... | ${match} | ${tags} | &{sub_interface_settings}
47 | Sub-interface Operational Data From Honeycomb Should Be
48 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb\
49 | | ... | and compares it with settings supplied in argument.
51 | | ... | *Arguments:*
52 | | ... | - node - Information about a DUT node. Type: dictionary
53 | | ... | - super_interface - Super-interface. Type: string
54 | | ... | - identifier - Sub-interface ID. Type: integer or string
55 | | ... | - sub_if_settings - Operational data for sub-interface to be checked.\
56 | | ... | Type: dictionary
59 | | ... | \| Sub-interface Operational Data From Honeycomb Should Be\
60 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
61 | | ... | \| ${sub_if_1_params} \|
63 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
64 | | ... | ${sub_if_settings}
66 | | ${api_data}= | Get sub interface oper data
67 | | ... | ${node} | ${super_interface} | ${identifier}
68 | | Compare Data Structures | ${api_data} | ${sub_if_settings}
70 | Sub-interface Operational Data From Honeycomb Should Be empty
71 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
72 | | ... | and expects no data.
74 | | ... | *Arguments:*
75 | | ... | - node - Information about a DUT node. Type: dictionary
76 | | ... | - super_interface - Super-interface. Type: string
77 | | ... | - identifier - Sub-interface ID. Type: integer or string
80 | | ... | \| Sub-interface Operational Data From Honeycomb Should Be empty\
81 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
83 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
85 | | Run keyword and expect error | *KeyError: 'vpp-vlan:sub-interfaces'*
86 | | ... | Get sub interface oper data
87 | | ... | ${node} | ${super_interface} | ${identifier}
89 | Sub-interface state from Honeycomb should be
90 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
91 | | ... | and checks the administrative and operational state.
93 | | ... | *Arguments:*
94 | | ... | - node - Information about a DUT node. Type: dictionary
95 | | ... | - super_interface - Super-interface. Type: string
96 | | ... | - identifier - Sub-interface ID. Type: integer or string
97 | | ... | - admin_state - Required administrative state - up or down. \
98 | | ... | Type: string
99 | | ... | - oper_state - Required operational state - up or down. Type: string
102 | | ... | \| Sub-interface state from Honeycomb should be\
103 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| up \| up \|
105 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
106 | | ... | ${admin_state} | ${oper_state}
108 | | ${api_data}= | Get sub interface oper data
109 | | ... | ${node} | ${super_interface} | ${identifier}
110 | | Should be equal | ${api_data['admin-status']} | ${admin_state}
111 | | Should be equal | ${api_data['oper-status']} | ${oper_state}
113 | Sub-interface Operational Data From VAT Should Be
114 | | [Documentation] | Retrieves sub-interface configuration through VAT and\
115 | | ... | compares it with settings supplied in argument.
117 | | ... | *Arguments:*
118 | | ... | - node - Information about a DUT node. Type: dictionary
119 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
120 | | ... | Type: string
121 | | ... | - sub_interface_settings - Operational data specific for a\
122 | | ... | sub-interface to be checked. Type: dictionary
125 | | ... | \| Sub-interface Operational Data From VAT Should Be\
126 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_if_1_params} \|
128 | | [Arguments] | ${node} | ${sub_interface} | ${sub_interface_settings}
130 | | ${vat_data}= | VPP get interface data
131 | | ... | ${node} | ${sub_interface}
132 | | Should be equal as strings | ${vat_data['sub_id']}
133 | | ... | ${sub_interface_settings['identifier']}
134 | | Should be equal as strings
135 | | ... | ${vat_data['interface_name']} | ${sub_interface}
136 | | Run keyword if | ${vat_data['link_up_down']} == 0
137 | | ... | Should be equal as strings
138 | | ... | ${sub_interface_settings['oper-status']} | down
139 | | Run keyword if | ${vat_data['link_up_down']} == 1
140 | | ... | Should be equal as strings
141 | | ... | ${sub_interface_settings['oper-status']} | up
143 | Sub-interface state from VAT should be
144 | | [Documentation] | Retrieves sub-interface configuration through VAT and \
145 | | ... | checks the administrative and operational state.
147 | | ... | *Arguments:*
148 | | ... | - node - Information about a DUT node. Type: dictionary
149 | | ... | - sub_interface - Name of an sub-interface on the specified node. \
150 | | ... | Type: string
151 | | ... | - admin_state - Required administrative state - up or down. \
152 | | ... | Type: string
153 | | ... | - oper_state - Required operational state - up or down. Type: string
156 | | ... | \| Sub-interface state from VAT should be \
157 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| up \| up \|
159 | | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state}
161 | | ${vat_data}= | VPP get interface data
162 | | ... | ${node} | ${sub_interface}
163 | | Run keyword if | '${admin_state}' == 'down'
164 | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 0
165 | | Run keyword if | '${admin_state}' == 'up'
166 | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 1
167 | | Run keyword if | '${oper_state}' == 'down'
168 | | ... | Should be equal as strings | ${vat_data['link_up_down']} | 0
169 | | Run keyword if | '${oper_state}' == 'up'
170 | | ... | Should be equal as strings | ${vat_data['link_up_down']} | 1
172 | Sub-interface indices from Honeycomb and VAT should correspond
173 | | [Documentation] | Uses VAT and Honeycomb to get operational data about the\
174 | | ... | given sub-interface and compares the interface indexes. The
175 | | ... | sub-interface index from Honeycomb should be greater than index from
176 | | ... | VAT by one.
178 | | ... | *Arguments:*
179 | | ... | - node - Information about a DUT node. Type: dictionary
180 | | ... | - super_interface - Super-interface. Type: string
181 | | ... | - identifier - Sub-interface ID. Type: integer or string
185 | | ... | \| Sub-interface indices from Honeycomb and VAT should correspond \
186 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
188 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
190 | | ${api_data}= | Get sub interface oper data
191 | | ... | ${node} | ${super_interface} | ${identifier}
192 | | ${vat_data}= | VPP get interface data
193 | | ... | ${node} | ${super_interface}.${identifier}
194 | | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1
195 | | Should be equal as strings
196 | | ... | ${api_data['if-index']} | ${sw_if_index}
198 | Honeycomb sets the sub-interface up
199 | | [Documentation] | Honeycomb sets the sub-interface up.
201 | | ... | *Arguments:*
202 | | ... | - node - Information about a DUT node. Type: dictionary
203 | | ... | - super_interface - Super-interface. Type: string
204 | | ... | - identifier - Sub-interface ID. Type: integer or string
207 | | ... | Honeycomb sets the sub-interface up\
208 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
210 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
212 | | Set sub interface state
213 | | ... | ${node} | ${super_interface} | ${identifier} | up
215 | Honeycomb sets the sub-interface down
216 | | [Documentation] | Honeycomb sets the sub-interface down.
218 | | ... | *Arguments:*
219 | | ... | - node - Information about a DUT node. Type: dictionary
220 | | ... | - super_interface - Super-interface. Type: string
221 | | ... | - identifier - Sub-interface ID. Type: integer or string
224 | | ... | Honeycomb sets the sub-interface down\
225 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
227 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
229 | | Set sub interface state
230 | | ... | ${node} | ${super_interface} | ${identifier} | down
232 | Honeycomb fails to set sub-interface up
233 | | [Documentation] | Honeycomb tries to set sub-interface up and expects error.
235 | | ... | *Arguments:*
236 | | ... | - node - Information about a DUT node. Type: dictionary
237 | | ... | - super_interface - Super-interface. Type: string
238 | | ... | - identifier - Sub-interface ID. Type: integer or string
241 | | ... | \| Honeycomb fails to set sub-interface up\
242 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
244 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
246 | | Run keyword and expect error | *HoneycombError: * was not successful. * 500.
247 | | ... | Set sub interface state
248 | | ... | ${node} | ${super_interface} | ${identifier} | up
250 | Honeycomb adds sub-interface to bridge domain
251 | | [Documentation] | Honeycomb adds the given sub-interface to bridge domain.
253 | | ... | *Arguments:*
254 | | ... | - node - Information about a DUT node. Type: dictionary
255 | | ... | - super_if - Super-interface. Type: string
256 | | ... | - identifier - Sub-interface ID. Type: integer or string
257 | | ... | - sub_bd_setings - Bridge domain parameters to be set while adding\
258 | | ... | the sub-interface to the bridge domain. Type: dictionary
261 | | ... | \| Honeycomb adds sub-interface to bridge domain\
262 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
264 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
266 | | Add bridge domain to sub interface
267 | | ... | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
269 | Sub-interface bridge domain Operational Data From Honeycomb Should Be
270 | | [Documentation] | Uses Honeycomb API to verify sub-interface assignment to\
271 | | ... | a bridge domain.
273 | | ... | *Arguments:*
274 | | ... | - node - Information about a DUT node. Type: dictionary
275 | | ... | - super_if - Super-interface. Type: string
276 | | ... | - identifier - Sub-interface ID. Type: integer or string
277 | | ... | - settings - Bridge domain parameters to be checked. Type: dictionary
280 | | ... | \| Sub-interface bridge domain Operational Data From Honeycomb Should Be\
281 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
283 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
285 | | ${if_data}= | Get BD data from sub interface
286 | | ... | ${node} | ${super_if} | ${identifier}
287 | | Should be equal | ${if_data['bridge-domain']}
288 | | ... | ${settings['bridge-domain']}
290 | Sub-interface bridge domain Operational Data From VAT Should Be
291 | | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\
294 | | ... | *Arguments:*
295 | | ... | - node - Information about a DUT node. Type: dictionary
296 | | ... | - interface - Name of a sub-interface on the specified node. Type:\
298 | | ... | - setings - Parameters to be checked. Type: dictionary
301 | | ... | \| Sub-interface bridge domain Operational Data From VAT Should Be\
302 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \|
304 | | [Arguments] | ${node} | ${interface} | ${settings}
306 | | ${bd_data}= | VPP get bridge domain data | ${node}
307 | | ${bd_intf}= | Set Variable | ${bd_data[0]}
308 | | ${sw_if_data}= | Set Variable | ${bd_intf['sw_if'][0]}
309 | | Should be equal as integers | ${bd_intf['flood']} | ${bd_settings['flood']}
310 | | Should be equal as integers | ${bd_intf['forward']}
311 | | ... | ${bd_settings['forward']}
312 | | Should be equal as integers | ${bd_intf['learn']} | ${bd_settings['learn']}
313 | | Should be equal as strings | ${sw_if_data['shg']}
314 | | ... | ${settings['split-horizon-group']}
316 | Honeycomb fails to remove all sub-interfaces
317 | | [Documentation] | Honeycomb tries to remove all sub-interfaces using\
318 | | ... | Honeycomb API. This operation must fail.
320 | | ... | *Arguments:*
321 | | ... | - node - Information about a DUT node. Type: dictionary
322 | | ... | - super_if - Super-interface. Type: string
325 | | ... | \| Honeycomb fails to remove all sub-interfaces\
326 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
328 | | [Arguments] | ${node} | ${super_if}
330 | | Run keyword and expect error | *HoneycombError:*not successful. * code: 500.
331 | | ... | Remove all sub interfaces
332 | | ... | ${node} | ${super_if}
334 | Honeycomb configures tag rewrite
335 | | [Documentation] | Honeycomb configures tag-rewrite
337 | | ... | *Arguments:*
338 | | ... | - node - Information about a DUT node. Type: dictionary
339 | | ... | - super_if - Super-interface. Type: string
340 | | ... | - identifier - Sub-interface ID. Type: integer or string
341 | | ... | - settings - tag-rewrite parameters. Type: dictionary.
344 | | ... | \| Honeycomb configures tag rewrite\
345 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
346 | | ... | \| ${tag_rewrite_push} \|
348 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
350 | | Configure tag rewrite
351 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
353 | Rewrite tag from Honeycomb should be empty
354 | | [Documentation] | Checks if the tag-rewrite is empty or does not exist.
356 | | ... | *Arguments:*
357 | | ... | - node - Information about a DUT node. Type: dictionary
358 | | ... | - super_if - Super-interface. Type: string
359 | | ... | - identifier - Sub-interface ID. Type: integer or string
362 | | ... | \| Rewrite tag from Honeycomb should be empty\
363 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
365 | | [Arguments] | ${node} | ${super_if} | ${identifier}
367 | | Run keyword and expect error | *Hon*Error*oper*does not contain*tag-rewrite*
368 | | ... | Get tag rewrite oper data
369 | | ... | ${node} | ${super_if} | ${identifier}
371 | Rewrite tag from Honeycomb should be
372 | | [Documentation] | Checks if the operational data retrieved from Honeycomb\
373 | | ... | are as expected.
375 | | ... | *Arguments:*
376 | | ... | - node - Information about a DUT node. Type: dictionary
377 | | ... | - super_if - Super-interface. Type: string
378 | | ... | - identifier - Sub-interface ID. Type: integer or string
379 | | ... | - settings - tag-rewrite operational parameters to be checked.\
380 | | ... | Type: dictionary.
383 | | ... | \| Rewrite tag from Honeycomb should be\
384 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
385 | | ... | \| ${tag_rewrite_push_oper} \|
387 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
388 | | ${api_data}= | Get tag rewrite oper data
389 | | ... | ${node} | ${super_if} | ${identifier}
390 | | Compare Data Structures
391 | | ... | ${api_data} | ${settings}
393 | Rewrite tag from VAT should be
394 | | [Documentation] | Retrieves sub-interface configuration through VAT and\
395 | | ... | compares values of rewrite tag parameters with settings supplied in\
398 | | ... | *Arguments:*
399 | | ... | - node - information about a DUT node. Type: dictionary
400 | | ... | - interface - name of a sub-interface on the specified node.\
401 | | ... | Type: string
402 | | ... | - rw_settings - Parameters to be set while setting the rewrite tag.\
403 | | ... | Type: dictionary
406 | | ... | \| Rewrite tag from VAT should be\
407 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \|
409 | | [Arguments] | ${node} | ${interface} | ${rw_settings}
410 | | ${vat_data}= | VPP get interface data | ${node} | ${interface}
411 | | Compare Data Structures | ${vat_data} | ${rw_settings}
413 | Honeycomb fails to set wrong rewrite tag
414 | | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\
417 | | ... | *Arguments:*
418 | | ... | - node - Information about a DUT node. Type: dictionary
419 | | ... | - super_if - Super-interface. Type: string
420 | | ... | - identifier - Sub-interface ID. Type: integer or string
421 | | ... | - settings - tag-rewrite parameters. Type: dictionary.
424 | | ... | \| Honeycomb fails to set wrong rewrite tag\
425 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
426 | | ... | \| ${tag_rewrite_push_WRONG} \|
428 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
429 | | Run keyword and expect error | *HoneycombError: * was not successful. *00.
430 | | ... | Configure tag rewrite
431 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
433 | Honeycomb sets sub-interface ipv4 address
434 | | [Documentation] | Uses Honeycomb API to configure an ipv4 address on the\
435 | | ... | spcified sub-interface. Replaces any existing ipv4 addresses.
437 | | ... | *Arguments:*
438 | | ... | - node - Information about a DUT node. Type: dictionary
439 | | ... | - super_if - Super-interface. Type: string
440 | | ... | - identifier - Sub-interface ID. Type: integer or string
441 | | ... | - address - IPv4 address to set. Type: string
442 | | ... | - prefix - IPv4 network prefix length to set. Type: integer
445 | | ... | \| | Honeycomb sets sub-interface ipv4 address\
446 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
447 | | ... | \| 192.168.0.2 \| ${24} \|
449 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
450 | | Add ip address to sub_interface
451 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4
453 | Sub-interface ipv4 address from Honeycomb should be
454 | | [Documentation] | Uses Honeycomb API to verify ipv4 address configuration\
455 | | ... | on the specified sub-interface.
457 | | ... | *Arguments:*
458 | | ... | - node - Information about a DUT node. Type: dictionary
459 | | ... | - super_if - Super-interface. Type: string
460 | | ... | - identifier - Sub-interface ID. Type: integer or string
461 | | ... | - address - IPv4 address to expect. Type: string
462 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
465 | | ... | \| sub-interface ipv4 address from Honeycomb should be\
466 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
467 | | ... | \| 192.168.0.2 \| ${24} \|
469 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
470 | | ${if_data}= | Get sub interface oper data
471 | | ... | ${node} | ${super_if} | ${identifier}
473 | | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address}
475 | | ... | ${if_data['ipv4']['address'][0]['prefix-length']} | ${prefix}
477 | Sub-interface ipv4 address from VAT should be
478 | | [Documentation] | Uses VAT to verify ipv4 address configuration\
479 | | ... | on the specified sub-interface.
481 | | ... | *Arguments:*
482 | | ... | - node - Information about a DUT node. Type: dictionary
483 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
484 | | ... | Type: string
485 | | ... | - address - IPv4 address to expect. Type: string
486 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
489 | | ... | \| sub-interface ipv4 address from VAT should be\
490 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
492 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
493 | | ${data}= | VPP get interface ip addresses
494 | | ... | ${node} | ${sub_interface} | ipv4
495 | | Should be equal | ${data[0]['ip']} | ${address}
496 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
498 | Honeycomb removes all sub-interface ipv4 addresses
499 | | [Documentation] | Uses Honeycomb API to remove all configured ipv4\
500 | | ... | addresses from the sub-interface.
502 | | ... | *Arguments:*
503 | | ... | - node - Information about a DUT node. Type: dictionary
504 | | ... | - super_if - Super-interface. Type: string
505 | | ... | - identifier - Sub-interface ID. Type: integer or string
508 | | ... | \| Honeycomb removes all sub-interface ipv4 addresses\
509 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
511 | | [Arguments] | ${node} | ${super_if} | ${identifier}
512 | | Remove all ip addresses from sub_interface
513 | | ... | ${node} | ${super_if} | ${identifier} | ipv4
515 | Sub-interface ipv4 address from Honeycomb should be empty
516 | | [Documentation] | Uses Honeycomb API to verify that ipv4 address\
517 | | ... | configuration on the specified sub-interface is empty.
519 | | ... | *Arguments:*
520 | | ... | - node - Information about a DUT node. Type: dictionary
521 | | ... | - super_if - Super-interface. Type: string
522 | | ... | - identifier - Sub-interface ID. Type: integer or string
525 | | ... | \| sub-interface ipv4 address from Honeycomb should be empty\
526 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
528 | | [Arguments] | ${node} | ${super_if} | ${identifier}
529 | | ${if_data}= | Get sub interface oper data
530 | | ... | ${node} | ${super_if} | ${identifier}
531 | | Run keyword and expect error | *KeyError: 'ipv4'*
532 | | ... | Set Variable | ${if_data['ipv4']['address'][0]['ip']}
534 | Sub-interface ipv4 address from VAT should be empty
535 | | [Documentation] | Uses VAT to verify that ipv4 address\
536 | | ... | configuration on the specified sub-interface is empty.
538 | | ... | *Arguments:*
539 | | ... | - node - Information about a DUT node. Type: dictionary
540 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
541 | | ... | Type: string
544 | | ... | \| sub-interface ipv4 address from VAT should be empty\
545 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
547 | | [Arguments] | ${node} | ${sub_interface}
548 | | Run keyword and expect error | *No JSON object could be decoded*
549 | | ... | VPP get interface ip addresses
550 | | ... | ${node} | ${sub_interface} | ipv4
552 | Honeycomb sets sub-interface ipv6 address
553 | | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\
554 | | ... | spcified sub-interface. Replaces any existing ipv6 addresses.
556 | | ... | *Arguments:*
557 | | ... | - node - Information about a DUT node. Type: dictionary
558 | | ... | - super_if - Super-interface. Type: string
559 | | ... | - identifier - Sub-interface ID. Type: integer or string
560 | | ... | - address - IPv6 address to set. Type: string
561 | | ... | - prefix - IPv6 network prefix length to set. Type: integer
564 | | ... | \| | Honeycomb sets sub-interface ipv6 address\
565 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
566 | | ... | \| 10::10 \| ${64} \|
568 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
569 | | Add ip address to sub_interface
570 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6
572 | Sub-interface IPv6 address from Honeycomb should contain
573 | | [Documentation] | Uses Honeycomb API to verify ipv6 address configuration\
574 | | ... | on the specified sub-interface.
576 | | ... | *Arguments:*
577 | | ... | - node - Information about a DUT node. Type: dictionary
578 | | ... | - super_if - Super-interface. Type: string
579 | | ... | - identifier - Sub-interface ID. Type: integer or string
580 | | ... | - address - IPv6 address to expect. Type: string
581 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
584 | | ... | \| sub-interface IPv6 address from Honeycomb should contain\
585 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
586 | | ... | \| 10::10 \| ${64} \|
588 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
589 | | ${if_data}= | Get sub interface oper data
590 | | ... | ${node} | ${super_if} | ${identifier}
591 | | ${settings}= | Create Dictionary
592 | | ... | ip=${address} | prefix-length=${prefix}
593 | | Should contain | ${if_data['ipv6']['address']} | ${settings}
595 | Sub-interface IPv6 address from VAT should contain
596 | | [Documentation] | Uses VAT to verify ipv6 address configuration\
597 | | ... | on the specified sub-interface.
599 | | ... | *Arguments:*
600 | | ... | - node - Information about a DUT node. Type: dictionary
601 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
602 | | ... | Type: string
603 | | ... | - address - IPv6 address to expect. Type: string
604 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
607 | | ... | \| sub-interface IPv6 address from VAT should contain\
608 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
610 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
611 | | ${data}= | VPP get interface ip addresses
612 | | ... | ${node} | ${sub_interface} | ipv6
613 | | Should be equal | ${data[0]['ip']} | ${address}
614 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
616 | Honeycomb removes all sub-interface ipv6 addresses
617 | | [Documentation] | Uses Honeycomb API to remove all configured ipv6\
618 | | ... | addresses from the sub-interface.
620 | | ... | *Arguments:*
621 | | ... | - node - Information about a DUT node. Type: dictionary
622 | | ... | - super_if - Super-interface. Type: string
623 | | ... | - identifier - Sub-interface ID. Type: integer or string
626 | | ... | \| Honeycomb removes all sub-interface ipv6 addresses\
627 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
629 | | [Arguments] | ${node} | ${super_if} | ${identifier}
630 | | Remove all ip addresses from sub_interface
631 | | ... | ${node} | ${super_if} | ${identifier} | ipv6
633 | Sub-interface ipv6 address from Honeycomb should be empty
634 | | [Documentation] | Uses Honeycomb API to verify that ipv6 address\
635 | | ... | configuration on the specified sub-interface is empty.
637 | | ... | *Arguments:*
638 | | ... | - node - Information about a DUT node. Type: dictionary
639 | | ... | - super_if - Super-interface. Type: string
640 | | ... | - identifier - Sub-interface ID. Type: integer or string
643 | | ... | \| sub-interface ipv6 address from Honeycomb should be empty\
644 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
646 | | [Arguments] | ${node} | ${super_if} | ${identifier}
647 | | ${if_data}= | Get sub interface oper data
648 | | ... | ${node} | ${super_if} | ${identifier}
649 | | Run keyword and expect error | *KeyError: 'ipv6'*
650 | | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']}
652 | Sub-interface ipv6 address from VAT should be empty
653 | | [Documentation] | Uses VAT to verify that ipv6 address\
654 | | ... | configuration on the specified sub-interface is empty.
656 | | ... | *Arguments:*
657 | | ... | - node - Information about a DUT node. Type: dictionary
658 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
659 | | ... | Type: string
662 | | ... | \| sub-interface ipv6 address from VAT should be empty\
663 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
665 | | [Arguments] | ${node} | ${sub_interface}
666 | | Run keyword and expect error | *No JSON object could be decoded*
667 | | ... | VPP get interface ip addresses
668 | | ... | ${node} | ${sub_interface} | ipv6