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 | ... | WITH NAME | interfaceCLI
17 | Library | resources.libraries.python.L2Util
18 | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
19 | ... | WITH NAME | InterfaceAPI
20 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
21 | Documentation | Keywords used to manipulate sub-interfaces.
24 | Honeycomb creates sub-interface
25 | | [Documentation] | Create a sub-interface using Honeycomb API.
27 | | ... | *Arguments:*
28 | | ... | - node - Information about a DUT node. Type: dictionary
29 | | ... | - super_interface - Super-interface where a sub-interface will be\
30 | | ... | created. Type: string
31 | | ... | - match - Match type. Type: string
32 | | ... | - tags - List of tags to be set while creating the sub-interface.\
34 | | ... | - sub_interface_settings - Sub-inteface parameters to be set while\
35 | | ... | creating the sub-interface. Type: dictionary
38 | | ... | \| Honeycomb creates sub-interface\
39 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0\
40 | | ... | \| vlan-tagged-exact-match \| ${sub_if_1_tags}\
41 | | ... | \| ${sub_if_1_settings} \|
43 | | [Arguments] | ${node} | ${super_interface}
44 | | ... | ${match} | ${tags} | ${sub_interface_settings}
46 | | interfaceAPI.Create sub interface | ${node} | ${super_interface}
47 | | ... | ${match} | ${tags} | &{sub_interface_settings}
49 | Sub-interface configuration from Honeycomb should be
50 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb\
51 | | ... | and compares it with settings supplied in argument.
53 | | ... | *Arguments:*
54 | | ... | - node - Information about a DUT node. Type: dictionary
55 | | ... | - super_interface - Super-interface. Type: string
56 | | ... | - identifier - Sub-interface ID. Type: integer or string
57 | | ... | - sub_if_settings - Operational data for sub-interface to be checked.\
58 | | ... | Type: dictionary
61 | | ... | \| Sub-interface configuration from Honeycomb should be\
62 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
63 | | ... | \| ${sub_if_1_params} \|
65 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
66 | | ... | ${sub_if_settings}
68 | | ${api_data}= | interfaceAPI.Get sub interface oper data
69 | | ... | ${node} | ${super_interface} | ${identifier}
70 | | interfaceAPI.Compare Data Structures | ${api_data} | ${sub_if_settings}
72 | Sub-interface configuration from Honeycomb should be empty
73 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
74 | | ... | and expects no data.
76 | | ... | *Arguments:*
77 | | ... | - node - Information about a DUT node. Type: dictionary
78 | | ... | - super_interface - Super-interface. Type: string
79 | | ... | - identifier - Sub-interface ID. Type: integer or string
82 | | ... | \| Sub-interface configuration from Honeycomb should be empty\
83 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
85 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
87 | | Run keyword and expect error | *KeyError: 'vpp-vlan:sub-interfaces'*
88 | | ... | interfaceAPI.Get sub interface oper data
89 | | ... | ${node} | ${super_interface} | ${identifier}
91 | Sub-interface state from Honeycomb should be
92 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
93 | | ... | and checks the administrative and operational state.
95 | | ... | *Arguments:*
96 | | ... | - node - Information about a DUT node. Type: dictionary
97 | | ... | - super_interface - Super-interface. Type: string
98 | | ... | - identifier - Sub-interface ID. Type: integer or string
99 | | ... | - admin_state - Required administrative state - up or down. \
100 | | ... | Type: string
101 | | ... | - oper_state - Required operational state - up or down. Type: string
104 | | ... | \| Sub-interface state from Honeycomb should be\
105 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| up \| up \|
107 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
108 | | ... | ${admin_state} | ${oper_state}
110 | | ${api_data}= | interfaceAPI.Get sub interface oper data
111 | | ... | ${node} | ${super_interface} | ${identifier}
112 | | Should be equal | ${api_data['admin-status']} | ${admin_state}
113 | | Should be equal | ${api_data['oper-status']} | ${oper_state}
115 | Sub-interface configuration from VAT should be
116 | | [Documentation] | Retrieves sub-interface configuration through VAT and\
117 | | ... | compares it with settings supplied in argument.
119 | | ... | *Arguments:*
120 | | ... | - node - Information about a DUT node. Type: dictionary
121 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
122 | | ... | Type: string
123 | | ... | - sub_interface_settings - Operational data specific for a\
124 | | ... | sub-interface to be checked. Type: dictionary
127 | | ... | \| Sub-interface configuration from VAT should be\
128 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_if_1_params} \|
130 | | [Arguments] | ${node} | ${sub_interface} | ${sub_interface_settings}
132 | | ${vat_data}= | InterfaceCLI.VPP get interface data
133 | | ... | ${node} | ${sub_interface}
134 | | Should be equal as strings | ${vat_data['sub_id']}
135 | | ... | ${sub_interface_settings['identifier']}
136 | | Should be equal as strings
137 | | ... | ${vat_data['interface_name']} | ${sub_interface}
138 | | Run keyword if | ${vat_data['link_up_down']} == 0
139 | | ... | Should be equal as strings
140 | | ... | ${sub_interface_settings['oper-status']} | down
141 | | Run keyword if | ${vat_data['link_up_down']} == 1
142 | | ... | Should be equal as strings
143 | | ... | ${sub_interface_settings['oper-status']} | up
145 | Sub-interface state from VAT should be
146 | | [Documentation] | Retrieves sub-interface configuration through VAT and \
147 | | ... | checks the administrative and operational state.
149 | | ... | *Arguments:*
150 | | ... | - node - Information about a DUT node. Type: dictionary
151 | | ... | - sub_interface - Name of an sub-interface on the specified node. \
152 | | ... | Type: string
153 | | ... | - admin_state - Required administrative state - up or down. \
154 | | ... | Type: string
155 | | ... | - oper_state - Required operational state - up or down. Type: string
158 | | ... | \| Sub-interface state from VAT should be \
159 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| up \| up \|
161 | | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state}
163 | | ${vat_data}= | InterfaceCLI.VPP get interface data
164 | | ... | ${node} | ${sub_interface}
165 | | Run keyword if | '${admin_state}' == 'down'
166 | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 0
167 | | Run keyword if | '${admin_state}' == 'up'
168 | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 1
169 | | Run keyword if | '${oper_state}' == 'down'
170 | | ... | Should be equal as strings | ${vat_data['link_up_down']} | 0
171 | | Run keyword if | '${oper_state}' == 'up'
172 | | ... | Should be equal as strings | ${vat_data['link_up_down']} | 1
174 | Sub-interface indices from Honeycomb and VAT should correspond
175 | | [Documentation] | Uses VAT and Honeycomb to get operational data about the\
176 | | ... | given sub-interface and compares the interface indexes. The
177 | | ... | sub-interface index from Honeycomb should be greater than index from
178 | | ... | VAT by one.
180 | | ... | *Arguments:*
181 | | ... | - node - Information about a DUT node. Type: dictionary
182 | | ... | - super_interface - Super-interface. Type: string
183 | | ... | - identifier - Sub-interface ID. Type: integer or string
187 | | ... | \| Sub-interface indices from Honeycomb and VAT should correspond \
188 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
190 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
192 | | ${api_data}= | interfaceAPI.Get sub interface oper data
193 | | ... | ${node} | ${super_interface} | ${identifier}
194 | | ${vat_data}= | InterfaceCLI.VPP get interface data
195 | | ... | ${node} | ${super_interface}.${identifier}
196 | | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1
197 | | Should be equal as strings
198 | | ... | ${api_data['if-index']} | ${sw_if_index}
200 | Honeycomb sets the sub-interface up
201 | | [Documentation] | Honeycomb sets the sub-interface up.
203 | | ... | *Arguments:*
204 | | ... | - node - Information about a DUT node. Type: dictionary
205 | | ... | - super_interface - Super-interface. Type: string
206 | | ... | - identifier - Sub-interface ID. Type: integer or string
209 | | ... | Honeycomb sets the sub-interface up\
210 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
212 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
214 | | interfaceAPI.Set sub interface state
215 | | ... | ${node} | ${super_interface} | ${identifier} | up
217 | Honeycomb sets the sub-interface down
218 | | [Documentation] | Honeycomb sets the sub-interface down.
220 | | ... | *Arguments:*
221 | | ... | - node - Information about a DUT node. Type: dictionary
222 | | ... | - super_interface - Super-interface. Type: string
223 | | ... | - identifier - Sub-interface ID. Type: integer or string
226 | | ... | Honeycomb sets the sub-interface down\
227 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
229 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
231 | | interfaceAPI.Set sub interface state
232 | | ... | ${node} | ${super_interface} | ${identifier} | down
234 | Honeycomb fails to set sub-interface up
235 | | [Documentation] | Honeycomb tries to set sub-interface up and expects error.
237 | | ... | *Arguments:*
238 | | ... | - node - Information about a DUT node. Type: dictionary
239 | | ... | - super_interface - Super-interface. Type: string
240 | | ... | - identifier - Sub-interface ID. Type: integer or string
243 | | ... | \| Honeycomb fails to set sub-interface up\
244 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
246 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
248 | | Run keyword and expect error | *HoneycombError: * was not successful. * 500.
249 | | ... | interfaceAPI.Set sub interface state
250 | | ... | ${node} | ${super_interface} | ${identifier} | up
252 | Honeycomb adds sub-interface to bridge domain
253 | | [Documentation] | Honeycomb adds the given sub-interface to bridge domain.
255 | | ... | *Arguments:*
256 | | ... | - node - Information about a DUT node. Type: dictionary
257 | | ... | - super_if - Super-interface. Type: string
258 | | ... | - identifier - Sub-interface ID. Type: integer or string
259 | | ... | - sub_bd_setings - Bridge domain parameters to be set while adding\
260 | | ... | the sub-interface to the bridge domain. Type: dictionary
263 | | ... | \| Honeycomb adds sub-interface to bridge domain\
264 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
266 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
268 | | interfaceAPI.Add bridge domain to sub interface
269 | | ... | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
271 | Sub-interface bridge domain configuration from Honeycomb should be
272 | | [Documentation] | Uses Honeycomb API to verify sub-interface assignment to\
273 | | ... | a bridge domain.
275 | | ... | *Arguments:*
276 | | ... | - node - Information about a DUT node. Type: dictionary
277 | | ... | - super_if - Super-interface. Type: string
278 | | ... | - identifier - Sub-interface ID. Type: integer or string
279 | | ... | - settings - Bridge domain parameters to be checked. Type: dictionary
282 | | ... | \| Sub-interface bridge domain configuration from Honeycomb should be\
283 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
285 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
287 | | ${if_data}= | interfaceAPI.Get BD data from sub interface
288 | | ... | ${node} | ${super_if} | ${identifier}
289 | | Should be equal | ${if_data['bridge-domain']}
290 | | ... | ${settings['bridge-domain']}
292 | Sub-interface bridge domain configuration from VAT should be
293 | | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\
296 | | ... | *Arguments:*
297 | | ... | - node - Information about a DUT node. Type: dictionary
298 | | ... | - interface - Name of a sub-interface on the specified node. Type:\
300 | | ... | - setings - Parameters to be checked. Type: dictionary
303 | | ... | \| Sub-interface bridge domain configuration from VAT should be\
304 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \|
306 | | [Arguments] | ${node} | ${interface} | ${settings}
308 | | ${bd_data}= | VPP get bridge domain data | ${node}
309 | | ${bd_intf}= | Set Variable | ${bd_data[0]}
310 | | ${sw_if_data}= | Set Variable | ${bd_intf['sw_if'][0]}
311 | | Should be equal as integers | ${bd_intf['flood']} | ${bd_settings['flood']}
312 | | Should be equal as integers | ${bd_intf['forward']}
313 | | ... | ${bd_settings['forward']}
314 | | Should be equal as integers | ${bd_intf['learn']} | ${bd_settings['learn']}
315 | | Should be equal as strings | ${sw_if_data['shg']}
316 | | ... | ${settings['split-horizon-group']}
318 | Honeycomb fails to remove all sub-interfaces
319 | | [Documentation] | Honeycomb tries to remove all sub-interfaces using\
320 | | ... | Honeycomb API. This operation must fail.
322 | | ... | *Arguments:*
323 | | ... | - node - Information about a DUT node. Type: dictionary
324 | | ... | - super_if - Super-interface. Type: string
327 | | ... | \| Honeycomb fails to remove all sub-interfaces\
328 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
330 | | [Arguments] | ${node} | ${super_if}
332 | | Run keyword and expect error | *HoneycombError:*not successful. * code: 500.
333 | | ... | interfaceAPI.Remove all sub interfaces
334 | | ... | ${node} | ${super_if}
336 | Honeycomb configures tag rewrite
337 | | [Documentation] | Honeycomb configures tag-rewrite
339 | | ... | *Arguments:*
340 | | ... | - node - Information about a DUT node. Type: dictionary
341 | | ... | - super_if - Super-interface. Type: string
342 | | ... | - identifier - Sub-interface ID. Type: integer or string
343 | | ... | - settings - tag-rewrite parameters. Type: dictionary.
346 | | ... | \| Honeycomb configures tag rewrite\
347 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
348 | | ... | \| ${tag_rewrite_push} \|
350 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
352 | | interfaceAPI.Configure tag rewrite
353 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
355 | Rewrite tag from Honeycomb should be empty
356 | | [Documentation] | Checks if the tag-rewrite is empty or does not exist.
358 | | ... | *Arguments:*
359 | | ... | - node - Information about a DUT node. Type: dictionary
360 | | ... | - super_if - Super-interface. Type: string
361 | | ... | - identifier - Sub-interface ID. Type: integer or string
364 | | ... | \| Rewrite tag from Honeycomb should be empty\
365 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
367 | | [Arguments] | ${node} | ${super_if} | ${identifier}
369 | | Run keyword and expect error | *Hon*Error*oper*does not contain*tag-rewrite*
370 | | ... | interfaceAPI.Get tag rewrite oper data
371 | | ... | ${node} | ${super_if} | ${identifier}
373 | Rewrite tag from Honeycomb should be
374 | | [Documentation] | Checks if the operational data retrieved from Honeycomb\
375 | | ... | are as expected.
377 | | ... | *Arguments:*
378 | | ... | - node - Information about a DUT node. Type: dictionary
379 | | ... | - super_if - Super-interface. Type: string
380 | | ... | - identifier - Sub-interface ID. Type: integer or string
381 | | ... | - settings - tag-rewrite operational parameters to be checked.\
382 | | ... | Type: dictionary.
385 | | ... | \| Rewrite tag from Honeycomb should be\
386 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
387 | | ... | \| ${tag_rewrite_push_oper} \|
389 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
390 | | ${api_data}= | interfaceAPI.Get tag rewrite oper data
391 | | ... | ${node} | ${super_if} | ${identifier}
392 | | interfaceAPI.Compare Data Structures
393 | | ... | ${api_data} | ${settings}
395 | Rewrite tag from VAT should be
396 | | [Documentation] | Retrieves sub-interface configuration through VAT and\
397 | | ... | compares values of rewrite tag parameters with settings supplied in\
400 | | ... | *Arguments:*
401 | | ... | - node - information about a DUT node. Type: dictionary
402 | | ... | - interface - name of a sub-interface on the specified node.\
403 | | ... | Type: string
404 | | ... | - rw_settings - Parameters to be set while setting the rewrite tag.\
405 | | ... | Type: dictionary
408 | | ... | \| Rewrite tag from VAT should be\
409 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \|
411 | | [Arguments] | ${node} | ${interface} | ${rw_settings}
412 | | ${vat_data}= | InterfaceCLI.VPP get interface data | ${node} | ${interface}
413 | | interfaceAPI.Compare Data Structures | ${vat_data} | ${rw_settings}
415 | Honeycomb fails to set wrong rewrite tag
416 | | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\
419 | | ... | *Arguments:*
420 | | ... | - node - Information about a DUT node. Type: dictionary
421 | | ... | - super_if - Super-interface. Type: string
422 | | ... | - identifier - Sub-interface ID. Type: integer or string
423 | | ... | - settings - tag-rewrite parameters. Type: dictionary.
426 | | ... | \| Honeycomb fails to set wrong rewrite tag\
427 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
428 | | ... | \| ${tag_rewrite_push_WRONG} \|
430 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
431 | | Run keyword and expect error | *HoneycombError: * was not successful. *00.
432 | | ... | interfaceAPI.Configure tag rewrite
433 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
435 | VAT disables tag-rewrite
436 | | [Documentation] | The keyword disables the tag-rewrite using VAT.
438 | | ... | *Arguments:*
439 | | ... | - node - Information about a DUT node. Type: dictionary
440 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
441 | | ... | Type: string
444 | | ... | \| VAT disables tag-rewrite\
445 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
447 | | [Arguments] | ${node} | ${sub_interface}
449 | | ${sw_if_index}= | interfaceCLI.Get sw if index | ${node} | ${sub_interface}
450 | | L2 tag rewrite | ${node} | ${sw_if_index} | disable
452 | Honeycomb sets sub-interface ipv4 address
453 | | [Documentation] | Uses Honeycomb API to configure an ipv4 address on the\
454 | | ... | spcified sub-interface. Replaces any existing ipv4 addresses.
456 | | ... | *Arguments:*
457 | | ... | - node - Information about a DUT node. Type: dictionary
458 | | ... | - super_if - Super-interface. Type: string
459 | | ... | - identifier - Sub-interface ID. Type: integer or string
460 | | ... | - address - IPv4 address to set. Type: string
461 | | ... | - prefix - IPv4 network prefix length to set. Type: integer
464 | | ... | \| | Honeycomb sets sub-interface ipv4 address\
465 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
466 | | ... | \| 192.168.0.2 \| ${24} \|
468 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
469 | | Add ip address to sub_interface
470 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4
472 | Sub-interface ipv4 address from Honeycomb should be
473 | | [Documentation] | Uses Honeycomb API to verify ipv4 address configuration\
474 | | ... | on the specified sub-interface.
476 | | ... | *Arguments:*
477 | | ... | - node - Information about a DUT node. Type: dictionary
478 | | ... | - super_if - Super-interface. Type: string
479 | | ... | - identifier - Sub-interface ID. Type: integer or string
480 | | ... | - address - IPv4 address to expect. Type: string
481 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
484 | | ... | \| sub-interface ipv4 address from Honeycomb should be\
485 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
486 | | ... | \| 192.168.0.2 \| ${24} \|
488 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
489 | | ${if_data}= | interfaceAPI.Get sub interface oper data
490 | | ... | ${node} | ${super_if} | ${identifier}
492 | | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address}
494 | | ... | ${if_data['ipv4']['address'][0]['prefix-length']} | ${prefix}
496 | Sub-interface ipv4 address from VAT should be
497 | | [Documentation] | Uses VAT to verify ipv4 address configuration\
498 | | ... | on the specified sub-interface.
500 | | ... | *Arguments:*
501 | | ... | - node - Information about a DUT node. Type: dictionary
502 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
503 | | ... | Type: string
504 | | ... | - address - IPv4 address to expect. Type: string
505 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
508 | | ... | \| sub-interface ipv4 address from VAT should be\
509 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
511 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
512 | | ${data}= | interfaceCLI.VPP get interface ip addresses
513 | | ... | ${node} | ${sub_interface} | ipv4
514 | | Should be equal | ${data[0]['ip']} | ${address}
515 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
517 | Honeycomb removes all sub-interface ipv4 addresses
518 | | [Documentation] | Uses Honeycomb API to remove all configured ipv4\
519 | | ... | addresses from the sub-interface.
521 | | ... | *Arguments:*
522 | | ... | - node - Information about a DUT node. Type: dictionary
523 | | ... | - super_if - Super-interface. Type: string
524 | | ... | - identifier - Sub-interface ID. Type: integer or string
527 | | ... | \| Honeycomb removes all sub-interface ipv4 addresses\
528 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
530 | | [Arguments] | ${node} | ${super_if} | ${identifier}
531 | | Remove all ip addresses from sub_interface
532 | | ... | ${node} | ${super_if} | ${identifier} | ipv4
534 | Sub-interface ipv4 address from Honeycomb should be empty
535 | | [Documentation] | Uses Honeycomb API 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 | | ... | - super_if - Super-interface. Type: string
541 | | ... | - identifier - Sub-interface ID. Type: integer or string
544 | | ... | \| sub-interface ipv4 address from Honeycomb should be empty\
545 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
547 | | [Arguments] | ${node} | ${super_if} | ${identifier}
548 | | ${if_data}= | interfaceAPI.Get sub interface oper data
549 | | ... | ${node} | ${super_if} | ${identifier}
550 | | Run keyword and expect error | *KeyError: 'ipv4'*
551 | | ... | Set Variable | ${if_data['ipv4']['address'][0]['ip']}
553 | Sub-interface ipv4 address from VAT should be empty
554 | | [Documentation] | Uses VAT to verify that ipv4 address\
555 | | ... | configuration on the specified sub-interface is empty.
557 | | ... | *Arguments:*
558 | | ... | - node - Information about a DUT node. Type: dictionary
559 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
560 | | ... | Type: string
563 | | ... | \| sub-interface ipv4 address from VAT should be empty\
564 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
566 | | [Arguments] | ${node} | ${sub_interface}
567 | | Run keyword and expect error | *No JSON object could be decoded*
568 | | ... | interfaceCLI.VPP get interface ip addresses
569 | | ... | ${node} | ${sub_interface} | ipv4
571 | Honeycomb sets sub-interface ipv6 address
572 | | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\
573 | | ... | spcified sub-interface. Replaces any existing ipv6 addresses.
575 | | ... | *Arguments:*
576 | | ... | - node - Information about a DUT node. Type: dictionary
577 | | ... | - super_if - Super-interface. Type: string
578 | | ... | - identifier - Sub-interface ID. Type: integer or string
579 | | ... | - address - IPv6 address to set. Type: string
580 | | ... | - prefix - IPv6 network prefix length to set. Type: integer
583 | | ... | \| | Honeycomb sets sub-interface ipv6 address\
584 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
585 | | ... | \| 10::10 \| ${64} \|
587 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
588 | | Add ip address to sub_interface
589 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6
591 | Sub-interface IPv6 address from Honeycomb should contain
592 | | [Documentation] | Uses Honeycomb API to verify ipv6 address configuration\
593 | | ... | on the specified sub-interface.
595 | | ... | *Arguments:*
596 | | ... | - node - Information about a DUT node. Type: dictionary
597 | | ... | - super_if - Super-interface. Type: string
598 | | ... | - identifier - Sub-interface ID. Type: integer or string
599 | | ... | - address - IPv6 address to expect. Type: string
600 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
603 | | ... | \| sub-interface IPv6 address from Honeycomb should contain\
604 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
605 | | ... | \| 10::10 \| ${64} \|
607 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
608 | | ${if_data}= | interfaceAPI.Get sub interface oper data
609 | | ... | ${node} | ${super_if} | ${identifier}
610 | | ${settings}= | Create Dictionary
611 | | ... | ip=${address} | prefix-length=${prefix}
612 | | Should contain | ${if_data['ipv6']['address']} | ${settings}
614 | Sub-interface IPv6 address from VAT should contain
615 | | [Documentation] | Uses VAT to verify ipv6 address configuration\
616 | | ... | on the specified sub-interface.
618 | | ... | *Arguments:*
619 | | ... | - node - Information about a DUT node. Type: dictionary
620 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
621 | | ... | Type: string
622 | | ... | - address - IPv6 address to expect. Type: string
623 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
626 | | ... | \| sub-interface IPv6 address from VAT should contain\
627 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
629 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
630 | | ${data}= | interfaceCLI.VPP get interface ip addresses
631 | | ... | ${node} | ${sub_interface} | ipv6
632 | | Should be equal | ${data[0]['ip']} | ${address}
633 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
635 | Honeycomb removes all sub-interface ipv6 addresses
636 | | [Documentation] | Uses Honeycomb API to remove all configured ipv6\
637 | | ... | addresses from the sub-interface.
639 | | ... | *Arguments:*
640 | | ... | - node - Information about a DUT node. Type: dictionary
641 | | ... | - super_if - Super-interface. Type: string
642 | | ... | - identifier - Sub-interface ID. Type: integer or string
645 | | ... | \| Honeycomb removes all sub-interface ipv6 addresses\
646 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
648 | | [Arguments] | ${node} | ${super_if} | ${identifier}
649 | | Remove all ip addresses from sub_interface
650 | | ... | ${node} | ${super_if} | ${identifier} | ipv6
652 | Sub-interface ipv6 address from Honeycomb should be empty
653 | | [Documentation] | Uses Honeycomb API 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 | | ... | - super_if - Super-interface. Type: string
659 | | ... | - identifier - Sub-interface ID. Type: integer or string
662 | | ... | \| sub-interface ipv6 address from Honeycomb should be empty\
663 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
665 | | [Arguments] | ${node} | ${super_if} | ${identifier}
666 | | ${if_data}= | interfaceAPI.Get sub interface oper data
667 | | ... | ${node} | ${super_if} | ${identifier}
668 | | Run keyword and expect error | *KeyError: 'ipv6'*
669 | | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']}
671 | Sub-interface ipv6 address from VAT should be empty
672 | | [Documentation] | Uses VAT to verify that ipv6 address\
673 | | ... | configuration on the specified sub-interface is empty.
675 | | ... | *Arguments:*
676 | | ... | - node - Information about a DUT node. Type: dictionary
677 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
678 | | ... | Type: string
681 | | ... | \| sub-interface ipv6 address from VAT should be empty\
682 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
684 | | [Arguments] | ${node} | ${sub_interface}
685 | | Run keyword and expect error | *No JSON object could be decoded*
686 | | ... | interfaceCLI.VPP get interface ip addresses
687 | | ... | ${node} | ${sub_interface} | ipv6