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 PAPI 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 PAPI 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_details'][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 # interface[1] = sw_if_index, interface[2] = shg
314 | | Should be equal as strings | ${sw_if_data[2]}
315 | | ... | ${settings['split-horizon-group']}
317 | Honeycomb fails to remove all sub-interfaces
318 | | [Documentation] | Honeycomb tries to remove all sub-interfaces using\
319 | | ... | Honeycomb API. This operation must fail.
321 | | ... | *Arguments:*
322 | | ... | - node - Information about a DUT node. Type: dictionary
323 | | ... | - super_if - Super-interface. Type: string
326 | | ... | \| Honeycomb fails to remove all sub-interfaces\
327 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
329 | | [Arguments] | ${node} | ${super_if}
331 | | Run keyword and expect error | *HoneycombError:*not successful. * code: 500.
332 | | ... | Remove all sub interfaces
333 | | ... | ${node} | ${super_if}
335 | Honeycomb configures tag rewrite
336 | | [Documentation] | Honeycomb configures tag-rewrite
338 | | ... | *Arguments:*
339 | | ... | - node - Information about a DUT node. Type: dictionary
340 | | ... | - super_if - Super-interface. Type: string
341 | | ... | - identifier - Sub-interface ID. Type: integer or string
342 | | ... | - settings - tag-rewrite parameters. Type: dictionary.
345 | | ... | \| Honeycomb configures tag rewrite\
346 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
347 | | ... | \| ${tag_rewrite_push} \|
349 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
351 | | Configure tag rewrite
352 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
354 | Rewrite tag from Honeycomb should be empty
355 | | [Documentation] | Checks if the tag-rewrite is empty or does not exist.
357 | | ... | *Arguments:*
358 | | ... | - node - Information about a DUT node. Type: dictionary
359 | | ... | - super_if - Super-interface. Type: string
360 | | ... | - identifier - Sub-interface ID. Type: integer or string
363 | | ... | \| Rewrite tag from Honeycomb should be empty\
364 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
366 | | [Arguments] | ${node} | ${super_if} | ${identifier}
368 | | Run keyword and expect error | *Hon*Error*oper*does not contain*tag-rewrite*
369 | | ... | Get tag rewrite oper data
370 | | ... | ${node} | ${super_if} | ${identifier}
372 | Rewrite tag from Honeycomb should be
373 | | [Documentation] | Checks if the operational data retrieved from Honeycomb\
374 | | ... | are as expected.
376 | | ... | *Arguments:*
377 | | ... | - node - Information about a DUT node. Type: dictionary
378 | | ... | - super_if - Super-interface. Type: string
379 | | ... | - identifier - Sub-interface ID. Type: integer or string
380 | | ... | - settings - tag-rewrite operational parameters to be checked.\
381 | | ... | Type: dictionary.
384 | | ... | \| Rewrite tag from Honeycomb should be\
385 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
386 | | ... | \| ${tag_rewrite_push_oper} \|
388 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
389 | | ${api_data}= | Get tag rewrite oper data
390 | | ... | ${node} | ${super_if} | ${identifier}
391 | | Compare Data Structures
392 | | ... | ${api_data} | ${settings}
394 | Rewrite tag from VAT should be
395 | | [Documentation] | Retrieves sub-interface configuration through VAT and\
396 | | ... | compares values of rewrite tag parameters with settings supplied in\
399 | | ... | *Arguments:*
400 | | ... | - node - information about a DUT node. Type: dictionary
401 | | ... | - interface - name of a sub-interface on the specified node.\
402 | | ... | Type: string
403 | | ... | - rw_settings - Parameters to be set while setting the rewrite tag.\
404 | | ... | Type: dictionary
407 | | ... | \| Rewrite tag from VAT should be\
408 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \|
410 | | [Arguments] | ${node} | ${interface} | ${rw_settings}
411 | | ${vat_data}= | VPP get interface data | ${node} | ${interface}
412 | | Compare Data Structures | ${vat_data} | ${rw_settings}
414 | Honeycomb fails to set wrong rewrite tag
415 | | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\
418 | | ... | *Arguments:*
419 | | ... | - node - Information about a DUT node. Type: dictionary
420 | | ... | - super_if - Super-interface. Type: string
421 | | ... | - identifier - Sub-interface ID. Type: integer or string
422 | | ... | - settings - tag-rewrite parameters. Type: dictionary.
425 | | ... | \| Honeycomb fails to set wrong rewrite tag\
426 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
427 | | ... | \| ${tag_rewrite_push_WRONG} \|
429 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
430 | | Run keyword and expect error | *HoneycombError: * was not successful. *00.
431 | | ... | Configure tag rewrite
432 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
434 | Honeycomb sets sub-interface ipv4 address
435 | | [Documentation] | Uses Honeycomb API to configure an ipv4 address on the\
436 | | ... | spcified sub-interface. Replaces any existing ipv4 addresses.
438 | | ... | *Arguments:*
439 | | ... | - node - Information about a DUT node. Type: dictionary
440 | | ... | - super_if - Super-interface. Type: string
441 | | ... | - identifier - Sub-interface ID. Type: integer or string
442 | | ... | - address - IPv4 address to set. Type: string
443 | | ... | - prefix - IPv4 network prefix length to set. Type: integer
446 | | ... | \| | Honeycomb sets sub-interface ipv4 address\
447 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
448 | | ... | \| 192.168.0.2 \| ${24} \|
450 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
451 | | Add ip address to sub_interface
452 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4
454 | Sub-interface ipv4 address from Honeycomb should be
455 | | [Documentation] | Uses Honeycomb API to verify ipv4 address configuration\
456 | | ... | on the specified sub-interface.
458 | | ... | *Arguments:*
459 | | ... | - node - Information about a DUT node. Type: dictionary
460 | | ... | - super_if - Super-interface. Type: string
461 | | ... | - identifier - Sub-interface ID. Type: integer or string
462 | | ... | - address - IPv4 address to expect. Type: string
463 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
466 | | ... | \| sub-interface ipv4 address from Honeycomb should be\
467 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
468 | | ... | \| 192.168.0.2 \| ${24} \|
470 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
471 | | ${if_data}= | Get sub interface oper data
472 | | ... | ${node} | ${super_if} | ${identifier}
474 | | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address}
476 | | ... | ${if_data['ipv4']['address'][0]['prefix-length']} | ${prefix}
478 | Sub-interface ipv4 address from VAT should be
479 | | [Documentation] | Uses VAT to verify ipv4 address configuration\
480 | | ... | on the specified sub-interface.
482 | | ... | *Arguments:*
483 | | ... | - node - Information about a DUT node. Type: dictionary
484 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
485 | | ... | Type: string
486 | | ... | - address - IPv4 address to expect. Type: string
487 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
490 | | ... | \| sub-interface ipv4 address from VAT should be\
491 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
493 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
494 | | ${data}= | VPP get interface ip addresses
495 | | ... | ${node} | ${sub_interface} | ipv4
496 | | Should be equal | ${data[0]['ip']} | ${address}
497 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
499 | Honeycomb removes all sub-interface ipv4 addresses
500 | | [Documentation] | Uses Honeycomb API to remove all configured ipv4\
501 | | ... | addresses from the sub-interface.
503 | | ... | *Arguments:*
504 | | ... | - node - Information about a DUT node. Type: dictionary
505 | | ... | - super_if - Super-interface. Type: string
506 | | ... | - identifier - Sub-interface ID. Type: integer or string
509 | | ... | \| Honeycomb removes all sub-interface ipv4 addresses\
510 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
512 | | [Arguments] | ${node} | ${super_if} | ${identifier}
513 | | Remove all ip addresses from sub_interface
514 | | ... | ${node} | ${super_if} | ${identifier} | ipv4
516 | Sub-interface ipv4 address from Honeycomb should be empty
517 | | [Documentation] | Uses Honeycomb API to verify that ipv4 address\
518 | | ... | configuration on the specified sub-interface is empty.
520 | | ... | *Arguments:*
521 | | ... | - node - Information about a DUT node. Type: dictionary
522 | | ... | - super_if - Super-interface. Type: string
523 | | ... | - identifier - Sub-interface ID. Type: integer or string
526 | | ... | \| sub-interface ipv4 address from Honeycomb should be empty\
527 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
529 | | [Arguments] | ${node} | ${super_if} | ${identifier}
530 | | ${if_data}= | Get sub interface oper data
531 | | ... | ${node} | ${super_if} | ${identifier}
532 | | Run keyword and expect error | *KeyError: 'ipv4'*
533 | | ... | Set Variable | ${if_data['ipv4']['address'][0]['ip']}
535 | Sub-interface ipv4 address from VAT should be empty
536 | | [Documentation] | Uses VAT to verify that ipv4 address\
537 | | ... | configuration on the specified sub-interface is empty.
539 | | ... | *Arguments:*
540 | | ... | - node - Information about a DUT node. Type: dictionary
541 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
542 | | ... | Type: string
545 | | ... | \| sub-interface ipv4 address from VAT should be empty\
546 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
548 | | [Arguments] | ${node} | ${sub_interface}
549 | | Run keyword and expect error | *No JSON object could be decoded*
550 | | ... | VPP get interface ip addresses
551 | | ... | ${node} | ${sub_interface} | ipv4
553 | Honeycomb sets sub-interface ipv6 address
554 | | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\
555 | | ... | spcified sub-interface. Replaces any existing ipv6 addresses.
557 | | ... | *Arguments:*
558 | | ... | - node - Information about a DUT node. Type: dictionary
559 | | ... | - super_if - Super-interface. Type: string
560 | | ... | - identifier - Sub-interface ID. Type: integer or string
561 | | ... | - address - IPv6 address to set. Type: string
562 | | ... | - prefix - IPv6 network prefix length to set. Type: integer
565 | | ... | \| | Honeycomb sets sub-interface ipv6 address\
566 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
567 | | ... | \| 10::10 \| ${64} \|
569 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
570 | | Add ip address to sub_interface
571 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6
573 | Sub-interface IPv6 address from Honeycomb should contain
574 | | [Documentation] | Uses Honeycomb API to verify ipv6 address configuration\
575 | | ... | on the specified sub-interface.
577 | | ... | *Arguments:*
578 | | ... | - node - Information about a DUT node. Type: dictionary
579 | | ... | - super_if - Super-interface. Type: string
580 | | ... | - identifier - Sub-interface ID. Type: integer or string
581 | | ... | - address - IPv6 address to expect. Type: string
582 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
585 | | ... | \| sub-interface IPv6 address from Honeycomb should contain\
586 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
587 | | ... | \| 10::10 \| ${64} \|
589 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
590 | | ${if_data}= | Get sub interface oper data
591 | | ... | ${node} | ${super_if} | ${identifier}
592 | | ${settings}= | Create Dictionary
593 | | ... | ip=${address} | prefix-length=${prefix}
594 | | Should contain | ${if_data['ipv6']['address']} | ${settings}
596 | Sub-interface IPv6 address from VAT should contain
597 | | [Documentation] | Uses VAT to verify ipv6 address configuration\
598 | | ... | on the specified sub-interface.
600 | | ... | *Arguments:*
601 | | ... | - node - Information about a DUT node. Type: dictionary
602 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
603 | | ... | Type: string
604 | | ... | - address - IPv6 address to expect. Type: string
605 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
608 | | ... | \| sub-interface IPv6 address from VAT should contain\
609 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
611 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
612 | | ${data}= | VPP get interface ip addresses
613 | | ... | ${node} | ${sub_interface} | ipv6
614 | | Should be equal | ${data[0]['ip']} | ${address}
615 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
617 | Honeycomb removes all sub-interface ipv6 addresses
618 | | [Documentation] | Uses Honeycomb API to remove all configured ipv6\
619 | | ... | addresses from the sub-interface.
621 | | ... | *Arguments:*
622 | | ... | - node - Information about a DUT node. Type: dictionary
623 | | ... | - super_if - Super-interface. Type: string
624 | | ... | - identifier - Sub-interface ID. Type: integer or string
627 | | ... | \| Honeycomb removes all sub-interface ipv6 addresses\
628 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
630 | | [Arguments] | ${node} | ${super_if} | ${identifier}
631 | | Remove all ip addresses from sub_interface
632 | | ... | ${node} | ${super_if} | ${identifier} | ipv6
634 | Sub-interface ipv6 address from Honeycomb should be empty
635 | | [Documentation] | Uses Honeycomb API to verify that ipv6 address\
636 | | ... | configuration on the specified sub-interface is empty.
638 | | ... | *Arguments:*
639 | | ... | - node - Information about a DUT node. Type: dictionary
640 | | ... | - super_if - Super-interface. Type: string
641 | | ... | - identifier - Sub-interface ID. Type: integer or string
644 | | ... | \| sub-interface ipv6 address from Honeycomb should be empty\
645 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
647 | | [Arguments] | ${node} | ${super_if} | ${identifier}
648 | | ${if_data}= | Get sub interface oper data
649 | | ... | ${node} | ${super_if} | ${identifier}
650 | | Run keyword and expect error | *KeyError: 'ipv6'*
651 | | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']}
653 | Sub-interface ipv6 address from VAT should be empty
654 | | [Documentation] | Uses VAT to verify that ipv6 address\
655 | | ... | configuration on the specified sub-interface is empty.
657 | | ... | *Arguments:*
658 | | ... | - node - Information about a DUT node. Type: dictionary
659 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
660 | | ... | Type: string
663 | | ... | \| sub-interface ipv6 address from VAT should be empty\
664 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
666 | | [Arguments] | ${node} | ${sub_interface}
667 | | Run keyword and expect error | *No JSON object could be decoded*
668 | | ... | VPP get interface ip addresses
669 | | ... | ${node} | ${sub_interface} | ipv6