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