2 Documentation Test suite to verify Behaviour in different topologies
3 Suite Setup Setup SXP Environment 6
4 Suite Teardown Clean SXP Environment 6
5 Test Teardown Clean Nodes
6 Library RequestsLibrary
8 Library ../../../libraries/Sxp.py
9 Resource ../../../libraries/SxpLib.robot
15 [Documentation] Test behaviour after shutting down connections in Version4
16 [Tags] SXP TopoBuiltIn.Logy
17 Setup TopoBuiltIn.Logy Triangel version4
18 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part One
19 SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.3
20 SxpLib.Delete Connections 127.0.0.3 64999 127.0.0.1
21 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Two
22 SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.2
23 SxpLib.Delete Connections 127.0.0.2 64999 127.0.0.1
24 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Three
27 [Documentation] Test behaviour after shutting down connections in Legacy versions
28 [Tags] SXP TopoBuiltIn.Logy
29 @{list} = Create List version1
30 : FOR ${version} IN @{list}
31 \ Setup TopoBuiltIn.Logy Triangel ${version}
32 \ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part One
33 \ SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.3
34 \ SxpLib.Delete Connections 127.0.0.3 64999 127.0.0.1
35 \ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Two
36 \ SxpLib.Delete Connections 127.0.0.1 64999 127.0.0.2
37 \ SxpLib.Delete Connections 127.0.0.2 64999 127.0.0.1
38 \ BuiltIn.Wait Until Keyword Succeeds 4 1 Check Export Part Three
41 Forwarding Test V2=>V1
42 [Documentation] Version 2 => 1 functionality
43 [Tags] SXP TopoBuiltIn.Logy
44 Setup TopoBuiltIn.Logy Linear version2 version1
45 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Forwarding V2=>V1
47 Forwarding Test V3=>V2
48 [Documentation] Version 3 => 2 functionality
49 [Tags] SXP TopoBuiltIn.Logy
50 Setup TopoBuiltIn.Logy Linear version3 version2
51 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Forwarding V3=>V2
53 Forwarding Test V4=>V3
54 [Documentation] Version 4 => 3 functionality
55 [Tags] SXP TopoBuiltIn.Logy
56 Setup TopoBuiltIn.Logy Linear version4 version3
57 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Forwarding V4=>V3
60 [Documentation] Most Recent Rule
61 [Tags] SXP TopoBuiltIn.Logy
62 Setup TopoBuiltIn.Logy Fork version4
63 SxpLib.Add Bindings 542 5.5.5.5/32 127.0.0.2
65 SxpLib.Add Bindings 543 5.5.5.5/32 127.0.0.3
66 SxpLib.Add Bindings 100 15.15.15.15/32 127.0.0.3
68 SxpLib.Add Bindings 99 15.15.15.15/32 127.0.0.2
69 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Most Recent
72 [Documentation] Shorthes Path over Most Recent
73 [Tags] SXP TopoBuiltIn.Logy
74 SxpLib.Add Connection version4 listener 127.0.0.5 64999 127.0.0.3
75 SxpLib.Add Connection version4 speaker 127.0.0.3 64999 127.0.0.5
76 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection version4 listener 127.0.0.5
78 Setup TopoBuiltIn.Logy Fork version4
79 SxpLib.Add Bindings 542 5.5.5.5/32 127.0.0.2
80 SxpLib.Add Bindings 545 5.5.5.5/32 127.0.0.5
81 SxpLib.Add Bindings 99 15.15.15.15/32 127.0.0.2
82 SxpLib.Add Bindings 9954 105.15.125.15/32 127.0.0.5
83 SxpLib.Add Bindings 95 15.15.15.15/32 127.0.0.5
84 BuiltIn.Wait Until Keyword Succeeds 4 1 Check Shorthest Path
87 Setup TopoBuiltIn.Logy Triangel
88 [Arguments] ${version}
89 [Documentation] Setup 3 nodes connected to each other
90 SxpLib.Add Bindings 542 5.5.5.5/32 127.0.0.2
91 SxpLib.Add Bindings 543 5.5.5.5/32 127.0.0.3
92 SxpLib.Add Bindings 99 15.15.15.15/32 127.0.0.3
93 SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
94 SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
95 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
97 SxpLib.Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
98 SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
99 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
100 SxpLib.Add Connection ${version} listener 127.0.0.3 64999 127.0.0.2
101 SxpLib.Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.3
102 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.2
105 Setup TopoBuiltIn.Logy Linear
106 [Arguments] ${version} ${r_version}
107 [Documentation] Setup 3 nodes connected linearly
108 SxpLib.Add Bindings 6 56.56.56.0/24 127.0.0.2
109 SxpLib.Add Bindings 66 9.9.9.9/32 127.0.0.2
110 SxpLib.Add Bindings 666 2001:db8:0:0:0:0:1428:57ab/128 127.0.0.2
111 SxpLib.Add Bindings 555 2001:db8:85a3:8d3:0:0:0:0/64 127.0.0.2
112 SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
113 SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
114 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
115 SxpLib.Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.1
116 SxpLib.Add Connection ${r_version} listener 127.0.0.1 64999 127.0.0.3
117 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${r_version} speaker 127.0.0.3
119 Setup TopoBuiltIn.Logy Fork
120 [Arguments] ${version}
121 [Documentation] Setup 4 nodes in to T topoBuiltIn.Logy
122 SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
123 SxpLib.Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
124 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
125 SxpLib.Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
126 SxpLib.Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
127 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
128 SxpLib.Add Connection ${version} speaker 127.0.0.4 64999 127.0.0.1
129 SxpLib.Add Connection ${version} listener 127.0.0.1 64999 127.0.0.4
130 BuiltIn.Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.4
132 Check Export Part One
133 [Documentation] Checks if Bindings 542 5.5.5.5/32 is replaced by 543 5.5.5.5/32
134 ${resp} = SxpLib.Get Bindings
136 SxpLib.Should Contain Binding ${resp} 543 5.5.5.5/32
137 Should Not Contain Binding ${resp} 542 5.5.5.5/32
138 SxpLib.Should Contain Binding ${resp} 99 15.15.15.15/32
140 Check Export Part Two
141 [Documentation] Checks if Bindings 542 5.5.5.5/32 was updated after peer shutdown
142 ${resp} = SxpLib.Get Bindings
144 Should Not Contain Binding ${resp} 543 5.5.5.5/32
145 SxpLib.Should Contain Binding ${resp} 542 5.5.5.5/32
146 SxpLib.Should Contain Binding ${resp} 99 15.15.15.15/32
148 Check Export Part Three
149 [Documentation] Checks if database is empty after peers shutdown
150 ${resp} = SxpLib.Get Bindings
152 Should Not Contain Binding ${resp} 542 5.5.5.5/32
153 Should Not Contain Binding ${resp} 99 15.15.15.15/32
155 Check Forwarding V2=>V1
156 [Documentation] Check if appropriate bindings are exported per version
157 ${resp} = SxpLib.Get Bindings
158 Should Not Contain Binding ${resp} 6 56.56.56.0/24
159 SxpLib.Should Contain Binding ${resp} 66 9.9.9.9/32
160 SxpLib.Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
161 Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
163 ${resp} = SxpLib.Get Bindings 127.0.0.3
164 Should Not Contain Binding ${resp} 6 56.56.56.0/24
165 SxpLib.Should Contain Binding ${resp} 66 9.9.9.9/32
166 Should Not Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
167 Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
168 BuiltIn.Log Forward OK
170 Check Forwarding V3=>V2
171 [Documentation] Check if appropriate bindings are exported per version
172 ${resp} = SxpLib.Get Bindings
173 SxpLib.Should Contain Binding ${resp} 6 56.56.56.0/24
174 SxpLib.Should Contain Binding ${resp} 66 9.9.9.9/32
175 SxpLib.Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
176 SxpLib.Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
178 ${resp} = SxpLib.Get Bindings 127.0.0.3
179 Should Not Contain Binding ${resp} 6 56.56.56.0/24
180 SxpLib.Should Contain Binding ${resp} 66 9.9.9.9/32
181 SxpLib.Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
182 Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
183 BuiltIn.Log Forward OK
185 Check Forwarding V4=>V3
186 [Documentation] Check if appropriate bindings are exported per version
187 ${resp} = SxpLib.Get Bindings
188 SxpLib.Should Contain Binding ${resp} 6 56.56.56.0/24
189 SxpLib.Should Contain Binding ${resp} 66 9.9.9.9/32
190 SxpLib.Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
191 SxpLib.Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
193 ${resp} = SxpLib.Get Bindings 127.0.0.3
194 SxpLib.Should Contain Binding ${resp} 6 56.56.56.0/24
195 SxpLib.Should Contain Binding ${resp} 66 9.9.9.9/32
196 SxpLib.Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
197 SxpLib.Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
198 BuiltIn.Log Forward OK
201 [Documentation] Checks if Shorthest path rule is applied onto bindings
202 ${resp} = SxpLib.Get Bindings
203 SxpLib.Should Contain Binding ${resp} 542 5.5.5.5/32
204 SxpLib.Should Contain Binding ${resp} 9954 105.15.125.15/32
205 SxpLib.Should Contain Binding ${resp} 99 15.15.15.15/32
206 ${resp} = SxpLib.Get Bindings 127.0.0.4
207 SxpLib.Should Contain Binding ${resp} 542 5.5.5.5/32
208 SxpLib.Should Contain Binding ${resp} 9954 105.15.125.15/32
209 SxpLib.Should Contain Binding ${resp} 99 15.15.15.15/32
212 [Documentation] Checks if MostRecent rule is applied onto bindings
213 ${resp} = SxpLib.Get Bindings
214 SxpLib.Should Contain Binding ${resp} 543 5.5.5.5/32
215 SxpLib.Should Contain Binding ${resp} 99 15.15.15.15/32
216 ${resp} = SxpLib.Get Bindings 127.0.0.4
217 SxpLib.Should Contain Binding ${resp} 543 5.5.5.5/32
218 SxpLib.Should Contain Binding ${resp} 99 15.15.15.15/32
221 SxpLib.Clean Bindings 127.0.0.1
222 SxpLib.Clean Bindings 127.0.0.2
223 SxpLib.Clean Bindings 127.0.0.3
224 SxpLib.Clean Bindings 127.0.0.4
225 SxpLib.Clean Bindings 127.0.0.5
226 SxpLib.Clean Connections 127.0.0.1
227 SxpLib.Clean Connections 127.0.0.2
228 SxpLib.Clean Connections 127.0.0.3
229 SxpLib.Clean Connections 127.0.0.4
230 SxpLib.Clean Connections 127.0.0.5