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 \ Add Bindings ${node}0 10.10.10.${node}0/32 127.0.0.${node}
10 \ Add Bindings ${node}0 10.10.${node}0.0/24 127.0.0.${node}
11 \ Add Bindings ${node}0 10.${node}0.0.0/16 127.0.0.${node}
12 \ Add Bindings ${node}0 ${node}0.0.0.0/8 127.0.0.${node}
13 Add Connection ${version} both 127.0.0.1 64999 127.0.0.2 ${password}
14 Add Connection ${version} both 127.0.0.2 64999 127.0.0.1 ${password}
15 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.2
16 Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3 ${password}
17 Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1 ${password}
18 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
19 Add Connection ${version} both 127.0.0.1 64999 127.0.0.4 ${password}
20 Add Connection ${version} both 127.0.0.4 64999 127.0.0.1 ${password}
21 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} both 127.0.0.4
22 Add Connection ${version} listener 127.0.0.1 64999 127.0.0.5 ${password}
23 Add Connection ${version} speaker 127.0.0.5 64999 127.0.0.1 ${password}
24 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.5
27 Clean Bindings 127.0.0.1
28 Clean Bindings 127.0.0.2
29 Clean Bindings 127.0.0.3
30 Clean Bindings 127.0.0.4
31 Clean Bindings 127.0.0.5
32 Clean Peer Groups 127.0.0.1
33 Clean Connections 127.0.0.1
34 Clean Connections 127.0.0.2
35 Clean Connections 127.0.0.3
36 Clean Connections 127.0.0.4
37 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} Get Bindings 127.0.0.${node}
49 \ Should Contain Binding ${resp} 10 10.10.10.10/32
50 \ Should Contain Binding ${resp} 10 10.10.10.0/24
51 \ Should Not Contain Binding ${resp} 10 10.10.0.0/16
52 \ Should Contain Binding ${resp} 10 10.0.0.0/8
53 \ Should Contain Binding ${resp} 20 10.10.10.20/32
54 \ Should Not Contain Binding ${resp} 20 10.10.20.0/24
55 \ Should Contain Binding ${resp} 20 10.20.0.0/16
56 \ Should Not Contain Binding ${resp} 20 20.0.0.0/8
57 \ Should Contain Binding ${resp} 30 10.10.10.30/32
58 \ Should Not Contain Binding ${resp} 30 10.10.30.0/24
59 \ Should Contain Binding ${resp} 30 10.30.0.0/16
60 \ Should Not Contain Binding ${resp} 30 30.0.0.0/8
61 ${resp} Get Bindings 127.0.0.2
63 Should Contain Binding ${resp} 10 10.10.10.10/32
64 Should Contain Binding ${resp} 10 10.10.10.0/24
65 Should Contain Binding ${resp} 10 10.10.0.0/16
66 Should Contain Binding ${resp} 10 10.0.0.0/8
67 Should Contain Binding ${resp} 30 10.10.10.30/32
68 Should Contain Binding ${resp} 30 10.10.30.0/24
69 Should Contain Binding ${resp} 30 10.30.0.0/16
70 Should Contain Binding ${resp} 30 30.0.0.0/8
71 Should Contain Binding ${resp} 40 10.10.10.40/32
72 Should Contain Binding ${resp} 40 10.10.40.0/24
73 Should Contain Binding ${resp} 40 10.40.0.0/16
74 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} Get Bindings 127.0.0.${node}
85 \ Should Not Contain Binding ${resp} 10 10.10.10.10/32
86 \ Should Contain Binding ${resp} 10 10.10.10.0/24
87 \ Should Contain Binding ${resp} 10 10.10.0.0/16
88 \ Should Not Contain Binding ${resp} 10 10.0.0.0/8
89 \ Should Not Contain Binding ${resp} 20 10.10.10.20/32
90 \ Should Contain Binding ${resp} 20 10.10.20.0/24
91 \ Should Contain Binding ${resp} 20 10.20.0.0/16
92 \ Should Not Contain Binding ${resp} 20 20.0.0.0/8
93 \ Should Not Contain Binding ${resp} 30 10.10.10.30/32
94 \ Should Contain Binding ${resp} 30 10.10.30.0/24
95 \ Should Not Contain Binding ${resp} 30 10.30.0.0/16
96 \ Should Not Contain Binding ${resp} 30 30.0.0.0/8
97 ${resp} Get Bindings 127.0.0.2
99 Should Contain Binding ${resp} 10 10.10.10.10/32
100 Should Contain Binding ${resp} 10 10.10.10.0/24
101 Should Contain Binding ${resp} 10 10.10.0.0/16
102 Should Contain Binding ${resp} 10 10.0.0.0/8
103 Should Contain Binding ${resp} 30 10.10.10.30/32
104 Should Contain Binding ${resp} 30 10.10.30.0/24
105 Should Contain Binding ${resp} 30 10.30.0.0/16
106 Should Contain Binding ${resp} 30 30.0.0.0/8
107 Should Contain Binding ${resp} 40 10.10.10.40/32
108 Should Contain Binding ${resp} 40 10.10.40.0/24
109 Should Contain Binding ${resp} 40 10.40.0.0/16
110 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} Get Bindings ${node}
123 \ Should Not Contain Binding ${resp} 10 10.10.10.10/32
124 \ Should Contain Binding ${resp} 10 10.10.10.0/24
125 \ Should Contain Binding ${resp} 10 10.10.0.0/16
126 \ Should Not Contain Binding ${resp} 10 10.0.0.0/8
127 \ Should Contain Binding ${resp} 30 10.10.10.30/32
128 \ Should Contain Binding ${resp} 30 10.10.30.0/24
129 \ Should Not Contain Binding ${resp} 30 10.30.0.0/16
130 \ Should Not Contain Binding ${resp} 30 30.0.0.0/8
131 \ Should Not Contain Binding ${resp} 40 10.10.10.40/32
132 \ Should Contain Binding ${resp} 40 10.10.40.0/24
133 \ Should Not Contain Binding ${resp} 40 10.40.0.0/16
134 \ Should Not Contain Binding ${resp} 40 40.0.0.0/8
135 ${resp} Get Bindings 127.0.0.4
137 Should Contain Binding ${resp} 10 10.10.10.10/32
138 Should Contain Binding ${resp} 10 10.10.10.0/24
139 Should Contain Binding ${resp} 10 10.10.0.0/16
140 Should Contain Binding ${resp} 10 10.0.0.0/8
141 Should Contain Binding ${resp} 20 10.10.10.20/32
142 Should Contain Binding ${resp} 20 10.10.20.0/24
143 Should Contain Binding ${resp} 20 10.20.0.0/16
144 Should Contain Binding ${resp} 20 20.0.0.0/8
145 Should Contain Binding ${resp} 30 10.10.10.30/32
146 Should Contain Binding ${resp} 30 10.10.30.0/24
147 Should Contain Binding ${resp} 30 10.30.0.0/16
148 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} Get Bindings ${node}
159 \ Should Not Contain Binding ${resp} 10 10.10.10.10/32
160 \ Should Not Contain Binding ${resp} 10 10.10.10.0/24
161 \ Should Not Contain Binding ${resp} 10 10.10.0.0/16
162 \ Should Not Contain Binding ${resp} 10 10.0.0.0/8
163 \ Should Contain Binding ${resp} 30 10.10.10.30/32
164 \ Should Contain Binding ${resp} 30 10.10.30.0/24
165 \ Should Not Contain Binding ${resp} 30 10.30.0.0/16
166 \ Should Not Contain Binding ${resp} 30 30.0.0.0/8
167 \ Should Contain Binding ${resp} 40 10.10.10.40/32
168 \ Should Contain Binding ${resp} 40 10.10.40.0/24
169 \ Should Not Contain Binding ${resp} 40 10.40.0.0/16
170 \ Should Not Contain Binding ${resp} 40 40.0.0.0/8
171 ${resp} Get Bindings 127.0.0.4
173 Should Contain Binding ${resp} 10 10.10.10.10/32
174 Should Contain Binding ${resp} 10 10.10.10.0/24
175 Should Contain Binding ${resp} 10 10.10.0.0/16
176 Should Contain Binding ${resp} 10 10.0.0.0/8
177 Should Contain Binding ${resp} 20 10.10.10.20/32
178 Should Contain Binding ${resp} 20 10.10.20.0/24
179 Should Contain Binding ${resp} 20 10.20.0.0/16
180 Should Contain Binding ${resp} 20 20.0.0.0/8
181 Should Contain Binding ${resp} 30 10.10.10.30/32
182 Should Contain Binding ${resp} 30 10.10.30.0/24
183 Should Contain Binding ${resp} 30 10.30.0.0/16
184 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} Get Bindings 127.0.0.5
194 Should Contain Binding ${resp} 10 10.10.10.10/32
195 Should Contain Binding ${resp} 10 10.10.10.0/24
196 Should Contain Binding ${resp} 10 10.10.0.0/16
197 Should Contain Binding ${resp} 10 10.0.0.0/8
198 Should Contain Binding ${resp} 20 10.10.10.20/32
199 Should Not Contain Binding ${resp} 20 10.10.20.0/24
200 Should Contain Binding ${resp} 20 10.20.0.0/16
201 Should Not Contain Binding ${resp} 20 20.0.0.0/8
202 Should Contain Binding ${resp} 30 10.10.10.30/32
203 Should Contain Binding ${resp} 30 10.10.30.0/24
204 Should Contain Binding ${resp} 30 10.30.0.0/16
205 Should Contain Binding ${resp} 30 30.0.0.0/8
206 Should Contain Binding ${resp} 40 10.10.10.40/32
207 Should Not Contain Binding ${resp} 40 10.10.40.0/24
208 Should Contain Binding ${resp} 40 10.40.0.0/16
209 Should Not Contain Binding ${resp} 40 40.0.0.0/8
210 ${resp} Get Bindings 127.0.0.3
212 Should Contain Binding ${resp} 50 10.10.10.50/32
213 Should Contain Binding ${resp} 50 10.10.50.0/24
214 Should Contain Binding ${resp} 50 10.50.0.0/16
215 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} Get Bindings 127.0.0.5
224 Should Contain Binding ${resp} 10 10.10.10.10/32
225 Should Contain Binding ${resp} 10 10.10.10.0/24
226 Should Contain Binding ${resp} 10 10.10.0.0/16
227 Should Contain Binding ${resp} 10 10.0.0.0/8
228 Should Contain Binding ${resp} 20 10.10.10.20/32
229 Should Contain Binding ${resp} 20 10.10.20.0/24
230 Should Contain Binding ${resp} 20 10.20.0.0/16
231 Should Not Contain Binding ${resp} 20 20.0.0.0/8
232 Should Contain Binding ${resp} 30 10.10.10.30/32
233 Should Contain Binding ${resp} 30 10.10.30.0/24
234 Should Contain Binding ${resp} 30 10.30.0.0/16
235 Should Contain Binding ${resp} 30 30.0.0.0/8
236 Should Contain Binding ${resp} 40 10.10.10.40/32
237 Should Contain Binding ${resp} 40 10.10.40.0/24
238 Should Contain Binding ${resp} 40 10.40.0.0/16
239 Should Not Contain Binding ${resp} 40 40.0.0.0/8
240 ${resp} Get Bindings 127.0.0.3
242 Should Contain Binding ${resp} 50 10.10.10.50/32
243 Should Contain Binding ${resp} 50 10.10.50.0/24
244 Should Contain Binding ${resp} 50 10.50.0.0/16
245 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} Get Bindings 127.0.0.5
254 Should Contain Binding ${resp} 10 10.10.10.10/32
255 Should Contain Binding ${resp} 10 10.10.10.0/24
256 Should Contain Binding ${resp} 10 10.10.0.0/16
257 Should Contain Binding ${resp} 10 10.0.0.0/8
258 Should Not Contain Binding ${resp} 20 10.10.10.20/32
259 Should Not Contain Binding ${resp} 20 10.10.20.0/24
260 Should Not Contain Binding ${resp} 20 10.20.0.0/16
261 Should Not Contain Binding ${resp} 20 20.0.0.0/8
262 Should Contain Binding ${resp} 30 10.10.10.30/32
263 Should Contain Binding ${resp} 30 10.10.30.0/24
264 Should Contain Binding ${resp} 30 10.30.0.0/16
265 Should Contain Binding ${resp} 30 30.0.0.0/8
266 Should Not Contain Binding ${resp} 40 10.10.10.40/32
267 Should Not Contain Binding ${resp} 40 10.10.40.0/24
268 Should Not Contain Binding ${resp} 40 10.40.0.0/16
269 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} Get Bindings 127.0.0.4
279 Should Contain Binding ${resp} 10 10.10.10.10/32
280 Should Contain Binding ${resp} 10 10.10.10.0/24
281 Should Contain Binding ${resp} 10 10.10.0.0/16
282 Should Contain Binding ${resp} 10 10.0.0.0/8
283 Should Contain Binding ${resp} 20 10.10.10.20/32
284 Should Contain Binding ${resp} 20 10.10.20.0/24
285 Should Contain Binding ${resp} 20 10.20.0.0/16
286 Should Contain Binding ${resp} 20 20.0.0.0/8
287 Should Contain Binding ${resp} 30 10.10.10.30/32
288 Should Not Contain Binding ${resp} 30 10.10.30.0/24
289 Should Not Contain Binding ${resp} 30 10.30.0.0/16
290 Should Not Contain Binding ${resp} 30 30.0.0.0/8
291 Should Not Contain Binding ${resp} 50 10.10.10.50/32
292 Should Not Contain Binding ${resp} 50 10.10.50.0/24
293 Should Contain Binding ${resp} 50 10.50.0.0/16
294 Should Not Contain Binding ${resp} 50 50.0.0.0/8
295 ${resp} Get Bindings 127.0.0.2
297 Should Contain Binding ${resp} 40 10.10.10.40/32
298 Should Contain Binding ${resp} 40 10.10.40.0/24
299 Should Contain Binding ${resp} 40 10.40.0.0/16
300 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} Get Bindings 127.0.0.4
309 Should Contain Binding ${resp} 10 10.10.10.10/32
310 Should Contain Binding ${resp} 10 10.10.10.0/24
311 Should Contain Binding ${resp} 10 10.10.0.0/16
312 Should Contain Binding ${resp} 10 10.0.0.0/8
313 Should Contain Binding ${resp} 20 10.10.10.20/32
314 Should Contain Binding ${resp} 20 10.10.20.0/24
315 Should Contain Binding ${resp} 20 10.20.0.0/16
316 Should Contain Binding ${resp} 20 20.0.0.0/8
317 Should Contain Binding ${resp} 30 10.10.10.30/32
318 Should Contain Binding ${resp} 30 10.10.30.0/24
319 Should Contain Binding ${resp} 30 10.30.0.0/16
320 Should Not Contain Binding ${resp} 30 30.0.0.0/8
321 Should Not Contain Binding ${resp} 50 10.10.10.50/32
322 Should Not Contain Binding ${resp} 50 10.10.50.0/24
323 Should Not Contain Binding ${resp} 50 10.50.0.0/16
324 Should Not Contain Binding ${resp} 50 50.0.0.0/8
325 ${resp} Get Bindings 127.0.0.2
327 Should Contain Binding ${resp} 40 10.10.10.40/32
328 Should Contain Binding ${resp} 40 10.10.40.0/24
329 Should Contain Binding ${resp} 40 10.40.0.0/16
330 Should Contain Binding ${resp} 40 40.0.0.0/8