a7f739b1b055b81067a97ff6e6202df3e237bece
[csit.git] / resources / libraries / robot / honeycomb / sub_interface.robot
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:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
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.
13
14 *** Settings ***
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.
20
21 *** Keywords ***
22 | Honeycomb creates sub-interface
23 | | [Documentation] | Create a sub-interface using Honeycomb API.
24 | | ...
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.\
31 | | ... | Type: list
32 | | ... | - sub_interface_settings - Sub-inteface parameters to be set while\
33 | | ... | creating the sub-interface. Type: dictionary
34 | | ...
35 | | ... | *Example:*
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} \|
40 | | ...
41 | | [Arguments] | ${node} | ${super_interface}
42 | | ... | ${match} | ${tags} | ${sub_interface_settings}
43 | | ...
44 | | Honeycomb Create sub interface | ${node} | ${super_interface}
45 | | ... | ${match} | ${tags} | &{sub_interface_settings}
46
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.
50 | | ...
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
57 | | ...
58 | | ... | *Example:*
59 | | ... | \| Sub-interface Operational Data From Honeycomb Should Be\
60 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
61 | | ... | \| ${sub_if_1_params} \|
62 | | ...
63 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
64 | | ... | ${sub_if_settings}
65 | | ...
66 | | ${api_data}= | Get sub interface oper data
67 | | ... | ${node} | ${super_interface} | ${identifier}
68 | | Compare Data Structures | ${api_data} | ${sub_if_settings}
69
70 | Sub-interface Operational Data From Honeycomb Should Be empty
71 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
72 | | ... | and expects no data.
73 | | ...
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
78 | | ...
79 | | ... | *Example:*
80 | | ... | \| Sub-interface Operational Data From Honeycomb Should Be empty\
81 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
82 | | ...
83 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
84 | | ...
85 | | Run keyword and expect error | *KeyError: 'vpp-vlan:sub-interfaces'*
86 | | ... | Get sub interface oper data
87 | | ... | ${node} | ${super_interface} | ${identifier}
88
89 | Sub-interface state from Honeycomb should be
90 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
91 | | ... | and checks the administrative and operational state.
92 | | ...
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
100 | | ...
101 | | ... | *Example:*
102 | | ... | \| Sub-interface state from Honeycomb should be\
103 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| up \| up \|
104 | | ...
105 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
106 | | ... | ${admin_state} | ${oper_state}
107 | | ...
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}
112
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.
116 | | ...
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
123 | | ...
124 | | ... | *Example:*
125 | | ... | \| Sub-interface Operational Data From VAT Should Be\
126 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_if_1_params} \|
127 | | ...
128 | | [Arguments] | ${node} | ${sub_interface} | ${sub_interface_settings}
129 | | ...
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
142
143 | Sub-interface state from VAT should be
144 | | [Documentation] | Retrieves sub-interface configuration through VAT and \
145 | | ... | checks the administrative and operational state.
146 | | ...
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
154 | | ...
155 | | ... | *Example:*
156 | | ... | \| Sub-interface state from VAT should be \
157 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| up \| up \|
158 | | ...
159 | | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state}
160 | | ...
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
171
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.
177 | | ...
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
182 | | ...
183 | | ... | *Example:*
184 | | ...
185 | | ... | \| Sub-interface indices from Honeycomb and VAT should correspond \
186 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
187 | | ...
188 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
189 | | ...
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}
197
198 | Honeycomb sets the sub-interface up
199 | | [Documentation] | Honeycomb sets the sub-interface up.
200 | | ...
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
205 | | ...
206 | | ... | *Example:*
207 | | ... | Honeycomb sets the sub-interface up\
208 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
209 | | ...
210 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
211 | | ...
212 | | Set sub interface state
213 | | ... | ${node} | ${super_interface} | ${identifier} | up
214
215 | Honeycomb sets the sub-interface down
216 | | [Documentation] | Honeycomb sets the sub-interface down.
217 | | ...
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
222 | | ...
223 | | ... | *Example:*
224 | | ... | Honeycomb sets the sub-interface down\
225 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
226 | | ...
227 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
228 | | ...
229 | | Set sub interface state
230 | | ... | ${node} | ${super_interface} | ${identifier} | down
231
232 | Honeycomb fails to set sub-interface up
233 | | [Documentation] | Honeycomb tries to set sub-interface up and expects error.
234 | | ...
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
239 | | ...
240 | | ... | *Example:*
241 | | ... | \| Honeycomb fails to set sub-interface up\
242 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
243 | | ...
244 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
245 | | ...
246 | | Run keyword and expect error | *HoneycombError: * was not successful. * 500.
247 | | ... | Set sub interface state
248 | | ... | ${node} | ${super_interface} | ${identifier} | up
249
250 | Honeycomb adds sub-interface to bridge domain
251 | | [Documentation] | Honeycomb adds the given sub-interface to bridge domain.
252 | | ...
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
259 | | ...
260 | | ... | *Example:*
261 | | ... | \| Honeycomb adds sub-interface to bridge domain\
262 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
263 | | ...
264 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
265 | | ...
266 | | Add bridge domain to sub interface
267 | | ... | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
268
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.
272 | | ...
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
278 | | ...
279 | | ... | *Example:*
280 | | ... | \| Sub-interface bridge domain Operational Data From Honeycomb Should Be\
281 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
282 | | ...
283 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
284 | | ...
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']}
289
290 | Sub-interface bridge domain Operational Data From PAPI Should Be
291 | | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\
292 | | ... | domain.
293 | | ...
294 | | ... | *Arguments:*
295 | | ... | - node - Information about a DUT node. Type: dictionary
296 | | ... | - interface - Name of a sub-interface on the specified node. Type:\
297 | | ... | string
298 | | ... | - setings - Parameters to be checked. Type: dictionary
299 | | ...
300 | | ... | *Example:*
301 | | ... | \| Sub-interface bridge domain Operational Data From PAPI Should Be\
302 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \|
303 | | ...
304 | | [Arguments] | ${node} | ${interface} | ${settings}
305 | | ...
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']}
316
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.
320 | | ...
321 | | ... | *Arguments:*
322 | | ... | - node - Information about a DUT node. Type: dictionary
323 | | ... | - super_if - Super-interface. Type: string
324 | | ...
325 | | ... | *Example:*
326 | | ... | \| Honeycomb fails to remove all sub-interfaces\
327 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
328 | | ...
329 | | [Arguments] | ${node} | ${super_if}
330 | | ...
331 | | Run keyword and expect error | *HoneycombError:*not successful. * code: 500.
332 | | ... | Remove all sub interfaces
333 | | ... | ${node} | ${super_if}
334
335 | Honeycomb configures tag rewrite
336 | | [Documentation] | Honeycomb configures tag-rewrite
337 | | ...
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.
343 | | ...
344 | | ... | *Example:*
345 | | ... | \| Honeycomb configures tag rewrite\
346 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
347 | | ... | \| ${tag_rewrite_push} \|
348 | | ...
349 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
350 | | ...
351 | | Configure tag rewrite
352 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
353
354 | Rewrite tag from Honeycomb should be empty
355 | | [Documentation] | Checks if the tag-rewrite is empty or does not exist.
356 | | ...
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
361 | | ...
362 | | ... | *Example:*
363 | | ... | \| Rewrite tag from Honeycomb should be empty\
364 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
365 | | ...
366 | | [Arguments] | ${node} | ${super_if} | ${identifier}
367 | | ...
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}
371
372 | Rewrite tag from Honeycomb should be
373 | | [Documentation] | Checks if the operational data retrieved from Honeycomb\
374 | | ... | are as expected.
375 | | ...
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.
382 | | ...
383 | | ... | *Example:*
384 | | ... | \| Rewrite tag from Honeycomb should be\
385 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
386 | | ... | \| ${tag_rewrite_push_oper} \|
387 | | ...
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}
393
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\
397 | | ... | argument.
398 | | ...
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
405 | | ...
406 | | ... | *Example:*
407 | | ... | \| Rewrite tag from VAT should be\
408 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \|
409 | | ...
410 | | [Arguments] | ${node} | ${interface} | ${rw_settings}
411 | | ${vat_data}= | VPP get interface data | ${node} | ${interface}
412 | | Compare Data Structures | ${vat_data} | ${rw_settings}
413
414 | Honeycomb fails to set wrong rewrite tag
415 | | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\
416 | | ... | an error.
417 | | ...
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.
423 | | ...
424 | | ... | *Example:*
425 | | ... | \| Honeycomb fails to set wrong rewrite tag\
426 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
427 | | ... | \| ${tag_rewrite_push_WRONG} \|
428 | | ...
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}
433
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.
437 | | ...
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
444 | | ...
445 | | ... | *Example:*
446 | | ... | \| | Honeycomb sets sub-interface ipv4 address\
447 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
448 | | ... | \| 192.168.0.2 \| ${24} \|
449 | | ...
450 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
451 | | Add ip address to sub_interface
452 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4
453
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.
457 | | ...
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
464 | | ...
465 | | ... | *Example:*
466 | | ... | \| sub-interface ipv4 address from Honeycomb should be\
467 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
468 | | ... | \| 192.168.0.2 \| ${24} \|
469 | | ...
470 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
471 | | ${if_data}= | Get sub interface oper data
472 | | ... | ${node} | ${super_if} | ${identifier}
473 | | Should be equal
474 | | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address}
475 | | Should be equal
476 | | ... | ${if_data['ipv4']['address'][0]['prefix-length']} | ${prefix}
477
478 | Sub-interface ipv4 address from VAT should be
479 | | [Documentation] | Uses VAT to verify ipv4 address configuration\
480 | | ... | on the specified sub-interface.
481 | | ...
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
488 | | ...
489 | | ... | *Example:*
490 | | ... | \| sub-interface ipv4 address from VAT should be\
491 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
492 | | ...
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}
498
499 | Honeycomb removes all sub-interface ipv4 addresses
500 | | [Documentation] | Uses Honeycomb API to remove all configured ipv4\
501 | | ... | addresses from the sub-interface.
502 | | ...
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
507 | | ...
508 | | ... | *Example:*
509 | | ... | \| Honeycomb removes all sub-interface ipv4 addresses\
510 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
511 | | ...
512 | | [Arguments] | ${node} | ${super_if} | ${identifier}
513 | | Remove all ip addresses from sub_interface
514 | | ... | ${node} | ${super_if} | ${identifier} | ipv4
515
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.
519 | | ...
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
524 | | ...
525 | | ... | *Example:*
526 | | ... | \| sub-interface ipv4 address from Honeycomb should be empty\
527 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
528 | | ...
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']}
534
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.
538 | | ...
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
543 | | ...
544 | | ... | *Example:*
545 | | ... | \| sub-interface ipv4 address from VAT should be empty\
546 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
547 | | ...
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
552
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.
556 | | ...
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
563 | | ...
564 | | ... | *Example:*
565 | | ... | \| | Honeycomb sets sub-interface ipv6 address\
566 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
567 | | ... | \| 10::10 \| ${64} \|
568 | | ...
569 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
570 | | Add ip address to sub_interface
571 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6
572
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.
576 | | ...
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
583 | | ...
584 | | ... | *Example:*
585 | | ... | \| sub-interface IPv6 address from Honeycomb should contain\
586 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
587 | | ... | \| 10::10 \| ${64} \|
588 | | ...
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}
595
596 | Sub-interface IPv6 address from VAT should contain
597 | | [Documentation] | Uses VAT to verify ipv6 address configuration\
598 | | ... | on the specified sub-interface.
599 | | ...
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
606 | | ...
607 | | ... | *Example:*
608 | | ... | \| sub-interface IPv6 address from VAT should contain\
609 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
610 | | ...
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}
616
617 | Honeycomb removes all sub-interface ipv6 addresses
618 | | [Documentation] | Uses Honeycomb API to remove all configured ipv6\
619 | | ... | addresses from the sub-interface.
620 | | ...
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
625 | | ...
626 | | ... | *Example:*
627 | | ... | \| Honeycomb removes all sub-interface ipv6 addresses\
628 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
629 | | ...
630 | | [Arguments] | ${node} | ${super_if} | ${identifier}
631 | | Remove all ip addresses from sub_interface
632 | | ... | ${node} | ${super_if} | ${identifier} | ipv6
633
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.
637 | | ...
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
642 | | ...
643 | | ... | *Example:*
644 | | ... | \| sub-interface ipv6 address from Honeycomb should be empty\
645 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
646 | | ...
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']}
652
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.
656 | | ...
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
661 | | ...
662 | | ... | *Example:*
663 | | ... | \| sub-interface ipv6 address from VAT should be empty\
664 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
665 | | ...
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