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.
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/SetupUtils.robot
17 Resource ../../../libraries/TopoprocessingKeywords.robot
19 Suite Setup Setup Environment
20 Suite Teardown Clean Environment
21 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
22 Test Teardown Delete Overlay Topology
27 [Documentation] Test unification operation on Network Topology model
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 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:5 bgp:10
47 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9
48 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8
49 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:7
50 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:6
51 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4
52 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
53 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1
55 Unification Node Inventory
56 [Documentation] Test unification operation on inventory model
57 ${model} Set Variable opendaylight-inventory-model
58 ${request} Prepare Unification Topology Request
64 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
65 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
66 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
67 ${resp} Wait Until Keyword Succeeds
70 ... Output Topo Should Be Complete
72 ... supporting-node_count=10
75 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:10 of-node:4
76 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9
77 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8
78 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:6 of-node:1
79 Check Aggregated Node in Topology ${model} ${resp.content} 1 of-node:5
80 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:3
81 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2
83 Unification Scripting Node
84 [Documentation] Test unification operation on Network Topology model using scripting
85 ${model} Set Variable network-topology-model
86 ${request} Prepare Unification Topology Request
92 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
93 ${request} Insert Target Field ${request} 1 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
94 ${request} Insert Scripting into Request
97 ... 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);}
98 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
99 ${resp} Wait Until Keyword Succeeds
102 ... Output Topo Should Be Complete
104 ... supporting-node_count=10
107 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:10
108 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:9
109 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:8
110 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:7
111 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:1 bgp:6
112 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5
113 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:4
114 Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:3
115 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
117 Unification Scripting Node Inventory
118 [Documentation] Test unification operation on inventory model using scripting
119 ${model} Set Variable opendaylight-inventory-model
120 ${request} Prepare Unification Topology Request
121 ... ${UNIFICATION_NT}
126 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
127 ${request} Insert Target Field ${request} 1 ${OPENFLOW_NODE_IP_ADDRESS} 0
128 ${request} Insert Scripting into Request
131 ... 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);}
132 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
133 ${resp} Wait Until Keyword Succeeds
136 ... Output Topo Should Be Complete
138 ... supporting-node_count=10
141 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10
142 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:9
143 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:2 of-node:8
144 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7
145 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:6
146 Check Aggregated Node in Topology ${model} ${resp.content} 1 of-node:5
147 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:4
148 Check Aggregated Node in Topology ${model} ${resp.content} 3 of-node:3
149 Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:1
151 Unification Node Inside
152 [Documentation] Test of unification type of aggregation inside on nodes on Network Topology model
153 ${model} Set Variable network-topology-model
154 ${request} Prepare Unification Inside Topology Request
155 ... ${UNIFICATION_NT_AGGREGATE_INSIDE}
159 ${request} Insert Target Field ${request} 0 ${ISIS_NODE_TE_ROUTER_ID_IPV4} 0
160 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
161 ${resp} Wait Until Keyword Succeeds
164 ... Output Topo Should Be Complete
166 ... supporting-node_count=5
169 Check Aggregated Node in Topology ${model} ${resp.content} 1 bgp:5
170 Check Aggregated Node in Topology ${model} ${resp.content} 4 bgp:3 bgp:4
171 Check Aggregated Node in Topology ${model} ${resp.content} 0 bgp:2
172 Check Aggregated Node in Topology ${model} ${resp.content} 3 bgp:1
174 Unification Node Inside Inventory
175 [Documentation] Test of unification type of aggregation inside on nodes on Inventory model
176 ${model} Set Variable opendaylight-inventory-model
177 ${request} Prepare Unification Inside Topology Request
178 ... ${UNIFICATION_NT_AGGREGATE_INSIDE}
182 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_IP_ADDRESS} 0
183 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
184 ${resp} Wait Until Keyword Succeeds
187 ... Output Topo Should Be Complete
189 ... supporting-node_count=5
191 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:10
192 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:7 of-node:9
193 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:8
194 Check Aggregated Node in Topology ${model} ${resp.content} 0 of-node:6
196 Unification Termination Point Inside
197 [Documentation] Test aggregate inside operation on termination points
198 ${model} Set Variable network-topology-model
199 ${request} Prepare Unification Inside Topology Request
200 ... ${UNIFICATION_NT_AGGREGATE_INSIDE}
202 ... termination-point
204 ${request} Insert Target Field ${request} 0 ${OVSDB_OFPORT} 0
205 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
206 ${resp} Wait Until Keyword Succeeds
209 ... Output Topo Should Be Complete
211 ... supporting-node_count=5
214 ${topology_id} Set Variable network-topo:1
215 Check Aggregated Termination Point in Node
223 Check Aggregated Termination Point in Node
230 Check Aggregated Termination Point in Node
237 Check Aggregated Termination Point in Node
244 Check Aggregated Termination Point in Node
252 Check Aggregated Termination Point in Node
260 Unification Termination Point Inside Inventory
261 [Documentation] Test aggregate inside operation on termination points
262 ${model} Set Variable opendaylight-inventory-model
263 ${request} Prepare Unification Inside Topology Request
264 ... ${UNIFICATION_NT_AGGREGATE_INSIDE}
266 ... termination-point
268 ${request} Insert Target Field ${request} 0 ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER} 0
269 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
270 ${resp} Wait Until Keyword Succeeds
273 ... Output Topo Should Be Complete
275 ... supporting-node_count=5
278 ${topology_id} Set Variable openflow-topo:1
279 Check Aggregated Termination Point in Node
286 Check Aggregated Termination Point in Node
295 Check Aggregated Termination Point in Node
303 Check Aggregated Termination Point in Node
310 Check Aggregated Termination Point in Node
317 Check Aggregated Termination Point in Node
324 Check Aggregated Termination Point in Node
331 Check Aggregated Termination Point in Node