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 | Resource | resources/libraries/robot/shared/interfaces.robot
16 | Library | resources.libraries.python.NodePath
17 | Library | resources.libraries.python.LispSetup.LispStatus
18 | Library | resources.libraries.python.LispSetup.LispSetup
19 | Library | resources.libraries.python.LispSetup.LispGpeStatus
20 | Library | resources.libraries.python.LispUtil
24 | Generate LISP locator_set data
25 | | [Documentation] | Generate lisp locator_set data for test
26 | | ... | the lisp locator_set and locator API.
28 | | ... | *Arguments:*
29 | | ... | - dut_node - DUT node. Type: dictionary
30 | | ... | - locator_set_number - Number how many locator_set data
31 | | ... | will be generated. Type: integer
34 | | ... | - No value returned
36 | | ... | _NOTE:_ This KW sets following test case variables:
37 | | ... | - locator_set_values - New generated locator_set data.
38 | | ... | - locator_set_values_vat - New generated locator_set data expected\
42 | | ... | \| Given Generate LISP locator_set data \| ${nodes['DUT1']} \
43 | | ... | \| ${locator_set_number} \|
45 | | [Arguments] | ${dut_node} | ${locator_set_number}
46 | | ${locator_set_values} | ${locator_set_values_vat}=
47 | | ... | Generate Unique Lisp Locator Set Data
48 | | ... | ${dut_node} | ${locator_set_number}
49 | | Set Test Variable | ${locator_set_values}
50 | | Set Test Variable | ${locator_set_values_vat}
52 | Configure LISP locator_set data
53 | | [Documentation] | Set the lisp locator_set and locator on the VPP node.
55 | | ... | *Arguments:*
56 | | ... | - dut_node - DUT node. Type: dictionary
59 | | ... | - No value returned
61 | | ... | _NOTE:_ This KW requires following test case variables:
62 | | ... | - locator_set_values - Generated locator_set data from
63 | | ... | KW locator_set data is prepared, which will be set on the VPP node.
66 | | ... | \| When Configure LISP locator_set data \| ${nodes['DUT1']} \|
68 | | [Arguments] | ${dut_node}
69 | | Vpp Set Lisp Locator Set | ${dut_node} | ${locator_set_values}
71 | LISP locator_set shpuld be configured correctly
72 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
74 | | ... | *Arguments:*
75 | | ... | - dut_node - DUT node. Type: dictionary
78 | | ... | - No value returned
80 | | ... | _NOTE:_ This KW requires following test case variables:
81 | | ... | - locator_set_values_vat - Generated locator_set data from
82 | | ... | KW locator_set data is prepared, which are expected from VPP via VAT.
85 | | ... | \| Then LISP locator_set should be configured correctly \
86 | | ... | \| ${nodes['DUT1']} \|
88 | | [Arguments] | ${dut_node}
89 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node} | local
90 | | Lisp Locator S Should Be Equal
91 | | ... | ${locator_set_values_vat} | ${show_locator_set}
93 | Delete all LISP locator_set from VPP
94 | | [Documentation] | Delete all lisp locator_set on the VPP node.
96 | | ... | *Arguments:*
97 | | ... | - dut_node - DUT node. Type: dictionary
100 | | ... | - No value returned
102 | | ... | _NOTE:_ This KW requires following test case variables:
103 | | ... | - locator_set_values - Generated locator_set data from
104 | | ... | KW locator_set data is prepared, which was set on the VPP node.
107 | | ... | \| When Delete all LISP locator_set from VPP \
108 | | ... | \| ${nodes['DUT1']} \|
110 | | [Arguments] | ${dut_node}
111 | | Vpp Unset Lisp Locator Set | ${dut_node} | ${locator_set_values}
113 | LISP locator_set should be unset
114 | | [Documentation] | Test if all locator_set are unset from VPP node.
116 | | ... | *Arguments:*
117 | | ... | - dut_node - DUT node. Type: dictionary
120 | | ... | - No value returned
123 | | ... | \| Then LISP locator_set should be unset \| ${nodes['DUT1']} \|
125 | | [Arguments] | ${dut_node}
126 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node} | ${EMPTY}
127 | | Lisp Is Empty | ${show_locator_set}
129 | Lisp locator_set data use for test reset locator_set are prepared
130 | | [Documentation] | Generate lisp special type of locator_set data.
131 | | ... | This data will be use for test reset locator_set.
133 | | ... | *Arguments:*
134 | | ... | - dut_node - DUT node. Type: dictionary
135 | | ... | - locator_set_number - Number how many locator_set data
136 | | ... | it will generate. Type: integer
139 | | ... | - No value returned
141 | | ... | _NOTE:_ This KW sets following test case variables:
142 | | ... | - locator_set_values - New generate locator_set data.
143 | | ... | - locator_set_values_vat - New generated locator_set data expected\
147 | | ... | \| Given Lisp locator_set data use for test reset locator_set \
148 | | ... | are prepared \| ${nodes['DUT1']} \| ${locator_set_number} \|
150 | | [Arguments] | ${dut_node} | ${locator_set_number}
151 | | ${locator_set_values} | ${locator_set_values_vat}=
152 | | ... | Generate Duplicate Lisp Locator Set Data
153 | | ... | ${dut_node} | ${locator_set_number}
154 | | Set Test Variable | ${locator_set_values}
155 | | Set Test Variable | ${locator_set_values_vat}
157 | Configure LISP eid address
158 | | [Documentation] | Set the lisp eid address on the VPP node.
160 | | ... | *Arguments:*
161 | | ... | - dut_node - DUT node. Type: dictionary
162 | | ... | - set_eid - Test eid data. Type: list
165 | | ... | - No value returned
168 | | ... | \| When Configure LISP eid address \| ${nodes['DUT1']} \
169 | | ... | \| ${eid_table} \|
171 | | [Arguments] | ${dut_node} | ${set_eid}
172 | | Vpp Set Lisp Eid Table | ${dut_node} | ${set_eid}
174 | LISP eid address should be set correctly to eid table
175 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
177 | | ... | *Arguments:*
178 | | ... | - dut_node - DUT node. Type: dictionary
179 | | ... | - set_eid - Example eid data, which was set to the VPP node.
183 | | ... | - No value returned
185 | | ... | _NOTE:_ This KW requires following test case variables:
186 | | ... | - set_eid - Generated eid data, which will be set to the VPP node.
189 | | ... | \| Then LISP eid address should be set correctly to eid table \
190 | | ... | \| ${nodes['DUT1']} \| ${eid_table} \|
192 | | [Arguments] | ${dut_node} | ${set_eid}
193 | | ${show_eid}= | Vpp Show Lisp Eid Table | ${dut_node}
194 | | Lisp Should Be Equal | ${set_eid} | ${show_eid}
196 | Delete all LISP eid address from VPP
197 | | [Documentation] | Delete all lisp eid address from the VPP node.
199 | | ... | *Arguments:*
200 | | ... | - dut_node - DUT node. Type: dictionary
201 | | ... | - set_eid - Eid data which will be removed from the VPP node.
205 | | ... | - No value returned
208 | | ... | \| When Delete all LISP eid address from VPP \
209 | | ... | \| ${nodes['DUT1']} \| ${eid_table} \|
211 | | [Arguments] | ${dut_node} | ${set_eid}
212 | | Vpp Unset Lisp Eid Table | ${dut_node} | ${set_eid}
214 | LISP eid table should be empty
215 | | [Documentation] | Test if the eid table is empty.
217 | | ... | *Arguments:*
218 | | ... | - dut_node - DUT node. Type: dictionary
221 | | ... | - No value returned
224 | | ... | \| Then LISP eid table should be empty \| ${nodes['DUT1']} \|
226 | | [Arguments] | ${dut_node}
227 | | ${show_eid}= | Vpp Show Lisp Eid Table | ${dut_node}
228 | | Lisp Is Empty | ${show_eid}
230 | Configure LISP map resolver address
231 | | [Documentation] | Set the lisp map resolver address in the VPP node.
233 | | ... | *Arguments:*
234 | | ... | - dut_node - DUT node. Type: dictionary
235 | | ... | - set_map_resolver - Map resolver data, which will be set on
236 | | ... | the VPP node. Type: list
239 | | ... | - No value returned
242 | | ... | \| When Configure LISP map resolver address \| ${nodes['DUT1']} \
243 | | ... | \| ${map_resolver} \|
245 | | [Arguments] | ${dut_node} | ${set_map_resolver}
246 | | Vpp Set Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
248 | LISP map resolver address should be configured correctly
249 | | [Documentation] | Test if the map resolver address is set correctly
250 | | ... | on the VPP node.
252 | | ... | *Arguments:*
253 | | ... | - dut_node - DUT node. Type: dictionary
254 | | ... | - set_map_resolver - Map resolver data, which was set on
255 | | ... | the VPP node. Type: list
258 | | ... | - No value returned
261 | | ... | \| Then LISP map resolver address should be configured correctly \
262 | | ... | \| ${nodes['DUT1']} \| ${map_resolver} \|
264 | | [Arguments] | ${dut_node} | ${set_map_resolver}
265 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
266 | | Lisp Should Be Equal | ${set_map_resolver} | ${show_map_resolver}
268 | Delete all LISP map resolver address from VPP
269 | | [Documentation] | Delete all lisp map resolver address on the VPP node.
271 | | ... | *Arguments:*
272 | | ... | - dut_node - DUT node. Type: dictionary
273 | | ... | - map_resolver - Map resolver data, which will be remove from
274 | | ... | the VPP. Type: list
277 | | ... | - No value returned
280 | | ... | \| When Delete all LISP map resolver address from VPP \
281 | | ... | \| ${nodes['DUT1']} \| ${map_resolver} \|
283 | | [Arguments] | ${dut_node} | ${set_map_resolver}
284 | | Vpp Unset Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
286 | LISP map resolver address should be empty
287 | | [Documentation] | Test if the map resolver are empty.
289 | | ... | *Arguments:*
290 | | ... | - dut_node - DUT node. Type: dictionary
293 | | ... | - No value returned
296 | | ... | \| Then LISP map resolver address should be empty \
297 | | ... | \| ${nodes['DUT1']} \|
299 | | [Arguments] | ${dut_node}
300 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
301 | | Lisp Is Empty | ${show_map_resolver}
304 | | [Documentation] | Enable LISP on VPP node.
306 | | ... | *Arguments:*
307 | | ... | - dut_node - DUT node. Type: dictionary
310 | | ... | - No value returned
313 | | ... | \| Enable LISP \| ${nodes['DUT1']} \|
315 | | [Arguments] | ${dut_node}
316 | | Vpp Lisp Enable Disable | ${dut_node} | enable
318 | LISP should be enabled
319 | | [Documentation] | Check if the lisp is enabled.
321 | | ... | *Arguments:*
322 | | ... | - dut_node - DUT node. Type: dictionary
323 | | ... | - lisp_status_data - Lisp status data, which was set on
324 | | ... | the VPP node. Type: list
327 | | ... | - No value returned
330 | | ... | \| LISP should be enabled \| ${nodes['DUT1']} \
331 | | ... | \| ${lisp_status_data} \|
333 | | [Arguments] | ${dut_node} | ${lisp_status_data}
334 | | ${show_lisp_stat}= | Vpp Show Lisp State | ${dut_node}
335 | | Lisp Should Be Equal | ${show_lisp_stat} | ${lisp_status_data[1]}
338 | | [Documentation] | Disable LISP on VPP node.
340 | | ... | *Arguments:*
341 | | ... | - dut_node - DUT node. Type: dictionary
344 | | ... | - No value returned
347 | | ... | \| Disable LISP \| ${nodes['DUT1']} \|
349 | | [Arguments] | ${dut_node}
350 | | Vpp Lisp Enable Disable | ${dut_node} | disable
352 | LISP Should be disabled
353 | | [Documentation] | LISP Should be disabled.
355 | | ... | *Arguments:*
356 | | ... | - dut_node - DUT node. Type: dictionary
357 | | ... | - lisp_status_data - Lisp status data, which was set on
358 | | ... | the VPP node. Type: list
361 | | ... | - No value returned
364 | | ... | \| LISP Should be disabled \| ${nodes['DUT1']} \
365 | | ... | \| ${lisp_status_data} \|
367 | | [Arguments] | ${dut_node} | ${lisp_status_data}
368 | | ${show_lisp_stat}= | Vpp Show Lisp State | ${dut_node}
369 | | Lisp Should Be Equal | ${show_lisp_stat} | ${lisp_status_data[0]}
372 | | [Documentation] | Enable Lisp Gpe on VPP node.
374 | | ... | *Arguments:*
375 | | ... | - dut_node - DUT node. Type: dictionary
378 | | ... | - No value returned
381 | | ... | \| Enable Lisp Gpe \| ${nodes['DUT1']} \|
383 | | [Arguments] | ${dut_node}
384 | | Vpp Lisp Gpe Enable Disable | ${dut_node} | enable
387 | | [Documentation] | Disable Lisp Gpe on VPP node.
389 | | ... | *Arguments:*
390 | | ... | - dut_node - DUT node. Type: dictionary
393 | | ... | - No value returned
396 | | ... | \| Disable Lisp Gpe \| ${nodes['DUT1']} \|
398 | | [Arguments] | ${dut_node}
399 | | Vpp Lisp Gpe Enable Disable | ${dut_node} | disable