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