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.
7 Suite Setup Setup Environment
8 Suite Teardown Clean Environment
9 Test Teardown Filtration Termination Points Test Teardown
10 Library RequestsLibrary
13 Variables ../../../variables/topoprocessing/TopologyRequests.py
14 Variables ../../../variables/Variables.py
15 Resource ../../../libraries/KarafKeywords.robot
16 Resource ../../../libraries/Utils.robot
17 Resource ../../../libraries/TopoprocessingKeywords.robot
20 Filtration IPV4 Network Topology Model
21 [Documentation] Test of ipv4 type of filtration operation on Network Topology model
22 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:1
23 ${request} Insert Filter ${request} ${FILTER_IPV4} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
24 ${request} Set IPV4 Filter ${request} 192.168.1.1/24
25 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
26 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
27 Should Contain X Times ${resp.content} <node-id>node: 5
28 Should Contain X Times ${resp.content} <termination-point> 4
29 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:1']/..
30 ${node} Element to String ${node}
31 Should Contain X Times ${node} <termination-point> 2
32 Should Contain ${node} <tp-id>tp:1:1</tp-id>
33 Should Contain ${node} <tp-id>tp:1:2</tp-id>
34 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:3']/..
35 ${node} Element to String ${node}
36 Should Contain X Times ${node} <termination-point> 2
37 Should Contain ${node} <tp-id>tp:3:1</tp-id>
38 Should Contain ${node} <tp-id>tp:3:2</tp-id>
39 [Teardown] Run Keywords Filtration Termination Points Test Teardown
40 ... AND Report_Failure_Due_To_Bug 4750
42 Filtration Range Number Network Topology Model
43 [Documentation] Test of range number type of filtration operation on Network Topology model
44 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
45 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} ovsdb:ofport
46 ${request} Set Range Number Filter ${request} 1115 1119
47 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
48 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
49 Should Contain X Times ${resp.content} <node-id>node: 5
50 Should Contain X Times ${resp.content} <termination-point> 3
51 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/..
52 ${node} Element to String ${node}
53 Should Contain X Times ${node} <termination-point> 2
54 Should Contain ${node} <tp-id>tp:7:1</tp-id>
55 Should Contain ${node} <tp-id>tp:7:2</tp-id>
56 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:6']/..
57 ${node} Element to String ${node}
58 Should Contain X Times ${node} <termination-point> 1
59 Should Contain ${node} <tp-id>tp:6:1</tp-id>
60 [Teardown] Run Keywords Filtration Termination Points Test Teardown
61 ... AND Report_Failure_Due_To_Bug 4750
63 Filtration Range Number Inventory Model
64 [Documentation] Test of range number type of filtration operation on Inventory model
65 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
66 ${request} Insert Filter ${request} ${FILTER_RANGE_NUMBER} flow-node-inventory:port-number
67 ${request} Set Range Number Filter ${request} 2 4
68 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
69 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
70 Should Contain X Times ${resp.content} <node-id>node: 5
71 Should Contain X Times ${resp.content} <termination-point> 5
72 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/..
73 ${node} Element to String ${node}
74 Should Contain X Times ${node} <termination-point> 2
75 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:3']/..
76 ${node} Element to String ${node}
77 Should Contain X Times ${node} <termination-point> 2
78 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/..
79 ${node} Element to String ${node}
80 Should Contain X Times ${node} <termination-point> 1
81 [Teardown] Run Keywords Filtration Termination Points Test Teardown
82 ... AND Report_Failure_Due_To_Bug 4674
84 Filtration Specific Number Network Topology Model
85 [Documentation] Test of specific number type of filtration operation on Network Topology model
86 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
87 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} ovsdb:ofport
88 ${request} Set Specific Number Filter ${request} 1119
89 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
90 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
91 Should Contain X Times ${resp.content} <node-id>node: 5
92 Should Contain X Times ${resp.content} <termination-point> 1
93 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/..
94 ${node} Element to String ${node}
95 Should Contain X Times ${node} <termination-point> 1
96 Should Contain ${node} <tp-id>tp:7:1</tp-id>
97 [Teardown] Run Keywords Filtration Termination Points Test Teardown
98 ... AND Report_Failure_Due_To_Bug 4750
100 Filtration Specific Number Inventory Model
101 [Documentation] Test of specific number type of filtration operation on Inventory model
102 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
103 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_NUMBER} flow-node-inventory:port-number
104 ${request} Set Specific Number Filter ${request} 1
105 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
106 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
107 Should Contain X Times ${resp.content} <node-id>node: 5
108 Should Contain X Times ${resp.content} <termination-point> 7
109 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/..
110 ${node} Element to String ${node}
111 Should Contain X Times ${node} <termination-point> 2
112 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/..
113 ${node} Element to String ${node}
114 Should Contain X Times ${node} <termination-point> 1
115 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:3']/..
116 ${node} Element to String ${node}
117 Should Contain X Times ${node} <termination-point> 1
118 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:4']/..
119 ${node} Element to String ${node}
120 Should Contain X Times ${node} <termination-point> 3
121 [Teardown] Run Keywords Filtration Termination Points Test Teardown
122 ... AND Report_Failure_Due_To_Bug 4674
124 Filtration Specific String Network Topology Model
125 [Documentation] Test of specific string type of filtration operation on Network Topology model
126 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
127 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} ovsdb:name
128 ${request} Set Specific String Filter ${request} portC
129 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
130 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
131 Should Contain X Times ${resp.content} <node-id>node: 5
132 Should Contain X Times ${resp.content} <termination-point> 1
133 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/..
134 ${node} Element to String ${node}
135 Should Contain X Times ${node} <termination-point> 1
136 [Teardown] Run Keywords Filtration Termination Points Test Teardown
137 ... AND Report_Failure_Due_To_Bug 4750
139 Filtration Specific String Inventory Model
140 [Documentation] Test of specific string type of filtration operation on Inventory model
141 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
142 ${request} Insert Filter ${request} ${FILTER_SPECIFIC_STRING} flow-node-inventory:name
143 ${request} Set Specific String Filter ${request} portB
144 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
145 Should Contain X Times ${resp.content} <node-id>node: 5
146 Should Contain X Times ${resp.content} <termination-point> 2
147 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/..
148 ${node} Element to String ${node}
149 Should Contain X Times ${node} <termination-point> 1
150 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/..
151 ${node} Element to String ${node}
152 Should Contain X Times ${node} <termination-point> 1
153 [Teardown] Run Keywords Filtration Termination Points Test Teardown
154 ... AND Report_Failure_Due_To_Bug 4674
156 Filtration Range String Network Topology Model
157 [Documentation] Test of range string type of filtration operation on Network Topology model
158 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:2
159 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} ovsdb:name
160 ${request} Set Range String Filter ${request} portA portC
161 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
162 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
163 Should Contain X Times ${resp.content} <node-id>node: 5
164 Should Contain X Times ${resp.content} <termination-point> 3
165 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:6']/..
166 ${node} Element to String ${node}
167 Should Contain X Times ${node} <termination-point> 1
168 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:7']/..
169 ${node} Element to String ${node}
170 Should Contain X Times ${node} <termination-point> 1
171 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:10']/..
172 ${node} Element to String ${node}
173 Should Contain X Times ${node} <termination-point> 1
174 [Teardown] Run Keywords Filtration Termination Points Test Teardown
175 ... AND Report_Failure_Due_To_Bug 4750
177 Filtration Range String Inventory Model
178 [Documentation] Test of range string type of filtration operation on Inventory model
179 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
180 ${request} Insert Filter ${request} ${FILTER_RANGE_STRING} flow-node-inventory:name
181 ${request} Set Range String Filter ${request} portA portB
182 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
183 Should Contain X Times ${resp.content} <node-id>node: 5
184 Should Contain X Times ${resp.content} <termination-point> 3
185 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/..
186 ${node} Element to String ${node}
187 Should Contain X Times ${node} <termination-point> 2
188 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:5']/..
189 ${node} Element to String ${node}
190 Should Contain X Times ${node} <termination-point> 1
191 [Teardown] Run Keywords Filtration Termination Points Test Teardown
192 ... AND Report_Failure_Due_To_Bug 4674
194 Filtration IPV6 Network Topology Model
195 [Documentation] Test of ipv6 type of filtration operation on Network Topology model
196 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:3
197 ${request} Insert Filter ${request} ${FILTER_IPV6} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
198 ${request} Set IPV6 Filter ${request} fe80:0:0:0:0:0:c0a8:101/120
199 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
200 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
201 Should Contain X Times ${resp.content} <node-id>node: 5
202 Should Contain X Times ${resp.content} <termination-point> 1
203 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:11']/..
204 ${node} Element to String ${node}
205 Should Contain X Times ${node} <termination-point> 1
206 [Teardown] Run Keywords Filtration Termination Points Test Teardown
207 ... AND Report_Failure_Due_To_Bug 4750
209 Filtration Script Network Topology Model
210 [Documentation] Test of script type of filtration operation on Network Topology model
211 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} network-topology-model termination-point network-topo:1
212 ${request} Insert Filter ${request} ${FILTER_SCRIPT} l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
213 ${script} Set Variable if (node.getValue().indexOf("192.168.1") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
214 ${request} Set Script Filter ${request} javascript ${script}
215 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
216 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
217 Should Contain X Times ${resp.content} <node-id>node: 5
218 Should Contain X Times ${resp.content} <termination-point> 3
219 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:4']/..
220 ${node} Element to String ${node}
221 Should Contain X Times ${node} <termination-point> 2
222 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='bgp:5']/..
223 ${node} Element to String ${node}
224 Should Contain X Times ${node} <termination-point> 1
225 [Teardown] Run Keywords Filtration Termination Points Test Teardown
226 ... AND Report_Failure_Due_To_Bug 4750
228 Filtration Script Inventory Model
229 [Documentation] Test of script type of filtration operation on Inventory model
230 ${request} Prepare Filtration Topology Request ${FILTRATION_NT} opendaylight-inventory-model termination-point openflow-topo:1
231 ${request} Insert Filter ${request} ${FILTER_SCRIPT} flow-node-inventory:name
232 ${script} Set Variable if (node.getValue().indexOf("portB") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
233 ${request} Set Script Filter ${request} javascript ${script}
234 ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1
235 Should Contain ${resp.content} <topology-id>topo:1</topology-id>
236 Should Contain X Times ${resp.content} <node-id>node: 5
237 Should Contain X Times ${resp.content} <termination-point> 3
238 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:2']/..
239 ${node} Element to String ${node}
240 Should Contain X Times ${node} <termination-point> 2
241 ${node} Get Element ${resp.content} xpath=.//node/supporting-node[node-ref='of-node:1']/..
242 ${node} Element to String ${node}
243 Should Contain X Times ${node} <termination-point> 1
244 [Teardown] Run Keywords Filtration Termination Points Test Teardown
245 ... AND Report_Failure_Due_To_Bug 4674
248 Filtration Termination Points Test Teardown
249 Test Teardown network-topology:network-topology/topology/topo:1
250 Report_Failure_Due_To_Bug 4673