2 Documentation Test suite to verify unification operation on different 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 install features required for tested models, clear 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 Suite Setup Setup Environment
8 Suite Teardown Clean Environment
9 Test Teardown Delete Overlay Topology
10 Library RequestsLibrary
13 Variables ../../../variables/topoprocessing/TopologyRequests.py
14 Variables ../../../variables/topoprocessing/TargetFields.py
15 Variables ../../../variables/Variables.py
16 Resource ../../../libraries/KarafKeywords.robot
17 Resource ../../../libraries/Utils.robot
18 Resource ../../../libraries/TopoprocessingKeywords.robot
22 [Documentation] Test unification operation on Network Topology model
23 ${model} Set Variable network-topology-model
24 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node network-topo:1 network-topo:2
25 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
26 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
27 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
28 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=8 supporting-node_count=10
29 ... tp_count=14 tp-ref_count=14
30 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:5 bgp:10
31 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9
32 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8
33 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:7
34 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:6
35 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4
36 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
37 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1
39 Unification Node Inventory
40 [Documentation] Test unification operation on inventory model
41 ${model} Set Variable opendaylight-inventory-model
42 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2
43 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
44 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
45 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
46 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=7 supporting-node_count=10
47 ... tp_count=12 tp-ref_count=12
48 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:10 of-node:4
49 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9
50 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8
51 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:6 of-node:1
52 Check Aggregated Node in Topology ${model} ${resp.content} 1 of-node:5
53 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:3
54 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2
56 Unification Scripting Node
57 [Documentation] Test unification operation on Network Topology model using scripting
58 ${model} Set Variable network-topology-model
59 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node network-topo:1 network-topo:2
60 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
61 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
62 ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);}
63 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
64 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=9 supporting-node_count=10
65 ... tp_count=14 tp-ref_count=14
66 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:10
67 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9
68 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8
69 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:7
70 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:1 bgp:6
71 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5
72 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:4
73 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:3
74 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
76 Unification Scripting Node Inventory
77 [Documentation] Test unification operation on inventory model using scripting
78 ${model} Set Variable opendaylight-inventory-model
79 ${request} Prepare Unification Topology Request ${UNIFICATION_NT} ${model} node openflow-topo:1 openflow-topo:2
80 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
81 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
82 ${request} Insert Scripting into Request ${request} javascript if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);}
83 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
84 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=9 supporting-node_count=10
85 ... tp_count=12 tp-ref_count=12
86 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10
87 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:9
88 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2 of-node:8
89 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7
90 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:6
91 Check Aggregated Node in Topology ${model} ${resp.content} 1 of-node:5
92 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:4
93 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:3
94 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:1
96 Unification Node Inside
97 [Documentation] Test of unification type of aggregation inside on nodes on Network Topology model
98 ${model} Set Variable network-topology-model
99 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node network-topo:1
100 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
101 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
102 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=5
103 ... tp_count=8 tp-ref_count=8
104 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5
105 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4
106 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
107 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1
109 Unification Node Inside Inventory
110 [Documentation] Test of unification type of aggregation inside on nodes on Inventory model
111 ${model} Set Variable opendaylight-inventory-model
112 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} node openflow-topo:2
113 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
114 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
115 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=4 supporting-node_count=5
117 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10
118 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9
119 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8
120 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:6
122 Unification Termination Point Inside
123 [Documentation] Test aggregate inside operation on termination points
124 ${model} Set Variable network-topology-model
125 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} termination-point network-topo:1
126 ${request} Insert Target Field ${request} 0 ${OVSDB_OFPORT} 0
127 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
128 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5
129 ... tp_count=6 tp-ref_count=8
130 ${topology_id} Set Variable network-topo:1
131 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:1 tp:1:1 tp:1:1
133 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:1 tp:1:3 tp:1:3
134 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:3 tp:3:1 tp:3:1
135 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:3 tp:3:2 tp:3:2
136 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:4 tp:4:1 tp:4:1
138 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} bgp:5 tp:5:1 tp:5:1
140 Unification Termination Point Inside Inventory
141 [Documentation] Test aggregate inside operation on termination points
142 ${model} Set Variable opendaylight-inventory-model
143 ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} ${model} termination-point openflow-topo:1
144 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER} 0
145 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
146 ${resp} Wait Until Keyword Succeeds 3x 1s Output Topo Should Be Complete node_count=5 supporting-node_count=5
147 ... tp_count=8 tp-ref_count=12
148 ${topology_id} Set Variable openflow-topo:1
149 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:5 tp:5:1 tp:5:1
150 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:4 tp:4:1 tp:4:1
152 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:3 tp:3:1 tp:3:1
154 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:3 tp:3:3 tp:3:3
155 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:2 tp:2:1 tp:2:1
156 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:2 tp:2:2 tp:2:2
157 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:2 tp:2:3 tp:2:3
158 Check Aggregated Termination Point in Node ${model} ${resp.content} ${topology_id} of-node:1 tp:1:1 tp:1:1