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.
38 | | ... | - locator_set_values_vat - New generated locator_set data expected\
42 | | ... | \| Given Lisp locator_set data is prepared \| ${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 | Lisp locator_set data is set
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,
64 | | ... | which will be set on the VPP node.
67 | | ... | \| When Lisp locator_set data is set \| ${nodes['DUT1']} \|
69 | | [Arguments] | ${dut_node}
70 | | Vpp Set Lisp Locator Set | ${dut_node} | ${locator_set_values}
72 | Lisp locator_set is set correctly
73 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
75 | | ... | *Arguments:*
76 | | ... | - dut_node - DUT node. Type: dictionary
79 | | ... | - No value returned
81 | | ... | _NOTE:_ This KW requires following test case variables:
82 | | ... | - locator_set_values_vat - Generated locator_set data from
83 | | ... | KW locator_set data is prepared, which are expected from VPP via VAT.
86 | | ... | \| Then Lisp locator_set is set correctly \| ${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,
105 | | ... | which was set on the VPP node.
108 | | ... | \| When Delete all lisp locator_set from VPP \
109 | | ... | \| ${nodes['DUT1']} \|
111 | | [Arguments] | ${dut_node}
112 | | Vpp Unset Lisp Locator Set | ${dut_node} | ${locator_set_values}
114 | Lisp locator_set should be unset
115 | | [Documentation] | Test if all locator_set are unset from VPP node.
117 | | ... | *Arguments:*
118 | | ... | - dut_node - DUT node. Type: dictionary
121 | | ... | - No value returned
124 | | ... | \| Then Lisp locator_set should be unset \| ${nodes['DUT1']} \|
126 | | [Arguments] | ${dut_node}
127 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node} | ${EMPTY}
128 | | Lisp Is Empty | ${show_locator_set}
130 | Lisp locator_set data use for test reset locator_set are prepared
131 | | [Documentation] | Generate lisp special type of locator_set data.
132 | | ... | This data will be use for test reset locator_set.
134 | | ... | *Arguments:*
135 | | ... | - dut_node - DUT node. Type: dictionary
136 | | ... | - locator_set_number - Number how many locator_set data
137 | | ... | it will generate. Type: integer
140 | | ... | - No value returned
142 | | ... | _NOTE:_ This KW sets following test case variables:
143 | | ... | - locator_set_values - New generate locator_set data.
144 | | ... | - locator_set_values_vat - New generated locator_set data expected\
148 | | ... | \| Given Lisp locator_set data use for test reset locator_set \
149 | | ... | are prepared \| ${nodes['DUT1']} \| ${locator_set_number} \|
151 | | [Arguments] | ${dut_node} | ${locator_set_number}
152 | | ${locator_set_values} | ${locator_set_values_vat}=
153 | | ... | Generate Duplicate Lisp Locator Set Data
154 | | ... | ${dut_node} | ${locator_set_number}
155 | | Set Test Variable | ${locator_set_values}
156 | | Set Test Variable | ${locator_set_values_vat}
158 | Lisp eid address is set
159 | | [Documentation] | Set the lisp eid address on the VPP node.
161 | | ... | *Arguments:*
162 | | ... | - dut_node - DUT node. Type: dictionary
163 | | ... | - set_eid - Test eid data. Type: list
166 | | ... | - No value returned
169 | | ... | \| When Lisp eid address is set \| ${nodes['DUT1']} \| ${eid_table} |\
171 | | [Arguments] | ${dut_node} | ${set_eid}
172 | | Vpp Set Lisp Eid Table | ${dut_node} | ${set_eid}
174 | Lisp eid address is 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 is 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 | Lisp map resolver address is set
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 Lisp map resolver address is set \| ${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 is set 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 is set 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 | Lip 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 Lip 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 | Check if lisp is 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 | | ... | \| Check if lisp is 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 | Check if lisp is disabled
353 | | [Documentation] | Check if lisp is 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 | | ... | \| Check if lisp is 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