2 Documentation Test suite to verify update behaviour during different topoprocessing operations on NT and inventory models.
3 ... Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIG_API to OPERATIONAL_API.
4 ... Need for this change is also a reason why main feature (odl-topoprocessing-framework) is installed after file change and not during boot.
5 ... Suite setup also installs features required for tested models and clears karaf logs for further synchronization. Tests themselves send configurational
6 ... xmls and verify output. Topology-id on the end of each urls must match topology-id from xml. Yang models of components in topology are defined in xmls.
8 Library RequestsLibrary
11 Variables ../../../variables/topoprocessing/TopologyRequests.py
12 Variables ../../../variables/topoprocessing/TargetFields.py
13 Variables ../../../variables/Variables.py
14 Resource ../../../libraries/KarafKeywords.robot
15 Resource ../../../libraries/Utils.robot
16 Resource ../../../libraries/TopoprocessingKeywords.robot
18 Suite Setup Setup Environment
19 Suite Teardown Clean Environment
20 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
21 Test Teardown Refresh Underlay Topologies And Delete Overlay Topology
25 Unification Node Update
26 [Documentation] Test processing of updates using unification operation on Network Topology model
27 #Create the original topology
28 ${model} Set Variable network-topology-model
29 ${request} Prepare Unification Topology Request
35 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
36 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
37 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
38 ${resp} Wait Until Keyword Succeeds
41 ... Output Topo Should Be Complete
43 ... supporting-node_count=10
46 #Update a node, expecting a unification of two nodes into one
47 ${node} Create Isis Node bgp:1 router-id-ipv4=192.168.1.2
48 Basic Request Put ${node} network-topology:network-topology/topology/network-topo:1/node/bgp:1
49 ${resp} Wait Until Keyword Succeeds
52 ... Output Topo Should Be Complete
54 ... supporting-node_count=10
57 FOR ${index} IN RANGE 1 11
58 Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
60 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2 bgp:1
61 #Update a unified node, expecting creation of a new overlay node
62 ${node} Create Isis Node bgp:3 router-id-ipv4=192.168.3.1
63 Basic Request Put ${node} network-topology:network-topology/topology/network-topo:1/node/bgp:3
64 ${resp} Wait Until Keyword Succeeds
67 ... Output Topo Should Be Complete
69 ... supporting-node_count=10
72 FOR ${index} IN RANGE 1 11
73 Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
76 Unification Node Inventory
77 [Documentation] Test processing of updates using unification operation on Inventory model
78 ${model} Set Variable opendaylight-inventory-model
79 ${request} Prepare Unification Topology Request
85 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
86 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
87 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
88 ${resp} Wait Until Keyword Succeeds
91 ... Output Topo Should Be Complete
93 ... supporting-node_count=10
96 #Update a node, expecting unification of two nodes into one
97 ${node} Create Openflow Node openflow:2 192.168.1.1
98 Basic Request Put ${node} opendaylight-inventory:nodes/node/openflow:2
99 ${resp} Wait Until Keyword Succeeds
102 ... Output Topo Should Be Complete
104 ... supporting-node_count=10
107 FOR ${index} IN RANGE 1 11
108 Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
110 Check Aggregated Node in Topology ${model} ${resp.content} 5 of-node:2 of-node:6 of-node:1
111 #Update a unified node, expecting creation of a new overlay node
112 ${node} Create Openflow Node openflow:4 192.168.3.1
113 Basic Request Put ${node} opendaylight-inventory:nodes/node/openflow:4
114 ${resp} Wait Until Keyword Succeeds
117 ... Output Topo Should Be Complete
119 ... supporting-node_count=10
122 FOR ${index} IN RANGE 1 11
123 Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
126 Filtration Range Number Node Update Network Topology Model
127 ${model} Set Variable network-topology-model
128 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} ${model} node network-topo:2
129 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OVS_VERSION}
130 ${request} Set Range Number Filter ${request} 20 25
131 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
132 ${resp} Wait Until Keyword Succeeds
135 ... Output Topo Should Be Complete
137 ... supporting-node_count=4
141 ${request} Create Isis Node bgp:7 17
142 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7
143 ${resp} Wait Until Keyword Succeeds
146 ... Output Topo Should Be Complete
148 ... supporting-node_count=3
152 FOR ${index} IN RANGE 8 11
153 Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
155 Should Not Contain ${resp.content} <node-ref>bgp:7</node-ref>
156 ${topology_id} Set Variable network-topo:2
157 Check Aggregated Termination Point in Node
164 Check Aggregated Termination Point in Node
171 Check Aggregated Termination Point in Node
178 ${request} Create Isis Node bgp:7 23
179 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:2/node/bgp:7
180 ${resp} Wait Until Keyword Succeeds
183 ... Output Topo Should Be Complete
185 ... supporting-node_count=4
189 ${request} Create OVSDB Termination Point tp:7:1 1119
192 ... network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1
193 ${resp} Wait Until Keyword Succeeds
196 ... Output Topo Should Be Complete
198 ... supporting-node_count=4
202 FOR ${index} IN RANGE 7 11
203 Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
205 Check Aggregated Termination Point in Node
212 Check Aggregated Termination Point in Node
219 Check Aggregated Termination Point in Node
226 Check Aggregated Termination Point in Node
234 Filtration Range Number Node Update Inventory Model
235 ${request} Prepare Filtration Topology Request
237 ... opendaylight-inventory-model
240 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_SERIAL_NUMBER}
241 ${request} Set Range Number Filter ${request} 20 25
242 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
243 ${resp} Wait Until Keyword Succeeds
246 ... Output Topo Should Be Complete
248 ... supporting-node_count=3
252 #Update a Node so it passes filtration
253 ${request} Create Openflow Node openflow:7 192.168.2.3 23
254 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:7
255 ${resp} Wait Until Keyword Succeeds
258 ... Output Topo Should Be Complete
260 ... supporting-node_count=4
264 FOR ${index} IN RANGE 7 11
265 Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
266 #Update a Node so it is filtered out
268 ${request} Create Openflow Node openflow:7 192.168.2.3 17
269 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:7
270 ${resp} Wait Until Keyword Succeeds
273 ... Output Topo Should Be Complete
275 ... supporting-node_count=3
279 FOR ${index} IN RANGE 8 11
280 Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
282 Should Not Contain ${resp.content} <node-ref>of-node:7</node-ref>
284 Filtration Range Number Termination Point Update NT
285 [Documentation] Test processing of updates using range number type of filtration operation on Network Topology model
286 ${model} Set Variable network-topology-model
287 ${request} Prepare Filtration Topology Request
290 ... termination-point
292 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OFPORT}
293 ${request} Set Range Number Filter ${request} 1115 1119
294 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
295 ${resp} Wait Until Keyword Succeeds
298 ... Output Topo Should Be Complete
300 ... supporting-node_count=5
304 #Update a previously out-of-range termination point, so it passes filtration
305 ${terminationPoint} Create OVSDB Termination Point tp:8:1 1115
307 ... ${terminationPoint}
308 ... network-topology:network-topology/topology/network-topo:2/node/bgp:8/termination-point/tp:8:1
309 ${resp} Wait Until Keyword Succeeds
312 ... Output Topo Should Be Complete
314 ... supporting-node_count=5
318 Check Aggregated Termination Point in Node
325 #Update a previsouly in-range termination point, so it is filtered out
326 ${terminationPoint} Create OVSDB Termination Point tp:7:2 1110
328 ... ${terminationPoint}
329 ... network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:2
330 ${resp} Wait Until Keyword Succeeds
333 ... Output Topo Should Be Complete
335 ... supporting-node_count=5
339 Check Aggregated Termination Point in Node
347 Filtration Range Number Termination Point Update Inventory
348 [Documentation] Test processing of updates using range number type of filtration operation on Inventory model
349 ${model} Set Variable opendaylight-inventory-model
350 ${request} Prepare Filtration Topology Request
353 ... termination-point
355 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER}
356 ${request} Set Range Number Filter ${request} 2 4
357 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
358 ${resp} Wait Until Keyword Succeeds
361 ... Output Topo Should Be Complete
363 ... supporting-node_count=5
367 #Update a previously out-of-range termination point, so it passes filtration
368 ${nodeConnector} Create Openflow Node Connector openflow:2:1 3
369 Basic Request Put ${nodeConnector} opendaylight-inventory:nodes/node/openflow:2/node-connector/openflow:2:1
370 ${resp} Wait Until Keyword Succeeds
373 ... Output Topo Should Be Complete
375 ... supporting-node_count=5
379 Check Aggregated Termination Point in Node
386 Check Aggregated Termination Point in Node
393 Check Aggregated Termination Point in Node
400 #Update an in-range termination point, so it is filtered out
401 ${nodeConnector} Create Openflow Node Connector openflow:3:2 5
402 Basic Request Put ${nodeConnector} opendaylight-inventory:nodes/node/openflow:3/node-connector/openflow:3:2
403 ${resp} Wait Until Keyword Succeeds
406 ... Output Topo Should Be Complete
408 ... supporting-node_count=5
412 Check Aggregated Termination Point in Node
420 Filtration Range Number Link Update Network Topology Model
421 [Documentation] Tests the processing of link update requests when using a range-number filtration on NT model
422 ${request} Prepare Filtration Topology Request
424 ... network-topology-model
427 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC}
428 ${request} Set Range Number Filter ${request} 11 13
429 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
430 ${resp} Wait Until Keyword Succeeds
433 ... Output Topo Should Be Complete
437 ${request} Create Link link:1:4 bgp:1 bgp:4 linkA 15
438 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:1/link/link:1:4
439 ${resp} Wait Until Keyword Succeeds
442 ... Output Topo Should Be Complete
445 Should Contain X Times
447 ... <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>
449 Should Contain X Times
451 ... <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>
453 Should Not Contain ${resp.content} network-topology/topology/network-topo:1/link/link:1:4
454 #Put the link back in
455 ${request} Create Link link:1:4 bgp:1 bgp:4 linkA 12
456 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:1/link/link:1:4
457 ${resp} Wait Until Keyword Succeeds
460 ... Output Topo Should Be Complete
463 Should Contain X Times
465 ... <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref>
467 Should Contain X Times
469 ... <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>
471 Should Contain X Times
473 ... <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>
476 Filtration Range Number Link Update Inventory Model
477 [Documentation] Tests the processing of link update requests when using a range-number filtration on Inventory model
478 ${request} Prepare Filtration Topology Request
480 ... opendaylight-inventory-model
483 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${IGP_LINK_METRIC}
484 ${request} Set Range Number Filter ${request} 14 15
485 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
486 ${resp} Wait Until Keyword Succeeds
489 ... Output Topo Should Be Complete
492 ${request} Create Link link:11:12 of-node:11 of-node:12 linkB 14
493 Basic Request Put ${request} network-topology:network-topology/topology/openflow-topo:3/link/link:11:12
494 ${resp} Wait Until Keyword Succeeds
497 ... Output Topo Should Be Complete
500 Should Contain X Times
502 ... <link-ref>/network-topology/topology/openflow-topo:3/link/link:14:12</link-ref>
504 Should Contain X Times
506 ... <link-ref>/network-topology/topology/openflow-topo:3/link/link:15:13</link-ref>
508 Should Contain X Times
510 ... <link-ref>/network-topology/topology/openflow-topo:3/link/link:11:12</link-ref>
512 ${request} Create Link link:11:12 of-node:11 of-node:12 linkB 13
513 Basic Request Put ${request} network-topology:network-topology/topology/openflow-topo:3/link/link:11:12
514 ${resp} Wait Until Keyword Succeeds
517 ... Output Topo Should Be Complete
520 Should Contain X Times
522 ... <link-ref>/network-topology/topology/openflow-topo:3/link/link:14:12</link-ref>
524 Should Contain X Times
526 ... <link-ref>/network-topology/topology/openflow-topo:3/link/link:15:13</link-ref>
529 Unification Filtration Node Update Inside Network Topology model
530 ${model} Set Variable network-topology-model
531 ${request} Prepare Unification Filtration Inside Topology Request
532 ... ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}
535 ... ${ISIS_NODE_TE_ROUTER_ID_IPV4}
537 ${request} Insert Filter With ID ${request} ${FILTER_IPV4} ${ISIS_NODE_TE_ROUTER_ID_IPV4} 1
538 ${request} Insert Apply Filters ${request} 1 1
539 ${request} Set IPV4 Filter ${request} 192.168.2.1/24
540 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
541 ${resp} Wait Until Keyword Succeeds
544 ... Output Topo Should Be Complete
546 ... supporting-node_count=3
550 ${request} Create Isis Node bgp:17 10 192.168.2.1
551 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:4/node/bgp:17
552 ${resp} Wait Until Keyword Succeeds
555 ... Output Topo Should Be Complete
557 ... supporting-node_count=4
561 FOR ${index} IN RANGE 17 21
562 Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
564 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:17 bgp:20
565 ${request} Create Isis Node bgp:17 10 192.168.1.2
566 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:4/node/bgp:17
567 ${resp} Wait Until Keyword Succeeds
570 ... Output Topo Should Be Complete
572 ... supporting-node_count=3
576 FOR ${index} IN RANGE 18 21
577 Should Contain X Times ${resp.content} <node-ref>bgp:${index}</node-ref> 1
579 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:18 bgp:20
581 Unification Filtration Node Update Inside Inventory model
582 ${model} Set Variable opendaylight-inventory-model
583 ${request} Prepare Unification Filtration Inside Topology Request
584 ... ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}
587 ... ${OPENFLOW_NODE_IP_ADDRESS}
589 ${request} Insert Filter With ID ${request} ${FILTER_IPV4} ${OPENFLOW_NODE_IP_ADDRESS} 1
590 ${request} Insert Apply Filters ${request} 1 1
591 ${request} Set IPV4 Filter ${request} 192.168.2.1/24
592 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
593 ${resp} Wait Until Keyword Succeeds
596 ... Output Topo Should Be Complete
598 ... supporting-node_count=4
602 ${request} Create Openflow Node openflow:17 192.168.1.2
603 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:17
604 ${resp} Wait Until Keyword Succeeds
607 ... Output Topo Should Be Complete
609 ... supporting-node_count=3
613 FOR ${index} IN RANGE 18 21
614 Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
616 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:19']/..
617 ${node} Element to String ${node}
618 Should Contain X Times ${node} <supporting-node> 2
619 Should Contain ${node} <node-ref>of-node:19</node-ref>
620 Should Contain ${node} <node-ref>of-node:20</node-ref>
621 Should Not Contain ${node} <node-ref>of-node:17</node-ref>
622 ${request} Create Openflow Node openflow:17 192.168.2.3
623 Basic Request Put ${request} opendaylight-inventory:nodes/node/openflow:17
624 ${resp} Wait Until Keyword Succeeds
627 ... Output Topo Should Be Complete
629 ... supporting-node_count=4
633 FOR ${index} IN RANGE 17 21
634 Should Contain X Times ${resp.content} <node-ref>of-node:${index}</node-ref> 1
636 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:17 of-node:19 of-node:20
638 Link Computation Aggregation Inside Update NT
639 [Documentation] Test of link computation with unification type of aggregation inside on updated nodes from network-topology model
640 ${model} Set Variable network-topology-model
641 ${request} Prepare Unification Inside Topology Request
642 ... ${UNIFICATION_NT_AGGREGATE_INSIDE}
646 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
647 ${request} Insert Link Computation Inside
649 ... ${LINK_COMPUTATION_INSIDE}
650 ... n:network-topology-model
652 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
653 ${resp} Wait Until Keyword Succeeds
656 ... Output Topo Should Be Complete
658 ... supporting-node_count=5
662 #Divide double nodes from overlay topology
663 ${request} Create Isis Node bgp:29 router-id-ipv4=192.168.1.3
664 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:6/node/bgp:29
665 ${resp} Wait Until Keyword Succeeds
668 ... Output Topo Should Be Complete
670 ... supporting-node_count=5
674 ${node_26} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:26
675 ${node_27} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:27
676 ${node_28} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:28
677 ${node_29} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:29
678 ${node_30} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:30
679 ${topo_id} Set Variable network-topo:6
680 Check Overlay Link Source And Destination
687 Check Overlay Link Source And Destination
694 Check Overlay Link Source And Destination
701 Check Overlay Link Source And Destination
708 #Update link to node out of topology
709 ${request} Create Link link:28:29 bgp:28 bgp:31 linkB 11
710 Basic Request Put ${request} network-topology:network-topology/topology/network-topo:6/link/link:28:29
711 ${resp} Wait Until Keyword Succeeds
714 ... Output Topo Should Be Complete
716 ... supporting-node_count=5
721 ${node_26} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:26
722 ${node_27} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:27
723 ${node_28} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:28
724 ${node_29} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:29
725 ${node_30} Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:30
726 Should Not Contain ${resp.content} /network-topology/topology/network-topo:6/link/link:28:29
727 Check Overlay Link Source And Destination
734 Check Overlay Link Source And Destination
741 Check Overlay Link Source And Destination
748 Check Overlay Link Source And Destination