Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / topoprocessing / basic-topology-operations / 070_Underlay_update.robot
1 *** Settings ***
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.
7
8 Library             RequestsLibrary
9 Library             SSHLibrary
10 Library             XML
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
17
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
22
23
24 *** Test Cases ***
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
30     ...    ${UNIFICATION_NT}
31     ...    ${model}
32     ...    node
33     ...    network-topo:1
34     ...    network-topo:2
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
39     ...    3x
40     ...    1s
41     ...    Output Topo Should Be Complete
42     ...    node_count=8
43     ...    supporting-node_count=10
44     ...    tp_count=14
45     ...    tp-ref_count=14
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
50     ...    3x
51     ...    1s
52     ...    Output Topo Should Be Complete
53     ...    node_count=7
54     ...    supporting-node_count=10
55     ...    tp_count=11
56     ...    tp-ref_count=11
57     FOR    ${index}    IN RANGE    1    11
58         Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
59     END
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
65     ...    3x
66     ...    1s
67     ...    Output Topo Should Be Complete
68     ...    node_count=8
69     ...    supporting-node_count=10
70     ...    tp_count=9
71     ...    tp-ref_count=9
72     FOR    ${index}    IN RANGE    1    11
73         Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
74     END
75
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
80     ...    ${UNIFICATION_NT}
81     ...    ${model}
82     ...    node
83     ...    openflow-topo:1
84     ...    openflow-topo:2
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
89     ...    3x
90     ...    1s
91     ...    Output Topo Should Be Complete
92     ...    node_count=7
93     ...    supporting-node_count=10
94     ...    tp_count=12
95     ...    tp-ref_count=12
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
100     ...    3x
101     ...    1s
102     ...    Output Topo Should Be Complete
103     ...    node_count=6
104     ...    supporting-node_count=10
105     ...    tp_count=12
106     ...    tp-ref_count=12
107     FOR    ${index}    IN RANGE    1    11
108         Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
109     END
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
115     ...    3x
116     ...    1s
117     ...    Output Topo Should Be Complete
118     ...    node_count=7
119     ...    supporting-node_count=10
120     ...    tp_count=12
121     ...    tp-ref_count=12
122     FOR    ${index}    IN RANGE    1    11
123         Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
124     END
125
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
133     ...    3x
134     ...    1s
135     ...    Output Topo Should Be Complete
136     ...    node_count=4
137     ...    supporting-node_count=4
138     ...    node-ref_count=4
139     ...    tp_count=5
140     ...    tp-ref_count=5
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
144     ...    3x
145     ...    1s
146     ...    Output Topo Should Be Complete
147     ...    node_count=3
148     ...    supporting-node_count=3
149     ...    node-ref_count=3
150     ...    tp_count=3
151     ...    tp-ref_count=3
152     FOR    ${index}    IN RANGE    8    11
153         Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
154     END
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
158     ...    ${model}
159     ...    ${resp.content}
160     ...    ${topology_id}
161     ...    bgp:8
162     ...    tp:8:1
163     ...    tp:8:1
164     Check Aggregated Termination Point in Node
165     ...    ${model}
166     ...    ${resp.content}
167     ...    ${topology_id}
168     ...    bgp:9
169     ...    tp:9:1
170     ...    tp:9:1
171     Check Aggregated Termination Point in Node
172     ...    ${model}
173     ...    ${resp.content}
174     ...    ${topology_id}
175     ...    bgp:10
176     ...    tp:10:1
177     ...    tp:10:1
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
181     ...    3x
182     ...    1s
183     ...    Output Topo Should Be Complete
184     ...    node_count=4
185     ...    supporting-node_count=4
186     ...    node-ref_count=4
187     ...    tp_count=3
188     ...    tp-ref_count=3
189     ${request}    Create OVSDB Termination Point    tp:7:1    1119
190     Basic Request Put
191     ...    ${request}
192     ...    network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1
193     ${resp}    Wait Until Keyword Succeeds
194     ...    3x
195     ...    1s
196     ...    Output Topo Should Be Complete
197     ...    node_count=4
198     ...    supporting-node_count=4
199     ...    node-ref_count=4
200     ...    tp_count=4
201     ...    tp-ref_count=4
202     FOR    ${index}    IN RANGE    7    11
203         Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
204     END
205     Check Aggregated Termination Point in Node
206     ...    ${model}
207     ...    ${resp.content}
208     ...    ${topology_id}
209     ...    bgp:7
210     ...    tp:7:1
211     ...    tp:7:1
212     Check Aggregated Termination Point in Node
213     ...    ${model}
214     ...    ${resp.content}
215     ...    ${topology_id}
216     ...    bgp:8
217     ...    tp:8:1
218     ...    tp:8:1
219     Check Aggregated Termination Point in Node
220     ...    ${model}
221     ...    ${resp.content}
222     ...    ${topology_id}
223     ...    bgp:9
224     ...    tp:9:1
225     ...    tp:9:1
226     Check Aggregated Termination Point in Node
227     ...    ${model}
228     ...    ${resp.content}
229     ...    ${topology_id}
230     ...    bgp:10
231     ...    tp:10:1
232     ...    tp:10:1
233
234 Filtration Range Number Node Update Inventory Model
235     ${request}    Prepare Filtration Topology Request
236     ...    ${FILTRATION_NT}
237     ...    opendaylight-inventory-model
238     ...    node
239     ...    openflow-topo:2
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
244     ...    3x
245     ...    1s
246     ...    Output Topo Should Be Complete
247     ...    node_count=3
248     ...    supporting-node_count=3
249     ...    node-ref_count=3
250     ...    tp_count=0
251     ...    tp-ref_count=0
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
256     ...    3x
257     ...    1s
258     ...    Output Topo Should Be Complete
259     ...    node_count=4
260     ...    supporting-node_count=4
261     ...    node-ref_count=4
262     ...    tp_count=0
263     ...    tp-ref_count=0
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
267     END
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
271     ...    3x
272     ...    1s
273     ...    Output Topo Should Be Complete
274     ...    node_count=3
275     ...    supporting-node_count=3
276     ...    node-ref_count=3
277     ...    tp_count=0
278     ...    tp-ref_count=0
279     FOR    ${index}    IN RANGE    8    11
280         Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
281     END
282     Should Not Contain    ${resp.content}    <node-ref>of-node:7</node-ref>
283
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
288     ...    ${FILTRATION_NT}
289     ...    ${model}
290     ...    termination-point
291     ...    network-topo:2
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
296     ...    3x
297     ...    1s
298     ...    Output Topo Should Be Complete
299     ...    node_count=5
300     ...    supporting-node_count=5
301     ...    node-ref_count=5
302     ...    tp_count=3
303     ...    tp-ref_count=3
304     #Update a previously out-of-range termination point, so it passes filtration
305     ${terminationPoint}    Create OVSDB Termination Point    tp:8:1    1115
306     Basic Request Put
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
310     ...    3x
311     ...    1s
312     ...    Output Topo Should Be Complete
313     ...    node_count=5
314     ...    supporting-node_count=5
315     ...    node-ref_count=5
316     ...    tp_count=4
317     ...    tp-ref_count=4
318     Check Aggregated Termination Point in Node
319     ...    ${model}
320     ...    ${resp.content}
321     ...    network-topo:2
322     ...    bgp:8
323     ...    tp:8:1
324     ...    tp:8:1
325     #Update a previsouly in-range termination point, so it is filtered out
326     ${terminationPoint}    Create OVSDB Termination Point    tp:7:2    1110
327     Basic Request Put
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
331     ...    3x
332     ...    1s
333     ...    Output Topo Should Be Complete
334     ...    node_count=5
335     ...    supporting-node_count=5
336     ...    node-ref_count=5
337     ...    tp_count=3
338     ...    tp-ref_count=3
339     Check Aggregated Termination Point in Node
340     ...    ${model}
341     ...    ${resp.content}
342     ...    network-topo:2
343     ...    bgp:7
344     ...    tp:7:1
345     ...    tp:7:1
346
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
351     ...    ${FILTRATION_NT}
352     ...    ${model}
353     ...    termination-point
354     ...    openflow-topo:1
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
359     ...    3x
360     ...    1s
361     ...    Output Topo Should Be Complete
362     ...    node_count=5
363     ...    supporting-node_count=5
364     ...    node-ref_count=5
365     ...    tp_count=5
366     ...    tp-ref_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
371     ...    3x
372     ...    1s
373     ...    Output Topo Should Be Complete
374     ...    node_count=5
375     ...    supporting-node_count=5
376     ...    node-ref_count=5
377     ...    tp_count=6
378     ...    tp-ref_count=6
379     Check Aggregated Termination Point in Node
380     ...    ${model}
381     ...    ${resp.content}
382     ...    openflow-topo:1
383     ...    of-node:2
384     ...    tp:2:1
385     ...    tp:2:1
386     Check Aggregated Termination Point in Node
387     ...    ${model}
388     ...    ${resp.content}
389     ...    openflow-topo:1
390     ...    of-node:2
391     ...    tp:2:2
392     ...    tp:2:2
393     Check Aggregated Termination Point in Node
394     ...    ${model}
395     ...    ${resp.content}
396     ...    openflow-topo:1
397     ...    of-node:2
398     ...    tp:2:3
399     ...    tp:2:3
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
404     ...    3x
405     ...    1s
406     ...    Output Topo Should Be Complete
407     ...    node_count=5
408     ...    supporting-node_count=5
409     ...    node-ref_count=5
410     ...    tp_count=5
411     ...    tp-ref_count=5
412     Check Aggregated Termination Point in Node
413     ...    ${model}
414     ...    ${resp.content}
415     ...    openflow-topo:1
416     ...    of-node:3
417     ...    tp:3:1
418     ...    tp:3:1
419
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
423     ...    ${FILTRATION_NT}
424     ...    network-topology-model
425     ...    link
426     ...    network-topo:1
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
431     ...    3x
432     ...    1s
433     ...    Output Topo Should Be Complete
434     ...    link_count=3
435     ...    link-ref_count=3
436     #Filter a link out
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
440     ...    3x
441     ...    1s
442     ...    Output Topo Should Be Complete
443     ...    link_count=2
444     ...    link-ref_count=2
445     Should Contain X Times
446     ...    ${resp.content}
447     ...    <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>
448     ...    1
449     Should Contain X Times
450     ...    ${resp.content}
451     ...    <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>
452     ...    1
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
458     ...    3x
459     ...    1s
460     ...    Output Topo Should Be Complete
461     ...    link_count=3
462     ...    link-ref_count=3
463     Should Contain X Times
464     ...    ${resp.content}
465     ...    <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref>
466     ...    1
467     Should Contain X Times
468     ...    ${resp.content}
469     ...    <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>
470     ...    1
471     Should Contain X Times
472     ...    ${resp.content}
473     ...    <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>
474     ...    1
475
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
479     ...    ${FILTRATION_NT}
480     ...    opendaylight-inventory-model
481     ...    link
482     ...    openflow-topo:3
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
487     ...    3x
488     ...    1s
489     ...    Output Topo Should Be Complete
490     ...    link_count=2
491     ...    link-ref_count=2
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
495     ...    3x
496     ...    1s
497     ...    Output Topo Should Be Complete
498     ...    link_count=3
499     ...    link-ref_count=3
500     Should Contain X Times
501     ...    ${resp.content}
502     ...    <link-ref>/network-topology/topology/openflow-topo:3/link/link:14:12</link-ref>
503     ...    1
504     Should Contain X Times
505     ...    ${resp.content}
506     ...    <link-ref>/network-topology/topology/openflow-topo:3/link/link:15:13</link-ref>
507     ...    1
508     Should Contain X Times
509     ...    ${resp.content}
510     ...    <link-ref>/network-topology/topology/openflow-topo:3/link/link:11:12</link-ref>
511     ...    1
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
515     ...    3x
516     ...    1s
517     ...    Output Topo Should Be Complete
518     ...    link_count=2
519     ...    link-ref_count=2
520     Should Contain X Times
521     ...    ${resp.content}
522     ...    <link-ref>/network-topology/topology/openflow-topo:3/link/link:14:12</link-ref>
523     ...    1
524     Should Contain X Times
525     ...    ${resp.content}
526     ...    <link-ref>/network-topology/topology/openflow-topo:3/link/link:15:13</link-ref>
527     ...    1
528
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}
533     ...    ${model}
534     ...    node
535     ...    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
536     ...    network-topo:4
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
542     ...    3x
543     ...    1s
544     ...    Output Topo Should Be Complete
545     ...    node_count=2
546     ...    supporting-node_count=3
547     ...    node-ref_count=3
548     ...    tp_count=0
549     ...    tp-ref_count=0
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
553     ...    3x
554     ...    1s
555     ...    Output Topo Should Be Complete
556     ...    node_count=2
557     ...    supporting-node_count=4
558     ...    node-ref_count=4
559     ...    tp_count=0
560     ...    tp-ref_count=0
561     FOR    ${index}    IN RANGE    17    21
562         Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
563     END
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
568     ...    3x
569     ...    1s
570     ...    Output Topo Should Be Complete
571     ...    node_count=2
572     ...    supporting-node_count=3
573     ...    node-ref_count=3
574     ...    tp_count=0
575     ...    tp-ref_count=0
576     FOR    ${index}    IN RANGE    18    21
577         Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
578     END
579     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:18    bgp:20
580
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}
585     ...    ${model}
586     ...    node
587     ...    ${OPENFLOW_NODE_IP_ADDRESS}
588     ...    openflow-topo:4
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
594     ...    3x
595     ...    1s
596     ...    Output Topo Should Be Complete
597     ...    node_count=2
598     ...    supporting-node_count=4
599     ...    node-ref_count=4
600     ...    tp_count=0
601     ...    tp-ref_count=0
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
605     ...    3x
606     ...    1s
607     ...    Output Topo Should Be Complete
608     ...    node_count=2
609     ...    supporting-node_count=3
610     ...    node-ref_count=3
611     ...    tp_count=0
612     ...    tp-ref_count=0
613     FOR    ${index}    IN RANGE    18    21
614         Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
615     END
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
625     ...    3x
626     ...    1s
627     ...    Output Topo Should Be Complete
628     ...    node_count=2
629     ...    supporting-node_count=4
630     ...    node-ref_count=4
631     ...    tp_count=0
632     ...    tp-ref_count=0
633     FOR    ${index}    IN RANGE    17    21
634         Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
635     END
636     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:17    of-node:19    of-node:20
637
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}
643     ...    ${model}
644     ...    node
645     ...    network-topo:6
646     ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
647     ${request}    Insert Link Computation Inside
648     ...    ${request}
649     ...    ${LINK_COMPUTATION_INSIDE}
650     ...    n:network-topology-model
651     ...    network-topo:6
652     Basic Request Put    ${request}    ${OVERLAY_TOPO_URL}
653     ${resp}    Wait Until Keyword Succeeds
654     ...    3x
655     ...    1s
656     ...    Output Topo Should Be Complete
657     ...    node_count=4
658     ...    supporting-node_count=5
659     ...    node-ref_count=5
660     ...    link_count=4
661     ...    link-ref_count=4
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
666     ...    3x
667     ...    1s
668     ...    Output Topo Should Be Complete
669     ...    node_count=5
670     ...    supporting-node_count=5
671     ...    node-ref_count=5
672     ...    link_count=4
673     ...    link-ref_count=4
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
681     ...    ${model}
682     ...    ${resp.content}
683     ...    ${topo_id}
684     ...    link:28:29
685     ...    ${node_28}
686     ...    ${node_29}
687     Check Overlay Link Source And Destination
688     ...    ${model}
689     ...    ${resp.content}
690     ...    ${topo_id}
691     ...    link:26:28
692     ...    ${node_26}
693     ...    ${node_28}
694     Check Overlay Link Source And Destination
695     ...    ${model}
696     ...    ${resp.content}
697     ...    ${topo_id}
698     ...    link:29:30-2
699     ...    ${node_29}
700     ...    ${node_30}
701     Check Overlay Link Source And Destination
702     ...    ${model}
703     ...    ${resp.content}
704     ...    ${topo_id}
705     ...    link:29:30-1
706     ...    ${node_29}
707     ...    ${node_30}
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
712     ...    3x
713     ...    1s
714     ...    Output Topo Should Be Complete
715     ...    node_count=5
716     ...    supporting-node_count=5
717     ...    node-ref_count=5
718     ...    link_count=3
719     ...    link-ref_count=3
720     #Refresh node IDs
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
728     ...    ${model}
729     ...    ${resp.content}
730     ...    ${topo_id}
731     ...    link:26:28
732     ...    ${node_26}
733     ...    ${node_28}
734     Check Overlay Link Source And Destination
735     ...    ${model}
736     ...    ${resp.content}
737     ...    ${topo_id}
738     ...    link:29:30-2
739     ...    ${node_29}
740     ...    ${node_30}
741     Check Overlay Link Source And Destination
742     ...    ${model}
743     ...    ${resp.content}
744     ...    ${topo_id}
745     ...    link:29:30-1
746     ...    ${node_29}
747     ...    ${node_30}
748     Check Overlay Link Source And Destination
749     ...    ${model}
750     ...    ${resp.content}
751     ...    ${topo_id}
752     ...    link:29:30-1
753     ...    ${node_29}
754     ...    ${node_30}