2 Documentation Test suite to verify fitration operation on different models.
3 ... Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIGURATION to OPERATIONAL.
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 ... Tests themselves install feature required for specific model, clear karaf logs for futher synchronization, send configurational xmls and verify output.
6 ... 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 Delete Overlay Topology
25 Filtration Range Number Network Topology Model
26 [Documentation] Test of range number type of filtration operation on Network Topology model
27 ${request} Prepare Filtration Topology Request
29 ... network-topology-model
32 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OVSDB_OFPORT}
33 ${request} Set Range Number Filter ${request} 1115 1119
34 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
35 ${resp} Wait Until Keyword Succeeds
38 ... Output Topo Should Be Complete
40 ... supporting-node_count=5
44 Check Filtered Termination Points in Node ${resp.content} bgp:6 tp:6:1
45 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:1 tp:7:2
46 Check Filtered Termination Points in Node ${resp.content} bgp:8
47 Check Filtered Termination Points in Node ${resp.content} bgp:9
48 Check Filtered Termination Points in Node ${resp.content} bgp:10
50 Filtration Range Number Inventory Model
51 [Documentation] Test of range number type of filtration operation on Inventory model
52 ${request} Prepare Filtration Topology Request
54 ... opendaylight-inventory-model
57 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER}
58 ${request} Set Range Number Filter ${request} 2 4
59 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
60 ${resp} Wait Until Keyword Succeeds
63 ... Output Topo Should Be Complete
65 ... supporting-node_count=5
69 Check Filtered Termination Points in Node ${resp.content} of-node:1
70 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:3 tp:2:2
71 Check Filtered Termination Points in Node ${resp.content} of-node:3 tp:3:1 tp:3:2
72 Check Filtered Termination Points in Node ${resp.content} of-node:4
73 Check Filtered Termination Points in Node ${resp.content} of-node:5 tp:5:1
75 Filtration Specific Number Network Topology Model
76 [Documentation] Test of specific number type of filtration operation on Network Topology model
77 ${request} Prepare Filtration Topology Request
79 ... network-topology-model
82 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ${OVSDB_OFPORT}
83 ${request} Set Specific Number Filter ${request} 1119
84 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
85 ${resp} Wait Until Keyword Succeeds
88 ... Output Topo Should Be Complete
90 ... supporting-node_count=5
94 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/..
95 ${node} Element to String ${node}
96 Should Contain X Times ${node} <termination-point> 1
97 Check Filtered Termination Points in Node ${resp.content} bgp:6
98 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:1
99 Check Filtered Termination Points in Node ${resp.content} bgp:8
100 Check Filtered Termination Points in Node ${resp.content} bgp:9
101 Check Filtered Termination Points in Node ${resp.content} bgp:10
103 Filtration Specific Number Inventory Model
104 [Documentation] Test of specific number type of filtration operation on Inventory model
105 ${request} Prepare Filtration Topology Request
107 ... opendaylight-inventory-model
108 ... termination-point
110 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ${OPENFLOW_NODE_CONNECTOR_MAXIMUM_SPEED}
111 ${request} Set Specific Number Filter ${request} 2
112 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
113 ${resp} Wait Until Keyword Succeeds
116 ... Output Topo Should Be Complete
118 ... supporting-node_count=5
122 Check Filtered Termination Points in Node ${resp.content} of-node:1
123 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:2
124 Check Filtered Termination Points in Node ${resp.content} of-node:3 tp:3:1 tp:3:2
125 Check Filtered Termination Points in Node ${resp.content} of-node:4
126 Check Filtered Termination Points in Node ${resp.content} of-node:5
128 Filtration Specific String Network Topology Model
129 [Documentation] Test of specific string type of filtration operation on Network Topology model
130 ${request} Prepare Filtration Topology Request
132 ... network-topology-model
133 ... termination-point
135 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OVSDB_TP_NAME}
136 ${request} Set Specific String Filter ${request} portC
137 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
138 ${resp} Wait Until Keyword Succeeds
141 ... Output Topo Should Be Complete
143 ... supporting-node_count=5
147 Check Filtered Termination Points in Node ${resp.content} bgp:6
148 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:2
149 Check Filtered Termination Points in Node ${resp.content} bgp:8
150 Check Filtered Termination Points in Node ${resp.content} bgp:9
151 Check Filtered Termination Points in Node ${resp.content} bgp:10
153 Filtration Specific String Inventory Model
154 [Documentation] Test of specific string type of filtration operation on Inventory model
155 ${request} Prepare Filtration Topology Request
157 ... opendaylight-inventory-model
158 ... termination-point
160 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ${OPENFLOW_NODE_CONNECTOR_NAME}
161 ${request} Set Specific String Filter ${request} portB
162 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
163 ${resp} Wait Until Keyword Succeeds
166 ... Output Topo Should Be Complete
168 ... supporting-node_count=5
172 Check Filtered Termination Points in Node ${resp.content} of-node:1
173 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:1
174 Check Filtered Termination Points in Node ${resp.content} of-node:3
175 Check Filtered Termination Points in Node ${resp.content} of-node:4
176 Check Filtered Termination Points in Node ${resp.content} of-node:5 tp:5:1
178 Filtration Range String Network Topology Model
179 [Documentation] Test of range string type of filtration operation on Network Topology model
180 ${request} Prepare Filtration Topology Request
182 ... network-topology-model
183 ... termination-point
185 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OVSDB_TP_NAME}
186 ${request} Set Range String Filter ${request} portA portC
187 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
188 ${resp} Wait Until Keyword Succeeds
191 ... Output Topo Should Be Complete
193 ... supporting-node_count=5
197 Check Filtered Termination Points in Node ${resp.content} bgp:6 tp:6:1
198 Check Filtered Termination Points in Node ${resp.content} bgp:7 tp:7:2
199 Check Filtered Termination Points in Node ${resp.content} bgp:8
200 Check Filtered Termination Points in Node ${resp.content} bgp:9
201 Check Filtered Termination Points in Node ${resp.content} bgp:10 tp:10:1
203 Filtration Range String Inventory Model
204 [Documentation] Test of range string type of filtration operation on Inventory model
205 ${request} Prepare Filtration Topology Request
207 ... opendaylight-inventory-model
208 ... termination-point
210 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ${OPENFLOW_NODE_CONNECTOR_NAME}
211 ${request} Set Range String Filter ${request} portA portB
212 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
213 ${resp} Wait Until Keyword Succeeds
216 ... Output Topo Should Be Complete
218 ... supporting-node_count=5
222 Check Filtered Termination Points in Node ${resp.content} of-node:1
223 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:1 tp:2:3
224 Check Filtered Termination Points in Node ${resp.content} of-node:3
225 Check Filtered Termination Points in Node ${resp.content} of-node:4
226 Check Filtered Termination Points in Node ${resp.content} of-node:5 tp:5:1
228 Filtration Script Network Topology Model
229 [Documentation] Test of script type of filtration operation on Network Topology model
230 ${request} Prepare Filtration Topology Request
232 ... network-topology-model
233 ... termination-point
235 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OVSDB_OFPORT}
236 ${script} Set Variable
237 ... if (node.getValue() > 1117 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
238 ${request} Set Script Filter ${request} javascript ${script}
239 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
240 ${resp} Wait Until Keyword Succeeds
243 ... Output Topo Should Be Complete
245 ... supporting-node_count=5
249 Check Filtered Termination Points in Node ${resp.content} bgp:1
250 Check Filtered Termination Points in Node ${resp.content} bgp:2
251 Check Filtered Termination Points in Node ${resp.content} bgp:3
252 Check Filtered Termination Points in Node ${resp.content} bgp:4 tp:4:1 tp:4:2
253 Check Filtered Termination Points in Node ${resp.content} bgp:5 tp:5:1
255 Filtration Script Inventory Model
256 [Documentation] Test of script type of filtration operation on Inventory model
257 ${request} Prepare Filtration Topology Request
259 ... opendaylight-inventory-model
260 ... termination-point
262 ${request} Insert Filter ${request} ${FILTER_SCRIPT} ${OPENFLOW_NODE_CONNECTOR_NAME}
263 ${script} Set Variable
264 ... if (node.getValue().indexOf("portB") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
265 ${request} Set Script Filter ${request} javascript ${script}
266 Basic Request Put ${request} ${OVERLAY_TOPO_URL}
267 ${resp} Wait Until Keyword Succeeds
270 ... Output Topo Should Be Complete
272 ... supporting-node_count=5
276 Check Filtered Termination Points in Node ${resp.content} of-node:1 tp:1:1
277 Check Filtered Termination Points in Node ${resp.content} of-node:2 tp:2:2 tp:2:3
278 Check Filtered Termination Points in Node ${resp.content} of-node:3
279 Check Filtered Termination Points in Node ${resp.content} of-node:4
280 Check Filtered Termination Points in Node ${resp.content} of-node:5