blob: 66f21457e07ef47640acdefc0005297c5100c8ef [file] [log] [blame]
Andreas Pantelopoulos90f0b102018-02-01 13:21:45 -08001
2class SRRouting:
3 def __init__( self ):
4 self.default = ''
5
6 def CASE1( self, main ):
7 """
Andreas Pantelopoulosb7904ce2018-02-07 16:24:49 -08008 Ping between all ipv4 hosts in the topology.
Andreas Pantelopoulos90f0b102018-02-01 13:21:45 -08009 """
You Wangd66de192018-04-30 17:30:12 -070010 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
11 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
12 main.case( "Ping between all ipv4 hosts in the topology" )
13 setupTest( main, test_idx=1, onosNodes=3, ipv6=False, external=False )
14 verify( main, ipv6=False, disconnected=False, external=False )
15 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosf6ed5012018-02-08 21:26:01 -080016
17 def CASE2( self, main ):
18 """
19 Ping between all ipv6 hosts in the topology.
20 """
You Wangd66de192018-04-30 17:30:12 -070021 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
22 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
23 main.case( "Ping between all ipv6 hosts in the topology" )
24 setupTest( main, test_idx=2, onosNodes=3, ipv4=False, external=False )
25 verify( main, ipv4=False, disconnected=False, external=False )
26 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosf6ed5012018-02-08 21:26:01 -080027
You Wang79577812018-02-27 16:39:50 -080028 def CASE3( self, main ):
29 """
30 Ping between all ipv4 and ipv6 hosts in the topology.
31 """
You Wangd66de192018-04-30 17:30:12 -070032 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
33 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
34 main.case( "Ping between all ipv4 and ipv6 hosts in the topology" )
35 setupTest( main, test_idx=3, onosNodes=3, external=False )
36 verify( main, disconnected=False, external=False )
37 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wangba231e72018-03-01 13:18:21 -080038
39 def CASE4( self, main ):
40 """
41 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
42 """
You Wangd66de192018-04-30 17:30:12 -070043 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
44 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
45 main.case( "Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts" )
46 setupTest( main, test_idx=4, onosNodes=3, ipv6=False )
47 verify( main, ipv6=False, disconnected=False )
48 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wangba231e72018-03-01 13:18:21 -080049
50 def CASE5( self, main ):
51 """
52 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
53 """
You Wangd66de192018-04-30 17:30:12 -070054 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
55 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
56 main.case( "Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts" )
57 setupTest( main, test_idx=5, onosNodes=3, ipv4=False )
58 verify( main, ipv4=False, disconnected=False )
59 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wangba231e72018-03-01 13:18:21 -080060
61 def CASE6( self, main ):
62 """
63 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
64 """
You Wangd66de192018-04-30 17:30:12 -070065 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
66 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
67 main.case( "Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external hosts" )
68 setupTest( main, test_idx=6, onosNodes=3 )
69 verify( main, disconnected=False )
70 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -080071
72 def CASE7( self, main ):
73 """
74 Ping between ipv4 hosts and an external host that is not configured in
75 external router config, but reachable through the use of route-add
76 command.
77 """
You Wangd66de192018-04-30 17:30:12 -070078 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
79 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
80 main.case( "Ping between from ipv4 hosts to external host configured with route-add command" )
81 setupTest( main, test_idx=7, onosNodes=3, ipv6=False, external=False )
82 verify( main, ipv6=False, internal=False, disconnected=False )
83 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -080084
85 def CASE8( self, main ):
86 """
87 Ping between ipv6 hosts and an external host that is not configured in
88 external router config, but reachable through the use of route-add
89 command.
90 """
You Wangd66de192018-04-30 17:30:12 -070091 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
92 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
93 main.case( "Ping between from ipv6 hosts to external host configured with route-add command" )
94 setupTest( main, test_idx=8, onosNodes=3, ipv4=False, external=False )
95 verify( main, ipv6=False, internal=False, disconnected=False )
96 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -080097
98 def CASE9( self, main ):
99 """
100 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
101 external router config, but reachable through the use of route-add
102 command.
103 """
You Wangd66de192018-04-30 17:30:12 -0700104 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
105 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
106 main.case( "Ping between from ipv4 and ipv6 hosts to external host configured with route-add command" )
107 setupTest( main, test_idx=9, onosNodes=3, external=False )
108 verify( main, internal=False, disconnected=False )
109 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800110
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800111 def CASE101( self, main ):
112 """
113 Kill and recover links
114 Ping between all ipv4 hosts in the topology.
115 """
You Wangd66de192018-04-30 17:30:12 -0700116 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
117 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
118 main.case( "Test link failures with IPv4 hosts" )
119 setupTest( main, test_idx=101, onosNodes=3, ipv6=False, external=False )
120 verify( main, ipv6=False, external=False, disconnected=False )
121 verifyLinkFailure( main, ipv6=False, external=False )
122 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800123
124 def CASE102( self, main ):
125 """
126 Kill and recover links
127 Ping between all ipv6 hosts in the topology.
128 """
You Wangd66de192018-04-30 17:30:12 -0700129 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
130 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
131 main.case( "Test link failures with IPv6 hosts" )
132 setupTest( main, test_idx=102, onosNodes=3, ipv4=False, external=False )
133 verify( main, ipv4=False, external=False, disconnected=False )
134 verifyLinkFailure( main, ipv4=False, external=False )
135 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800136
137 def CASE103( self, main ):
138 """
139 Kill and recover links
140 Ping between all ipv4 and ipv6 hosts in the topology.
141 """
You Wangd66de192018-04-30 17:30:12 -0700142 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
143 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
144 main.case( "Test link failures with IPv4 and IPv6 hosts" )
145 setupTest( main, test_idx=103, onosNodes=3, external=False )
146 verify( main, external=False, disconnected=False )
147 verifyLinkFailure( main, external=False )
148 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800149
150 def CASE104( self, main ):
151 """
152 Kill and recover links
153 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
154 """
You Wangd66de192018-04-30 17:30:12 -0700155 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
156 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
157 main.case( "Test link failures with IPv4 hosts including external hosts" )
158 setupTest( main, test_idx=104, onosNodes=3, ipv6=False )
159 verify( main, ipv6=False, disconnected=False )
160 verifyLinkFailure( main, ipv6=False )
161 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800162
163 def CASE105( self, main ):
164 """
165 Kill and recover links
166 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
167 """
You Wangd66de192018-04-30 17:30:12 -0700168 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
169 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
170 main.case( "Test link failures with IPv6 hosts including external hosts" )
171 setupTest( main, test_idx=105, onosNodes=3, ipv4=False )
172 verify( main, ipv4=False, disconnected=False )
173 verifyLinkFailure( main, ipv4=False )
174 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800175
176 def CASE106( self, main ):
177 """
178 Kill and recover links
179 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
180 """
You Wangd66de192018-04-30 17:30:12 -0700181 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
182 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
183 main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts" )
184 setupTest( main, test_idx=106, onosNodes=3 )
185 verify( main, disconnected=False )
186 verifyLinkFailure( main )
187 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800188
189 def CASE107( self, main ):
190 """
191 Kill and recover links
192 Ping between ipv4 hosts and an external host that is not configured in
193 external router config, but reachable through the use of route-add command.
194 """
You Wangd66de192018-04-30 17:30:12 -0700195 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
196 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
197 main.case( "Test link failures with IPv4 hosts including external hosts configured with route-add command" )
198 setupTest( main, test_idx=107, onosNodes=3, ipv6=False, external=False )
199 verify( main, ipv6=False, disconnected=False )
200 verifyLinkFailure( main, ipv6=False, internal=False )
201 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800202
203 def CASE108( self, main ):
204 """
205 Kill and recover links
206 Ping between ipv6 hosts and an external host that is not configured in
207 external router config, but reachable through the use of route-add command.
208 """
You Wangd66de192018-04-30 17:30:12 -0700209 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
210 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
211 main.case( "Test link failures with IPv6 hosts including external hosts configured with route-add command" )
212 setupTest( main, test_idx=108, onosNodes=3, ipv4=False, external=False )
213 verify( main, ipv4=False, disconnected=False )
214 verifyLinkFailure( main, ipv4=False, internal=False )
215 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800216
217 def CASE109( self, main ):
218 """
219 Kill and recover links
220 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
221 external router config, but reachable through the use of route-add command.
222 """
You Wangd66de192018-04-30 17:30:12 -0700223 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
224 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
225 main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" )
226 setupTest( main, test_idx=109, onosNodes=3, external=False )
227 verify( main, disconnected=False )
228 verifyLinkFailure( main, internal=False )
229 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800230
You Wang27317572018-03-06 12:13:11 -0800231 def CASE201( self, main ):
232 """
233 Kill and recover spine switches
234 Ping between all ipv4 hosts in the topology.
235 """
You Wangd66de192018-04-30 17:30:12 -0700236 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
237 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
238 main.case( "Test switch failures with IPv4 hosts" )
239 setupTest( main, test_idx=201, onosNodes=3, ipv6=False, external=False )
240 verify( main, ipv6=False, external=False, disconnected=False )
241 verifySwitchFailure( main, ipv6=False, external=False )
242 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800243
244 def CASE202( self, main ):
245 """
246 Kill and recover spine switches
247 Ping between all ipv6 hosts in the topology.
248 """
You Wangd66de192018-04-30 17:30:12 -0700249 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
250 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
251 main.case( "Test switch failures with IPv6 hosts" )
252 setupTest( main, test_idx=202, onosNodes=3, ipv4=False, external=False )
253 verify( main, ipv4=False, external=False, disconnected=False )
254 verifySwitchFailure( main, ipv4=False, external=False )
255 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800256
257 def CASE203( self, main ):
258 """
259 Kill and recover spine switches
260 Ping between all ipv4 and ipv6 hosts in the topology.
261 """
You Wangd66de192018-04-30 17:30:12 -0700262 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
263 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
264 main.case( "Test switch failures with IPv4 and IPv6 hosts" )
265 setupTest( main, test_idx=203, onosNodes=3, external=False )
266 verify( main, external=False, disconnected=False )
267 verifySwitchFailure( main, external=False )
268 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800269
270 def CASE204( self, main ):
271 """
272 Kill and recover spine switches
273 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
274 """
You Wangd66de192018-04-30 17:30:12 -0700275 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
276 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
277 main.case( "Test switch failures with IPv4 hosts including external hosts" )
278 setupTest( main, test_idx=204, onosNodes=3, ipv6=False )
279 verify( main, ipv6=False, disconnected=False )
280 verifySwitchFailure( main, ipv6=False )
281 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800282
283 def CASE205( self, main ):
284 """
285 Kill and recover spine switches
286 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
287 """
You Wangd66de192018-04-30 17:30:12 -0700288 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
289 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
290 main.case( "Test switch failures with IPv6 hosts including external hosts" )
291 setupTest( main, test_idx=205, onosNodes=3, ipv4=False )
292 verify( main, ipv4=False, disconnected=False )
293 verifySwitchFailure( main, ipv4=False )
294 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800295
296 def CASE206( self, main ):
297 """
298 Kill and recover spine switches
299 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
300 """
You Wangd66de192018-04-30 17:30:12 -0700301 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
302 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
303 main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts" )
304 setupTest( main, test_idx=206, onosNodes=3 )
305 verify( main, disconnected=False )
306 verifySwitchFailure( main )
307 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800308
309 def CASE207( self, main ):
310 """
311 Kill and recover spine switches
312 Ping between ipv4 hosts and an external host that is not configured in
313 external router config, but reachable through the use of route-add command.
314 """
You Wangd66de192018-04-30 17:30:12 -0700315 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
316 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
317 main.case( "Test switch failures with IPv4 hosts including external hosts configured with route-add command" )
318 setupTest( main, test_idx=207, onosNodes=3, ipv6=False, external=False )
319 verify( main, ipv6=False, disconnected=False )
320 verifySwitchFailure( main, ipv6=False, internal=False )
321 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800322
323 def CASE208( self, main ):
324 """
325 Kill and recover spine switches
326 Ping between ipv6 hosts and an external host that is not configured in
327 external router config, but reachable through the use of route-add command.
328 """
You Wangd66de192018-04-30 17:30:12 -0700329 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
330 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
331 main.case( "Test switch failures with IPv6 hosts including external hosts configured with route-add command" )
332 setupTest( main, test_idx=208, onosNodes=3, ipv4=False, external=False )
333 verify( main, ipv4=False, disconnected=False )
334 verifySwitchFailure( main, ipv4=False, internal=False )
335 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800336
337 def CASE209( self, main ):
338 """
339 Kill and recover spine switches
340 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
341 external router config, but reachable through the use of route-add command.
342 """
You Wangd66de192018-04-30 17:30:12 -0700343 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
344 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
345 main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" )
346 setupTest( main, test_idx=209, onosNodes=3, external=False )
347 verify( main, disconnected=False )
348 verifySwitchFailure( main, internal=False )
349 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800350
Jon Hall3c910162018-03-07 14:42:16 -0800351 def CASE301( self, main ):
352 """
You Wangd66de192018-04-30 17:30:12 -0700353 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800354 Ping between all ipv4 hosts in the topology.
355 """
You Wangd66de192018-04-30 17:30:12 -0700356 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
357 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
358 main.case( "Test onos failures with IPv4 hosts" )
359 setupTest( main, test_idx=301, onosNodes=3, ipv6=False, external=False )
360 verify( main, ipv6=False, external=False, disconnected=False )
361 verifyOnosFailure( main, ipv6=False, external=False )
362 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800363
364 def CASE302( self, main ):
365 """
You Wangd66de192018-04-30 17:30:12 -0700366 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800367 Ping between all ipv6 hosts in the topology.
368 """
You Wangd66de192018-04-30 17:30:12 -0700369 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
370 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
371 main.case( "Test onos failures with IPv6 hosts" )
372 setupTest( main, test_idx=302, onosNodes=3, ipv4=False, external=False )
373 verify( main, ipv4=False, external=False, disconnected=False )
374 verifyOnosFailure( main, ipv4=False, external=False )
375 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800376
377 def CASE303( self, main ):
378 """
You Wangd66de192018-04-30 17:30:12 -0700379 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800380 Ping between all ipv4 and ipv6 hosts in the topology.
381 """
You Wangd66de192018-04-30 17:30:12 -0700382 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
383 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
384 main.case( "Test onos failures with IPv4 and IPv6 hosts" )
385 setupTest( main, test_idx=303, onosNodes=3, external=False )
386 verify( main, external=False, disconnected=False )
387 verifyOnosFailure( main, external=False )
388 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800389
390 def CASE304( self, main ):
391 """
You Wangd66de192018-04-30 17:30:12 -0700392 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800393 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
394 """
You Wangd66de192018-04-30 17:30:12 -0700395 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
396 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
397 main.case( "Test onos failures with IPv4 hosts including external hosts" )
398 setupTest( main, test_idx=304, onosNodes=3, ipv6=False )
399 verify( main, ipv6=False, disconnected=False )
400 verifyOnosFailure( main, ipv6=False )
401 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800402
403 def CASE305( self, main ):
404 """
You Wangd66de192018-04-30 17:30:12 -0700405 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800406 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
407 """
You Wangd66de192018-04-30 17:30:12 -0700408 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
409 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
410 main.case( "Test onos failures with IPv6 hosts including external hosts" )
411 setupTest( main, test_idx=305, onosNodes=3, ipv4=False )
412 verify( main, ipv4=False, disconnected=False )
413 verifyOnosFailure( main, ipv4=False )
414 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800415
416 def CASE306( self, main ):
417 """
You Wangd66de192018-04-30 17:30:12 -0700418 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800419 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
420 """
You Wangd66de192018-04-30 17:30:12 -0700421 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
422 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
423 main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts" )
424 setupTest( main, test_idx=306, onosNodes=3 )
425 verify( main, disconnected=False )
426 verifyOnosFailure( main )
427 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800428
429 def CASE307( self, main ):
430 """
You Wangd66de192018-04-30 17:30:12 -0700431 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800432 Ping between ipv4 hosts and an external host that is not configured in
433 external router config, but reachable through the use of route-add command.
434 """
You Wangd66de192018-04-30 17:30:12 -0700435 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
436 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
437 main.case( "Test onos failures with IPv4 hosts including external hosts configured with route-add command" )
438 setupTest( main, test_idx=307, onosNodes=3, ipv6=False, external=False )
439 verify( main, ipv6=False, disconnected=False )
440 verifyOnosFailure( main, ipv6=False, internal=False )
441 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800442
443 def CASE308( self, main ):
444 """
You Wangd66de192018-04-30 17:30:12 -0700445 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800446 Ping between ipv6 hosts and an external host that is not configured in
447 external router config, but reachable through the use of route-add command.
448 """
You Wangd66de192018-04-30 17:30:12 -0700449 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
450 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
451 main.case( "Test onos failures with IPv6 hosts including external hosts configured with route-add command" )
452 setupTest( main, test_idx=308, onosNodes=3, ipv4=False, external=False )
453 verify( main, ipv4=False, disconnected=False )
454 verifyOnosFailure( main, ipv4=False, internal=False )
455 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800456
457 def CASE309( self, main ):
458 """
You Wangd66de192018-04-30 17:30:12 -0700459 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800460 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
461 external router config, but reachable through the use of route-add command.
462 """
You Wangd66de192018-04-30 17:30:12 -0700463 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
464 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
465 main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" )
466 setupTest( main, test_idx=309, onosNodes=3, external=False )
467 verify( main, disconnected=False )
468 verifyOnosFailure( main, internal=False )
469 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800470
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700471 def CASE603( self, main ):
472 """"
473 Drop HAGG-1 device and test connectivity.
474 Drop DAAS-1 device and test connectivity (some hosts lost it)
475 Bring up DAAS-1 and test connectivity (all hosts gained it again)
476
477 Repeat the same with HAGG-2 and DAAS-2.
478 """
479 import time
480 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
481 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
482 main.case( "Drop hagg spine switch along with dass leaf switch." )
483 setupTest( main, test_idx=603, onosNodes=3 )
484 main.disconnectedIpv4Hosts = []
485 main.disconnectedIpv6Hosts = []
486
487 verify( main )
488 lib.killSwitch( main, "spine103", int( main.params[ "TOPO" ]["switchNum" ] ) - 1, int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
489 verify( main )
490 lib.killSwitch( main, "leaf6", int( main.params[ "TOPO" ]["switchNum" ] ) - 2, int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 )
491 main.disconnectedIpv4Hosts = [ 'h12v4', 'h13v4']
492 main.disconnectedIpv6Hosts = [ 'h12v6', 'h13v6']
493 verify( main )
494 lib.recoverSwitch( main, "leaf6", int( main.params[ "TOPO" ]["switchNum" ] ) - 1, int( main.params[ "TOPO" ][ "linkNum" ] ) - 6, rediscoverHosts=True)
495 main.disconnectedIpv4Hosts = []
496 main.disconnectedIpv6Hosts = []
497 verify( main )
498 lib.recoverSwitch( main, "spine103", int( main.params[ "TOPO" ][ "switchNum" ] ), int( main.params[ "TOPO" ][ "linkNum" ] ))
499 verify( main )
500
501 lib.killSwitch( main, "spine104", int( main.params[ "TOPO" ]["switchNum" ] ) - 1, int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
502 verify( main )
503 lib.killSwitch( main, "leaf1", int( main.params[ "TOPO" ]["switchNum" ] ) - 2, int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 )
504 main.disconnectedIpv4Hosts = [ 'h1v4', 'h2v4']
505 main.disconnectedIpv6Hosts = [ 'h1v6', 'h2v6']
506 verify( main )
507 lib.recoverSwitch( main, "leaf1", int( main.params[ "TOPO" ]["switchNum" ] ) - 1, int( main.params[ "TOPO" ][ "linkNum" ] ) - 6, rediscoverHosts=True)
508 main.disconnectedIpv4Hosts = []
509 main.disconnectedIpv6Hosts = []
510 verify( main )
511 lib.recoverSwitch( main, "spine104", int( main.params[ "TOPO" ][ "switchNum" ] ), int( main.params[ "TOPO" ][ "linkNum" ] ))
512 verify( main )
513
514 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
515
516 def CASE604( self, main ):
517 """"
518 Drop HAGG-1 device and test connectivity.
519 Bring up HAGG-1 and test connectivity.
520 Drop HAGG-2 device and test connectivity.
521 Bring up HAGG-2 device and test connectivity
522 """
523 import time
524 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
525 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
526 main.case( "Drop hagg spine switches." )
527 setupTest( main, test_idx=604, onosNodes=3 )
528 main.disconnectedIpv4Hosts = []
529 main.disconnectedIpv6Hosts = []
530 verify( main )
531 lib.killSwitch( main, "spine103", int( main.params[ "TOPO" ]["switchNum" ] ) - 1, int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
532 verify( main )
533 lib.recoverSwitch( main, "spine103", int( main.params[ "TOPO" ][ "switchNum" ] ), int( main.params[ "TOPO" ][ "linkNum" ] ))
534 verify( main )
535 lib.killSwitch( main, "spine104", int( main.params[ "TOPO" ]["switchNum" ] ) - 1, int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
536 verify( main )
537 lib.recoverSwitch( main, "spine104", int( main.params[ "TOPO" ][ "switchNum" ] ), int( main.params[ "TOPO" ][ "linkNum" ] ))
538 verify( main )
539 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
540
You Wang5da39c82018-04-26 22:55:08 -0700541 def CASE606( self, main ):
542 """
543 Drop SPINE-1 and test connectivity
544 Drop paired leaf and test connectivity (expect some failures)
545 Bring up SPINE-1 and test connectivity (still expect some failures)
546 Bring up the paired leaf and test connectivity
547 Repeat above with SPINE-2 and a different paired leaf
548 """
549 import time
550 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
551 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
552 main.case( "Drop spine and paired leaf" )
553 setupTest( main, test_idx=606, onosNodes=3 )
You Wangd66de192018-04-30 17:30:12 -0700554 verify( main, disconnected=False )
555 lib.killSwitch( main, "spine101", 9, 30 )
556 verify( main, disconnected=False )
557 lib.killSwitch( main, "leaf2", 8, 24 )
558 lib.killSwitch( main, "leaf3", 7, 20 )
You Wang5da39c82018-04-26 22:55:08 -0700559 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4" ]
560 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6" ]
You Wangd66de192018-04-30 17:30:12 -0700561 verify( main )
562 lib.recoverSwitch( main, "spine101", 8, 30 )
563 verify( main )
564 lib.recoverSwitch( main, "leaf3", 9, 38 )
565 lib.recoverSwitch( main, "leaf2", 10, 48 )
You Wang5da39c82018-04-26 22:55:08 -0700566 main.disconnectedIpv4Hosts = []
567 main.disconnectedIpv6Hosts = []
You Wangd66de192018-04-30 17:30:12 -0700568 verify( main )
You Wang5da39c82018-04-26 22:55:08 -0700569 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )