2 Documentation Basic tests for BIER information configuration and verification.
3 ... Copyright (c) 2016-2017 Zte, Inc. and others. All rights reserved.
4 ... Test suite performs basic BIER information configuration and verification test cases for topology domain, subdomain, node and channel as follows:
5 ... Test Case 1: Query the topology, node and check their existence
6 ... Expected result: Exist a topology which topologyId is example-linkstate-topology and five nodes inside it
7 ... Test Case 2: Configure domain with add and delete operation
8 ... Expected result: The Configure result with corresponding operation verified as expected
9 ... Test Case 3: Configure subdomain with add and delete operation
10 ... Expected result: The Configure result with corresponding operation verified as expected
11 ... Test Case 4: Configure bier node params with add, modify and delete operation
12 ... Expected result: The Configure result with corresponding operation verified as expected
13 ... Test Case 5: Configure bier-te node params with add, modify and delete operation
14 ... Expected result: The Configure result with corresponding operation verified as expected
15 ... Test Case 6: Configure channel with add, modify, deploy and delete operation
16 ... Expected result: The Configure result with corresponding operation verified as expected
18 Resource ../../../libraries/BierTeResource.robot
19 Resource ../../../libraries/TemplatedRequests.robot
20 Resource ../../../variables/Variables.robot
21 Library RequestsLibrary
24 Suite Teardown Delete All Sessions
28 @{NODE_ID_LIST} 1111.1111.1111 1111.1111.1122 1111.1111.1133 1111.1111.1144 1111.1111.1155
29 ${TOPOLOGY_ID} example-linkstate-topology
30 @{DOMAIN_ID_LIST} ${1} ${2}
31 @{SUBDOMAIN_ID_LIST} ${1} ${2}
32 @{BFR_ID_LIST} ${1} ${2} ${3} ${4} ${5}
33 @{TE_LABEL_BASE_LIST} ${1100} ${2200} ${3300} ${4400} ${5500}
34 ${TE_LABEL_RANGE_SIZE} ${100}
35 @{TP_ID_LIST_OF_NODE1} fei-0/1/0/4 fei-0/1/0/1 fei-0/1/0/7 atm135-0/1/2/2
36 @{BP_LIST_OF_NODE1} 1 2 3 4
37 @{TP_ID_LIST_OF_NODE2} fei-0/1/0/1 atm155-0/1/2/1 fei-0/1/0/6
38 @{BP_LIST_OF_NODE2} 5 6 15
39 @{TP_ID_LIST_OF_NODE3} fei-0/1/0/4 fei-0/1/0/5 pos192-0/1/0/3
40 @{BP_LIST_OF_NODE3} 7 8 9
41 @{TP_ID_LIST_OF_NODE4} fei-0/1/0/5 spi-0/1/0/4 fei-0/1/0/6
42 @{BP_LIST_OF_NODE4} 10 11 14
44 ... 1111.1111.1111=${TP_ID_LIST_OF_NODE1}
45 ... 1111.1111.1122=${TP_ID_LIST_OF_NODE2}
46 ... 1111.1111.1133=${TP_ID_LIST_OF_NODE3}
47 ... 1111.1111.1144=${TP_ID_LIST_OF_NODE4}
49 ... 1111.1111.1111=${BP_LIST_OF_NODE1}
50 ... 1111.1111.1122=${BP_LIST_OF_NODE2}
51 ... 1111.1111.1133=${BP_LIST_OF_NODE3}
52 ... 1111.1111.1144=${BP_LIST_OF_NODE4}
53 @{CHANNEL_NAME_LIST} channel1 channel2 channel3
54 @{SRC_IP_LIST} 1.1.1.1 2.2.2.2 3.3.3.3
55 @{DST_GROUP_LIST} 239.1.1.1 239.2.2.2 239.3.3.3
60 [Documentation] Verify the topology has been succesfully put into the datastore by querying nodes and topology names.
61 Wait Until Keyword Succeeds 30s 2s Node Online
62 ${resp} TemplatedRequests.Post_As_Json_Templated
63 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/load_topology
69 [Documentation] Query the all links in the bier topology.
70 ${mapping1} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID}
71 ${resp} TemplatedRequests.Post_As_Json_Templated
72 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_link
78 [Documentation] Configure two BIER domains with domain id list ${DOMAIN_ID_LIST}.
79 ${mapping1} Create Dictionary
80 ... TOPOLOGYID=${TOPOLOGY_ID}
81 ... DOMAINID1=${DOMAIN_ID_LIST[0]}
82 ... DOMAINID2=${DOMAIN_ID_LIST[1]}
83 ${resp} TemplatedRequests.Post_As_Json_Templated
84 ... ${BIER_TE_VAR_FOLDER}/bier_domain_configuration/configure_domain
87 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
90 [Documentation] Delete the second domain created in the testcase TC2_Configure Domain.
91 ${mapping1} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} DOMAINID=${DOMAIN_ID_LIST[1]}
92 ${resp} TemplatedRequests.Post_As_Json_Templated
93 ... ${BIER_TE_VAR_FOLDER}/bier_domain_configuration/delete_domain
96 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
99 [Documentation] Query the domains created in the datastore.
100 ${mapping1} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID}
101 ${resp} TemplatedRequests.Post_As_Json_Templated
102 ... ${BIER_TE_VAR_FOLDER}/bier_domain_configuration/query_domain
107 TC3_Configure Subdomain
108 [Documentation] Configure two subdomains with subdomain list ${SUBDOMAIN_ID_LIST}.
109 ${mapping1} Create Dictionary
110 ... TOPOLOGYID=${TOPOLOGY_ID}
111 ... DOMAINID=${DOMAIN_ID_LIST[0]}
112 ... SUBDOMAIN1=${SUBDOMAIN_ID_LIST[0]}
113 ... SUBDOMAIN2=${SUBDOMAIN_ID_LIST[1]}
114 ${resp} TemplatedRequests.Post_As_Json_Templated
115 ... ${BIER_TE_VAR_FOLDER}/bier_domain_configuration/configure_subdomain
118 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
121 [Documentation] Delete the second subdomain created in TC3_Configure Subdomain.
122 ${mapping1} Create Dictionary
123 ... TOPOLOGYID=${TOPOLOGY_ID}
124 ... DOMAINID=${DOMAIN_ID_LIST[0]}
125 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[1]}
126 ${resp} TemplatedRequests.Post_As_Json_Templated
127 ... ${BIER_TE_VAR_FOLDER}/bier_domain_configuration/delete_subdomain
130 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
133 [Documentation] Query the subdomains in the datastore.
134 ${mapping1} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} DOMAINID=${DOMAIN_ID_LIST[0]}
135 ${resp} TemplatedRequests.Post_As_Json_Templated
136 ... ${BIER_TE_VAR_FOLDER}/bier_domain_configuration/query_subdomain
142 [Documentation] Configure the bier params of nodes in the bier network topology.
143 FOR ${i} IN RANGE len(${NODE_ID_LIST})
144 ${domain-bfr-id} Get From List ${BFR_ID_LIST} ${i}
145 ${node-id} Get From List ${NODE_ID_LIST} ${i}
146 ${mapping1} Create Dictionary
147 ... TOPOLOGYID=${TOPOLOGY_ID}
148 ... NODEID=${node-id}
149 ... DOMAINID=${DOMAIN_ID_LIST[0]}
150 ... DOMAINBFRID=${domain-bfr-id}
151 ... SUBDOMAINBFRID=${domain-bfr-id}
152 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
153 ${resp} TemplatedRequests.Post_As_Json_Templated
154 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_node
157 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
159 ${resp} TemplatedRequests.Post_As_Json_Templated
160 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_node
163 Verify_Response_As_Json_Templated
165 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_node
166 ... config_node_response
169 [Documentation] Configure the bier params of one node in the bier network topology and then delete it.
170 ${node-id} Get From List ${NODE_ID_LIST} ${3}
171 ${mapping} Create Dictionary
172 ... TOPOLOGYID=${TOPOLOGY_ID}
173 ... DOMAINID=${DOMAIN_ID_LIST[0]}
174 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
175 ... NODEID=${node-id}
176 ${resp} TemplatedRequests.Post_As_Json_Templated
177 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/delete_node
180 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
183 [Documentation] Configure the bier params of one node in the bier network topology and delete the ipv4 parameter of it.
184 ${node-id} Get From List ${NODE_ID_LIST} ${4}
185 ${mapping} Create Dictionary
186 ... DOMAINID=${DOMAIN_ID_LIST[0]}
187 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
188 ... NODEID=${node-id}
189 ... TOPOLOGYID=${TOPOLOGY_ID}
190 ${resp} TemplatedRequests.Post_As_Json_Templated
191 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/delete_ipv4
194 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
196 TC4_Query Subdomain Link
197 [Documentation] Query the bier links in the domain 1 and subdomain 1.
198 ${mapping} Create Dictionary
199 ... TOPOLOGYID=${TOPOLOGY_ID}
200 ... DOMAINID=${DOMAIN_ID_LIST[0]}
201 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
202 ${resp} TemplatedRequests.Post_As_Json_Templated
203 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_subdomain_link
208 TC5_Configure Te Label
209 [Documentation] Configure the BIER-TE label base and label range size for all nodes in the bier topology.
210 FOR ${i} IN RANGE len(${NODE_ID_LIST})
211 ${node-id} Get From List ${NODE_ID_LIST} ${i}
212 ${label-base} Get From List ${TE_LABEL_BASE_LIST} ${i}
213 ${mapping} Create Dictionary
214 ... TOPOLOGYID=${TOPOLOGY_ID}
215 ... NODEID=${node-id}
216 ... LABELBASE=${label-base}
217 ... LABELRANGESIZE=${TE_LABEL_RANGE_SIZE}
218 ${resp} TemplatedRequests.Post_As_Json_Templated
219 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_label
222 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
225 TC5_Configure Te Node
226 [Documentation] Configure the BIER-TE params of nodes in the bier network topology.
228 ${node-id} Get From List ${NODE_ID_LIST} ${i}
229 ${tp-id-list} Get From Dictionary ${NODE_TO_TP_ID_LIST} ${node-id}
230 ${bp-list} Get From Dictionary ${NODE_TO_BP_LIST} ${node-id}
231 Second Layer Loop ${node-id} ${tp-id-list} ${bp-list} len(${bp-list})
234 TC5_Query Te Subdomain Link
235 [Documentation] Query the bier links in the te-domain 1 and te-subdomain 1.
236 ${mapping} Create Dictionary
237 ... TOPOLOGYID=${TOPOLOGY_ID}
238 ... DOMAINID=${DOMAIN_ID_LIST[0]}
239 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
240 ${resp} TemplatedRequests.Post_As_Json_Templated
241 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_te_subdomain_link
247 [Documentation] Configure the bier te params of one node and delete the BP parameter.
248 ${mapping1} Create Dictionary
249 ... TOPOLOGYID=${TOPOLOGY_ID}
250 ... NODEID=${NODE_ID_LIST[4]}
251 ... DOMAINID=${DOMAIN_ID_LIST[0]}
252 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
255 ${resp1} TemplatedRequests.Post_As_Json_Templated
256 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node
259 Verify_Response_As_Json_Templated ${resp1} ${BIER_TE_VAR_FOLDER}/common success_response
260 ${mapping2} Create Dictionary
261 ... TOPOLOGYID=${TOPOLOGY_ID}
262 ... NODEID=${NODE_ID_LIST[4]}
263 ... DOMAINID=${DOMAIN_ID_LIST[0]}
264 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
266 ${resp2} TemplatedRequests.Post_As_Json_Templated
267 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/delete_te_bp
270 Verify_Response_As_Json_Templated ${resp2} ${BIER_TE_VAR_FOLDER}/common success_response
273 [Documentation] Configure the bier te params of one node and delete the SI parameter.
274 ${mapping1} Create Dictionary
275 ... TOPOLOGYID=${TOPOLOGY_ID}
276 ... NODEID=${NODE_ID_LIST[4]}
277 ... DOMAINID=${DOMAIN_ID_LIST[0]}
278 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
281 ${resp1} TemplatedRequests.Post_As_Json_Templated
282 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node
285 Verify_Response_As_Json_Templated ${resp1} ${BIER_TE_VAR_FOLDER}/common success_response
286 ${mapping2} Create Dictionary
287 ... TOPOLOGYID=${TOPOLOGY_ID}
288 ... NODEID=${NODE_ID_LIST[4]}
289 ... DOMAINID=${DOMAIN_ID_LIST[0]}
290 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
291 ${resp2} TemplatedRequests.Post_As_Json_Templated
292 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/delete_te_si
295 Verify_Response_As_Json_Templated ${resp2} ${BIER_TE_VAR_FOLDER}/common success_response
298 [Documentation] Configure the bier te params of one node and delete the BSL parameter.
299 ${mapping1} Create Dictionary
300 ... TOPOLOGYID=${TOPOLOGY_ID}
301 ... NODEID=${NODE_ID_LIST[4]}
302 ... DOMAINID=${DOMAIN_ID_LIST[0]}
303 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
306 ${resp1} TemplatedRequests.Post_As_Json_Templated
307 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node
310 Verify_Response_As_Json_Templated ${resp1} ${BIER_TE_VAR_FOLDER}/common success_response
311 ${mapping2} Create Dictionary
312 ... TOPOLOGYID=${TOPOLOGY_ID}
313 ... NODEID=${NODE_ID_LIST[4]}
314 ... DOMAINID=${DOMAIN_ID_LIST[0]}
315 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
316 ${resp2} TemplatedRequests.Post_As_Json_Templated
317 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/delete_te_bsl
320 Verify_Response_As_Json_Templated ${resp2} ${BIER_TE_VAR_FOLDER}/common success_response
323 [Documentation] Delete te label base and label range size of one node.
324 ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${NODE_ID_LIST[4]}
325 ${resp} TemplatedRequests.Post_As_Json_Templated
326 ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/delete_te_label
329 Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response
332 [Documentation] Add three channels to the datastore defined by bier-network-channel.
333 FOR ${i} IN RANGE len(${CHANNEL_NAME_LIST})
334 ${channel-name} Get From List ${CHANNEL_NAME_LIST} ${i}
335 ${src-ip} Get From List ${SRC_IP_LIST} ${i}
336 ${dst-group} Get From List ${DST_GROUP_LIST} ${i}
337 ${mapping} Create Dictionary
338 ... TOPOLOGYID=${TOPOLOGY_ID}
339 ... CHANNELNAME=${channel-name}
341 ... DSTGROUP=${dst-group}
342 ... DOMAINID=${DOMAIN_ID_LIST[0]}
343 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
344 ${resp} TemplatedRequests.Post_As_Json_Templated
345 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/add_channel
348 Verify_Response_As_Json_Templated
350 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration
355 [Documentation] Query the channels put into the datastore.
356 ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID}
357 ${resp} TemplatedRequests.Post_As_Json_Templated
358 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/get_channel
364 [Documentation] Query the channel put into the datastore by given name .
365 ${mapping} Create Dictionary
366 ... TOPOLOGYID=${TOPOLOGY_ID}
367 ... CHANNEL1=${CHANNEL_NAME_LIST[0]}
368 ... CHANNEL2=${CHANNEL_NAME_LIST[1]}
369 ${resp} TemplatedRequests.Post_As_Json_Templated
370 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/query_channel
376 [Documentation] Remove one channel which was put into the datastore.
377 ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} CHANNELNAME=channel3
378 ${resp} TemplatedRequests.Post_As_Json_Templated
379 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/remove_channel
382 Verify_Response_As_Json_Templated
384 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration
388 [Documentation] Modify one channel which was put into the datastore.
389 ${mapping} Create Dictionary
390 ... TOPOLOGYID=${TOPOLOGY_ID}
391 ... CHANNELNAME=${CHANNEL_NAME_LIST[0]}
392 ... SRCIP=10.10.10.10
393 ... DSTGROUP=${DST_GROUP_LIST[0]}
394 ... DOMAINID=${DOMAIN_ID_LIST[0]}
395 ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
396 ${resp} TemplatedRequests.Post_As_Json_Templated
397 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/modify_channel
400 Verify_Response_As_Json_Templated
402 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration
406 [Documentation] Deploy two channels which was put into the datastore, by giving the ingress node, ingress tp, egress nodes and coressponding tps.
407 ${mapping1} Create Dictionary
408 ... TOPOLOGYID=${TOPOLOGY_ID}
409 ... CHANNELNAME=${CHANNEL_NAME_LIST[0]}
410 ... INGRESSNODE=${NODE_ID_LIST[0]}
411 ... SRCTP=${TP_ID_LIST_OF_NODE1[3]}
412 ... NODEID1=${NODE_ID_LIST[1]}
413 ... RCVTP1=${TP_ID_LIST_OF_NODE2[1]}
414 ... NODEID2=${NODE_ID_LIST[2]}
415 ... RCVTP2=${TP_ID_LIST_OF_NODE3[2]}
416 ${resp1} TemplatedRequests.Post_As_Json_Templated
417 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/deploy_channel
420 Verify_Response_As_Json_Templated
422 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration
424 ${mapping2} Create Dictionary
425 ... TOPOLOGYID=${TOPOLOGY_ID}
426 ... CHANNELNAME=${CHANNEL_NAME_LIST[1]}
427 ... INGRESSNODE=${NODE_ID_LIST[0]}
428 ... SRCTP=${TP_ID_LIST_OF_NODE1[3]}
429 ... NODEID1=${NODE_ID_LIST[1]}
430 ... RCVTP1=${TP_ID_LIST_OF_NODE2[1]}
431 ... NODEID2=${NODE_ID_LIST[3]}
432 ... RCVTP2=${TP_ID_LIST_OF_NODE4[1]}
433 ${resp2} TemplatedRequests.Post_As_Json_Templated
434 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration/deploy_channel
437 Verify_Response_As_Json_Templated
439 ... ${BIER_TE_VAR_FOLDER}/bier_channel_configuration