Improve test tag string parsing
[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.IPUtil
17 | Library | resources.libraries.python.L2Util
18 | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
19 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
20 | Documentation | Keywords used to manipulate sub-interfaces.
21
22 *** Keywords ***
23 | Honeycomb creates sub-interface
24 | | [Documentation] | Create a sub-interface using Honeycomb API.
25 | | ...
26 | | ... | *Arguments:*
27 | | ... | - node - Information about a DUT node. Type: dictionary
28 | | ... | - super_interface - Super-interface where a sub-interface will be\
29 | | ... | created. Type: string
30 | | ... | - match - Match type. Type: string
31 | | ... | - tags - List of tags to be set while creating the sub-interface.\
32 | | ... | Type: list
33 | | ... | - sub_interface_settings - Sub-inteface parameters to be set while\
34 | | ... | creating the sub-interface. Type: dictionary
35 | | ...
36 | | ... | *Example:*
37 | | ... | \| Honeycomb creates sub-interface\
38 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0\
39 | | ... | \| vlan-tagged-exact-match \| ${sub_if_1_tags}\
40 | | ... | \| ${sub_if_1_settings} \|
41 | | ...
42 | | [Arguments] | ${node} | ${super_interface}
43 | | ... | ${match} | ${tags} | ${sub_interface_settings}
44 | | ...
45 | | Honeycomb Create sub interface | ${node} | ${super_interface}
46 | | ... | ${match} | ${tags} | &{sub_interface_settings}
47
48 | Sub-interface Operational Data From Honeycomb Should Be
49 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb\
50 | | ... | and compares it with settings supplied in argument.
51 | | ...
52 | | ... | *Arguments:*
53 | | ... | - node - Information about a DUT node. Type: dictionary
54 | | ... | - super_interface - Super-interface. Type: string
55 | | ... | - identifier - Sub-interface ID. Type: integer or string
56 | | ... | - sub_if_settings - Operational data for sub-interface to be checked.\
57 | | ... | Type: dictionary
58 | | ...
59 | | ... | *Example:*
60 | | ... | \| Sub-interface Operational Data From Honeycomb Should Be\
61 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
62 | | ... | \| ${sub_if_1_params} \|
63 | | ...
64 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
65 | | ... | ${sub_if_settings}
66 | | ...
67 | | ${api_data}= | Get sub interface oper data
68 | | ... | ${node} | ${super_interface} | ${identifier}
69 | | Compare Data Structures | ${api_data} | ${sub_if_settings}
70
71 | Sub-interface Operational Data From Honeycomb Should Be empty
72 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
73 | | ... | and expects no data.
74 | | ...
75 | | ... | *Arguments:*
76 | | ... | - node - Information about a DUT node. Type: dictionary
77 | | ... | - super_interface - Super-interface. Type: string
78 | | ... | - identifier - Sub-interface ID. Type: integer or string
79 | | ...
80 | | ... | *Example:*
81 | | ... | \| Sub-interface Operational Data From Honeycomb Should Be empty\
82 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
83 | | ...
84 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
85 | | ...
86 | | Run keyword and expect error | *KeyError: 'vpp-vlan:sub-interfaces'*
87 | | ... | Get sub interface oper data
88 | | ... | ${node} | ${super_interface} | ${identifier}
89
90 | Sub-interface state from Honeycomb should be
91 | | [Documentation] | Retrieves sub-interface configuration through Honeycomb \
92 | | ... | and checks the administrative and operational state.
93 | | ...
94 | | ... | *Arguments:*
95 | | ... | - node - Information about a DUT node. Type: dictionary
96 | | ... | - super_interface - Super-interface. Type: string
97 | | ... | - identifier - Sub-interface ID. Type: integer or string
98 | | ... | - admin_state - Required administrative state - up or down. \
99 | | ... | Type: string
100 | | ... | - oper_state - Required operational state - up or down. Type: string
101 | | ...
102 | | ... | *Example:*
103 | | ... | \| Sub-interface state from Honeycomb should be\
104 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| up \| up \|
105 | | ...
106 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
107 | | ... | ${admin_state} | ${oper_state}
108 | | ...
109 | | ${api_data}= | Get sub interface oper data
110 | | ... | ${node} | ${super_interface} | ${identifier}
111 | | Should be equal | ${api_data['admin-status']} | ${admin_state}
112 | | Should be equal | ${api_data['oper-status']} | ${oper_state}
113
114 | Sub-interface Operational Data From VAT Should Be
115 | | [Documentation] | Retrieves sub-interface configuration through VAT and\
116 | | ... | compares it with settings supplied in argument.
117 | | ...
118 | | ... | *Arguments:*
119 | | ... | - node - Information about a DUT node. Type: dictionary
120 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
121 | | ... | Type: string
122 | | ... | - sub_interface_settings - Operational data specific for a\
123 | | ... | sub-interface to be checked. Type: dictionary
124 | | ...
125 | | ... | *Example:*
126 | | ... | \| Sub-interface Operational Data From VAT Should Be\
127 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_if_1_params} \|
128 | | ...
129 | | [Arguments] | ${node} | ${sub_interface} | ${sub_interface_settings}
130 | | ...
131 | | ${vat_data}= | VPP get interface data
132 | | ... | ${node} | ${sub_interface}
133 | | Should be equal as strings | ${vat_data['sub_id']}
134 | | ... | ${sub_interface_settings['identifier']}
135 | | Should be equal as strings
136 | | ... | ${vat_data['interface_name']} | ${sub_interface}
137 | | Run keyword if | ${vat_data['link_up_down']} == 0
138 | | ... | Should be equal as strings
139 | | ... | ${sub_interface_settings['oper-status']} | down
140 | | Run keyword if | ${vat_data['link_up_down']} == 1
141 | | ... | Should be equal as strings
142 | | ... | ${sub_interface_settings['oper-status']} | up
143
144 | Sub-interface state from VAT should be
145 | | [Documentation] | Retrieves sub-interface configuration through VAT and \
146 | | ... | checks the administrative and operational state.
147 | | ...
148 | | ... | *Arguments:*
149 | | ... | - node - Information about a DUT node. Type: dictionary
150 | | ... | - sub_interface - Name of an sub-interface on the specified node. \
151 | | ... | Type: string
152 | | ... | - admin_state - Required administrative state - up or down. \
153 | | ... | Type: string
154 | | ... | - oper_state - Required operational state - up or down. Type: string
155 | | ...
156 | | ... | *Example:*
157 | | ... | \| Sub-interface state from VAT should be \
158 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| up \| up \|
159 | | ...
160 | | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state}
161 | | ...
162 | | ${vat_data}= | VPP get interface data
163 | | ... | ${node} | ${sub_interface}
164 | | Run keyword if | '${admin_state}' == 'down'
165 | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 0
166 | | Run keyword if | '${admin_state}' == 'up'
167 | | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 1
168 | | Run keyword if | '${oper_state}' == 'down'
169 | | ... | Should be equal as strings | ${vat_data['link_up_down']} | 0
170 | | Run keyword if | '${oper_state}' == 'up'
171 | | ... | Should be equal as strings | ${vat_data['link_up_down']} | 1
172
173 | Sub-interface indices from Honeycomb and VAT should correspond
174 | | [Documentation] | Uses VAT and Honeycomb to get operational data about the\
175 | | ... | given sub-interface and compares the interface indexes. The
176 | | ... | sub-interface index from Honeycomb should be greater than index from
177 | | ... | VAT by one.
178 | | ...
179 | | ... | *Arguments:*
180 | | ... | - node - Information about a DUT node. Type: dictionary
181 | | ... | - super_interface - Super-interface. Type: string
182 | | ... | - identifier - Sub-interface ID. Type: integer or string
183 | | ...
184 | | ... | *Example:*
185 | | ...
186 | | ... | \| Sub-interface indices from Honeycomb and VAT should correspond \
187 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
188 | | ...
189 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
190 | | ...
191 | | ${api_data}= | Get sub interface oper data
192 | | ... | ${node} | ${super_interface} | ${identifier}
193 | | ${vat_data}= | VPP get interface data
194 | | ... | ${node} | ${super_interface}.${identifier}
195 | | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1
196 | | Should be equal as strings
197 | | ... | ${api_data['if-index']} | ${sw_if_index}
198
199 | Honeycomb sets the sub-interface up
200 | | [Documentation] | Honeycomb sets the sub-interface up.
201 | | ...
202 | | ... | *Arguments:*
203 | | ... | - node - Information about a DUT node. Type: dictionary
204 | | ... | - super_interface - Super-interface. Type: string
205 | | ... | - identifier - Sub-interface ID. Type: integer or string
206 | | ...
207 | | ... | *Example:*
208 | | ... | Honeycomb sets the sub-interface up\
209 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
210 | | ...
211 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
212 | | ...
213 | | Set sub interface state
214 | | ... | ${node} | ${super_interface} | ${identifier} | up
215
216 | Honeycomb sets the sub-interface down
217 | | [Documentation] | Honeycomb sets the sub-interface down.
218 | | ...
219 | | ... | *Arguments:*
220 | | ... | - node - Information about a DUT node. Type: dictionary
221 | | ... | - super_interface - Super-interface. Type: string
222 | | ... | - identifier - Sub-interface ID. Type: integer or string
223 | | ...
224 | | ... | *Example:*
225 | | ... | Honeycomb sets the sub-interface down\
226 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
227 | | ...
228 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
229 | | ...
230 | | Set sub interface state
231 | | ... | ${node} | ${super_interface} | ${identifier} | down
232
233 | Honeycomb fails to set sub-interface up
234 | | [Documentation] | Honeycomb tries to set sub-interface up and expects error.
235 | | ...
236 | | ... | *Arguments:*
237 | | ... | - node - Information about a DUT node. Type: dictionary
238 | | ... | - super_interface - Super-interface. Type: string
239 | | ... | - identifier - Sub-interface ID. Type: integer or string
240 | | ...
241 | | ... | *Example:*
242 | | ... | \| Honeycomb fails to set sub-interface up\
243 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
244 | | ...
245 | | [Arguments] | ${node} | ${super_interface} | ${identifier}
246 | | ...
247 | | Run keyword and expect error | *HoneycombError: * was not successful. * 500.
248 | | ... | Set sub interface state
249 | | ... | ${node} | ${super_interface} | ${identifier} | up
250
251 | Honeycomb adds sub-interface to bridge domain
252 | | [Documentation] | Honeycomb adds the given sub-interface to bridge domain.
253 | | ...
254 | | ... | *Arguments:*
255 | | ... | - node - Information about a DUT node. Type: dictionary
256 | | ... | - super_if - Super-interface. Type: string
257 | | ... | - identifier - Sub-interface ID. Type: integer or string
258 | | ... | - sub_bd_setings - Bridge domain parameters to be set while adding\
259 | | ... | the sub-interface to the bridge domain. Type: dictionary
260 | | ...
261 | | ... | *Example:*
262 | | ... | \| Honeycomb adds sub-interface to bridge domain\
263 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
264 | | ...
265 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
266 | | ...
267 | | Add bridge domain to sub interface
268 | | ... | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings}
269
270 | Sub-interface bridge domain Operational Data From Honeycomb Should Be
271 | | [Documentation] | Uses Honeycomb API to verify sub-interface assignment to\
272 | | ... | a bridge domain.
273 | | ...
274 | | ... | *Arguments:*
275 | | ... | - node - Information about a DUT node. Type: dictionary
276 | | ... | - super_if - Super-interface. Type: string
277 | | ... | - identifier - Sub-interface ID. Type: integer or string
278 | | ... | - settings - Bridge domain parameters to be checked. Type: dictionary
279 | | ...
280 | | ... | *Example:*
281 | | ... | \| Sub-interface bridge domain Operational Data From Honeycomb Should Be\
282 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \|
283 | | ...
284 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
285 | | ...
286 | | ${if_data}= | Get BD data from sub interface
287 | | ... | ${node} | ${super_if} | ${identifier}
288 | | Should be equal | ${if_data['bridge-domain']}
289 | | ... | ${settings['bridge-domain']}
290
291 | Sub-interface bridge domain Operational Data From PAPI Should Be
292 | | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\
293 | | ... | domain.
294 | | ...
295 | | ... | *Arguments:*
296 | | ... | - node - Information about a DUT node. Type: dictionary
297 | | ... | - interface - Name of a sub-interface on the specified node. Type:\
298 | | ... | string
299 | | ... | - setings - Parameters to be checked. Type: dictionary
300 | | ...
301 | | ... | *Example:*
302 | | ... | \| Sub-interface bridge domain Operational Data From PAPI Should Be\
303 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \|
304 | | ...
305 | | [Arguments] | ${node} | ${interface} | ${settings}
306 | | ...
307 | | ${bd_data}= | VPP get bridge domain data | ${node}
308 | | ${bd_intf}= | Set Variable | ${bd_data[0]}
309 | | ${sw_if_data}= | Set Variable | ${bd_intf['sw_if_details'][0]}
310 | | Should be equal as integers | ${bd_intf['flood']} | ${bd_settings['flood']}
311 | | Should be equal as integers | ${bd_intf['forward']}
312 | | ... | ${bd_settings['forward']}
313 | | Should be equal as integers | ${bd_intf['learn']} | ${bd_settings['learn']}
314 # interface[1] = sw_if_index, interface[2] = shg
315 | | Should be equal as strings | ${sw_if_data[2]}
316 | | ... | ${settings['split-horizon-group']}
317
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.
321 | | ...
322 | | ... | *Arguments:*
323 | | ... | - node - Information about a DUT node. Type: dictionary
324 | | ... | - super_if - Super-interface. Type: string
325 | | ...
326 | | ... | *Example:*
327 | | ... | \| Honeycomb fails to remove all sub-interfaces\
328 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
329 | | ...
330 | | [Arguments] | ${node} | ${super_if}
331 | | ...
332 | | Run keyword and expect error | *HoneycombError:*not successful. * code: 500.
333 | | ... | Remove all sub interfaces
334 | | ... | ${node} | ${super_if}
335
336 | Honeycomb configures tag rewrite
337 | | [Documentation] | Honeycomb configures tag-rewrite
338 | | ...
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.
344 | | ...
345 | | ... | *Example:*
346 | | ... | \| Honeycomb configures tag rewrite\
347 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
348 | | ... | \| ${tag_rewrite_push} \|
349 | | ...
350 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
351 | | ...
352 | | Configure tag rewrite
353 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
354
355 | Rewrite tag from Honeycomb should be empty
356 | | [Documentation] | Checks if the tag-rewrite is empty or does not exist.
357 | | ...
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
362 | | ...
363 | | ... | *Example:*
364 | | ... | \| Rewrite tag from Honeycomb should be empty\
365 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \|
366 | | ...
367 | | [Arguments] | ${node} | ${super_if} | ${identifier}
368 | | ...
369 | | Run keyword and expect error | *Hon*Error*oper*does not contain*tag-rewrite*
370 | | ... | Get tag rewrite oper data
371 | | ... | ${node} | ${super_if} | ${identifier}
372
373 | Rewrite tag from Honeycomb should be
374 | | [Documentation] | Checks if the operational data retrieved from Honeycomb\
375 | | ... | are as expected.
376 | | ...
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.
383 | | ...
384 | | ... | *Example:*
385 | | ... | \| Rewrite tag from Honeycomb should be\
386 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
387 | | ... | \| ${tag_rewrite_push_oper} \|
388 | | ...
389 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
390 | | ${api_data}= | Get tag rewrite oper data
391 | | ... | ${node} | ${super_if} | ${identifier}
392 | | Compare Data Structures
393 | | ... | ${api_data} | ${settings}
394
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\
398 | | ... | argument.
399 | | ...
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
406 | | ...
407 | | ... | *Example:*
408 | | ... | \| Rewrite tag from VAT should be\
409 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \|
410 | | ...
411 | | [Arguments] | ${node} | ${interface} | ${rw_settings}
412 | | ${vat_data}= | VPP get interface data | ${node} | ${interface}
413 | | Compare Data Structures | ${vat_data} | ${rw_settings}
414
415 | Honeycomb fails to set wrong rewrite tag
416 | | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\
417 | | ... | an error.
418 | | ...
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.
424 | | ...
425 | | ... | *Example:*
426 | | ... | \| Honeycomb fails to set wrong rewrite tag\
427 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\
428 | | ... | \| ${tag_rewrite_push_WRONG} \|
429 | | ...
430 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings}
431 | | Run keyword and expect error | *HoneycombError: * was not successful. *00.
432 | | ... | Configure tag rewrite
433 | | ... | ${node} | ${super_if} | ${identifier} | ${settings}
434
435 | Honeycomb sets sub-interface ipv4 address
436 | | [Documentation] | Uses Honeycomb API to configure an ipv4 address on the\
437 | | ... | spcified sub-interface. Replaces any existing ipv4 addresses.
438 | | ...
439 | | ... | *Arguments:*
440 | | ... | - node - Information about a DUT node. Type: dictionary
441 | | ... | - super_if - Super-interface. Type: string
442 | | ... | - identifier - Sub-interface ID. Type: integer or string
443 | | ... | - address - IPv4 address to set. Type: string
444 | | ... | - prefix - IPv4 network prefix length to set. Type: integer
445 | | ...
446 | | ... | *Example:*
447 | | ... | \| | Honeycomb sets sub-interface ipv4 address\
448 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
449 | | ... | \| 192.168.0.2 \| ${24} \|
450 | | ...
451 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
452 | | Add ip address to sub_interface
453 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4
454
455 | Sub-interface ipv4 address from Honeycomb should be
456 | | [Documentation] | Uses Honeycomb API to verify ipv4 address configuration\
457 | | ... | on the specified sub-interface.
458 | | ...
459 | | ... | *Arguments:*
460 | | ... | - node - Information about a DUT node. Type: dictionary
461 | | ... | - super_if - Super-interface. Type: string
462 | | ... | - identifier - Sub-interface ID. Type: integer or string
463 | | ... | - address - IPv4 address to expect. Type: string
464 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
465 | | ...
466 | | ... | *Example:*
467 | | ... | \| sub-interface ipv4 address from Honeycomb should be\
468 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
469 | | ... | \| 192.168.0.2 \| ${24} \|
470 | | ...
471 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
472 | | ${if_data}= | Get sub interface oper data
473 | | ... | ${node} | ${super_if} | ${identifier}
474 | | Should be equal
475 | | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address}
476 | | Should be equal
477 | | ... | ${if_data['ipv4']['address'][0]['prefix-length']} | ${prefix}
478
479 | Sub-interface ipv4 address from VAT should be
480 | | [Documentation] | Uses VAT to verify ipv4 address configuration\
481 | | ... | on the specified sub-interface.
482 | | ...
483 | | ... | *Arguments:*
484 | | ... | - node - Information about a DUT node. Type: dictionary
485 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
486 | | ... | Type: string
487 | | ... | - address - IPv4 address to expect. Type: string
488 | | ... | - prefix - IPv4 network prefix length to expect. Type: integer
489 | | ...
490 | | ... | *Example:*
491 | | ... | \| sub-interface ipv4 address from VAT should be\
492 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
493 | | ...
494 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
495 | | ${data}= | VPP get interface ip addresses
496 | | ... | ${node} | ${sub_interface} | ipv4
497 | | Should be equal | ${data[0]['ip']} | ${address}
498 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
499
500 | Honeycomb removes all sub-interface ipv4 addresses
501 | | [Documentation] | Uses Honeycomb API to remove all configured ipv4\
502 | | ... | addresses from the sub-interface.
503 | | ...
504 | | ... | *Arguments:*
505 | | ... | - node - Information about a DUT node. Type: dictionary
506 | | ... | - super_if - Super-interface. Type: string
507 | | ... | - identifier - Sub-interface ID. Type: integer or string
508 | | ...
509 | | ... | *Example:*
510 | | ... | \| Honeycomb removes all sub-interface ipv4 addresses\
511 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
512 | | ...
513 | | [Arguments] | ${node} | ${super_if} | ${identifier}
514 | | Remove all ip addresses from sub_interface
515 | | ... | ${node} | ${super_if} | ${identifier} | ipv4
516
517 | Sub-interface ipv4 address from Honeycomb should be empty
518 | | [Documentation] | Uses Honeycomb API to verify that ipv4 address\
519 | | ... | configuration on the specified sub-interface is empty.
520 | | ...
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
525 | | ...
526 | | ... | *Example:*
527 | | ... | \| sub-interface ipv4 address from Honeycomb should be empty\
528 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
529 | | ...
530 | | [Arguments] | ${node} | ${super_if} | ${identifier}
531 | | ${if_data}= | Get sub interface oper data
532 | | ... | ${node} | ${super_if} | ${identifier}
533 | | Run keyword and expect error | *KeyError: 'ipv4'*
534 | | ... | Set Variable | ${if_data['ipv4']['address'][0]['ip']}
535
536 | Sub-interface ipv4 address from VAT should be empty
537 | | [Documentation] | Uses VAT to verify that ipv4 address\
538 | | ... | configuration on the specified sub-interface is empty.
539 | | ...
540 | | ... | *Arguments:*
541 | | ... | - node - Information about a DUT node. Type: dictionary
542 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
543 | | ... | Type: string
544 | | ...
545 | | ... | *Example:*
546 | | ... | \| sub-interface ipv4 address from VAT should be empty\
547 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
548 | | ...
549 | | [Arguments] | ${node} | ${sub_interface}
550 | | ${data}= | VPP get interface ip addresses
551 | | ... | ${node} | ${sub_interface} | ipv4
552 | | Should be empty | ${data}
553
554 | Honeycomb sets sub-interface ipv6 address
555 | | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\
556 | | ... | spcified sub-interface. Replaces any existing ipv6 addresses.
557 | | ...
558 | | ... | *Arguments:*
559 | | ... | - node - Information about a DUT node. Type: dictionary
560 | | ... | - super_if - Super-interface. Type: string
561 | | ... | - identifier - Sub-interface ID. Type: integer or string
562 | | ... | - address - IPv6 address to set. Type: string
563 | | ... | - prefix - IPv6 network prefix length to set. Type: integer
564 | | ...
565 | | ... | *Example:*
566 | | ... | \| | Honeycomb sets sub-interface ipv6 address\
567 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
568 | | ... | \| 10::10 \| ${64} \|
569 | | ...
570 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
571 | | Add ip address to sub_interface
572 | | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6
573
574 | Sub-interface IPv6 address from Honeycomb should contain
575 | | [Documentation] | Uses Honeycomb API to verify ipv6 address configuration\
576 | | ... | on the specified sub-interface.
577 | | ...
578 | | ... | *Arguments:*
579 | | ... | - node - Information about a DUT node. Type: dictionary
580 | | ... | - super_if - Super-interface. Type: string
581 | | ... | - identifier - Sub-interface ID. Type: integer or string
582 | | ... | - address - IPv6 address to expect. Type: string
583 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
584 | | ...
585 | | ... | *Example:*
586 | | ... | \| sub-interface IPv6 address from Honeycomb should contain\
587 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \
588 | | ... | \| 10::10 \| ${64} \|
589 | | ...
590 | | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix}
591 | | ${if_data}= | Get sub interface oper data
592 | | ... | ${node} | ${super_if} | ${identifier}
593 | | ${settings}= | Create Dictionary
594 | | ... | ip=${address} | prefix-length=${prefix}
595 | | Should contain | ${if_data['ipv6']['address']} | ${settings}
596
597 | Sub-interface IPv6 address from VAT should contain
598 | | [Documentation] | Uses VAT to verify ipv6 address configuration\
599 | | ... | on the specified sub-interface.
600 | | ...
601 | | ... | *Arguments:*
602 | | ... | - node - Information about a DUT node. Type: dictionary
603 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
604 | | ... | Type: string
605 | | ... | - address - IPv6 address to expect. Type: string
606 | | ... | - prefix - IPv6 network prefix length to expect. Type: integer
607 | | ...
608 | | ... | *Example:*
609 | | ... | \| sub-interface IPv6 address from VAT should contain\
610 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
611 | | ...
612 | | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix}
613 | | ${data}= | VPP get interface ip addresses
614 | | ... | ${node} | ${sub_interface} | ipv6
615 | | Should be equal | ${data[0]['ip']} | ${address}
616 | | Should be equal | ${data[0]['prefix_length']} | ${prefix}
617
618 | Honeycomb removes all sub-interface ipv6 addresses
619 | | [Documentation] | Uses Honeycomb API to remove all configured ipv6\
620 | | ... | addresses from the sub-interface.
621 | | ...
622 | | ... | *Arguments:*
623 | | ... | - node - Information about a DUT node. Type: dictionary
624 | | ... | - super_if - Super-interface. Type: string
625 | | ... | - identifier - Sub-interface ID. Type: integer or string
626 | | ...
627 | | ... | *Example:*
628 | | ... | \| Honeycomb removes all sub-interface ipv6 addresses\
629 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
630 | | ...
631 | | [Arguments] | ${node} | ${super_if} | ${identifier}
632 | | Remove all ip addresses from sub_interface
633 | | ... | ${node} | ${super_if} | ${identifier} | ipv6
634
635 | Sub-interface ipv6 address from Honeycomb should be empty
636 | | [Documentation] | Uses Honeycomb API to verify that ipv6 address\
637 | | ... | configuration on the specified sub-interface is empty.
638 | | ...
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
643 | | ...
644 | | ... | *Example:*
645 | | ... | \| sub-interface ipv6 address from Honeycomb should be empty\
646 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \|
647 | | ...
648 | | [Arguments] | ${node} | ${super_if} | ${identifier}
649 | | ${if_data}= | Get sub interface oper data
650 | | ... | ${node} | ${super_if} | ${identifier}
651 | | Run keyword and expect error | *KeyError: 'ipv6'*
652 | | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']}
653
654 | Sub-interface ipv6 address from VAT should be empty
655 | | [Documentation] | Uses VAT to verify that ipv6 address\
656 | | ... | configuration on the specified sub-interface is empty.
657 | | ...
658 | | ... | *Arguments:*
659 | | ... | - node - Information about a DUT node. Type: dictionary
660 | | ... | - sub_interface - Name of an sub-interface on the specified node.\
661 | | ... | Type: string
662 | | ...
663 | | ... | *Example:*
664 | | ... | \| sub-interface ipv6 address from VAT should be empty\
665 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \|
666 | | ...
667 | | [Arguments] | ${node} | ${sub_interface}
668 | | ${data}= | VPP get interface ip addresses
669 | | ... | ${node} | ${sub_interface} | ipv6
670 | | Should be empty | ${data}