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.LispUtil
23 | Lisp locator_set data is prepared
24 | | [Documentation] | Generate lisp locator_set data for test
25 | | ... | the lisp locator_set and locator API.
27 | | ... | *Arguments:*
28 | | ... | - dut_node - DUT node. Type: dictionary
29 | | ... | - locator_set_number - Number how many locator_set data
30 | | ... | will be generated. Type: integer
33 | | ... | - No value returned
35 | | ... | _NOTE:_ This KW sets following test case variables:
36 | | ... | - locator_set_values - New generated locator_set data.
39 | | ... | \| Given Lisp locator_set data is prepared \| ${nodes['DUT1']} \
40 | | ... | \| ${locator_set_number} \|
42 | | [Arguments] | ${dut_node} | ${locator_set_number}
43 | | ${locator_set_values}= | Generate Lisp Locator Set Data |
44 | | ... | ${dut_node} | ${locator_set_number}
45 | | Set Test Variable | ${locator_set_values}
47 | Lisp locator_set data is set
48 | | [Documentation] | Set the lisp locator_set and locator on the VPP node.
50 | | ... | *Arguments:*
51 | | ... | - dut_node - DUT node. Type: dictionary
54 | | ... | - No value returned
56 | | ... | _NOTE:_ This KW requires following test case variables:
57 | | ... | - locator_set_values - Generated locator_set data from
58 | | ... | KW locator_set data is prepared,
59 | | ... | which will be set on the VPP node.
62 | | ... | \| When Lisp locator_set data is set \| ${nodes['DUT1']} \|
64 | | [Arguments] | ${dut_node}
65 | | Vpp Set Lisp Locator Set | ${dut_node} | ${locator_set_values}
67 | Lisp locator_set is set correctly
68 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
70 | | ... | *Arguments:*
71 | | ... | - dut_node - DUT node. Type: dictionary
74 | | ... | - No value returned
76 | | ... | _NOTE:_ This KW requires following test case variables:
77 | | ... | - locator_set_values - Generated locator_set data from
78 | | ... | KW locator_set data is prepared,
79 | | ... | which were set to VPP node.
82 | | ... | \| Then Lisp locator_set is set correctly \| ${nodes['DUT1']} \|
84 | | [Arguments] | ${dut_node}
85 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node}
86 | | Lisp Locator S Should Be Equal
87 | | ... | ${locator_set_values} | ${show_locator_set}
89 | Delete all lisp locator_set from VPP
90 | | [Documentation] | Delete all lisp locator_set on the VPP node.
92 | | ... | *Arguments:*
93 | | ... | - dut_node - DUT node. Type: dictionary
96 | | ... | - No value returned
98 | | ... | _NOTE:_ This KW requires following test case variables:
99 | | ... | - locator_set_values - Generated locator_set data from
100 | | ... | KW locator_set data is prepared,
101 | | ... | which was set on the VPP node.
104 | | ... | \| When Delete all lisp locator_set from VPP \
105 | | ... | \| ${nodes['DUT1']} \|
107 | | [Arguments] | ${dut_node}
108 | | Vpp Unset Lisp Locator Set | ${dut_node} | ${locator_set_values}
110 | Lisp locator_set should be unset
111 | | [Documentation] | Test if all locator_set are unset from VPP node.
113 | | ... | *Arguments:*
114 | | ... | - dut_node - DUT node. Type: dictionary
117 | | ... | - No value returned
120 | | ... | \| Then Lisp locator_set should be unset \| ${nodes['DUT1']} \|
122 | | [Arguments] | ${dut_node}
123 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node}
124 | | Lisp Is Empty | ${show_locator_set}
126 | Lisp locator_set data use for test reset locator_set are prepared
127 | | [Documentation] | Generate lisp special type of locator_set data.
128 | | ... | This data will be use for test reset locator_set.
130 | | ... | *Arguments:*
131 | | ... | - dut_node - DUT node. Type: dictionary
132 | | ... | - locator_set_number - Number how many locator_set data
133 | | ... | it will generate. Type: int
136 | | ... | - No value returned
138 | | ... | _NOTE:_ This KW sets following test case variables:
139 | | ... | - locator_set_values - New generate locator_set data.
142 | | ... | \| Given Lisp locator_set data use for test reset locator_set \
143 | | ... | are prepared \| ${nodes['DUT1']} \| ${locator_set_number} \|
145 | | [Arguments] | ${dut_node} | ${locator_set_number}
146 | | ${locator_set_values}= | Generate Lisp Locator Set Reset Data |
147 | | ... | ${dut_node} | ${locator_set_number}
148 | | Set Test Variable | ${locator_set_values}
150 | Lisp eid address is prepared
151 | | [Documentation] | Generate lisp eid address for testing lisp eid API.
153 | | ... | *Arguments:*
154 | | ... | - dut_node - DUT node. Type: dictionary
155 | | ... | - eid_ipv4_num - Number of generate ipv4 address. Type: int
156 | | ... | - eid_ipv6_num - Number of generate ipv6 address. Type: int
159 | | ... | - No value returned
161 | | ... | _NOTE:_ This KW sets following test case variables:
162 | | ... | - set_eid - New generate eid data.
165 | | ... | \| Given Lisp eid address is prepared \| ${nodes['DUT1']} \
166 | | ... | \| ${eid_ipv4_num} \| ${eid_ipv6_num} \|
168 | | [Arguments] | ${dut_node} | ${eid_ipv4_num} | ${eid_ipv6_num}
169 | | ${set_eid} = | Generate Lisp Local Eid Data
170 | | ... | ${eid_ipv4_num} | ${eid_ipv6_num}
171 | | Set Test Variable | ${set_eid}
173 | Lisp eid address is set
174 | | [Documentation] | Set the lisp eid address on the VPP node.
176 | | ... | *Arguments:*
177 | | ... | - dut_node - DUT node. Type: dictionary
178 | | ... | - set_eid - Test eid data. Type: list
181 | | ... | - No value returned
184 | | ... | \| When Lisp eid address is set \| ${nodes['DUT1']} \| ${eid_table} |\
186 | | [Arguments] | ${dut_node} | ${set_eid}
187 | | Vpp Set Lisp Eid Table | ${dut_node} | ${set_eid}
189 | Lisp eid address is set correctly to eid table
190 | | [Documentation] | Test if the locator_set is set correctly on the VPP node.
192 | | ... | *Arguments:*
193 | | ... | - dut_node - DUT node. Type: dictionary
194 | | ... | - set_eid - Example eid data, which was set to the VPP node.
198 | | ... | - No value returned
200 | | ... | _NOTE:_ This KW requires following test case variables:
201 | | ... | - set_eid - Generated eid data, which will be set to the VPP node.
204 | | ... | \| Then Lisp eid address is set correctly to eid table \
205 | | ... | \| ${nodes['DUT1']} \| ${eid_table} \|
207 | | [Arguments] | ${dut_node} | ${set_eid}
208 | | ${show_eid}= | Vpp Show Lisp Local Eid Table | ${dut_node}
209 | | Lisp Should Be Equal | ${set_eid} | ${show_eid}
211 | Delete all lisp eid address from VPP
212 | | [Documentation] | Delete all lisp eid address from the VPP node.
214 | | ... | *Arguments:*
215 | | ... | - dut_node - DUT node. Type: dictionary
216 | | ... | - set_eid - Eid data which will be removed from the VPP node.
220 | | ... | - No value returned
223 | | ... | \| When Delete all lisp eid address from VPP \
224 | | ... | \| ${nodes['DUT1']} \| ${eid_table} \|
226 | | [Arguments] | ${dut_node} | ${set_eid}
227 | | Vpp Unset Lisp Eid Table | ${dut_node} | ${set_eid}
229 | Lisp eid table should be empty
230 | | [Documentation] | Test if the eid table is empty.
232 | | ... | *Arguments:*
233 | | ... | - dut_node - DUT node. Type: dictionary
236 | | ... | - No value returned
239 | | ... | \| Then Lisp eid table should be empty \| ${nodes['DUT1']} \|
241 | | [Arguments] | ${dut_node}
242 | | ${show_eid}= | Vpp Show Lisp Local Eid Table | ${dut_node}
243 | | Lisp Is Empty | ${show_eid}
245 | Lisp map resolver address is set
246 | | [Documentation] | Set the lisp map resolver address in the VPP node.
248 | | ... | *Arguments:*
249 | | ... | - dut_node - DUT node. Type: dictionary
250 | | ... | - set_map_resolver - Map resolver data, which will be set on
251 | | ... | the VPP node. Type: list
254 | | ... | - No value returned
257 | | ... | \| When Lisp map resolver address is set \| ${nodes['DUT1']} \
258 | | ... | \| ${map_resolver} \|
260 | | [Arguments] | ${dut_node} | ${set_map_resolver}
261 | | Vpp Set Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
263 | Lisp map resolver address is set correctly
264 | | [Documentation] | Test if the map resolver address is set correctly
265 | | ... | on the VPP node.
267 | | ... | *Arguments:*
268 | | ... | - dut_node - DUT node. Type: dictionary
269 | | ... | - set_map_resolver - Map resolver data, which was set on
270 | | ... | the VPP node. Type: list
273 | | ... | - No value returned
276 | | ... | \| Then Lisp map resolver address is set correctly \
277 | | ... | \| ${nodes['DUT1']} \| ${map_resolver} \|
279 | | [Arguments] | ${dut_node} | ${set_map_resolver}
280 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
281 | | Lisp Should Be Equal | ${set_map_resolver} | ${show_map_resolver}
283 | Delete all lisp map resolver address from VPP
284 | | [Documentation] | Delete all lisp map resolver address on the VPP node.
286 | | ... | *Arguments:*
287 | | ... | - dut_node - DUT node. Type: dictionary
288 | | ... | - map_resolver - Map resolver data, which will be remove from
289 | | ... | the VPP. Type: list
292 | | ... | - No value returned
295 | | ... | \| When Delete all lisp map resolver address from VPP \
296 | | ... | \| ${nodes['DUT1']} \| ${map_resolver} \|
298 | | [Arguments] | ${dut_node} | ${set_map_resolver}
299 | | Vpp Unset Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
301 | Lip map resolver address should be empty
302 | | [Documentation] | Test if the map resolver are empty.
304 | | ... | *Arguments:*
305 | | ... | - dut_node - DUT node. Type: dictionary
308 | | ... | - No value returned
311 | | ... | \| Then Lip map resolver address should be empty \
312 | | ... | \| ${nodes['DUT1']} \|
314 | | [Arguments] | ${dut_node}
315 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
316 | | Lisp Is Empty | ${show_map_resolver}
319 | | [Documentation] | Enable lisp on VPP node.
321 | | ... | *Arguments:*
322 | | ... | - dut_node - DUT node. Type: dictionary
325 | | ... | - No value returned
328 | | ... | \| Enable lisp \| ${nodes['DUT1']} \|
330 | | [Arguments] | ${dut_node}
331 | | Vpp Lisp Enable Disable | ${dut_node} | enable
333 | Check if lisp is enabled
334 | | [Documentation] | Check if the lisp is enabled.
336 | | ... | *Arguments:*
337 | | ... | - dut_node - DUT node. Type: dictionary
338 | | ... | - lisp_status_data - Lisp status data, which was set on
339 | | ... | the VPP node. Type: list
342 | | ... | - No value returned
345 | | ... | \| Check if lisp is enabled \| ${nodes['DUT1']} \
346 | | ... | \| ${lisp_status_data} \|
348 | | [Arguments] | ${dut_node} | ${lisp_status_data}
349 | | ${show_lisp_stat}= | Vpp Show Lisp State | ${dut_node}
350 | | Lisp Should Be Equal | ${show_lisp_stat} | ${lisp_status_data[1]}
353 | | [Documentation] | Disable lisp on VPP node.
355 | | ... | *Arguments:*
356 | | ... | - dut_node - DUT node. Type: dictionary
359 | | ... | - No value returned
362 | | ... | \| Disable lisp \| ${nodes['DUT1']} \|
364 | | [Arguments] | ${dut_node}
365 | | Vpp Lisp Enable Disable | ${dut_node} | disable
367 | Check if lisp is disabled
368 | | [Documentation] | Check if lisp is disabled.
370 | | ... | *Arguments:*
371 | | ... | - dut_node - DUT node. Type: dictionary
372 | | ... | - lisp_status_data - Lisp status data, which was set on
373 | | ... | the VPP node. Type: list
376 | | ... | - No value returned
379 | | ... | \| Check if lisp is disabled \| ${nodes['DUT1']} \
380 | | ... | \| ${lisp_status_data} \|
382 | | [Arguments] | ${dut_node} | ${lisp_status_data}
383 | | ${show_lisp_stat}= | Vpp Show Lisp State | ${dut_node}
384 | | Lisp Should Be Equal | ${show_lisp_stat} | ${lisp_status_data[0]}