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/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 | Lisp locator_set data is prepared
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.
40 | | ... | \| Given Lisp locator_set data is prepared \| ${nodes['DUT1']} \
41 | | ... | \| ${locator_set_number} \|
43 | | [Arguments] | ${dut_node} | ${locator_set_number}
44 | | ${locator_set_values}= | Generate Unique Lisp Locator Set Data |
45 | | ... | ${dut_node} | ${locator_set_number}
46 | | Set Test Variable | ${locator_set_values}
48 | Lisp locator_set data is set
49 | | [Documentation] | Set the lisp locator_set and locator on the VPP node.
51 | | ... | *Arguments:*
52 | | ... | - dut_node - DUT node. Type: dictionary
55 | | ... | - No value returned
57 | | ... | _NOTE:_ This KW requires following test case variables:
58 | | ... | - locator_set_values - Generated locator_set data from
59 | | ... | KW locator_set data is prepared,
60 | | ... | which will be set on the VPP node.
63 | | ... | \| When Lisp locator_set data is set \| ${nodes['DUT1']} \|
65 | | [Arguments] | ${dut_node}
66 | | Vpp Set Lisp Locator Set | ${dut_node} | ${locator_set_values}
68 | Lisp locator_set is set correctly
69 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
71 | | ... | *Arguments:*
72 | | ... | - dut_node - DUT node. Type: dictionary
75 | | ... | - No value returned
77 | | ... | _NOTE:_ This KW requires following test case variables:
78 | | ... | - locator_set_values - Generated locator_set data from
79 | | ... | KW locator_set data is prepared,
80 | | ... | which were set to VPP node.
83 | | ... | \| Then Lisp locator_set is set correctly \| ${nodes['DUT1']} \|
85 | | [Arguments] | ${dut_node}
86 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node} | local
87 | | Lisp Locator S Should Be Equal
88 | | ... | ${locator_set_values} | ${show_locator_set}
90 | Delete all lisp locator_set from VPP
91 | | [Documentation] | Delete all lisp locator_set on the VPP node.
93 | | ... | *Arguments:*
94 | | ... | - dut_node - DUT node. Type: dictionary
97 | | ... | - No value returned
99 | | ... | _NOTE:_ This KW requires following test case variables:
100 | | ... | - locator_set_values - Generated locator_set data from
101 | | ... | KW locator_set data is prepared,
102 | | ... | which was set on the VPP node.
105 | | ... | \| When Delete all lisp locator_set from VPP \
106 | | ... | \| ${nodes['DUT1']} \|
108 | | [Arguments] | ${dut_node}
109 | | Vpp Unset Lisp Locator Set | ${dut_node} | ${locator_set_values}
111 | Lisp locator_set should be unset
112 | | [Documentation] | Test if all locator_set are unset from VPP node.
114 | | ... | *Arguments:*
115 | | ... | - dut_node - DUT node. Type: dictionary
118 | | ... | - No value returned
121 | | ... | \| Then Lisp locator_set should be unset \| ${nodes['DUT1']} \|
123 | | [Arguments] | ${dut_node}
124 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node} | ${EMPTY}
125 | | Lisp Is Empty | ${show_locator_set}
127 | Lisp locator_set data use for test reset locator_set are prepared
128 | | [Documentation] | Generate lisp special type of locator_set data.
129 | | ... | This data will be use for test reset locator_set.
131 | | ... | *Arguments:*
132 | | ... | - dut_node - DUT node. Type: dictionary
133 | | ... | - locator_set_number - Number how many locator_set data
134 | | ... | it will generate. Type: integer
137 | | ... | - No value returned
139 | | ... | _NOTE:_ This KW sets following test case variables:
140 | | ... | - locator_set_values - New generate locator_set data.
143 | | ... | \| Given Lisp locator_set data use for test reset locator_set \
144 | | ... | are prepared \| ${nodes['DUT1']} \| ${locator_set_number} \|
146 | | [Arguments] | ${dut_node} | ${locator_set_number}
147 | | ${locator_set_values}= | Generate Duplicate Lisp Locator Set Data |
148 | | ... | ${dut_node} | ${locator_set_number}
149 | | Set Test Variable | ${locator_set_values}
151 | Lisp eid address is set
152 | | [Documentation] | Set the lisp eid address on the VPP node.
154 | | ... | *Arguments:*
155 | | ... | - dut_node - DUT node. Type: dictionary
156 | | ... | - set_eid - Test eid data. Type: list
159 | | ... | - No value returned
162 | | ... | \| When Lisp eid address is set \| ${nodes['DUT1']} \| ${eid_table} |\
164 | | [Arguments] | ${dut_node} | ${set_eid}
165 | | Vpp Set Lisp Eid Table | ${dut_node} | ${set_eid}
167 | Lisp eid address is set correctly to eid table
168 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
170 | | ... | *Arguments:*
171 | | ... | - dut_node - DUT node. Type: dictionary
172 | | ... | - set_eid - Example eid data, which was set to the VPP node.
176 | | ... | - No value returned
178 | | ... | _NOTE:_ This KW requires following test case variables:
179 | | ... | - set_eid - Generated eid data, which will be set to the VPP node.
182 | | ... | \| Then Lisp eid address is set correctly to eid table \
183 | | ... | \| ${nodes['DUT1']} \| ${eid_table} \|
185 | | [Arguments] | ${dut_node} | ${set_eid}
186 | | ${show_eid}= | Vpp Show Lisp Eid Table | ${dut_node}
187 | | Lisp Should Be Equal | ${set_eid} | ${show_eid}
189 | Delete all lisp eid address from VPP
190 | | [Documentation] | Delete all lisp eid address from the VPP node.
192 | | ... | *Arguments:*
193 | | ... | - dut_node - DUT node. Type: dictionary
194 | | ... | - set_eid - Eid data which will be removed from the VPP node.
198 | | ... | - No value returned
201 | | ... | \| When Delete all lisp eid address from VPP \
202 | | ... | \| ${nodes['DUT1']} \| ${eid_table} \|
204 | | [Arguments] | ${dut_node} | ${set_eid}
205 | | Vpp Unset Lisp Eid Table | ${dut_node} | ${set_eid}
207 | Lisp eid table should be empty
208 | | [Documentation] | Test if the eid table is empty.
210 | | ... | *Arguments:*
211 | | ... | - dut_node - DUT node. Type: dictionary
214 | | ... | - No value returned
217 | | ... | \| Then Lisp eid table should be empty \| ${nodes['DUT1']} \|
219 | | [Arguments] | ${dut_node}
220 | | ${show_eid}= | Vpp Show Lisp Eid Table | ${dut_node}
221 | | Lisp Is Empty | ${show_eid}
223 | Lisp map resolver address is set
224 | | [Documentation] | Set the lisp map resolver address in the VPP node.
226 | | ... | *Arguments:*
227 | | ... | - dut_node - DUT node. Type: dictionary
228 | | ... | - set_map_resolver - Map resolver data, which will be set on
229 | | ... | the VPP node. Type: list
232 | | ... | - No value returned
235 | | ... | \| When Lisp map resolver address is set \| ${nodes['DUT1']} \
236 | | ... | \| ${map_resolver} \|
238 | | [Arguments] | ${dut_node} | ${set_map_resolver}
239 | | Vpp Set Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
241 | Lisp map resolver address is set correctly
242 | | [Documentation] | Test if the map resolver address is set correctly
243 | | ... | on the VPP node.
245 | | ... | *Arguments:*
246 | | ... | - dut_node - DUT node. Type: dictionary
247 | | ... | - set_map_resolver - Map resolver data, which was set on
248 | | ... | the VPP node. Type: list
251 | | ... | - No value returned
254 | | ... | \| Then Lisp map resolver address is set correctly \
255 | | ... | \| ${nodes['DUT1']} \| ${map_resolver} \|
257 | | [Arguments] | ${dut_node} | ${set_map_resolver}
258 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
259 | | Lisp Should Be Equal | ${set_map_resolver} | ${show_map_resolver}
261 | Delete all lisp map resolver address from VPP
262 | | [Documentation] | Delete all lisp map resolver address on the VPP node.
264 | | ... | *Arguments:*
265 | | ... | - dut_node - DUT node. Type: dictionary
266 | | ... | - map_resolver - Map resolver data, which will be remove from
267 | | ... | the VPP. Type: list
270 | | ... | - No value returned
273 | | ... | \| When Delete all lisp map resolver address from VPP \
274 | | ... | \| ${nodes['DUT1']} \| ${map_resolver} \|
276 | | [Arguments] | ${dut_node} | ${set_map_resolver}
277 | | Vpp Unset Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
279 | Lip map resolver address should be empty
280 | | [Documentation] | Test if the map resolver are empty.
282 | | ... | *Arguments:*
283 | | ... | - dut_node - DUT node. Type: dictionary
286 | | ... | - No value returned
289 | | ... | \| Then Lip map resolver address should be empty \
290 | | ... | \| ${nodes['DUT1']} \|
292 | | [Arguments] | ${dut_node}
293 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
294 | | Lisp Is Empty | ${show_map_resolver}
297 | | [Documentation] | Enable lisp on VPP node.
299 | | ... | *Arguments:*
300 | | ... | - dut_node - DUT node. Type: dictionary
303 | | ... | - No value returned
306 | | ... | \| Enable lisp \| ${nodes['DUT1']} \|
308 | | [Arguments] | ${dut_node}
309 | | Vpp Lisp Enable Disable | ${dut_node} | enable
311 | Check if lisp is enabled
312 | | [Documentation] | Check if the lisp is enabled.
314 | | ... | *Arguments:*
315 | | ... | - dut_node - DUT node. Type: dictionary
316 | | ... | - lisp_status_data - Lisp status data, which was set on
317 | | ... | the VPP node. Type: list
320 | | ... | - No value returned
323 | | ... | \| Check if lisp is enabled \| ${nodes['DUT1']} \
324 | | ... | \| ${lisp_status_data} \|
326 | | [Arguments] | ${dut_node} | ${lisp_status_data}
327 | | ${show_lisp_stat}= | Vpp Show Lisp State | ${dut_node}
328 | | Lisp Should Be Equal | ${show_lisp_stat} | ${lisp_status_data[1]}
331 | | [Documentation] | Disable lisp on VPP node.
333 | | ... | *Arguments:*
334 | | ... | - dut_node - DUT node. Type: dictionary
337 | | ... | - No value returned
340 | | ... | \| Disable lisp \| ${nodes['DUT1']} \|
342 | | [Arguments] | ${dut_node}
343 | | Vpp Lisp Enable Disable | ${dut_node} | disable
345 | Check if lisp is disabled
346 | | [Documentation] | Check if lisp is disabled.
348 | | ... | *Arguments:*
349 | | ... | - dut_node - DUT node. Type: dictionary
350 | | ... | - lisp_status_data - Lisp status data, which was set on
351 | | ... | the VPP node. Type: list
354 | | ... | - No value returned
357 | | ... | \| Check if lisp is disabled \| ${nodes['DUT1']} \
358 | | ... | \| ${lisp_status_data} \|
360 | | [Arguments] | ${dut_node} | ${lisp_status_data}
361 | | ${show_lisp_stat}= | Vpp Show Lisp State | ${dut_node}
362 | | Lisp Should Be Equal | ${show_lisp_stat} | ${lisp_status_data[0]}
365 | | [Documentation] | Enable Lisp Gpe on VPP node.
367 | | ... | *Arguments:*
368 | | ... | - dut_node - DUT node. Type: dictionary
371 | | ... | - No value returned
374 | | ... | \| Enable Lisp Gpe \| ${nodes['DUT1']} \|
376 | | [Arguments] | ${dut_node}
377 | | Vpp Lisp Gpe Enable Disable | ${dut_node} | enable
380 | | [Documentation] | Disable Lisp Gpe on VPP node.
382 | | ... | *Arguments:*
383 | | ... | - dut_node - DUT node. Type: dictionary
386 | | ... | - No value returned
389 | | ... | \| Disable Lisp Gpe \| ${nodes['DUT1']} \|
391 | | [Arguments] | ${dut_node}
392 | | Vpp Lisp Gpe Enable Disable | ${dut_node} | disable