blob: 467231c6b134dc81f48c30cd868c311fe63abaa9 [file] [log] [blame]
Andreas Pantelopoulos90f0b102018-02-01 13:21:45 -08001
2class SRRouting:
Jon Halla604fd42018-05-04 14:27:27 -07003
Andreas Pantelopoulos90f0b102018-02-01 13:21:45 -08004 def __init__( self ):
5 self.default = ''
6
7 def CASE1( self, main ):
8 """
Andreas Pantelopoulosb7904ce2018-02-07 16:24:49 -08009 Ping between all ipv4 hosts in the topology.
Andreas Pantelopoulos90f0b102018-02-01 13:21:45 -080010 """
You Wangd66de192018-04-30 17:30:12 -070011 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
12 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
13 main.case( "Ping between all ipv4 hosts in the topology" )
14 setupTest( main, test_idx=1, onosNodes=3, ipv6=False, external=False )
15 verify( main, ipv6=False, disconnected=False, external=False )
16 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosf6ed5012018-02-08 21:26:01 -080017
18 def CASE2( self, main ):
19 """
20 Ping between all ipv6 hosts in the topology.
21 """
You Wangd66de192018-04-30 17:30:12 -070022 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
23 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
24 main.case( "Ping between all ipv6 hosts in the topology" )
25 setupTest( main, test_idx=2, onosNodes=3, ipv4=False, external=False )
26 verify( main, ipv4=False, disconnected=False, external=False )
27 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosf6ed5012018-02-08 21:26:01 -080028
You Wang79577812018-02-27 16:39:50 -080029 def CASE3( self, main ):
30 """
31 Ping between all ipv4 and ipv6 hosts in the topology.
32 """
You Wangd66de192018-04-30 17:30:12 -070033 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
34 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
35 main.case( "Ping between all ipv4 and ipv6 hosts in the topology" )
36 setupTest( main, test_idx=3, onosNodes=3, external=False )
37 verify( main, disconnected=False, external=False )
38 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wangba231e72018-03-01 13:18:21 -080039
40 def CASE4( self, main ):
41 """
42 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
43 """
You Wangd66de192018-04-30 17:30:12 -070044 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
45 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
46 main.case( "Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts" )
47 setupTest( main, test_idx=4, onosNodes=3, ipv6=False )
48 verify( main, ipv6=False, disconnected=False )
49 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wangba231e72018-03-01 13:18:21 -080050
51 def CASE5( self, main ):
52 """
53 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
54 """
You Wangd66de192018-04-30 17:30:12 -070055 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
56 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
57 main.case( "Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts" )
58 setupTest( main, test_idx=5, onosNodes=3, ipv4=False )
59 verify( main, ipv4=False, disconnected=False )
60 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wangba231e72018-03-01 13:18:21 -080061
62 def CASE6( self, main ):
63 """
64 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
65 """
You Wangd66de192018-04-30 17:30:12 -070066 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
67 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
68 main.case( "Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external hosts" )
69 setupTest( main, test_idx=6, onosNodes=3 )
70 verify( main, disconnected=False )
71 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -080072
73 def CASE7( self, main ):
74 """
75 Ping between ipv4 hosts and an external host that is not configured in
76 external router config, but reachable through the use of route-add
77 command.
78 """
You Wangd66de192018-04-30 17:30:12 -070079 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
80 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
81 main.case( "Ping between from ipv4 hosts to external host configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -070082 setupTest( main, test_idx=7, onosNodes=3, ipv6=False, external=False, static=True )
83 main.externalIpv4Hosts = main.staticIpv4Hosts
84 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -070085 verify( main, ipv6=False, internal=False, disconnected=False )
86 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -080087
88 def CASE8( self, main ):
89 """
90 Ping between ipv6 hosts and an external host that is not configured in
91 external router config, but reachable through the use of route-add
92 command.
93 """
You Wangd66de192018-04-30 17:30:12 -070094 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
95 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
96 main.case( "Ping between from ipv6 hosts to external host configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -070097 setupTest( main, test_idx=8, onosNodes=3, ipv4=False, external=False, static=True )
98 main.externalIpv4Hosts = main.staticIpv4Hosts
99 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangf6c83432018-05-30 17:01:01 -0700100 verify( main, ipv4=False, internal=False, disconnected=False )
You Wangd66de192018-04-30 17:30:12 -0700101 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -0800102
103 def CASE9( self, main ):
104 """
Jon Hall39570262020-11-17 12:18:19 -0800105 Ping between ipv4 and ipv6 hosts and external hosts that is not configured in
Andreas Pantelopoulos2eae3242018-03-06 13:47:20 -0800106 external router config, but reachable through the use of route-add
107 command.
108 """
You Wangd66de192018-04-30 17:30:12 -0700109 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
110 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
111 main.case( "Ping between from ipv4 and ipv6 hosts to external host configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700112 setupTest( main, test_idx=9, onosNodes=3, external=False, static=True )
113 main.externalIpv4Hosts = main.staticIpv4Hosts
114 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700115 verify( main, internal=False, disconnected=False )
116 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800117
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800118 def CASE101( self, main ):
119 """
120 Kill and recover links
121 Ping between all ipv4 hosts in the topology.
122 """
You Wangd66de192018-04-30 17:30:12 -0700123 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
124 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
125 main.case( "Test link failures with IPv4 hosts" )
126 setupTest( main, test_idx=101, onosNodes=3, ipv6=False, external=False )
127 verify( main, ipv6=False, external=False, disconnected=False )
Siddeshec3efb32021-11-19 17:57:43 +0000128 MaxLinks = int( main.params["TOPO"]["linkNum"] )
129 MaxSwitches = int( main.params["TOPO"]["switchNum"] )
130 currentLinks = MaxLinks
131 expect = True
132 for stage in main.params.get( "CASE101Links", [] ):
133 main.log.debug("linksFailures" + stage )
134 linksToRemove = []
135 for switch in main.params[ "CASE101Links" ][ stage ]:
136 main.log.debug("processingSwitch" + switch )
137 if switch == "expect":
138 expect = main.params[ "CASE101Links" ][ stage ][ switch ].split() == "True"
139 continue
140 endpoints = main.params[ "CASE101Links" ][ stage ][ switch ].split(",")
141 for endpoint in endpoints:
142 linksToRemove.append( [ switch, endpoint ] )
143 currentLinks = (currentLinks - 2*len(linksToRemove))
144 verifyLinkFailure( main, linksToRemove, currentLinks, MaxSwitches, ipv6=False, external=False, skipOnFail=False, expectedConnectivity=expect )
145 verifyLinksRestored( main, linksToRemove, MaxLinks, MaxSwitches, ipv6=False, external=False, skipOnFail=False )
You Wangd66de192018-04-30 17:30:12 -0700146 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800147
148 def CASE102( self, main ):
149 """
150 Kill and recover links
151 Ping between all ipv6 hosts in the topology.
152 """
You Wangd66de192018-04-30 17:30:12 -0700153 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
154 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
155 main.case( "Test link failures with IPv6 hosts" )
156 setupTest( main, test_idx=102, onosNodes=3, ipv4=False, external=False )
157 verify( main, ipv4=False, external=False, disconnected=False )
158 verifyLinkFailure( main, ipv4=False, external=False )
159 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800160
161 def CASE103( self, main ):
162 """
163 Kill and recover links
164 Ping between all ipv4 and ipv6 hosts in the topology.
165 """
You Wangd66de192018-04-30 17:30:12 -0700166 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
167 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
168 main.case( "Test link failures with IPv4 and IPv6 hosts" )
169 setupTest( main, test_idx=103, onosNodes=3, external=False )
170 verify( main, external=False, disconnected=False )
171 verifyLinkFailure( main, external=False )
172 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800173
174 def CASE104( self, main ):
175 """
176 Kill and recover links
177 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
178 """
You Wangd66de192018-04-30 17:30:12 -0700179 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
180 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
181 main.case( "Test link failures with IPv4 hosts including external hosts" )
182 setupTest( main, test_idx=104, onosNodes=3, ipv6=False )
183 verify( main, ipv6=False, disconnected=False )
Siddeshec3efb32021-11-19 17:57:43 +0000184 MaxLinks = int( main.params["TOPO"]["linkNum"] )
185 MaxSwitches = int( main.params["TOPO"]["switchNum"] )
186 currentLinks = MaxLinks
187 expect = True
188 for stage in main.params.get( "CASE104Links", [] ):
189 main.log.debug("linksFailures" + stage )
190 linksToRemove = []
191 for switch in main.params[ "CASE104Links" ][ stage ]:
192 main.log.debug("processingSwitch" + switch )
193 if switch == "expect":
194 expect = main.params[ "CASE104Links" ][ stage ][ switch ].split() == "True"
195 continue
196 endpoints = main.params[ "CASE104Links" ][ stage ][ switch ].split(",")
197 for endpoint in endpoints:
198 linksToRemove.append( [ switch, endpoint ] )
199 currentLinks = (currentLinks - 2*len(linksToRemove))
200 verifyLinkFailure( main, linksToRemove, currentLinks, MaxSwitches, ipv6=False, external=False, skipOnFail=False, expectedConnectivity=expect )
201 verifyLinksRestored( main, linksToRemove, MaxLinks, MaxSwitches, ipv6=False, external=False, skipOnFail=False )
You Wangd66de192018-04-30 17:30:12 -0700202 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800203
204 def CASE105( self, main ):
205 """
206 Kill and recover links
207 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
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" )
212 setupTest( main, test_idx=105, onosNodes=3, ipv4=False )
213 verify( main, ipv4=False, disconnected=False )
214 verifyLinkFailure( main, ipv4=False )
215 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800216
217 def CASE106( self, main ):
218 """
219 Kill and recover links
220 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
221 """
You Wangd66de192018-04-30 17:30:12 -0700222 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
223 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
224 main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts" )
225 setupTest( main, test_idx=106, onosNodes=3 )
226 verify( main, disconnected=False )
227 verifyLinkFailure( main )
228 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800229
230 def CASE107( self, main ):
231 """
232 Kill and recover links
233 Ping between ipv4 hosts and an external host that is not configured in
234 external router config, but reachable through the use of route-add command.
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 link failures with IPv4 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700239 setupTest( main, test_idx=107, onosNodes=3, ipv6=False, external=False, static=True )
240 main.externalIpv4Hosts = main.staticIpv4Hosts
241 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700242 verify( main, ipv6=False, disconnected=False )
243 verifyLinkFailure( main, ipv6=False, internal=False )
244 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800245
246 def CASE108( self, main ):
247 """
248 Kill and recover links
249 Ping between ipv6 hosts and an external host that is not configured in
250 external router config, but reachable through the use of route-add command.
251 """
You Wangd66de192018-04-30 17:30:12 -0700252 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
253 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
254 main.case( "Test link failures with IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700255 setupTest( main, test_idx=108, onosNodes=3, ipv4=False, external=False, static=True )
256 main.externalIpv4Hosts = main.staticIpv4Hosts
257 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700258 verify( main, ipv4=False, disconnected=False )
259 verifyLinkFailure( main, ipv4=False, internal=False )
260 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800261
262 def CASE109( self, main ):
263 """
264 Kill and recover links
265 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
266 external router config, but reachable through the use of route-add command.
267 """
You Wangd66de192018-04-30 17:30:12 -0700268 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
269 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
270 main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700271 setupTest( main, test_idx=109, onosNodes=3, external=False, static=True )
272 main.externalIpv4Hosts = main.staticIpv4Hosts
273 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700274 verify( main, disconnected=False )
275 verifyLinkFailure( main, internal=False )
276 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800277
You Wang27317572018-03-06 12:13:11 -0800278 def CASE201( self, main ):
279 """
280 Kill and recover spine switches
281 Ping between all ipv4 hosts in the topology.
282 """
You Wangd66de192018-04-30 17:30:12 -0700283 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
284 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
285 main.case( "Test switch failures with IPv4 hosts" )
286 setupTest( main, test_idx=201, onosNodes=3, ipv6=False, external=False )
287 verify( main, ipv6=False, external=False, disconnected=False )
288 verifySwitchFailure( main, ipv6=False, external=False )
289 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800290
291 def CASE202( self, main ):
292 """
293 Kill and recover spine switches
294 Ping between all ipv6 hosts in the topology.
295 """
You Wangd66de192018-04-30 17:30:12 -0700296 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
297 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
298 main.case( "Test switch failures with IPv6 hosts" )
299 setupTest( main, test_idx=202, onosNodes=3, ipv4=False, external=False )
300 verify( main, ipv4=False, external=False, disconnected=False )
301 verifySwitchFailure( main, ipv4=False, external=False )
302 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800303
304 def CASE203( self, main ):
305 """
306 Kill and recover spine switches
307 Ping between all ipv4 and ipv6 hosts in the topology.
308 """
You Wangd66de192018-04-30 17:30:12 -0700309 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
310 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
311 main.case( "Test switch failures with IPv4 and IPv6 hosts" )
312 setupTest( main, test_idx=203, onosNodes=3, external=False )
313 verify( main, external=False, disconnected=False )
314 verifySwitchFailure( main, external=False )
315 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800316
317 def CASE204( self, main ):
318 """
319 Kill and recover spine switches
320 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
321 """
You Wangd66de192018-04-30 17:30:12 -0700322 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
323 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
324 main.case( "Test switch failures with IPv4 hosts including external hosts" )
325 setupTest( main, test_idx=204, onosNodes=3, ipv6=False )
326 verify( main, ipv6=False, disconnected=False )
327 verifySwitchFailure( main, ipv6=False )
328 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800329
330 def CASE205( self, main ):
331 """
332 Kill and recover spine switches
333 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
334 """
You Wangd66de192018-04-30 17:30:12 -0700335 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
336 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
337 main.case( "Test switch failures with IPv6 hosts including external hosts" )
338 setupTest( main, test_idx=205, onosNodes=3, ipv4=False )
339 verify( main, ipv4=False, disconnected=False )
340 verifySwitchFailure( main, ipv4=False )
341 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800342
343 def CASE206( self, main ):
344 """
345 Kill and recover spine switches
346 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
347 """
You Wangd66de192018-04-30 17:30:12 -0700348 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
349 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
350 main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts" )
351 setupTest( main, test_idx=206, onosNodes=3 )
352 verify( main, disconnected=False )
353 verifySwitchFailure( main )
354 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800355
356 def CASE207( self, main ):
357 """
358 Kill and recover spine switches
359 Ping between ipv4 hosts and an external host that is not configured in
360 external router config, but reachable through the use of route-add command.
361 """
You Wangd66de192018-04-30 17:30:12 -0700362 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
363 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
364 main.case( "Test switch failures with IPv4 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700365 setupTest( main, test_idx=207, onosNodes=3, ipv6=False, external=False, static=True )
366 main.externalIpv4Hosts = main.staticIpv4Hosts
367 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700368 verify( main, ipv6=False, disconnected=False )
369 verifySwitchFailure( main, ipv6=False, internal=False )
370 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800371
372 def CASE208( self, main ):
373 """
374 Kill and recover spine switches
375 Ping between ipv6 hosts and an external host that is not configured in
376 external router config, but reachable through the use of route-add command.
377 """
You Wangd66de192018-04-30 17:30:12 -0700378 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
379 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
380 main.case( "Test switch failures with IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700381 setupTest( main, test_idx=208, onosNodes=3, ipv4=False, external=False, static=True )
382 main.externalIpv4Hosts = main.staticIpv4Hosts
383 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700384 verify( main, ipv4=False, disconnected=False )
385 verifySwitchFailure( main, ipv4=False, internal=False )
386 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800387
388 def CASE209( self, main ):
389 """
390 Kill and recover spine switches
391 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
392 external router config, but reachable through the use of route-add command.
393 """
You Wangd66de192018-04-30 17:30:12 -0700394 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
395 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
396 main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700397 setupTest( main, test_idx=209, onosNodes=3, external=False, static=True )
398 main.externalIpv4Hosts = main.staticIpv4Hosts
399 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700400 verify( main, disconnected=False )
401 verifySwitchFailure( main, internal=False )
402 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800403
Jon Hall3c910162018-03-07 14:42:16 -0800404 def CASE301( self, main ):
405 """
You Wangd66de192018-04-30 17:30:12 -0700406 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800407 Ping between all ipv4 hosts in the topology.
408 """
You Wangd66de192018-04-30 17:30:12 -0700409 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
410 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
411 main.case( "Test onos failures with IPv4 hosts" )
412 setupTest( main, test_idx=301, onosNodes=3, ipv6=False, external=False )
413 verify( main, ipv6=False, external=False, disconnected=False )
414 verifyOnosFailure( main, ipv6=False, external=False )
415 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800416
417 def CASE302( self, main ):
418 """
You Wangd66de192018-04-30 17:30:12 -0700419 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800420 Ping between all ipv6 hosts in the topology.
421 """
You Wangd66de192018-04-30 17:30:12 -0700422 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
423 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
424 main.case( "Test onos failures with IPv6 hosts" )
425 setupTest( main, test_idx=302, onosNodes=3, ipv4=False, external=False )
426 verify( main, ipv4=False, external=False, disconnected=False )
427 verifyOnosFailure( main, ipv4=False, external=False )
428 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800429
430 def CASE303( self, main ):
431 """
You Wangd66de192018-04-30 17:30:12 -0700432 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800433 Ping between all ipv4 and ipv6 hosts in the topology.
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 and IPv6 hosts" )
438 setupTest( main, test_idx=303, onosNodes=3, external=False )
439 verify( main, external=False, disconnected=False )
440 verifyOnosFailure( main, external=False )
441 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800442
443 def CASE304( 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 all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
447 """
You Wangd66de192018-04-30 17:30:12 -0700448 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
449 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
450 main.case( "Test onos failures with IPv4 hosts including external hosts" )
451 setupTest( main, test_idx=304, onosNodes=3, ipv6=False )
452 verify( main, ipv6=False, disconnected=False )
453 verifyOnosFailure( main, ipv6=False )
454 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800455
456 def CASE305( self, main ):
457 """
You Wangd66de192018-04-30 17:30:12 -0700458 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800459 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
460 """
You Wangd66de192018-04-30 17:30:12 -0700461 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
462 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
463 main.case( "Test onos failures with IPv6 hosts including external hosts" )
464 setupTest( main, test_idx=305, onosNodes=3, ipv4=False )
465 verify( main, ipv4=False, disconnected=False )
466 verifyOnosFailure( main, ipv4=False )
467 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800468
469 def CASE306( self, main ):
470 """
You Wangd66de192018-04-30 17:30:12 -0700471 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800472 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
473 """
You Wangd66de192018-04-30 17:30:12 -0700474 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
475 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
476 main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts" )
477 setupTest( main, test_idx=306, onosNodes=3 )
478 verify( main, disconnected=False )
479 verifyOnosFailure( main )
480 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800481
482 def CASE307( self, main ):
483 """
You Wangd66de192018-04-30 17:30:12 -0700484 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800485 Ping between ipv4 hosts and an external host that is not configured in
486 external router config, but reachable through the use of route-add command.
487 """
You Wangd66de192018-04-30 17:30:12 -0700488 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
489 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
490 main.case( "Test onos failures with IPv4 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700491 setupTest( main, test_idx=307, onosNodes=3, ipv6=False, external=False, static=True )
492 main.externalIpv4Hosts = main.staticIpv4Hosts
493 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700494 verify( main, ipv6=False, disconnected=False )
495 verifyOnosFailure( main, ipv6=False, internal=False )
496 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800497
498 def CASE308( self, main ):
499 """
You Wangd66de192018-04-30 17:30:12 -0700500 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800501 Ping between ipv6 hosts and an external host that is not configured in
502 external router config, but reachable through the use of route-add command.
503 """
You Wangd66de192018-04-30 17:30:12 -0700504 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
505 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
506 main.case( "Test onos failures with IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700507 setupTest( main, test_idx=308, onosNodes=3, ipv4=False, external=False, static=True )
508 main.externalIpv4Hosts = main.staticIpv4Hosts
509 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700510 verify( main, ipv4=False, disconnected=False )
511 verifyOnosFailure( main, ipv4=False, internal=False )
512 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800513
514 def CASE309( self, main ):
515 """
You Wangd66de192018-04-30 17:30:12 -0700516 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800517 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
518 external router config, but reachable through the use of route-add command.
519 """
You Wangd66de192018-04-30 17:30:12 -0700520 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
521 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
522 main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700523 setupTest( main, test_idx=309, onosNodes=3, external=False, static=True )
524 main.externalIpv4Hosts = main.staticIpv4Hosts
525 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700526 verify( main, disconnected=False )
527 verifyOnosFailure( main, internal=False )
528 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800529
Jon Halla604fd42018-05-04 14:27:27 -0700530 def CASE601( self, main ):
531 """
532 Bring down all switches
533 Verify Topology
534 Bring up all switches
535 Verify
536
537 repeat x3
538 """
539 import time
540 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
541 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
542 main.case( "Bring down all switches then recover" )
543 setupTest( main, test_idx=601, external=False )
544 main.Cluster.next().CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -0700545 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
Jon Halla604fd42018-05-04 14:27:27 -0700546 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
547 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
548 totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
549 totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] )
550 switchList = [ 'spine101', 'spine102', 'spine103', 'spine104',
551 'leaf1', 'leaf2', 'leaf3', 'leaf4', 'leaf5', 'leaf6' ]
552 verify( main, disconnected=False, external=False )
553 for i in range( 1, 4 ):
554 main.log.info( "Beginning iteration {} of stopping then starting all switches".format( i ) )
555 main.log.debug( main.Cluster.next().summary() )
556 # Bring down all switches
557 main.step( "Stopping switches - iteration " + str( i ) )
558 switchStop = main.TRUE
559 for switch in switchList:
560 switchStop = switchStop and main.Network.switch( SW=switch, OPTION="stop" )
561 utilities.assert_equals( expect=main.TRUE, actual=switchStop,
562 onpass="All switches stopped",
563 onfail="Failed to stop all switches" )
564
Jon Hall43060f62020-06-23 13:13:33 -0700565 main.log.debug( "sleeping %i seconds" % float( 60 ) )
Jon Halla604fd42018-05-04 14:27:27 -0700566 time.sleep( 60 )
567 lib.verifyTopology( main, 0, 0, main.Cluster.numCtrls )
568 # Bring up all switches
569 main.log.debug( main.Cluster.next().summary() )
570 main.step( "Starting switches - iteration " + str( i ) )
571 switchStart = main.TRUE
572 for switch in switchList:
573 switchStart = switchStart and main.Network.switch( SW=switch, OPTION="start" )
574 utilities.assert_equals( expect=main.TRUE, actual=switchStart,
575 onpass="All switches started",
576 onfail="Failed to start all switches" )
577
578 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
579 lib.verifyTopology( main, totalSwitches, totalLinks, main.Cluster.numCtrls )
580 main.log.debug( main.Cluster.next().summary() )
Jon Hall43060f62020-06-23 13:13:33 -0700581 main.log.debug( "sleeping %i seconds" % float( 60 ) )
Jon Halla604fd42018-05-04 14:27:27 -0700582 time.sleep( 60 )
583 main.log.debug( main.Cluster.next().summary() )
Jon Hall43060f62020-06-23 13:13:33 -0700584 main.log.debug( "sleeping %i seconds" % float( 60 ) )
Jon Halla604fd42018-05-04 14:27:27 -0700585 time.sleep( 60 )
586 main.log.debug( main.Cluster.next().summary() )
587 verifyPing( main )
588 verify( main, disconnected=False, external=False )
589 verify( main, disconnected=False, external=False )
590 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
591
You Wangc02f3be2018-05-18 12:14:23 -0700592 def CASE602( self, main ):
593 """"
594 Take down a leaf switch that is paired and has a dual homed host
595 Restore the leaf switch
596 Repeat for various dual homed hosts and paired switches
597 """
598 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
599 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
600 main.case( "Drop a leaf switch that is paired and has a dual homed host." )
601 setupTest( main, test_idx=602, onosNodes=3 )
602 verify( main, disconnected=False )
You Wangbe98fb12018-05-24 16:15:17 -0700603 # We need to disable ports toward dual-homed hosts before killing the leaf switch
604 portsToDisable = [ [ "of:0000000000000002", 7 ], [ "of:0000000000000002", 8 ],
605 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ] ]
606 lib.disablePortBatch( main, portsToDisable, 10, 48, 5 )
You Wangc02f3be2018-05-18 12:14:23 -0700607 # Kill leaf-2
608 lib.killSwitch( main, "leaf2", 9, 38 )
You Wangbe98fb12018-05-24 16:15:17 -0700609 # FIXME: the downed interfaces on h4v6 and h5v6 won't disappear because they are
610 # configured by netcfg
You Wangc02f3be2018-05-18 12:14:23 -0700611 hostLocations = { "h4v6": "of:0000000000000003/6",
You Wangbe98fb12018-05-24 16:15:17 -0700612 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
You Wangc02f3be2018-05-18 12:14:23 -0700613 "h4v4": "of:0000000000000003/10",
614 "h5v4": "of:0000000000000003/11" }
615 lib.verifyHostLocations( main, hostLocations )
616 main.disconnectedIpv4Hosts = [ "h3v4" ]
617 main.disconnectedIpv6Hosts = [ "h3v6" ]
618 verify( main )
619 # Recover leaf-2
You Wangbe98fb12018-05-24 16:15:17 -0700620 lib.recoverSwitch( main, "leaf2", 10, 48, rediscoverHosts=True )
You Wangc02f3be2018-05-18 12:14:23 -0700621 hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ],
622 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
623 "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ],
624 "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] }
625 lib.verifyHostLocations( main, hostLocations )
626 main.disconnectedIpv4Hosts = []
627 main.disconnectedIpv6Hosts = []
628 verify( main, disconnected=False )
You Wangbe98fb12018-05-24 16:15:17 -0700629 # We need to disable ports toward dual-homed hosts before killing the leaf switch
630 portsToDisable = [ [ "of:0000000000000004", 7 ], [ "of:0000000000000004", 8 ],
631 [ "of:0000000000000004", 10 ], [ "of:0000000000000004", 11 ] ]
632 lib.disablePortBatch( main, portsToDisable, 10, 48, 5 )
You Wangc02f3be2018-05-18 12:14:23 -0700633 # Kill leaf-4
634 lib.killSwitch( main, "leaf4", 9, 38 )
You Wangbe98fb12018-05-24 16:15:17 -0700635 hostLocations = { "h9v6": [ "of:0000000000000004/7", "of:0000000000000005/6" ],
636 "h10v6": [ "of:0000000000000004/8", "of:0000000000000005/7" ],
You Wangc02f3be2018-05-18 12:14:23 -0700637 "h9v4": "of:0000000000000005/9",
638 "h10v4": "of:0000000000000005/10" }
639 lib.verifyHostLocations( main, hostLocations )
640 main.disconnectedIpv4Hosts = [ "h8v4" ]
641 main.disconnectedIpv6Hosts = [ "h8v6" ]
642 verify( main )
643 # Recover leaf-4
You Wangbe98fb12018-05-24 16:15:17 -0700644 lib.recoverSwitch( main, "leaf4", 10, 48, rediscoverHosts=True )
You Wangc02f3be2018-05-18 12:14:23 -0700645 hostLocations = { "h9v6": [ "of:0000000000000004/7", "of:0000000000000005/6" ],
646 "h10v6": [ "of:0000000000000004/8", "of:0000000000000005/7" ],
647 "h9v4": [ "of:0000000000000004/10", "of:0000000000000005/9" ],
648 "h10v4": [ "of:0000000000000004/11", "of:0000000000000005/10" ] }
649 lib.verifyHostLocations( main, hostLocations )
650 main.disconnectedIpv4Hosts = []
651 main.disconnectedIpv6Hosts = []
652 verify( main, disconnected=False )
653 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
654
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700655 def CASE603( self, main ):
656 """"
657 Drop HAGG-1 device and test connectivity.
658 Drop DAAS-1 device and test connectivity (some hosts lost it)
659 Bring up DAAS-1 and test connectivity (all hosts gained it again)
660
661 Repeat the same with HAGG-2 and DAAS-2.
662 """
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700663 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
664 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
665 main.case( "Drop hagg spine switch along with dass leaf switch." )
666 setupTest( main, test_idx=603, onosNodes=3 )
667 main.disconnectedIpv4Hosts = []
668 main.disconnectedIpv6Hosts = []
669
670 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700671 lib.killSwitch( main, "spine103",
672 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
673 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700674 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700675 lib.killSwitch( main, "leaf6",
676 int( main.params[ "TOPO" ]["switchNum" ] ) - 2,
677 int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700678 main.disconnectedIpv4Hosts = [ 'h12v4', 'h13v4']
679 main.disconnectedIpv6Hosts = [ 'h12v6', 'h13v6']
680 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700681 lib.recoverSwitch( main, "leaf6",
682 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
683 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6,
684 rediscoverHosts=True)
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700685 main.disconnectedIpv4Hosts = []
686 main.disconnectedIpv6Hosts = []
687 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700688 lib.recoverSwitch( main, "spine103",
689 int( main.params[ "TOPO" ][ "switchNum" ] ),
690 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700691 verify( main )
692
Jon Halla604fd42018-05-04 14:27:27 -0700693 lib.killSwitch( main, "spine104",
694 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
695 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700696 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700697 lib.killSwitch( main, "leaf1",
698 int( main.params[ "TOPO" ]["switchNum" ] ) - 2,
699 int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700700 main.disconnectedIpv4Hosts = [ 'h1v4', 'h2v4']
701 main.disconnectedIpv6Hosts = [ 'h1v6', 'h2v6']
702 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700703 lib.recoverSwitch( main, "leaf1",
704 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
705 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6,
706 rediscoverHosts=True )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700707 main.disconnectedIpv4Hosts = []
708 main.disconnectedIpv6Hosts = []
709 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700710 lib.recoverSwitch( main, "spine104",
711 int( main.params[ "TOPO" ][ "switchNum" ] ),
712 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700713 verify( main )
714
715 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
716
717 def CASE604( self, main ):
718 """"
719 Drop HAGG-1 device and test connectivity.
720 Bring up HAGG-1 and test connectivity.
721 Drop HAGG-2 device and test connectivity.
722 Bring up HAGG-2 device and test connectivity
723 """
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700724 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
725 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
726 main.case( "Drop hagg spine switches." )
727 setupTest( main, test_idx=604, onosNodes=3 )
728 main.disconnectedIpv4Hosts = []
729 main.disconnectedIpv6Hosts = []
730 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700731 lib.killSwitch( main, "spine103",
732 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
733 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700734 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700735 lib.recoverSwitch( main, "spine103",
736 int( main.params[ "TOPO" ][ "switchNum" ] ),
737 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700738 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700739 lib.killSwitch( main, "spine104",
740 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
741 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700742 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700743 lib.recoverSwitch( main, "spine104",
744 int( main.params[ "TOPO" ][ "switchNum" ] ),
745 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700746 verify( main )
747 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
748
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700749 def CASE605( self, main ):
750 """
751 Drop HAGG-1 and test connectivity (expect no failure)
752 Drop all leafs in big fabric and test connectivity (expect some failures)
753 Bring up HAGG-1 and test connectivity (still expect some failures)
754 Bring up all leafs in big fabric and test connectivity (expect no failure)
755 Repeat above with HAGG-2
756 """
757 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
758 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
759 main.case( "Drop one hagg and all leafs in big fabric" )
760 setupTest( main, test_idx=605, onosNodes=3 )
761 main.disconnectedIpv4Hosts = []
762 main.disconnectedIpv6Hosts = []
763 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700764 lib.killSwitch( main, "spine103",
765 int( main.params[ "TOPO" ][ "switchNum" ] ) - 1,
766 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700767 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700768 lib.killSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
769 int( main.params[ "TOPO" ][ "switchNum" ] ) - 5,
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700770 int( main.params[ "TOPO" ][ "linkNum" ] ) - 42 )
771 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4" ]
772 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6" ]
773 main.disconnectedExternalIpv4Hosts = [ "rh1v4", "rh2v4", "rh5v4" ]
774 main.disconnectedExternalIpv6Hosts = [ "rh1v6", "rh11v6", "rh5v6", "rh2v6", "rh22v6" ]
775 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700776 lib.recoverSwitch( main, "spine103",
777 int( main.params[ "TOPO" ][ "switchNum" ] ) - 4,
778 int( main.params[ "TOPO" ][ "linkNum" ] ) - 36 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700779 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700780 lib.recoverSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
781 int( main.params[ "TOPO" ][ "switchNum" ] ),
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700782 int( main.params[ "TOPO" ][ "linkNum" ] ) )
783 main.disconnectedIpv4Hosts = []
784 main.disconnectedIpv6Hosts = []
785 main.disconnectedExternalIpv4Hosts = [ ]
786 main.disconnectedExternalIpv6Hosts = [ ]
787 verify( main )
788
Jon Halla604fd42018-05-04 14:27:27 -0700789 lib.killSwitch( main, "spine104",
790 int( main.params[ "TOPO" ][ "switchNum" ] ) - 1,
791 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700792 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700793 lib.killSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
794 int( main.params[ "TOPO" ][ "switchNum" ] ) - 5,
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700795 int( main.params[ "TOPO" ][ "linkNum" ] ) - 42 )
796 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4" ]
797 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6" ]
798 main.disconnectedExternalIpv4Hosts = [ "rh1v4", "rh2v4", "rh5v4" ]
799 main.disconnectedExternalIpv6Hosts = [ "rh1v6", "rh11v6", "rh5v6", "rh2v6", "rh22v6" ]
800 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700801 lib.recoverSwitch( main, "spine104",
802 int( main.params[ "TOPO" ][ "switchNum" ] ) - 4,
803 int( main.params[ "TOPO" ][ "linkNum" ] ) - 36 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700804 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700805 lib.recoverSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
806 int( main.params[ "TOPO" ][ "switchNum" ] ),
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700807 int( main.params[ "TOPO" ][ "linkNum" ] ) )
808 main.disconnectedIpv4Hosts = []
809 main.disconnectedIpv6Hosts = []
810 main.disconnectedExternalIpv4Hosts = [ ]
811 main.disconnectedExternalIpv6Hosts = [ ]
812 verify( main )
813 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
814
You Wang5da39c82018-04-26 22:55:08 -0700815 def CASE606( self, main ):
816 """
817 Drop SPINE-1 and test connectivity
818 Drop paired leaf and test connectivity (expect some failures)
819 Bring up SPINE-1 and test connectivity (still expect some failures)
820 Bring up the paired leaf and test connectivity
821 Repeat above with SPINE-2 and a different paired leaf
822 """
You Wang5da39c82018-04-26 22:55:08 -0700823 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
824 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
825 main.case( "Drop spine and paired leaf" )
826 setupTest( main, test_idx=606, onosNodes=3 )
You Wangd66de192018-04-30 17:30:12 -0700827 verify( main, disconnected=False )
You Wang6d2d6312018-05-08 12:02:02 -0700828 # Drop spine101 and leaf-2/3
You Wangd66de192018-04-30 17:30:12 -0700829 lib.killSwitch( main, "spine101", 9, 30 )
830 verify( main, disconnected=False )
831 lib.killSwitch( main, "leaf2", 8, 24 )
832 lib.killSwitch( main, "leaf3", 7, 20 )
You Wang5da39c82018-04-26 22:55:08 -0700833 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4" ]
834 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6" ]
You Wangd66de192018-04-30 17:30:12 -0700835 verify( main )
836 lib.recoverSwitch( main, "spine101", 8, 30 )
837 verify( main )
838 lib.recoverSwitch( main, "leaf3", 9, 38 )
You Wang6d2d6312018-05-08 12:02:02 -0700839 lib.recoverSwitch( main, "leaf2", 10, 48, rediscoverHosts=True,
840 hostsToDiscover=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts )
You Wang5da39c82018-04-26 22:55:08 -0700841 main.disconnectedIpv4Hosts = []
842 main.disconnectedIpv6Hosts = []
You Wang6d2d6312018-05-08 12:02:02 -0700843 verify( main, disconnected=False )
844 # Drop spine102 and leaf-4/5
845 lib.killSwitch( main, "spine102", 9, 30 )
846 verify( main, disconnected=False )
847 lib.killSwitch( main, "leaf4", 8, 24 )
848 lib.killSwitch( main, "leaf5", 7, 20 )
849 main.disconnectedIpv4Hosts = [ "h8v4", "h9v4", "h10v4", "h11v4" ]
850 main.disconnectedIpv6Hosts = [ "h8v6", "h9v6", "h10v6", "h11v6" ]
851 verify( main, external=False )
852 lib.recoverSwitch( main, "spine102", 8, 30 )
853 verify( main, external=False )
854 lib.recoverSwitch( main, "leaf5", 9, 38 )
855 lib.recoverSwitch( main, "leaf4", 10, 48, rediscoverHosts=True,
856 hostsToDiscover=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts )
857 main.disconnectedIpv4Hosts = []
858 main.disconnectedIpv6Hosts = []
859 verify( main, disconnected=False )
860 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
861
862 def CASE620( self, main ):
863 """
864 Take down one of double links towards the spine from all leaf switches and
865 check that buckets in select groups change accordingly
866 Bring up links again and check that buckets in select groups change accordingly
867 """
You Wang6d2d6312018-05-08 12:02:02 -0700868 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
869 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
870 main.case( "Take down one of double links towards the spine" )
871 setupTest( main, test_idx=620, onosNodes=3 )
872 verify( main, disconnected=False )
You Wangc02f3be2018-05-18 12:14:23 -0700873 groupBuckets = { "of:0000000000000002": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
874 "10.2.0.0/24": 1, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
875 "10.2.10.0/24": 4, "10.2.40.0/24": 4,
876 "10.3.0.0/24": 4, "10.3.10.0/24": 8, "10.3.30.0/24": 8,
877 "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 },
878 "of:0000000000000003": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
879 "10.2.0.0/24": 4, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
880 "10.2.10.0/24": 1, "10.2.40.0/24": 1,
881 "10.3.0.0/24": 4, "10.3.10.0/24": 8, "10.3.30.0/24": 8,
882 "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 },
883 "of:0000000000000004": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
884 "10.2.0.0/24": 4, "10.2.30.0/24": 8, "10.2.20.0/24": 8,
885 "10.2.10.0/24": 4, "10.2.40.0/24": 4,
886 "10.3.0.0/24": 1, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
887 "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 },
888 "of:0000000000000005": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
889 "10.2.0.0/24": 4, "10.2.30.0/24": 8, "10.2.20.0/24": 8,
890 "10.2.10.0/24": 4, "10.2.40.0/24": 4,
891 "10.3.0.0/24": 4, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
892 "10.3.20.0/24": 1, "10.5.10.0/24": 4, "10.5.20.0/24": 4 } }
893 for switch, subnets in groupBuckets.items():
894 lib.checkGroupsForBuckets( main, switch, subnets )
895 # Take down one of double links
You Wang6d2d6312018-05-08 12:02:02 -0700896 portsToDisable = [ [ "of:0000000000000002", 1 ], [ "of:0000000000000002", 3 ],
897 [ "of:0000000000000003", 1 ], [ "of:0000000000000003", 3 ],
898 [ "of:0000000000000004", 1 ], [ "of:0000000000000004", 3 ],
899 [ "of:0000000000000005", 1 ], [ "of:0000000000000005", 3 ] ]
You Wang85747762018-05-11 15:51:50 -0700900 lib.disablePortBatch( main, portsToDisable, 10, 32 )
You Wangc02f3be2018-05-18 12:14:23 -0700901 groupBucketsNew = { "of:0000000000000002": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
902 "10.2.0.0/24": 1, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
903 "10.2.10.0/24": 2, "10.2.40.0/24": 2,
904 "10.3.0.0/24": 2, "10.3.10.0/24": 4, "10.3.30.0/24": 4,
905 "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 },
906 "of:0000000000000003": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
907 "10.2.0.0/24": 2, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
908 "10.2.10.0/24": 1, "10.2.40.0/24": 1,
909 "10.3.0.0/24": 2, "10.3.10.0/24": 4, "10.3.30.0/24": 4,
910 "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 },
911 "of:0000000000000004": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
912 "10.2.0.0/24": 2, "10.2.30.0/24": 4, "10.2.20.0/24": 4,
913 "10.2.10.0/24": 2, "10.2.40.0/24": 2,
914 "10.3.0.0/24": 1, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
915 "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 },
916 "of:0000000000000005": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
917 "10.2.0.0/24": 2, "10.2.30.0/24": 4, "10.2.20.0/24": 4,
918 "10.2.10.0/24": 2, "10.2.40.0/24": 2,
919 "10.3.0.0/24": 2, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
920 "10.3.20.0/24": 1, "10.5.10.0/24": 2, "10.5.20.0/24": 2 } }
921 for switch, subnets in groupBucketsNew.items():
922 lib.checkGroupsForBuckets( main, switch, subnets )
You Wang6d2d6312018-05-08 12:02:02 -0700923 verify( main, disconnected=False )
You Wangc02f3be2018-05-18 12:14:23 -0700924 # Bring up the links
You Wang85747762018-05-11 15:51:50 -0700925 lib.enablePortBatch( main, portsToDisable, 10, 48 )
You Wangc02f3be2018-05-18 12:14:23 -0700926 for switch, subnets in groupBuckets.items():
927 lib.checkGroupsForBuckets( main, switch, subnets )
You Wang6d2d6312018-05-08 12:02:02 -0700928 verify( main, disconnected=False )
929 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
930
931 def CASE621( self, main ):
932 """
933 Remove all the links in the network and restore all Links (repeat x3)
934 """
935 import time
936 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
937 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
938 main.case( "Remove all the links in the network and restore all Links" )
939 setupTest( main, test_idx=621, onosNodes=3 )
940 verify( main, disconnected=False )
941 linksToRemove = [ ["spine101", "spine103"], ["spine102", "spine104"],
942 ["spine103", "leaf6"], ["spine103", "leaf1"],
943 ["spine104", "leaf6"], ["spine104", "leaf1"],
944 ["spine101", "leaf2"], ["spine101", "leaf3"], ["spine101", "leaf4"], ["spine101", "leaf5"],
945 ["spine102", "leaf2"], ["spine102", "leaf3"], ["spine102", "leaf4"], ["spine102", "leaf5"],
946 ["leaf2", "leaf3"], ["leaf4", "leaf5"] ]
947 portsToDisable = [ [ "of:0000000000000001", 3 ], [ "of:0000000000000001", 4 ],
948 [ "of:0000000000000001", 5 ], [ "of:0000000000000001", 6 ],
949 [ "of:0000000000000002", 6 ], [ "of:0000000000000002", 7 ],
950 [ "of:0000000000000002", 8 ], [ "of:0000000000000002", 9 ],
951 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ],
952 [ "of:0000000000000003", 6 ], [ "of:0000000000000003", 7 ],
953 [ "of:0000000000000003", 8 ], [ "of:0000000000000003", 9 ],
954 [ "of:0000000000000003", 10 ], [ "of:0000000000000003", 11 ],
955 [ "of:0000000000000003", 12 ], [ "of:0000000000000003", 13 ],
956 [ "of:0000000000000004", 6 ], [ "of:0000000000000004", 7 ],
957 [ "of:0000000000000004", 8 ], [ "of:0000000000000004", 9 ],
958 [ "of:0000000000000004", 10 ], [ "of:0000000000000004", 11 ],
959 [ "of:0000000000000004", 12 ], [ "of:0000000000000004", 13 ], [ "of:0000000000000004", 14 ],
960 [ "of:0000000000000005", 6 ], [ "of:0000000000000005", 7 ],
961 [ "of:0000000000000005", 8 ], [ "of:0000000000000005", 9 ],
962 [ "of:0000000000000005", 10 ], [ "of:0000000000000005", 11 ],
963 [ "of:0000000000000005", 12 ], [ "of:0000000000000005", 13 ],
964 [ "of:0000000000000005", 14 ], [ "of:0000000000000005", 15 ],
965 [ "of:0000000000000006", 3 ], [ "of:0000000000000006", 4 ],
966 [ "of:0000000000000006", 5 ], [ "of:0000000000000006", 6 ] ]
967 for i in range( 0, 3 ):
968 lib.killLinkBatch( main, linksToRemove, 0, 10 )
You Wang85747762018-05-11 15:51:50 -0700969 lib.disablePortBatch( main, portsToDisable, 10, 0 )
You Wang6d2d6312018-05-08 12:02:02 -0700970 main.disconnectedIpv4Hosts = main.internalIpv4Hosts
971 main.disconnectedIpv6Hosts = main.internalIpv6Hosts
972 verify( main )
973 lib.restoreLinkBatch( main, linksToRemove, 48, 10 )
You Wang85747762018-05-11 15:51:50 -0700974 lib.enablePortBatch( main, portsToDisable, 10, 48 )
You Wang6d2d6312018-05-08 12:02:02 -0700975 main.Network.discoverHosts( hostList=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts )
Jon Hall43060f62020-06-23 13:13:33 -0700976 main.log.debug( "sleeping %i seconds" % float( 10 ) )
You Wang6d2d6312018-05-08 12:02:02 -0700977 time.sleep( 10 )
978 main.disconnectedIpv4Hosts = []
979 main.disconnectedIpv6Hosts = []
980 verify( main )
981 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
982
983 def CASE622( self, main ):
984 """
985 Take down all uplinks from a paired leaf switch
986 """
You Wang6d2d6312018-05-08 12:02:02 -0700987 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
988 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
989 from core import utilities
990 main.case( "Take down all uplinks from a paired leaf switch" )
991 setupTest( main, test_idx=622, onosNodes=3 )
992 verify( main, disconnected=False )
You Wang85747762018-05-11 15:51:50 -0700993 hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ],
994 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
995 "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ],
996 "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] }
997 lib.verifyHostLocations( main, hostLocations )
You Wang6d2d6312018-05-08 12:02:02 -0700998 linksToRemove = [ ["spine101", "leaf2"], ["spine102", "leaf2"] ]
999 lib.killLinkBatch( main, linksToRemove, 40, 10 )
1000 # TODO: more verifications are required
You Wangc02f3be2018-05-18 12:14:23 -07001001 main.disconnectedIpv4Hosts = [ "h3v4" ]
1002 main.disconnectedIpv6Hosts = [ "h3v6" ]
You Wangd66de192018-04-30 17:30:12 -07001003 verify( main )
You Wang85747762018-05-11 15:51:50 -07001004 hostLocations = { "h4v6": "of:0000000000000003/6",
You Wangbe98fb12018-05-24 16:15:17 -07001005 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
You Wang85747762018-05-11 15:51:50 -07001006 "h4v4": "of:0000000000000003/10",
1007 "h5v4": "of:0000000000000003/11" }
1008 lib.verifyHostLocations( main, hostLocations )
You Wang6d2d6312018-05-08 12:02:02 -07001009 lib.restoreLinkBatch( main, linksToRemove, 48, 10 )
You Wangc02f3be2018-05-18 12:14:23 -07001010 main.disconnectedIpv4Hosts = []
1011 main.disconnectedIpv6Hosts = []
1012 verify( main, disconnected=False )
You Wang85747762018-05-11 15:51:50 -07001013 hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ],
1014 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
1015 "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ],
1016 "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] }
1017 lib.verifyHostLocations( main, hostLocations )
You Wang6d2d6312018-05-08 12:02:02 -07001018 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1019
1020 def CASE630( self, main ):
1021 """
1022 Bring an instance down
1023 Drop a device
1024 Bring that same instance up again and observe that this specific instance sees that the device is down.
1025 """
You Wang6d2d6312018-05-08 12:02:02 -07001026 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1027 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1028 from core import utilities
1029 main.case( "Bring an instance down and drop a device" )
1030 setupTest( main, test_idx=630, onosNodes=3 )
1031 onosToKill = 0
1032 deviceToDrop = "spine101"
1033 lib.killOnos( main, [ onosToKill ], 10, 48, 2 )
1034 lib.killSwitch( main, deviceToDrop, 9, 30 )
1035 lib.recoverOnos( main, [ onosToKill ], 9, 30, 3 )
1036 result = main.Cluster.runningNodes[ onosToKill ].CLI.checkStatus( 9, 30, 3 )
1037 utilities.assert_equals( expect=main.TRUE, actual=result,
1038 onpass="ONOS instance {} sees correct device numbers".format( onosToKill ),
1039 onfail="ONOS instance {} doesn't see correct device numbers".format( onosToKill ) )
You Wang5da39c82018-04-26 22:55:08 -07001040 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001041
Jon Halla604fd42018-05-04 14:27:27 -07001042 def CASE640( self, main ):
1043 """
1044 Controller instance going down and switch coming down at the same time and then we bring them up together
1045
1046 A. Instance goes down and SPINE-1 goes down
1047 - All connectivity should be there
1048 - Bring them up together
1049 - All connectivity should be there
1050 B. Instance goes down and HAGG-1 goes down
1051 - All connectivity should be there
1052 - Bring them up together
1053 - All connectivity should be there
1054 C. Instance goes down and a paired leaf switch goes down
1055 - Single homed hosts in this leaf should lose connectivity all others should be ok
1056 - Bring them up together
1057 - Test connectivity
1058 """
1059 import time
1060 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1061 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1062 main.case( "Drop an ONOS instance and switch(es) at the same time" )
1063 caseDict = { 'A': { 'switches': "spine101",
You Wangbe98fb12018-05-24 16:15:17 -07001064 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001065 'disconnectedV4': [],
1066 'disconnectedV6': [],
1067 'expectedSwitches': 9,
1068 'expectedLinks': 30 },
1069 'B': { 'switches': "spine103",
You Wangbe98fb12018-05-24 16:15:17 -07001070 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001071 'disconnectedV4': [],
1072 'disconnectedV6': [],
1073 'expectedSwitches': 9,
1074 'expectedLinks': 42 },
1075 'C': { 'switches': "leaf2",
You Wangbe98fb12018-05-24 16:15:17 -07001076 'ports': [ [ "of:0000000000000002", 7 ], [ "of:0000000000000002", 8 ],
1077 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ] ],
Jon Halla604fd42018-05-04 14:27:27 -07001078 'disconnectedV4': [ "h3v4" ],
1079 'disconnectedV6': [ "h3v6" ],
1080 'expectedSwitches': 9,
1081 'expectedLinks': 38 } }
1082 totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
1083 totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] )
1084 nodeIndex = 0
1085 cases = sorted( caseDict.keys() )
1086 for case in cases:
1087 switches = caseDict[ case ][ 'switches' ]
You Wangbe98fb12018-05-24 16:15:17 -07001088 ports = caseDict[ case ][ 'ports' ]
Jon Halla604fd42018-05-04 14:27:27 -07001089 expectedSwitches = caseDict[ case ][ 'expectedSwitches' ]
1090 expectedLinks = caseDict[ case ][ 'expectedLinks' ]
1091 main.step( "\n640{}: Drop ONOS{} and switch(es) {} at the same time".format( case,
1092 nodeIndex + 1,
1093 switches ) )
1094 setupTest( main, test_idx=640 )
1095 main.Cluster.next().CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001096 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
Jon Halla604fd42018-05-04 14:27:27 -07001097 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1098 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
1099 instance = main.Cluster.controllers[ nodeIndex ]
1100 verify( main, disconnected=False, external=False )
1101
1102 # Simultaneous failures
1103 main.step( "Kill ONOS{}: {}".format( nodeIndex + 1, instance.ipAddress ) )
1104 killResult = main.ONOSbench.onosDie( instance.ipAddress )
1105 utilities.assert_equals( expect=main.TRUE, actual=killResult,
1106 onpass="ONOS node killed",
1107 onfail="Failed to kill ONOS node" )
1108 instance.active = False
1109 main.Cluster.reset()
You Wangbe98fb12018-05-24 16:15:17 -07001110 if ports:
1111 lib.disablePortBatch( main, ports, 10, 48, 0 )
Jon Halla604fd42018-05-04 14:27:27 -07001112 # TODO: Remove sleeps from the concurrent events
1113 lib.killSwitch( main, switches, expectedSwitches, expectedLinks )
1114 main.disconnectedIpv4Hosts = caseDict[ case ][ 'disconnectedV4' ]
1115 main.disconnectedIpv6Hosts = caseDict[ case ][ 'disconnectedV6' ]
1116
1117 # verify functionality
1118 main.log.debug( main.Cluster.next().summary() )
1119 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
1120 main.log.debug( main.Cluster.next().summary() )
1121 lib.verifyTopology( main, expectedSwitches, expectedLinks, main.Cluster.numCtrls - 1 )
1122 lib.verifyNodes( main )
1123 verify( main, external=False )
1124
1125 # Bring everything back up
1126 lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True )
1127 main.disconnectedIpv4Hosts = []
1128 main.disconnectedIpv6Hosts = []
1129 lib.recoverOnos( main, [ nodeIndex ], expectedSwitches, expectedLinks, main.Cluster.numCtrls )
1130
1131 # Verify functionality
1132 lib.verifyNodes( main )
1133 verify( main, disconnected=False, external=False )
1134 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1135 nodeIndex = ( nodeIndex + 1 ) % main.Cluster.numCtrls
1136
1137 def CASE641( self, main ):
1138 """
1139 Controller instance going down while switch comes up at the same time
1140
1141 A. Take down SPINE-1
1142 - Test connectivity
1143 - Bring up SPINE-1 and drop an instance at the same time
1144 - Test connectivity
1145 - Bring up instance one
1146 - Test connectivity
1147 B. Take down HAGG-1
1148 - Test connectivity
1149 - Bring up HAGG-1 and drop an instance at the same time
1150 - Test connectivity
1151 - Bring up instance one
1152 - Test connectivity
1153 C. Take down a paired leaf switch
1154 - Test connectivity ( single homed hosts on this leaf will lose it )
1155 - Bring up paired leaf switch and drop a controller instance at the same time
1156 - Test connectivity
1157 - Bring up the instance
1158 - Test connectivity
1159 """
1160 import time
1161 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1162 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1163 main.case( "Drop an ONOS instance and recover switch(es) at the same time" )
1164 caseDict = { 'A': { 'switches': "spine101",
You Wangbe98fb12018-05-24 16:15:17 -07001165 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001166 'disconnectedV4': [],
1167 'disconnectedV6': [],
1168 'expectedSwitches': 9,
1169 'expectedLinks': 30 },
1170 'B': { 'switches': "spine103",
You Wangbe98fb12018-05-24 16:15:17 -07001171 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001172 'disconnectedV4': [],
1173 'disconnectedV6': [],
1174 'expectedSwitches': 9,
1175 'expectedLinks': 42 },
1176 'C': { 'switches': "leaf2",
You Wangbe98fb12018-05-24 16:15:17 -07001177 'ports': [ [ "of:0000000000000002", 7 ], [ "of:0000000000000002", 8 ],
1178 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ] ],
Jon Halla604fd42018-05-04 14:27:27 -07001179 'disconnectedV4': [ "h3v4" ],
1180 'disconnectedV6': [ "h3v6" ],
1181 'expectedSwitches': 9,
1182 'expectedLinks': 38 } }
1183 totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
1184 totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] )
1185 nodeIndex = 0
1186 cases = sorted( caseDict.keys() )
1187 for case in cases:
1188 switches = caseDict[ case ][ 'switches' ]
You Wangbe98fb12018-05-24 16:15:17 -07001189 ports = caseDict[ case ][ 'ports' ]
Jon Halla604fd42018-05-04 14:27:27 -07001190 expectedSwitches = caseDict[ case ][ 'expectedSwitches' ]
1191 expectedLinks = caseDict[ case ][ 'expectedLinks' ]
1192 main.step( "\n641{}: Drop ONOS{} and recover switch(es) {} at the same time".format( case,
1193 nodeIndex + 1,
1194 switches ) )
1195 setupTest( main, test_idx=641 )
1196 main.Cluster.next().CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001197 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
Jon Halla604fd42018-05-04 14:27:27 -07001198 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1199 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
1200 instance = main.Cluster.controllers[ nodeIndex ]
1201 verify( main, disconnected=False, external=False )
1202 # Drop the switch to setup scenario
You Wangbe98fb12018-05-24 16:15:17 -07001203 if ports:
1204 lib.disablePortBatch( main, ports, 10, 48, 5 )
Jon Halla604fd42018-05-04 14:27:27 -07001205 lib.killSwitch( main, switches, expectedSwitches, expectedLinks )
1206 main.disconnectedIpv4Hosts = caseDict[ case ][ 'disconnectedV4' ]
1207 main.disconnectedIpv6Hosts = caseDict[ case ][ 'disconnectedV6' ]
1208 verify( main, external=False )
1209
1210 # Simultaneous node failure and switch recovery
1211 main.step( "Kill ONOS{}: {}".format( nodeIndex + 1, instance.ipAddress ) )
1212 killResult = main.ONOSbench.onosDie( instance.ipAddress )
1213 utilities.assert_equals( expect=main.TRUE, actual=killResult,
1214 onpass="ONOS node killed",
1215 onfail="Failed to kill ONOS node" )
1216 instance.active = False
1217 main.Cluster.reset()
1218 # TODO: Remove sleeps from the concurrent events
1219 lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True )
1220 main.disconnectedIpv4Hosts = []
1221 main.disconnectedIpv6Hosts = []
1222
1223 # verify functionality
1224 main.log.debug( main.Cluster.next().summary() )
Jon Halla604fd42018-05-04 14:27:27 -07001225 lib.verifyTopology( main, totalSwitches, totalLinks, main.Cluster.numCtrls - 1 )
1226 lib.verifyNodes( main )
1227 verify( main, disconnected=False, external=False )
1228
1229 # Bring everything back up and verify functionality
1230 lib.recoverOnos( main, [ nodeIndex ], totalSwitches, totalLinks, main.Cluster.numCtrls )
1231 lib.verifyNodes( main )
1232 verify( main, external=False )
1233 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1234 nodeIndex = ( nodeIndex + 1 ) % main.Cluster.numCtrls
1235
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001236 def CASE642( self, main ):
1237 """
1238 Drop one link from each double link
1239 Drop a link between DAAS-1 and HAAG-1
1240 Drop a link between HAGG-2 and SPINE-2
1241 Drop one ONOS instance
1242 Test connectivity (expect no failure)
1243 Bring up all links and ONOS instance
1244 Test connectivity (expect no failure)
1245 """
1246 import time
1247 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1248 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1249 main.case( "Drop ONOS instance and links at the same time" )
1250 setupTest( main, test_idx=642, onosNodes=3 )
1251 main.Cluster.active( 0 ).CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001252 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001253 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1254 verify( main )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001255 portsToDisable = [ [ "of:0000000000000001", 1 ], [ "of:0000000000000103", 1 ],
1256 [ "of:0000000000000006", 1 ], [ "of:0000000000000103", 2 ],
1257 [ "of:0000000000000101", 9 ], [ "of:0000000000000103", 3 ],
1258 [ "of:0000000000000002", 1 ], [ "of:0000000000000101", 1 ],
1259 [ "of:0000000000000003", 1 ], [ "of:0000000000000101", 3 ],
1260 [ "of:0000000000000004", 1 ], [ "of:0000000000000101", 5 ],
1261 [ "of:0000000000000005", 1 ], [ "of:0000000000000101", 7 ],
1262 [ "of:0000000000000002", 3 ], [ "of:0000000000000102", 1 ],
1263 [ "of:0000000000000003", 3 ], [ "of:0000000000000102", 3 ],
1264 [ "of:0000000000000004", 3 ], [ "of:0000000000000102", 5 ],
1265 [ "of:0000000000000005", 3 ], [ "of:0000000000000102", 7 ] ]
You Wang85747762018-05-11 15:51:50 -07001266 lib.disablePortBatch( main, portsToDisable,
1267 int( main.params[ "TOPO" ][ "switchNum" ] ),
1268 int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ),
1269 sleep=0 )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001270 lib.killOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1271 int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ), 2 )
1272 verify( main )
You Wang85747762018-05-11 15:51:50 -07001273 lib.enablePortBatch( main, portsToDisable,
1274 int( main.params[ "TOPO" ][ "switchNum" ] ),
1275 int( main.params[ "TOPO" ][ "linkNum" ] ),
1276 sleep=0 )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001277 lib.recoverOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1278 int( main.params[ "TOPO" ][ "linkNum" ] ), 3 )
1279 verify( main )
1280 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1281
1282 def CASE643( self, main ):
1283 """
1284 Drop one link from each double link
1285 Drop a link between DAAS-1 and HAAG-1
1286 Drop a link between HAGG-2 and SPINE-2
1287 Test connectivity (expect no failure)
1288 Bring up all links
1289 Drop one ONOS instance
1290 Test connectivity (expect no failure)
1291 Bring up ONOS instance
1292 Test connectivity (expect no failure)
1293 """
1294 import time
1295 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1296 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1297 main.case( "Drop ONOS instances and bring up links at the same time" )
1298 setupTest( main, test_idx=643, onosNodes=3 )
1299 main.Cluster.active( 0 ).CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001300 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001301 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1302 verify( main )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001303 portsToDisable = [ [ "of:0000000000000001", 1 ], [ "of:0000000000000103", 1 ],
1304 [ "of:0000000000000006", 1 ], [ "of:0000000000000103", 2 ],
1305 [ "of:0000000000000101", 9 ], [ "of:0000000000000103", 3 ],
1306 [ "of:0000000000000002", 1 ], [ "of:0000000000000101", 1 ],
1307 [ "of:0000000000000003", 1 ], [ "of:0000000000000101", 3 ],
1308 [ "of:0000000000000004", 1 ], [ "of:0000000000000101", 5 ],
1309 [ "of:0000000000000005", 1 ], [ "of:0000000000000101", 7 ],
1310 [ "of:0000000000000002", 3 ], [ "of:0000000000000102", 1 ],
1311 [ "of:0000000000000003", 3 ], [ "of:0000000000000102", 3 ],
1312 [ "of:0000000000000004", 3 ], [ "of:0000000000000102", 5 ],
1313 [ "of:0000000000000005", 3 ], [ "of:0000000000000102", 7 ] ]
You Wang85747762018-05-11 15:51:50 -07001314 lib.disablePortBatch( main, portsToDisable,
1315 int( main.params[ "TOPO" ][ "switchNum" ] ),
1316 int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ) )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001317 verify( main )
You Wang85747762018-05-11 15:51:50 -07001318 lib.enablePortBatch( main, portsToDisable,
1319 int( main.params[ "TOPO" ][ "switchNum" ] ),
1320 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001321 lib.killOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1322 int( main.params[ "TOPO" ][ "linkNum" ] ), 2 )
1323 verify( main )
1324 lib.recoverOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1325 int( main.params[ "TOPO" ][ "linkNum" ] ), 3 )
1326 verify( main )
1327 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001328
1329 def CASE651( self, main ):
1330 """
1331 Move a single-homed host from port A to port B in DAAS-1
1332 Test connectivity (expect no failure)
1333
1334 Repeat with DAAS-2
1335 """
1336 import time
1337 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1338 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1339 main.case( "Move a single-homed host to another port in the same DAAS" )
1340 setupTest( main, test_idx=651, onosNodes=3 )
1341 main.Cluster.active( 0 ).CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001342 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001343 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1344 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001345 # Move an untagged IPv4 host on DAAS-1
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001346 h1v4cfg = '{"of:0000000000000001/7" : { "interfaces" : [ { "ips" : [ "10.1.0.254/24" ], "vlan-untagged": 10 } ] } }'
1347 lib.moveHost( main, "h1v4", "leaf1", "leaf1", "10.1.0.254", prefixLen=24, cfg=h1v4cfg )
You Wang7ea90582018-07-19 15:27:58 -07001348 hostLocations = { "h1v4": "of:0000000000000001/7" }
1349 lib.verifyHostLocations( main, hostLocations )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001350 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001351 # Move an untagged IPv6 host on DAAS-1
You Wang6260ed52018-07-18 17:54:25 -07001352 h1v6cfg = '{"of:0000000000000001/8" : { "interfaces" : [ { "ips" : [ "1000::3ff/120" ], "vlan-untagged": 21 } ] } }'
You Wang6e5b48e2018-07-23 16:17:38 -07001353 lib.moveHost( main, "h1v6", "leaf1", "leaf1", "1000::3ff", prefixLen=128, cfg=h1v6cfg, ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001354 hostLocations = { "h1v6": "of:0000000000000001/8" }
1355 lib.verifyHostLocations( main, hostLocations )
You Wang6260ed52018-07-18 17:54:25 -07001356 verify( main )
You Wang6e5b48e2018-07-23 16:17:38 -07001357 # FIXME: We don't have any tagged hosts on DAAS-1
1358
You Wang2cb70172018-07-25 16:44:13 -07001359 # Move an untagged IPv4 host on DAAS-2
You Wang6260ed52018-07-18 17:54:25 -07001360 h13v4cfg = '{"of:0000000000000006/7" : { "interfaces" : [ { "ips" : [ "10.5.20.254/24" ], "vlan-untagged": 20 } ] } }'
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001361 lib.moveHost( main, "h13v4", "leaf6", "leaf6", "10.5.20.254", prefixLen=24, cfg=h13v4cfg )
You Wang7ea90582018-07-19 15:27:58 -07001362 hostLocations = { "h13v4": "of:0000000000000006/7" }
1363 lib.verifyHostLocations( main, hostLocations )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001364 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001365 # Move an untagged IPv6 host on DAAS-2
You Wang6260ed52018-07-18 17:54:25 -07001366 h13v6cfg = '{"of:0000000000000006/8" : { "interfaces" : [ { "ips" : [ "1012::3ff/120" ], "vlan-untagged": 26 } ] } }'
You Wang6e5b48e2018-07-23 16:17:38 -07001367 lib.moveHost( main, "h13v6", "leaf6", "leaf6", "1012::3ff", prefixLen=128, cfg=h13v6cfg, ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001368 hostLocations = { "h13v6": "of:0000000000000006/8" }
1369 lib.verifyHostLocations( main, hostLocations )
You Wang6260ed52018-07-18 17:54:25 -07001370 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001371 # Move a tagged IPv4 host on DAAS-2
You Wang6e5b48e2018-07-23 16:17:38 -07001372 h12v4cfg = '{"of:0000000000000006/9" : { "interfaces" : [ { "ips" : [ "10.5.10.254/24" ], "vlan-tagged": [80] } ] } }'
1373 lib.moveHost( main, "h12v4", "leaf6", "leaf6", "10.5.10.254", prefixLen=24, cfg=h12v4cfg, vlan=80 )
1374 hostLocations = { "h12v4": "of:0000000000000006/9" }
1375 lib.verifyHostLocations( main, hostLocations )
1376 verify( main )
You Wang6e5b48e2018-07-23 16:17:38 -07001377 # FIXME: Due to CORD-3079, we are not able to test movement of tagged IPv6 hosts at the moment
1378 '''
1379 h12v6cfg = '{"of:0000000000000006/10" : { "interfaces" : [ { "ips" : [ "1011::3ff/120" ], "vlan-tagged": [127] } ] } }'
1380 lib.moveHost( main, "h12v6", "leaf6", "leaf6", "1011::3ff", prefixLen=128, cfg=h12v6cfg, ipv6=True, vlan=127 )
1381 hostLocations = { "h12v6": "of:0000000000000006/10" }
1382 lib.verifyHostLocations( main, hostLocations )
1383 verify( main )
1384 '''
1385
You Wangb2549812018-07-23 11:56:46 -07001386 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang7ea90582018-07-19 15:27:58 -07001387
1388 def CASE652( self, main ):
1389 """
Jon Hall39570262020-11-17 12:18:19 -08001390 Move a dual-homed host from ports 1A and 1B to ports 2A and 2B
You Wang7ea90582018-07-19 15:27:58 -07001391 Host retains the same MAC and IP address
1392 Test connectivity (expect no failure)
1393 """
1394 import time
1395 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1396 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1397 main.case( "Move a dual-homed host from porst 1A and 1B to ports 2A and 2B with the same MAC and IP" )
1398 setupTest( main, test_idx=652, onosNodes=3 )
1399 main.Cluster.active( 0 ).CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001400 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
You Wang7ea90582018-07-19 15:27:58 -07001401 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1402 verify( main )
1403
You Wang2cb70172018-07-25 16:44:13 -07001404 # Move an untagged IPv4 host
1405 lib.addStaticOnosRoute( main, "10.2.31.0/24", "10.2.30.1" )
1406 lib.startScapyHosts( main, scapyNames=[ 'h4v4Scapy' ], mininetNames=[ 'h4v4' ] )
1407 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.31.1", "h4v4Scapy", "h4v4-bond0" )
You Wang7ea90582018-07-19 15:27:58 -07001408 h4v4cfg = '''{"of:0000000000000002/12" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] },
1409 "of:0000000000000003/14" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] } }'''
1410 lib.moveDualHomedHost( main, "h4v4", "leaf2", "leaf3", "leaf2", "leaf3", "10.2.30.254", prefixLen=24, cfg=h4v4cfg )
1411 hostLocations = { "h4v4": [ "of:0000000000000002/12", "of:0000000000000003/14" ] }
1412 lib.verifyHostLocations( main, hostLocations )
1413 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001414 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.31.1", "h4v4Scapy", "h4v4-bond1" )
You Wang7ea90582018-07-19 15:27:58 -07001415
You Wang2cb70172018-07-25 16:44:13 -07001416 # Move an untagged IPv6 host
1417 lib.addStaticOnosRoute( main, "1003::400/120", "1003::3fe" )
1418 lib.startScapyHosts( main, scapyNames=[ 'h4v6Scapy' ], mininetNames=[ 'h4v6' ] )
1419 lib.verifyTraffic( main, main.internalIpv6Hosts, "1003::4fe", "h4v6Scapy", "h4v6-bond0", ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001420 h4v6cfg = '''{"of:0000000000000002/13" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] },
1421 "of:0000000000000003/15" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] } }'''
1422 lib.moveDualHomedHost( main, "h4v6", "leaf2", "leaf3", "leaf2", "leaf3", "1003::3fe", prefixLen=128, cfg=h4v6cfg, ipv6=True )
1423 hostLocations = { "h4v6": [ "of:0000000000000002/13", "of:0000000000000003/15" ] }
1424 lib.verifyHostLocations( main, hostLocations )
1425 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001426 lib.verifyTraffic( main, main.internalIpv6Hosts, "1003::4fe", "h4v6Scapy", "h4v6-bond1", ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001427
You Wang2cb70172018-07-25 16:44:13 -07001428 # Move a tagged IPv4 host
1429 lib.addStaticOnosRoute( main, "10.2.21.0/24", "10.2.20.1" )
1430 lib.startScapyHosts( main, scapyNames=[ 'h5v4Scapy' ], mininetNames=[ 'h5v4' ] )
1431 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.21.1", "h5v4Scapy", "h5v4-bond0" )
You Wang6e5b48e2018-07-23 16:17:38 -07001432 h5v4cfg = '''{"of:0000000000000002/14" : { "interfaces" : [ { "ips" : [ "10.2.20.254/24" ], "vlan-tagged": [30] } ] },
1433 "of:0000000000000003/16" : { "interfaces" : [ { "ips" : [ "10.2.20.254/24" ], "vlan-tagged": [30] } ] } }'''
1434 lib.moveDualHomedHost( main, "h5v4", "leaf2", "leaf3", "leaf2", "leaf3", "10.2.20.254", prefixLen=24, cfg=h5v4cfg, vlan=30 )
1435 hostLocations = { "h5v4": [ "of:0000000000000002/14", "of:0000000000000003/16" ] }
1436 lib.verifyHostLocations( main, hostLocations )
1437 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001438 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.21.1", "h5v4Scapy", "h5v4-bond1" )
You Wang6e5b48e2018-07-23 16:17:38 -07001439
You Wangb2549812018-07-23 11:56:46 -07001440 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang7ea90582018-07-19 15:27:58 -07001441
1442 def CASE653( self, main ):
1443 """
1444 Move a dual-homed host from porst 1A and 1B to ports 2A and 2B
1445 Host retains the same IP but MAC address changes
1446 Test connectivity (expect no failure)
1447 """
1448 import time
1449 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1450 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1451 main.case( "Move a dual-homed host from porst 1A and 1B to ports 2A and 2B with the same IP and different MAC" )
1452 setupTest( main, test_idx=653, onosNodes=3 )
1453 main.Cluster.active( 0 ).CLI.balanceMasters()
Jon Hall43060f62020-06-23 13:13:33 -07001454 main.log.debug( "sleeping %i seconds" % float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
You Wang7ea90582018-07-19 15:27:58 -07001455 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1456 verify( main )
1457
You Wang2cb70172018-07-25 16:44:13 -07001458 # Move an untagged IPv4 host
1459 lib.addStaticOnosRoute( main, "10.2.31.0/24", "10.2.30.1" )
1460 lib.startScapyHosts( main, scapyNames=[ 'h4v4Scapy' ], mininetNames=[ 'h4v4' ] )
1461 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.31.1", "h4v4Scapy", "h4v4-bond0" )
You Wang7ea90582018-07-19 15:27:58 -07001462 h4v4cfg = '''{"of:0000000000000002/12" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] },
1463 "of:0000000000000003/14" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] } }'''
1464 lib.moveDualHomedHost( main, "h4v4", "leaf2", "leaf3", "leaf2", "leaf3", "10.2.30.254", macAddr="00:aa:01:00:00:03", prefixLen=24, cfg=h4v4cfg )
1465 hostLocations = { "h4v4": [ "of:0000000000000002/12", "of:0000000000000003/14" ] }
1466 lib.verifyHostLocations( main, hostLocations )
1467 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001468 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.31.1", "h4v4Scapy", "h4v4-bond1" )
You Wang7ea90582018-07-19 15:27:58 -07001469
You Wang2cb70172018-07-25 16:44:13 -07001470 # Move an untagged IPv6 host
1471 lib.addStaticOnosRoute( main, "1003::400/120", "1003::3fe" )
1472 lib.startScapyHosts( main, scapyNames=[ 'h4v6Scapy' ], mininetNames=[ 'h4v6' ] )
1473 lib.verifyTraffic( main, main.internalIpv6Hosts, "1003::4fe", "h4v6Scapy", "h4v6-bond0", ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001474 h4v6cfg = '''{"of:0000000000000002/13" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] },
1475 "of:0000000000000003/15" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] } }'''
1476 lib.moveDualHomedHost( main, "h4v6", "leaf2", "leaf3", "leaf2", "leaf3", "1003::3fe", macAddr="00:bb:01:00:00:03", prefixLen=128, cfg=h4v6cfg, ipv6=True )
1477 hostLocations = { "h4v6": [ "of:0000000000000002/13", "of:0000000000000003/15" ] }
1478 lib.verifyHostLocations( main, hostLocations )
1479 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001480 lib.verifyTraffic( main, main.internalIpv6Hosts, "1003::4fe", "h4v6Scapy", "h4v6-bond1", ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001481
You Wang2cb70172018-07-25 16:44:13 -07001482 # Move a tagged IPv4 host
1483 lib.addStaticOnosRoute( main, "10.2.21.0/24", "10.2.20.1" )
1484 lib.startScapyHosts( main, scapyNames=[ 'h5v4Scapy' ], mininetNames=[ 'h5v4' ] )
1485 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.21.1", "h5v4Scapy", "h5v4-bond0" )
You Wang6e5b48e2018-07-23 16:17:38 -07001486 h5v4cfg = '''{"of:0000000000000002/14" : { "interfaces" : [ { "ips" : [ "10.2.20.254/24" ], "vlan-tagged": [30] } ] },
1487 "of:0000000000000003/16" : { "interfaces" : [ { "ips" : [ "10.2.20.254/24" ], "vlan-tagged": [30] } ] } }'''
1488 lib.moveDualHomedHost( main, "h5v4", "leaf2", "leaf3", "leaf2", "leaf3", "10.2.20.254", macAddr="00:aa:01:00:00:04", prefixLen=24, cfg=h5v4cfg, vlan=30 )
1489 hostLocations = { "h5v4": [ "of:0000000000000002/14", "of:0000000000000003/16" ] }
1490 lib.verifyHostLocations( main, hostLocations )
1491 verify( main )
You Wang2cb70172018-07-25 16:44:13 -07001492 lib.verifyTraffic( main, main.internalIpv4Hosts, "10.2.21.1", "h5v4Scapy", "h5v4-bond1" )
You Wang6e5b48e2018-07-23 16:17:38 -07001493
You Wangb2549812018-07-23 11:56:46 -07001494 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang0f745de2018-07-27 15:49:22 -07001495
1496 def CASE660( self, main ):
1497 """
1498 External router failure
1499 - Bring down quagga external router-1. Hosts that are behind router-2 should still be reachable. Hosts that are behind router-1 should not be reachable.
1500 - Bring router up again, all external hosts are reachable again.
1501 - Repeat this with external router-2.
1502 """
1503 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1504 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1505 main.case( "External router failure with cross-link" )
1506 setupTest( main, test_idx=660, onosNodes=3, static=True )
1507 main.externalIpv4Hosts += main.staticIpv4Hosts
1508 main.externalIpv6Hosts += main.staticIpv6Hosts
1509 verify( main, disconnected=False )
1510 # Bring down/up external router-1
1511 verifyRouterFailure( main, "r1", [ "rh5v4" ], [ "rh11v6", "rh5v6" ] )
1512 # Bring down/up external router-2
1513 verifyRouterFailure( main, "r2", [], [ "rh22v6" ] )
1514 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1515
1516 def CASE661( self, main ):
1517 """
1518 External router link failure
1519 - Drop a non-cross-link for external router-1. All external hosts should be reachable (via cross-link).
1520 - Bring up the link. All external hosts should be reachable.
1521 - Repeat the steps above with the cross-link of external router-1
1522 - Repeat all steps above with external router-2
1523 """
1524 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1525 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1526 main.case( "External router link failure with cross-link" )
1527 setupTest( main, test_idx=661, onosNodes=3, static=True )
1528 main.externalIpv4Hosts += main.staticIpv4Hosts
1529 main.externalIpv6Hosts += main.staticIpv6Hosts
1530 verify( main, disconnected=False )
1531 # Bring down/up a non-cross-link for external router-1
1532 portsToDisable = [ [ "of:0000000000000005", 13 ] ]
1533 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1534 verify( main, disconnected=False, internal=False )
1535 lib.enablePortBatch( main, portsToDisable, 10, 48 )
1536 verify( main, disconnected=False, internal=False )
1537 # Bring down/up a cross-link for external router-1
1538 portsToDisable = [ [ "of:0000000000000005", 14 ] ]
1539 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1540 verify( main, disconnected=False, internal=False )
1541 lib.enablePortBatch( main, portsToDisable, 10, 48 )
1542 verify( main, disconnected=False, internal=False )
1543 # Bring down/up a non-cross-link for external router-2
1544 portsToDisable = [ [ "of:0000000000000004", 14 ] ]
1545 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1546 verify( main, disconnected=False, internal=False )
1547 lib.enablePortBatch( main, portsToDisable, 10, 48 )
1548 verify( main, disconnected=False, internal=False )
1549 # Bring down/up a cross-link for external router-2
1550 portsToDisable = [ [ "of:0000000000000004", 13 ] ]
1551 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1552 verify( main, disconnected=False, internal=False )
1553 lib.enablePortBatch( main, portsToDisable, 10, 48 )
1554 verify( main, disconnected=False, internal=False )
1555 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1556
1557 def CASE662( self, main ):
1558 """
1559 Internal router failure
1560 - Bring down quagga internal router-1. All external hosts should be reachable (via cross-link).
1561 - Bring the router up. All external hosts should be reachable.
1562 - Repeat this with internal router-2.
1563 """
1564 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1565 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1566 main.case( "Internal router failure with cross-link" )
1567 setupTest( main, test_idx=662, onosNodes=3, static=True )
1568 main.externalIpv4Hosts += main.staticIpv4Hosts
1569 main.externalIpv6Hosts += main.staticIpv6Hosts
1570 verify( main, disconnected=False )
1571 # Bring down/up internal router-1
1572 verifyRouterFailure( main, "bgp1" )
1573 # Bring down/up internal router-2
1574 verifyRouterFailure( main, "bgp2" )
1575 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1576
1577 def CASE663( self, main ):
1578 """
1579 External router failure without cross-link
1580 - Drop the cross-link for both external routers. All external hosts should be reachable.
1581 - Bring down quagga external router-1. Hosts that are behind router-2 should still be reachable. Hosts that are behind router-1 should not be reachable.
1582 - Bring router up again, all external hosts are reachable again.
1583 - Repeat this with external router-2.
1584 """
1585 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1586 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1587 main.case( "External router failure without cross-link" )
1588 setupTest( main, test_idx=663, onosNodes=3, static=True )
1589 main.externalIpv4Hosts += main.staticIpv4Hosts
1590 main.externalIpv6Hosts += main.staticIpv6Hosts
1591 verify( main, disconnected=False )
1592 # Drop the cross-link
1593 portsToDisable = [ [ "of:0000000000000004", 13 ], [ "of:0000000000000005", 14 ] ]
1594 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1595 verify( main, disconnected=False, internal=False )
1596 # Bring down/up external router-1
1597 verifyRouterFailure( main, "r1", [ "rh5v4" ], [ "rh11v6", "rh5v6" ] )
1598 # Bring down/up external router-2
1599 verifyRouterFailure( main, "r2", [], [ "rh22v6" ] )
1600 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1601
1602 def CASE664( self, main ):
1603 """
1604 External router link failure without cross-link
1605 - Drop the cross-link for both external routers. All external hosts should be reachable.
1606 - Drop an extra link for external router-1. Only hosts connected to router-2 should be reachable.
1607 - Bring up single link for external router-1. All external hosts should be reachable.
1608 - Repeat the two steps above with external router-2
1609 """
1610 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1611 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1612 main.case( "External router link failure without cross-link" )
1613 setupTest( main, test_idx=664, onosNodes=3, static=True )
1614 main.externalIpv4Hosts += main.staticIpv4Hosts
1615 main.externalIpv6Hosts += main.staticIpv6Hosts
1616 verify( main, disconnected=False )
1617 # Drop the cross-link
1618 portsToDisable = [ [ "of:0000000000000004", 13 ], [ "of:0000000000000005", 14 ] ]
1619 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1620 verify( main, disconnected=False, internal=False )
1621 # Bring down/up a non-cross-link for external router-1
1622 portsToDisable = [ [ "of:0000000000000005", 13 ] ]
1623 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1624 main.disconnectedExternalIpv4Hosts = [ 'rh5v4' ]
1625 main.disconnectedExternalIpv6Hosts = [ "rh11v6", "rh5v6" ]
1626 verify( main, internal=False )
1627 lib.enablePortBatch( main, portsToDisable, 10, 48 )
1628 main.disconnectedExternalIpv4Hosts = []
1629 main.disconnectedExternalIpv6Hosts = []
1630 verify( main, disconnected=False, internal=False )
1631 # Bring down/up a non-cross-link for external router-2
1632 portsToDisable = [ [ "of:0000000000000004", 14 ] ]
1633 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1634 main.disconnectedExternalIpv6Hosts = [ "rh22v6" ]
1635 verify( main, internal=False )
1636 lib.enablePortBatch( main, portsToDisable, 10, 48 )
1637 main.disconnectedExternalIpv6Hosts = []
1638 verify( main, disconnected=False, internal=False )
1639 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1640
1641 def CASE665( self, main ):
1642 """
1643 Internal router failure without cross-link
1644 - Drop the cross-link for both external routers. All external hosts should be reachable.
1645 - Bring down quagga internal router-1. Hosts that are behind router-2 should still be reachable. Hosts that are behind router-1 should not be reachable.
1646 - Bring router up again, all external hosts are reachable again.
1647 - Repeat this with internal router-2.
1648 """
1649 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1650 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1651 main.case( "Internal router failure without cross-link" )
1652 setupTest( main, test_idx=665, onosNodes=3, static=True )
1653 main.externalIpv4Hosts += main.staticIpv4Hosts
1654 main.externalIpv6Hosts += main.staticIpv6Hosts
1655 verify( main, disconnected=False )
1656 # Drop the cross-link
1657 portsToDisable = [ [ "of:0000000000000004", 13 ], [ "of:0000000000000005", 14 ] ]
1658 lib.disablePortBatch( main, portsToDisable, 10, 48 )
1659 verify( main, disconnected=False, internal=False )
1660 # Bring down/up internal router-1
1661 verifyRouterFailure( main, "bgp1", [], [ "rh22v6" ] )
1662 # Bring down/up internal router-2
1663 verifyRouterFailure( main, "bgp2", [ "rh5v4" ], [ "rh11v6", "rh5v6" ] )
1664 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )