Add Honeycomb VxLAN test suite
[csit.git] / resources / libraries / robot / lisp.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 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/counters.robot
17 | Library | resources.libraries.python.NodePath
18 | Library | resources.libraries.python.LispSetup.LispSetup
19 | Library | resources.libraries.python.LispUtil
20
21 *** Keywords ***
22
23 | Lisp locator_set data is prepared
24 | | [Documentation] | Generate lisp locator_set data for test
25 | | ...             | the lisp locator_set and locator API.
26 | | ...
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
31 | | ...
32 | | ... | *Return:*
33 | | ... | - No value returned
34 | | ...
35 | | ... | _NOTE:_ This KW sets following test case variables:
36 | | ... | - ${locator_set_values} - New generated locator_set data.
37 | | ...
38 | | ... | *Example:*
39 | | ... | \| Given Lisp locator_set data is prepared \| ${nodes['DUT1']} \
40 | | ... | \| ${locator_set_number} \|
41 | | ...
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}
46
47 | Lisp locator_set data is set
48 | | [Documentation] | Set the lisp locator_set and locator on the VPP node.
49 | | ...
50 | | ... | *Arguments:*
51 | | ... | - ${dut_node} - DUT node. Type: dictionary
52 | | ...
53 | | ... | *Return:*
54 | | ... | - No value returned
55 | | ...
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.
60 | | ...
61 | | ... | *Example:*
62 | | ... | \| When Lisp locator_set data is set \| ${nodes['DUT1']} \|
63 | | ...
64 | | [Arguments] | ${dut_node}
65 | | Vpp Set Lisp Locator Set | ${dut_node} | ${locator_set_values}
66
67 | Lisp locator_set is set correct
68 | | [Documentation] | Test if the locator_set is set correct on the VPP node.
69 | | ...
70 | | ... | *Arguments:*
71 | | ... | - ${dut_node} - DUT node. Type: dictionary
72 | | ...
73 | | ... | *Return:*
74 | | ... | - No value returned
75 | | ...
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.
80 | | ...
81 | | ... | *Example:*
82 | | ... | \| Then Lisp locator_set is set correct \| ${nodes['DUT1']} \|
83 | | ...
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}
88
89 | Delete all lisp locator_set from VPP
90 | | [Documentation] | Delete all lisp locator_set on the VPP node.
91 | | ...
92 | | ... | *Arguments:*
93 | | ... | - ${dut_node} - DUT node. Type: dictionary
94 | | ...
95 | | ... | *Return:*
96 | | ... | - No value returned
97 | | ...
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.
102 | | ...
103 | | ... | *Example:*
104 | | ... | \| When Delete all lisp locator_set from VPP \
105 | | ... | \| ${nodes['DUT1']} \|
106 | | ...
107 | | [Arguments] | ${dut_node}
108 | | Vpp Unset Lisp Locator Set | ${dut_node} | ${locator_set_values}
109
110 | Lisp locator_set should be unset
111 | | [Documentation] | Test if all locator_set are unset from VPP node.
112 | | ...
113 | | ... | *Arguments:*
114 | | ... | - ${dut_node} - DUT node. Type: dictionary
115 | | ...
116 | | ... | *Return:*
117 | | ... | - No value returned
118 | | ...
119 | | ... | *Example:*
120 | | ... | \| Then Lisp locator_set should be unset \| ${nodes['DUT1']} \|
121 | | ...
122 | | [Arguments] | ${dut_node}
123 | | ${show_locator_set}= | Vpp Show Lisp Locator Set | ${dut_node}
124 | | Lisp Is Empty | ${show_locator_set}
125
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.
129 | | ...
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
134 | | ...
135 | | ... | *Return:*
136 | | ... | - No value returned
137 | | ...
138 | | ... | _NOTE:_ This KW sets following test case variables:
139 | | ... | - ${locator_set_values} - New generate locator_set data.
140 | | ...
141 | | ... | *Example:*
142 | | ... | \| Given Lisp locator_set data use for test reset locator_set \
143 | | ... |    are prepared \| ${nodes['DUT1']} \| ${locator_set_number} \|
144 | | ...
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}
149
150 | Lisp eid address is prepared
151 | | [Documentation] | Generate lisp eid address for testing lisp eid API.
152 | | ...
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
157 | | ...
158 | | ... | *Return:*
159 | | ... | - No value returned
160 | | ...
161 | | ... | _NOTE:_ This KW sets following test case variables:
162 | | ... | - ${set_eid} - New generate eid data.
163 | | ...
164 | | ... | *Example:*
165 | | ... | \| Given Lisp eid address is prepared \| ${nodes['DUT1']} \
166 | | ... | \| ${eid_ipv4_num} \| ${eid_ipv6_num} \|
167 | | ...
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}
172
173 | Lisp eid address is set
174 | | [Documentation] | Set the lisp eid address on the VPP node.
175 | | ...
176 | | ... | *Arguments:*
177 | | ... | - ${dut_node} - DUT node. Type: dictionary
178 | | ...
179 | | ... | *Return:*
180 | | ... | - No value returned
181 | | ...
182 | | ... | _NOTE:_ This KW requires following test case variables:
183 | | ... | - ${set_eid} - Generated eid data which will be set to VPP.
184 | | ...
185 | | ... | *Example:*
186 | | ... | \| When Lisp eid address is set \| ${nodes['DUT1']} \|
187 | | ...
188 | | [Arguments] | ${dut_node}
189 | | Vpp Set Lisp Eid Table | ${dut_node} | ${set_eid}
190
191 | Lisp eid address is set correct to eid table
192 | | [Documentation] | Test if the locator_set is set correct on the VPP node.
193 | | ...
194 | | ... | *Arguments:*
195 | | ... | - ${dut_node} - DUT node. Type: dictionary
196 | | ...
197 | | ... | *Return:*
198 | | ... | - No value returned
199 | | ...
200 | | ... | _NOTE:_ This KW requires following test case variables:
201 | | ... | - ${set_eid} - Generated eid data which will be set to the VPP node.
202 | | ...
203 | | ... | *Example:*
204 | | ... | \| Then Lisp eid address is set correct to eid table \
205 | | ... | \| ${nodes['DUT1']} \|
206 | | ...
207 | | [Arguments] | ${dut_node}
208 | | ${show_eid}= | Vpp Show Lisp Local Eid Table | ${dut_node}
209 | | Lisp Should Be Equal | ${set_eid} | ${show_eid}
210
211 | Delete all lisp eid address from VPP
212 | | [Documentation] | Delete all lisp eid address from the VPP node.
213 | | ...
214 | | ... | *Arguments:*
215 | | ... | - ${dut_node} - DUT node. Type: dictionary
216 | | ...
217 | | ... | *Return:*
218 | | ... | - No value returned
219 | | ...
220 | | ... | _NOTE:_ This KW requires following test case variables:
221 | | ... | - ${set_eid} - Generated eid data which was set to the VPP node.
222 | | ...
223 | | ... | *Example:*
224 | | ... | \| When Delete all lisp eid address from VPP \
225 | | ... | \| ${nodes['DUT1']} \|
226 | | ...
227 | | [Arguments] | ${dut_node}
228 | | Vpp Unset Lisp Eid Table | ${dut_node} | ${set_eid}
229
230 | Lisp eid table should be empty
231 | | [Documentation] | Test if the eid table is empty.
232 | | ...
233 | | ... | *Arguments:*
234 | | ... | - ${dut_node} - DUT node. Type: dictionary
235 | | ...
236 | | ... | *Return:*
237 | | ... | - No value returned
238 | | ...
239 | | ... | *Example:*
240 | | ... | \| Then Lisp eid table should be empty \| ${nodes['DUT1']} \|
241 | | ...
242 | | [Arguments] | ${dut_node}
243 | | ${show_eid}= | Vpp Show Lisp Local Eid Table | ${dut_node}
244 | | Lisp Is Empty | ${show_eid}
245
246 | Lisp map resolver address is prepared
247 | | [Documentation] | Generate map resolver address for testing
248 | | ...             | lisp map resolver API.
249 | | ...
250 | | ... | *Arguments:*
251 | | ... | - ${dut_node} - DUT node. Type: dictionary
252 | | ... | - ${map_resolver_ipv4_num} - Number of generate ipv4 address.
253 | | ... |                              Type: int
254 | | ... | - ${map_resolver_ipv6_num} - Number of generate ipv6 address.
255 | | ... |                              Type: int
256 | | ...
257 | | ... | *Return:*
258 | | ... | - No value returned
259 | | ...
260 | | ... | _NOTE:_ This KW sets following test case variables:
261 | | ... | - ${set_map_resolver} - Generate map resolver data.
262 | | ...
263 | | ... | *Example:*
264 | | ... | \| Given Lisp map resolver address is prepared \
265 | | ... | \| ${nodes['DUT1']} \| ${map_resolver_ipv4_num} \
266 | | ... | \| ${map_resolver_ipv6_num} \|
267 | | ...
268 | | [Arguments] | ${dut_node} | ${map_resolver_ipv4_num} | ${map_resolver_ipv6_num}
269 | | ${set_map_resolver} = | Generate Lisp Map Resolver Data
270 | | ... | ${map_resolver_ipv4_num} | ${map_resolver_ipv6_num}
271 | | Set Test Variable | ${set_map_resolver}
272
273 | Lisp map resolver address is set
274 | | [Documentation] | Set the lisp map resolver address in the VPP node.
275 | | ...
276 | | ... | *Arguments:*
277 | | ... | - ${dut_node} - DUT node. Type: dictionary
278 | | ...
279 | | ... | *Return:*
280 | | ... | - No value returned
281 | | ...
282 | | ... | _NOTE:_ This KW requires following test case variables:
283 | | ... | - ${set_map_resolver} - Map resolver data which will be set
284 | | ... |                         to the VPP node.
285 | | ...
286 | | ... | *Example:*
287 | | ... | \| When Lisp map resolver address is set \| ${nodes['DUT1']} \|
288 | | ...
289 | | [Arguments] | ${dut_node}
290 | | Vpp Set Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
291
292 | Lisp map resolver address is set correct
293 | | [Documentation] | Test if the map resolver address is set correct
294 | | ...             | on the VPP node.
295 | | ...
296 | | ... | *Arguments:*
297 | | ... | - ${dut_node} - DUT node. Type: dictionary
298 | | ...
299 | | ... | *Return:*
300 | | ... | - No value returned
301 | | ...
302 | | ... | _NOTE:_ This KW requires following test case variables:
303 | | ... | - ${set_map_resolver} - Map resolver data which was set
304 | | ... |                         to the VPP node.
305 | | ...
306 | | ... | *Example:*
307 | | ... | \| Then Lisp map resolver address is set correct \
308 | | ... | \| ${nodes['DUT1']} \|
309 | | ...
310 | | [Arguments] | ${dut_node}
311 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
312 | | Lisp Should Be Equal | ${set_map_resolver} | ${show_map_resolver}
313
314 | Delete all lisp map resolver address from VPP
315 | | [Documentation] | Delete all lisp map resolver address on the VPP node.
316 | | ...
317 | | ... | *Arguments:*
318 | | ... | - ${dut_node} - DUT node. Type: dictionary
319 | | ...
320 | | ... | *Return:*
321 | | ... | - No value returned
322 | | ...
323 | | ... | _NOTE:_ This KW requires following test case variables:
324 | | ... | - ${set_map_resolver} - Map resolver data which was set
325 | | ... |                         to the VPP node.
326 | | ...
327 | | ... | *Example:*
328 | | ... | \| When Delete all lisp map resolver address from VPP \
329 | | ... | \| ${nodes['DUT1']} \|
330 | | ...
331 | | [Arguments] | ${dut_node}
332 | | Vpp Unset Lisp Map Resolver | ${dut_node} | ${set_map_resolver}
333
334 | Lip map resolver address should be empty
335 | | [Documentation] | Test if the map resolver are empty.
336 | | ...
337 | | ... | *Arguments:*
338 | | ... | - ${dut_node} - DUT node. Type: dictionary
339 | | ...
340 | | ... | *Return:*
341 | | ... | - No value returned
342 | | ...
343 | | ... | *Example:*
344 | | ... | \| Then Lip map resolver address should be empty \
345 | | ... | \| ${nodes['DUT1']} \|
346 | | ...
347 | | [Arguments] | ${dut_node}
348 | | ${show_map_resolver}= | Vpp Show Lisp Map Resolver | ${dut_node}
349 | | Lisp Is Empty | ${show_map_resolver}