2 Documentation Library containing Keywords used for SXP filtering test checks
4 Resource ../SxpLib.robot
9 [Arguments] ${version}=version4 ${password}=none
10 FOR ${node} IN RANGE 1 5
11 SxpLib.Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
12 SxpLib.Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
13 SxpLib.Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
14 SxpLib.Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
16 SxpLib.Add Connection ${version} both 127.0.0.1 64999 127.0.0.2 ${password}
17 SxpLib.Add Connection ${version} both 127.0.0.2 64999 127.0.0.1 ${password}
18 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.2
19 SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3 ${password}
20 SxpLib.Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1 ${password}
21 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
22 SxpLib.Add Connection ${version} both 127.0.0.1 64999 127.0.0.4 ${password}
23 SxpLib.Add Connection ${version} both 127.0.0.4 64999 127.0.0.1 ${password}
24 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.4
25 SxpLib.Add Connection ${version} listener 127.0.0.1 64999 127.0.0.5 ${password}
26 SxpLib.Add Connection ${version} speaker 127.0.0.5 64999 127.0.0.1 ${password}
27 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.5
30 SxpLib.Clean Bindings 127.0.0.1
31 SxpLib.Clean Bindings 127.0.0.2
32 SxpLib.Clean Bindings 127.0.0.3
33 SxpLib.Clean Bindings 127.0.0.4
34 SxpLib.Clean Bindings 127.0.0.5
35 SxpLib.Clean Peer Groups 127.0.0.1
36 SxpLib.Clean Connections 127.0.0.1
37 SxpLib.Clean Connections 127.0.0.2
38 SxpLib.Clean Connections 127.0.0.3
39 SxpLib.Clean Connections 127.0.0.4
40 SxpLib.Clean Connections 127.0.0.5
43 [Documentation] Check if only bindings matching filter nodes 4 and 5
44 ... Database should contains only Bindings regarding to these matches:
45 ... permit ACL 10.10.10.0 0.0.0.255
46 ... deny ACL 10.10.0.0 0.0.255.0
47 ... permit ACL 10.0.0.0 0.255.255.0
48 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
49 FOR ${node} IN RANGE 4 6
50 ${resp} = SxpLib.Get Bindings 127.0.0.${node}
52 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
53 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
54 SxpLib.Should Not Contain Binding ${resp} 10 10.10.0.0/16
55 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
56 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
57 SxpLib.Should Not Contain Binding ${resp} 20 10.10.20.0/24
58 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
59 SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
60 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
61 SxpLib.Should Not Contain Binding ${resp} 30 10.10.30.0/24
62 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
63 SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
65 ${resp} = SxpLib.Get Bindings 127.0.0.2
67 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
68 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
69 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
70 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
71 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
72 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
73 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
74 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
75 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
76 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
77 SxpLib.Should Contain Binding ${resp} 40 10.40.0.0/16
78 SxpLib.Should Contain Binding ${resp} 40 40.0.0.0/8
81 [Documentation] Check if only bindings matching filter nodes 4 and 5
82 ... Database should contains only Bindings regarding to these matches:
83 ... permit ACL 10.20.0.0 0.0.255.255
84 ... permit ACL 10.10.0.0 0.0.255.0
85 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
86 FOR ${node} IN RANGE 4 6
87 ${resp} = SxpLib.Get Bindings 127.0.0.${node}
89 SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
90 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
91 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
92 SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
93 SxpLib.Should Not Contain Binding ${resp} 20 10.10.10.20/32
94 SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
95 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
96 SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
97 SxpLib.Should Not Contain Binding ${resp} 30 10.10.10.30/32
98 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
99 SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
100 SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
102 ${resp} = SxpLib.Get Bindings 127.0.0.2
104 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
105 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
106 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
107 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
108 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
109 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
110 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
111 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
112 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
113 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
114 SxpLib.Should Contain Binding ${resp} 40 10.40.0.0/16
115 SxpLib.Should Contain Binding ${resp} 40 40.0.0.0/8
118 [Documentation] Check if only bindings matching filter nodes 2 and 5
119 ... Database should contains only Bindings regarding to these matches:
120 ... deny ACL 10.10.20.0 0.0.0.255
121 ... permit ACL 10.10.0.0 0.0.255.0
122 ... permit SGT 30 ACL 10.10.10.0 0.0.0.255
123 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
124 @{list} = Create List 127.0.0.2 127.0.0.5
125 FOR ${node} IN @{list}
126 ${resp} = SxpLib.Get Bindings ${node}
128 SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
129 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
130 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
131 SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
132 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
133 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
134 SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
135 SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
136 SxpLib.Should Not Contain Binding ${resp} 40 10.10.10.40/32
137 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
138 SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
139 SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
141 ${resp} = SxpLib.Get Bindings 127.0.0.4
143 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
144 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
145 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
146 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
147 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
148 SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
149 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
150 SxpLib.Should Contain Binding ${resp} 20 20.0.0.0/8
151 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
152 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
153 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
154 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
157 [Documentation] Check if only bindings matching filter nodes 2 and 5
158 ... Database should contains only Bindings regarding to these matches:
159 ... permit SGT 20,40 ACL 10.10.0.0 0.0.255.255
160 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
161 @{list} = Create List 127.0.0.2 127.0.0.5
162 FOR ${node} IN @{list}
163 ${resp} = SxpLib.Get Bindings ${node}
165 SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.10/32
166 SxpLib.Should Not Contain Binding ${resp} 10 10.10.10.0/24
167 SxpLib.Should Not Contain Binding ${resp} 10 10.10.0.0/16
168 SxpLib.Should Not Contain Binding ${resp} 10 10.0.0.0/8
169 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
170 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
171 SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
172 SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
173 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
174 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
175 SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
176 SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
178 ${resp} = SxpLib.Get Bindings 127.0.0.4
180 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
181 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
182 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
183 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
184 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
185 SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
186 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
187 SxpLib.Should Contain Binding ${resp} 20 20.0.0.0/8
188 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
189 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
190 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
191 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
194 [Documentation] Check if only bindings matching filter from node 4 and 2 are propagated to SXP-DB other nodes
195 ... Database should contains only Bindings regarding to these matches:
196 ... permit ACL 10.10.10.0 0.0.0.255
197 ... permit ACL 10.0.0.0 0.254.0.0
198 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
199 ${resp} = SxpLib.Get Bindings 127.0.0.5
201 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
202 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
203 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
204 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
205 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
206 SxpLib.Should Not Contain Binding ${resp} 20 10.10.20.0/24
207 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
208 SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
209 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
210 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
211 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
212 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
213 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
214 SxpLib.Should Not Contain Binding ${resp} 40 10.10.40.0/24
215 SxpLib.Should Contain Binding ${resp} 40 10.40.0.0/16
216 SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
217 ${resp} = SxpLib.Get Bindings 127.0.0.3
219 SxpLib.Should Contain Binding ${resp} 50 10.10.10.50/32
220 SxpLib.Should Contain Binding ${resp} 50 10.10.50.0/24
221 SxpLib.Should Contain Binding ${resp} 50 10.50.0.0/16
222 SxpLib.Should Contain Binding ${resp} 50 50.0.0.0/8
225 [Documentation] Check if only bindings matching filter from node 4 and 2 are propagated to SXP-DB of other nodes
226 ... Database should contains only Bindings regarding to these matches:
227 ... permit ACL 10.0.0.0 0.255.255.255
228 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
229 ${resp} = SxpLib.Get Bindings 127.0.0.5
231 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
232 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
233 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
234 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
235 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
236 SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
237 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
238 SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
239 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
240 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
241 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
242 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
243 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
244 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
245 SxpLib.Should Contain Binding ${resp} 40 10.40.0.0/16
246 SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
247 ${resp} = SxpLib.Get Bindings 127.0.0.3
249 SxpLib.Should Contain Binding ${resp} 50 10.10.10.50/32
250 SxpLib.Should Contain Binding ${resp} 50 10.10.50.0/24
251 SxpLib.Should Contain Binding ${resp} 50 10.50.0.0/16
252 SxpLib.Should Contain Binding ${resp} 50 50.0.0.0/8
254 Check Three Group 4-2
255 [Documentation] Check if only bindings matching filter from node 4 and 2 are propagated to SXP-DB of other nodes
256 ... Database should contains only Bindings regarding to these matches:
257 ... deny ACL 10.0.0.0 0.255.255.255
258 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
259 ${resp} = SxpLib.Get Bindings 127.0.0.5
261 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
262 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
263 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
264 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
265 SxpLib.Should Not Contain Binding ${resp} 20 10.10.10.20/32
266 SxpLib.Should Not Contain Binding ${resp} 20 10.10.20.0/24
267 SxpLib.Should Not Contain Binding ${resp} 20 10.20.0.0/16
268 SxpLib.Should Not Contain Binding ${resp} 20 20.0.0.0/8
269 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
270 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
271 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
272 SxpLib.Should Contain Binding ${resp} 30 30.0.0.0/8
273 SxpLib.Should Not Contain Binding ${resp} 40 10.10.10.40/32
274 SxpLib.Should Not Contain Binding ${resp} 40 10.10.40.0/24
275 SxpLib.Should Not Contain Binding ${resp} 40 10.40.0.0/16
276 SxpLib.Should Not Contain Binding ${resp} 40 40.0.0.0/8
279 [Documentation] Check if only bindings matching filter from node 5 and 3 are propagated to SXP-DB of other nodes
280 ... Database should contains only Bindings regarding to these matches:
281 ... permit SGT 30 ACL 10.10.10.0 0.0.0.255
282 ... permit SGT 50 ACL 10.0.0.0 0.254.0.0
283 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
284 ${resp} = SxpLib.Get Bindings 127.0.0.4
286 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
287 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
288 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
289 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
290 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
291 SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
292 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
293 SxpLib.Should Contain Binding ${resp} 20 20.0.0.0/8
294 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
295 SxpLib.Should Not Contain Binding ${resp} 30 10.10.30.0/24
296 SxpLib.Should Not Contain Binding ${resp} 30 10.30.0.0/16
297 SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
298 SxpLib.Should Not Contain Binding ${resp} 50 10.10.10.50/32
299 SxpLib.Should Not Contain Binding ${resp} 50 10.10.50.0/24
300 SxpLib.Should Contain Binding ${resp} 50 10.50.0.0/16
301 SxpLib.Should Not Contain Binding ${resp} 50 50.0.0.0/8
302 ${resp} = SxpLib.Get Bindings 127.0.0.2
304 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
305 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
306 SxpLib.Should Contain Binding ${resp} 40 10.40.0.0/16
307 SxpLib.Should Contain Binding ${resp} 40 40.0.0.0/8
310 [Documentation] Check if only bindings matching filter from node 5 and 3 are propagated to SXP-DB of other nodes
311 ... Database should contains only Bindings regarding to these matches:
312 ... permit ESGT 20,40 ACL 10.0.0.0 0.255.255.255
313 ... Info regarding filtering https://wiki.opendaylight.org/view/SXP:Beryllium:Developer_Guide
314 ${resp} = SxpLib.Get Bindings 127.0.0.4
316 SxpLib.Should Contain Binding ${resp} 10 10.10.10.10/32
317 SxpLib.Should Contain Binding ${resp} 10 10.10.10.0/24
318 SxpLib.Should Contain Binding ${resp} 10 10.10.0.0/16
319 SxpLib.Should Contain Binding ${resp} 10 10.0.0.0/8
320 SxpLib.Should Contain Binding ${resp} 20 10.10.10.20/32
321 SxpLib.Should Contain Binding ${resp} 20 10.10.20.0/24
322 SxpLib.Should Contain Binding ${resp} 20 10.20.0.0/16
323 SxpLib.Should Contain Binding ${resp} 20 20.0.0.0/8
324 SxpLib.Should Contain Binding ${resp} 30 10.10.10.30/32
325 SxpLib.Should Contain Binding ${resp} 30 10.10.30.0/24
326 SxpLib.Should Contain Binding ${resp} 30 10.30.0.0/16
327 SxpLib.Should Not Contain Binding ${resp} 30 30.0.0.0/8
328 SxpLib.Should Not Contain Binding ${resp} 50 10.10.10.50/32
329 SxpLib.Should Not Contain Binding ${resp} 50 10.10.50.0/24
330 SxpLib.Should Not Contain Binding ${resp} 50 10.50.0.0/16
331 SxpLib.Should Not Contain Binding ${resp} 50 50.0.0.0/8
332 ${resp} = SxpLib.Get Bindings 127.0.0.2
334 SxpLib.Should Contain Binding ${resp} 40 10.10.10.40/32
335 SxpLib.Should Contain Binding ${resp} 40 10.10.40.0/24
336 SxpLib.Should Contain Binding ${resp} 40 10.40.0.0/16
337 SxpLib.Should Contain Binding ${resp} 40 40.0.0.0/8