blob: ca1ff80c8f0bf1303d0836434f731ae80f39a61e [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 """
105 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
106 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 )
128 verifyLinkFailure( main, ipv6=False, external=False )
129 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800130
131 def CASE102( self, main ):
132 """
133 Kill and recover links
134 Ping between all ipv6 hosts in the topology.
135 """
You Wangd66de192018-04-30 17:30:12 -0700136 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
137 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
138 main.case( "Test link failures with IPv6 hosts" )
139 setupTest( main, test_idx=102, onosNodes=3, ipv4=False, external=False )
140 verify( main, ipv4=False, external=False, disconnected=False )
141 verifyLinkFailure( main, ipv4=False, external=False )
142 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800143
144 def CASE103( self, main ):
145 """
146 Kill and recover links
147 Ping between all ipv4 and ipv6 hosts in the topology.
148 """
You Wangd66de192018-04-30 17:30:12 -0700149 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
150 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
151 main.case( "Test link failures with IPv4 and IPv6 hosts" )
152 setupTest( main, test_idx=103, onosNodes=3, external=False )
153 verify( main, external=False, disconnected=False )
154 verifyLinkFailure( main, external=False )
155 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800156
157 def CASE104( self, main ):
158 """
159 Kill and recover links
160 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
161 """
You Wangd66de192018-04-30 17:30:12 -0700162 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
163 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
164 main.case( "Test link failures with IPv4 hosts including external hosts" )
165 setupTest( main, test_idx=104, onosNodes=3, ipv6=False )
166 verify( main, ipv6=False, disconnected=False )
167 verifyLinkFailure( main, ipv6=False )
168 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800169
170 def CASE105( self, main ):
171 """
172 Kill and recover links
173 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
174 """
You Wangd66de192018-04-30 17:30:12 -0700175 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
176 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
177 main.case( "Test link failures with IPv6 hosts including external hosts" )
178 setupTest( main, test_idx=105, onosNodes=3, ipv4=False )
179 verify( main, ipv4=False, disconnected=False )
180 verifyLinkFailure( main, ipv4=False )
181 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800182
183 def CASE106( self, main ):
184 """
185 Kill and recover links
186 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
187 """
You Wangd66de192018-04-30 17:30:12 -0700188 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
189 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
190 main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts" )
191 setupTest( main, test_idx=106, onosNodes=3 )
192 verify( main, disconnected=False )
193 verifyLinkFailure( main )
194 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800195
196 def CASE107( self, main ):
197 """
198 Kill and recover links
199 Ping between ipv4 hosts and an external host that is not configured in
200 external router config, but reachable through the use of route-add command.
201 """
You Wangd66de192018-04-30 17:30:12 -0700202 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
203 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
204 main.case( "Test link failures with IPv4 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700205 setupTest( main, test_idx=107, onosNodes=3, ipv6=False, external=False, static=True )
206 main.externalIpv4Hosts = main.staticIpv4Hosts
207 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700208 verify( main, ipv6=False, disconnected=False )
209 verifyLinkFailure( main, ipv6=False, internal=False )
210 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800211
212 def CASE108( self, main ):
213 """
214 Kill and recover links
215 Ping between ipv6 hosts and an external host that is not configured in
216 external router config, but reachable through the use of route-add command.
217 """
You Wangd66de192018-04-30 17:30:12 -0700218 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
219 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
220 main.case( "Test link failures with IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700221 setupTest( main, test_idx=108, onosNodes=3, ipv4=False, external=False, static=True )
222 main.externalIpv4Hosts = main.staticIpv4Hosts
223 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700224 verify( main, ipv4=False, disconnected=False )
225 verifyLinkFailure( main, ipv4=False, internal=False )
226 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800227
228 def CASE109( self, main ):
229 """
230 Kill and recover links
231 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
232 external router config, but reachable through the use of route-add command.
233 """
You Wangd66de192018-04-30 17:30:12 -0700234 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
235 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
236 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 -0700237 setupTest( main, test_idx=109, onosNodes=3, external=False, static=True )
238 main.externalIpv4Hosts = main.staticIpv4Hosts
239 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700240 verify( main, disconnected=False )
241 verifyLinkFailure( main, internal=False )
242 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800243
You Wang27317572018-03-06 12:13:11 -0800244 def CASE201( self, main ):
245 """
246 Kill and recover spine switches
247 Ping between all ipv4 hosts in the topology.
248 """
You Wangd66de192018-04-30 17:30:12 -0700249 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
250 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
251 main.case( "Test switch failures with IPv4 hosts" )
252 setupTest( main, test_idx=201, onosNodes=3, ipv6=False, external=False )
253 verify( main, ipv6=False, external=False, disconnected=False )
254 verifySwitchFailure( main, ipv6=False, external=False )
255 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800256
257 def CASE202( self, main ):
258 """
259 Kill and recover spine switches
260 Ping between all ipv6 hosts in the topology.
261 """
You Wangd66de192018-04-30 17:30:12 -0700262 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
263 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
264 main.case( "Test switch failures with IPv6 hosts" )
265 setupTest( main, test_idx=202, onosNodes=3, ipv4=False, external=False )
266 verify( main, ipv4=False, external=False, disconnected=False )
267 verifySwitchFailure( main, ipv4=False, external=False )
268 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800269
270 def CASE203( self, main ):
271 """
272 Kill and recover spine switches
273 Ping between all ipv4 and ipv6 hosts in the topology.
274 """
You Wangd66de192018-04-30 17:30:12 -0700275 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
276 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
277 main.case( "Test switch failures with IPv4 and IPv6 hosts" )
278 setupTest( main, test_idx=203, onosNodes=3, external=False )
279 verify( main, external=False, disconnected=False )
280 verifySwitchFailure( main, external=False )
281 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800282
283 def CASE204( self, main ):
284 """
285 Kill and recover spine switches
286 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
287 """
You Wangd66de192018-04-30 17:30:12 -0700288 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
289 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
290 main.case( "Test switch failures with IPv4 hosts including external hosts" )
291 setupTest( main, test_idx=204, onosNodes=3, ipv6=False )
292 verify( main, ipv6=False, disconnected=False )
293 verifySwitchFailure( main, ipv6=False )
294 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800295
296 def CASE205( self, main ):
297 """
298 Kill and recover spine switches
299 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
300 """
You Wangd66de192018-04-30 17:30:12 -0700301 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
302 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
303 main.case( "Test switch failures with IPv6 hosts including external hosts" )
304 setupTest( main, test_idx=205, onosNodes=3, ipv4=False )
305 verify( main, ipv4=False, disconnected=False )
306 verifySwitchFailure( main, ipv4=False )
307 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800308
309 def CASE206( self, main ):
310 """
311 Kill and recover spine switches
312 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
313 """
You Wangd66de192018-04-30 17:30:12 -0700314 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
315 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
316 main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts" )
317 setupTest( main, test_idx=206, onosNodes=3 )
318 verify( main, disconnected=False )
319 verifySwitchFailure( main )
320 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800321
322 def CASE207( self, main ):
323 """
324 Kill and recover spine switches
325 Ping between ipv4 hosts and an external host that is not configured in
326 external router config, but reachable through the use of route-add command.
327 """
You Wangd66de192018-04-30 17:30:12 -0700328 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
329 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
330 main.case( "Test switch failures with IPv4 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700331 setupTest( main, test_idx=207, onosNodes=3, ipv6=False, external=False, static=True )
332 main.externalIpv4Hosts = main.staticIpv4Hosts
333 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700334 verify( main, ipv6=False, disconnected=False )
335 verifySwitchFailure( main, ipv6=False, internal=False )
336 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800337
338 def CASE208( self, main ):
339 """
340 Kill and recover spine switches
341 Ping between ipv6 hosts and an external host that is not configured in
342 external router config, but reachable through the use of route-add command.
343 """
You Wangd66de192018-04-30 17:30:12 -0700344 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
345 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
346 main.case( "Test switch failures with IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700347 setupTest( main, test_idx=208, onosNodes=3, ipv4=False, external=False, static=True )
348 main.externalIpv4Hosts = main.staticIpv4Hosts
349 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700350 verify( main, ipv4=False, disconnected=False )
351 verifySwitchFailure( main, ipv4=False, internal=False )
352 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang27317572018-03-06 12:13:11 -0800353
354 def CASE209( self, main ):
355 """
356 Kill and recover spine switches
357 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
358 external router config, but reachable through the use of route-add command.
359 """
You Wangd66de192018-04-30 17:30:12 -0700360 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
361 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
362 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 -0700363 setupTest( main, test_idx=209, onosNodes=3, external=False, static=True )
364 main.externalIpv4Hosts = main.staticIpv4Hosts
365 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700366 verify( main, disconnected=False )
367 verifySwitchFailure( main, internal=False )
368 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800369
Jon Hall3c910162018-03-07 14:42:16 -0800370 def CASE301( self, main ):
371 """
You Wangd66de192018-04-30 17:30:12 -0700372 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800373 Ping between all ipv4 hosts in the topology.
374 """
You Wangd66de192018-04-30 17:30:12 -0700375 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
376 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
377 main.case( "Test onos failures with IPv4 hosts" )
378 setupTest( main, test_idx=301, onosNodes=3, ipv6=False, external=False )
379 verify( main, ipv6=False, external=False, disconnected=False )
380 verifyOnosFailure( main, ipv6=False, external=False )
381 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800382
383 def CASE302( self, main ):
384 """
You Wangd66de192018-04-30 17:30:12 -0700385 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800386 Ping between all ipv6 hosts in the topology.
387 """
You Wangd66de192018-04-30 17:30:12 -0700388 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
389 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
390 main.case( "Test onos failures with IPv6 hosts" )
391 setupTest( main, test_idx=302, onosNodes=3, ipv4=False, external=False )
392 verify( main, ipv4=False, external=False, disconnected=False )
393 verifyOnosFailure( main, ipv4=False, external=False )
394 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800395
396 def CASE303( self, main ):
397 """
You Wangd66de192018-04-30 17:30:12 -0700398 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800399 Ping between all ipv4 and ipv6 hosts in the topology.
400 """
You Wangd66de192018-04-30 17:30:12 -0700401 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
402 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
403 main.case( "Test onos failures with IPv4 and IPv6 hosts" )
404 setupTest( main, test_idx=303, onosNodes=3, external=False )
405 verify( main, external=False, disconnected=False )
406 verifyOnosFailure( main, external=False )
407 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800408
409 def CASE304( self, main ):
410 """
You Wangd66de192018-04-30 17:30:12 -0700411 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800412 Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
413 """
You Wangd66de192018-04-30 17:30:12 -0700414 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
415 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
416 main.case( "Test onos failures with IPv4 hosts including external hosts" )
417 setupTest( main, test_idx=304, onosNodes=3, ipv6=False )
418 verify( main, ipv6=False, disconnected=False )
419 verifyOnosFailure( main, ipv6=False )
420 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800421
422 def CASE305( self, main ):
423 """
You Wangd66de192018-04-30 17:30:12 -0700424 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800425 Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
426 """
You Wangd66de192018-04-30 17:30:12 -0700427 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
428 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
429 main.case( "Test onos failures with IPv6 hosts including external hosts" )
430 setupTest( main, test_idx=305, onosNodes=3, ipv4=False )
431 verify( main, ipv4=False, disconnected=False )
432 verifyOnosFailure( main, ipv4=False )
433 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800434
435 def CASE306( self, main ):
436 """
You Wangd66de192018-04-30 17:30:12 -0700437 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800438 Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
439 """
You Wangd66de192018-04-30 17:30:12 -0700440 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
441 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
442 main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts" )
443 setupTest( main, test_idx=306, onosNodes=3 )
444 verify( main, disconnected=False )
445 verifyOnosFailure( main )
446 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800447
448 def CASE307( self, main ):
449 """
You Wangd66de192018-04-30 17:30:12 -0700450 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800451 Ping between ipv4 hosts and an external host that is not configured in
452 external router config, but reachable through the use of route-add command.
453 """
You Wangd66de192018-04-30 17:30:12 -0700454 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
455 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
456 main.case( "Test onos failures with IPv4 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700457 setupTest( main, test_idx=307, onosNodes=3, ipv6=False, external=False, static=True )
458 main.externalIpv4Hosts = main.staticIpv4Hosts
459 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700460 verify( main, ipv6=False, disconnected=False )
461 verifyOnosFailure( main, ipv6=False, internal=False )
462 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800463
464 def CASE308( self, main ):
465 """
You Wangd66de192018-04-30 17:30:12 -0700466 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800467 Ping between ipv6 hosts and an external host that is not configured in
468 external router config, but reachable through the use of route-add command.
469 """
You Wangd66de192018-04-30 17:30:12 -0700470 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
471 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
472 main.case( "Test onos failures with IPv6 hosts including external hosts configured with route-add command" )
You Wang4efd66b2018-06-12 14:47:26 -0700473 setupTest( main, test_idx=308, onosNodes=3, ipv4=False, external=False, static=True )
474 main.externalIpv4Hosts = main.staticIpv4Hosts
475 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700476 verify( main, ipv4=False, disconnected=False )
477 verifyOnosFailure( main, ipv4=False, internal=False )
478 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jon Hall3c910162018-03-07 14:42:16 -0800479
480 def CASE309( self, main ):
481 """
You Wangd66de192018-04-30 17:30:12 -0700482 Kill and recover onos nodes
Jon Hall3c910162018-03-07 14:42:16 -0800483 Ping between ipv4 and pv6 hosts and external hosts that is not configured in
484 external router config, but reachable through the use of route-add command.
485 """
You Wangd66de192018-04-30 17:30:12 -0700486 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
487 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
488 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 -0700489 setupTest( main, test_idx=309, onosNodes=3, external=False, static=True )
490 main.externalIpv4Hosts = main.staticIpv4Hosts
491 main.externalIpv6Hosts = main.staticIpv6Hosts
You Wangd66de192018-04-30 17:30:12 -0700492 verify( main, disconnected=False )
493 verifyOnosFailure( main, internal=False )
494 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Andreas Pantelopoulosfab6bf32018-03-06 18:56:35 -0800495
Jon Halla604fd42018-05-04 14:27:27 -0700496 def CASE601( self, main ):
497 """
498 Bring down all switches
499 Verify Topology
500 Bring up all switches
501 Verify
502
503 repeat x3
504 """
505 import time
506 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
507 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
508 main.case( "Bring down all switches then recover" )
509 setupTest( main, test_idx=601, external=False )
510 main.Cluster.next().CLI.balanceMasters()
511 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
512 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
513 totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
514 totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] )
515 switchList = [ 'spine101', 'spine102', 'spine103', 'spine104',
516 'leaf1', 'leaf2', 'leaf3', 'leaf4', 'leaf5', 'leaf6' ]
517 verify( main, disconnected=False, external=False )
518 for i in range( 1, 4 ):
519 main.log.info( "Beginning iteration {} of stopping then starting all switches".format( i ) )
520 main.log.debug( main.Cluster.next().summary() )
521 # Bring down all switches
522 main.step( "Stopping switches - iteration " + str( i ) )
523 switchStop = main.TRUE
524 for switch in switchList:
525 switchStop = switchStop and main.Network.switch( SW=switch, OPTION="stop" )
526 utilities.assert_equals( expect=main.TRUE, actual=switchStop,
527 onpass="All switches stopped",
528 onfail="Failed to stop all switches" )
529
530 time.sleep( 60 )
531 lib.verifyTopology( main, 0, 0, main.Cluster.numCtrls )
532 # Bring up all switches
533 main.log.debug( main.Cluster.next().summary() )
534 main.step( "Starting switches - iteration " + str( i ) )
535 switchStart = main.TRUE
536 for switch in switchList:
537 switchStart = switchStart and main.Network.switch( SW=switch, OPTION="start" )
538 utilities.assert_equals( expect=main.TRUE, actual=switchStart,
539 onpass="All switches started",
540 onfail="Failed to start all switches" )
541
542 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
543 lib.verifyTopology( main, totalSwitches, totalLinks, main.Cluster.numCtrls )
544 main.log.debug( main.Cluster.next().summary() )
545 time.sleep( 60 )
546 main.log.debug( main.Cluster.next().summary() )
547 time.sleep( 60 )
548 main.log.debug( main.Cluster.next().summary() )
549 verifyPing( main )
550 verify( main, disconnected=False, external=False )
551 verify( main, disconnected=False, external=False )
552 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
553
You Wangc02f3be2018-05-18 12:14:23 -0700554 def CASE602( self, main ):
555 """"
556 Take down a leaf switch that is paired and has a dual homed host
557 Restore the leaf switch
558 Repeat for various dual homed hosts and paired switches
559 """
560 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
561 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
562 main.case( "Drop a leaf switch that is paired and has a dual homed host." )
563 setupTest( main, test_idx=602, onosNodes=3 )
564 verify( main, disconnected=False )
You Wangbe98fb12018-05-24 16:15:17 -0700565 # We need to disable ports toward dual-homed hosts before killing the leaf switch
566 portsToDisable = [ [ "of:0000000000000002", 7 ], [ "of:0000000000000002", 8 ],
567 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ] ]
568 lib.disablePortBatch( main, portsToDisable, 10, 48, 5 )
You Wangc02f3be2018-05-18 12:14:23 -0700569 # Kill leaf-2
570 lib.killSwitch( main, "leaf2", 9, 38 )
You Wangbe98fb12018-05-24 16:15:17 -0700571 # FIXME: the downed interfaces on h4v6 and h5v6 won't disappear because they are
572 # configured by netcfg
You Wangc02f3be2018-05-18 12:14:23 -0700573 hostLocations = { "h4v6": "of:0000000000000003/6",
You Wangbe98fb12018-05-24 16:15:17 -0700574 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
You Wangc02f3be2018-05-18 12:14:23 -0700575 "h4v4": "of:0000000000000003/10",
576 "h5v4": "of:0000000000000003/11" }
577 lib.verifyHostLocations( main, hostLocations )
578 main.disconnectedIpv4Hosts = [ "h3v4" ]
579 main.disconnectedIpv6Hosts = [ "h3v6" ]
580 verify( main )
581 # Recover leaf-2
You Wangbe98fb12018-05-24 16:15:17 -0700582 lib.recoverSwitch( main, "leaf2", 10, 48, rediscoverHosts=True )
You Wangc02f3be2018-05-18 12:14:23 -0700583 hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ],
584 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
585 "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ],
586 "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] }
587 lib.verifyHostLocations( main, hostLocations )
588 main.disconnectedIpv4Hosts = []
589 main.disconnectedIpv6Hosts = []
590 verify( main, disconnected=False )
You Wangbe98fb12018-05-24 16:15:17 -0700591 # We need to disable ports toward dual-homed hosts before killing the leaf switch
592 portsToDisable = [ [ "of:0000000000000004", 7 ], [ "of:0000000000000004", 8 ],
593 [ "of:0000000000000004", 10 ], [ "of:0000000000000004", 11 ] ]
594 lib.disablePortBatch( main, portsToDisable, 10, 48, 5 )
You Wangc02f3be2018-05-18 12:14:23 -0700595 # Kill leaf-4
596 lib.killSwitch( main, "leaf4", 9, 38 )
You Wangbe98fb12018-05-24 16:15:17 -0700597 hostLocations = { "h9v6": [ "of:0000000000000004/7", "of:0000000000000005/6" ],
598 "h10v6": [ "of:0000000000000004/8", "of:0000000000000005/7" ],
You Wangc02f3be2018-05-18 12:14:23 -0700599 "h9v4": "of:0000000000000005/9",
600 "h10v4": "of:0000000000000005/10" }
601 lib.verifyHostLocations( main, hostLocations )
602 main.disconnectedIpv4Hosts = [ "h8v4" ]
603 main.disconnectedIpv6Hosts = [ "h8v6" ]
604 verify( main )
605 # Recover leaf-4
You Wangbe98fb12018-05-24 16:15:17 -0700606 lib.recoverSwitch( main, "leaf4", 10, 48, rediscoverHosts=True )
You Wangc02f3be2018-05-18 12:14:23 -0700607 hostLocations = { "h9v6": [ "of:0000000000000004/7", "of:0000000000000005/6" ],
608 "h10v6": [ "of:0000000000000004/8", "of:0000000000000005/7" ],
609 "h9v4": [ "of:0000000000000004/10", "of:0000000000000005/9" ],
610 "h10v4": [ "of:0000000000000004/11", "of:0000000000000005/10" ] }
611 lib.verifyHostLocations( main, hostLocations )
612 main.disconnectedIpv4Hosts = []
613 main.disconnectedIpv6Hosts = []
614 verify( main, disconnected=False )
615 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
616
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700617 def CASE603( self, main ):
618 """"
619 Drop HAGG-1 device and test connectivity.
620 Drop DAAS-1 device and test connectivity (some hosts lost it)
621 Bring up DAAS-1 and test connectivity (all hosts gained it again)
622
623 Repeat the same with HAGG-2 and DAAS-2.
624 """
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700625 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
626 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
627 main.case( "Drop hagg spine switch along with dass leaf switch." )
628 setupTest( main, test_idx=603, onosNodes=3 )
629 main.disconnectedIpv4Hosts = []
630 main.disconnectedIpv6Hosts = []
631
632 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700633 lib.killSwitch( main, "spine103",
634 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
635 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700636 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700637 lib.killSwitch( main, "leaf6",
638 int( main.params[ "TOPO" ]["switchNum" ] ) - 2,
639 int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700640 main.disconnectedIpv4Hosts = [ 'h12v4', 'h13v4']
641 main.disconnectedIpv6Hosts = [ 'h12v6', 'h13v6']
642 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700643 lib.recoverSwitch( main, "leaf6",
644 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
645 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6,
646 rediscoverHosts=True)
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700647 main.disconnectedIpv4Hosts = []
648 main.disconnectedIpv6Hosts = []
649 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700650 lib.recoverSwitch( main, "spine103",
651 int( main.params[ "TOPO" ][ "switchNum" ] ),
652 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700653 verify( main )
654
Jon Halla604fd42018-05-04 14:27:27 -0700655 lib.killSwitch( main, "spine104",
656 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
657 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700658 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700659 lib.killSwitch( main, "leaf1",
660 int( main.params[ "TOPO" ]["switchNum" ] ) - 2,
661 int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700662 main.disconnectedIpv4Hosts = [ 'h1v4', 'h2v4']
663 main.disconnectedIpv6Hosts = [ 'h1v6', 'h2v6']
664 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700665 lib.recoverSwitch( main, "leaf1",
666 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
667 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6,
668 rediscoverHosts=True )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700669 main.disconnectedIpv4Hosts = []
670 main.disconnectedIpv6Hosts = []
671 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700672 lib.recoverSwitch( main, "spine104",
673 int( main.params[ "TOPO" ][ "switchNum" ] ),
674 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700675 verify( main )
676
677 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
678
679 def CASE604( self, main ):
680 """"
681 Drop HAGG-1 device and test connectivity.
682 Bring up HAGG-1 and test connectivity.
683 Drop HAGG-2 device and test connectivity.
684 Bring up HAGG-2 device and test connectivity
685 """
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700686 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
687 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
688 main.case( "Drop hagg spine switches." )
689 setupTest( main, test_idx=604, onosNodes=3 )
690 main.disconnectedIpv4Hosts = []
691 main.disconnectedIpv6Hosts = []
692 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700693 lib.killSwitch( main, "spine103",
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.recoverSwitch( main, "spine103",
698 int( main.params[ "TOPO" ][ "switchNum" ] ),
699 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700700 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700701 lib.killSwitch( main, "spine104",
702 int( main.params[ "TOPO" ]["switchNum" ] ) - 1,
703 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700704 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700705 lib.recoverSwitch( main, "spine104",
706 int( main.params[ "TOPO" ][ "switchNum" ] ),
707 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Andreas Pantelopoulos74c7ff22018-05-01 15:42:02 -0700708 verify( main )
709 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
710
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700711 def CASE605( self, main ):
712 """
713 Drop HAGG-1 and test connectivity (expect no failure)
714 Drop all leafs in big fabric and test connectivity (expect some failures)
715 Bring up HAGG-1 and test connectivity (still expect some failures)
716 Bring up all leafs in big fabric and test connectivity (expect no failure)
717 Repeat above with HAGG-2
718 """
719 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
720 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
721 main.case( "Drop one hagg and all leafs in big fabric" )
722 setupTest( main, test_idx=605, onosNodes=3 )
723 main.disconnectedIpv4Hosts = []
724 main.disconnectedIpv6Hosts = []
725 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700726 lib.killSwitch( main, "spine103",
727 int( main.params[ "TOPO" ][ "switchNum" ] ) - 1,
728 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700729 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700730 lib.killSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
731 int( main.params[ "TOPO" ][ "switchNum" ] ) - 5,
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700732 int( main.params[ "TOPO" ][ "linkNum" ] ) - 42 )
733 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4" ]
734 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6" ]
735 main.disconnectedExternalIpv4Hosts = [ "rh1v4", "rh2v4", "rh5v4" ]
736 main.disconnectedExternalIpv6Hosts = [ "rh1v6", "rh11v6", "rh5v6", "rh2v6", "rh22v6" ]
737 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700738 lib.recoverSwitch( main, "spine103",
739 int( main.params[ "TOPO" ][ "switchNum" ] ) - 4,
740 int( main.params[ "TOPO" ][ "linkNum" ] ) - 36 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700741 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700742 lib.recoverSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
743 int( main.params[ "TOPO" ][ "switchNum" ] ),
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700744 int( main.params[ "TOPO" ][ "linkNum" ] ) )
745 main.disconnectedIpv4Hosts = []
746 main.disconnectedIpv6Hosts = []
747 main.disconnectedExternalIpv4Hosts = [ ]
748 main.disconnectedExternalIpv6Hosts = [ ]
749 verify( main )
750
Jon Halla604fd42018-05-04 14:27:27 -0700751 lib.killSwitch( main, "spine104",
752 int( main.params[ "TOPO" ][ "switchNum" ] ) - 1,
753 int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700754 verify( main )
Jon Halla604fd42018-05-04 14:27:27 -0700755 lib.killSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
756 int( main.params[ "TOPO" ][ "switchNum" ] ) - 5,
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700757 int( main.params[ "TOPO" ][ "linkNum" ] ) - 42 )
758 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4" ]
759 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6" ]
760 main.disconnectedExternalIpv4Hosts = [ "rh1v4", "rh2v4", "rh5v4" ]
761 main.disconnectedExternalIpv6Hosts = [ "rh1v6", "rh11v6", "rh5v6", "rh2v6", "rh22v6" ]
762 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700763 lib.recoverSwitch( main, "spine104",
764 int( main.params[ "TOPO" ][ "switchNum" ] ) - 4,
765 int( main.params[ "TOPO" ][ "linkNum" ] ) - 36 )
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700766 verify( main, disconnected=True )
Jon Halla604fd42018-05-04 14:27:27 -0700767 lib.recoverSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ],
768 int( main.params[ "TOPO" ][ "switchNum" ] ),
Jonghwan Hyun3759e472018-05-01 15:40:08 -0700769 int( main.params[ "TOPO" ][ "linkNum" ] ) )
770 main.disconnectedIpv4Hosts = []
771 main.disconnectedIpv6Hosts = []
772 main.disconnectedExternalIpv4Hosts = [ ]
773 main.disconnectedExternalIpv6Hosts = [ ]
774 verify( main )
775 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
776
You Wang5da39c82018-04-26 22:55:08 -0700777 def CASE606( self, main ):
778 """
779 Drop SPINE-1 and test connectivity
780 Drop paired leaf and test connectivity (expect some failures)
781 Bring up SPINE-1 and test connectivity (still expect some failures)
782 Bring up the paired leaf and test connectivity
783 Repeat above with SPINE-2 and a different paired leaf
784 """
You Wang5da39c82018-04-26 22:55:08 -0700785 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
786 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
787 main.case( "Drop spine and paired leaf" )
788 setupTest( main, test_idx=606, onosNodes=3 )
You Wangd66de192018-04-30 17:30:12 -0700789 verify( main, disconnected=False )
You Wang6d2d6312018-05-08 12:02:02 -0700790 # Drop spine101 and leaf-2/3
You Wangd66de192018-04-30 17:30:12 -0700791 lib.killSwitch( main, "spine101", 9, 30 )
792 verify( main, disconnected=False )
793 lib.killSwitch( main, "leaf2", 8, 24 )
794 lib.killSwitch( main, "leaf3", 7, 20 )
You Wang5da39c82018-04-26 22:55:08 -0700795 main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4" ]
796 main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6" ]
You Wangd66de192018-04-30 17:30:12 -0700797 verify( main )
798 lib.recoverSwitch( main, "spine101", 8, 30 )
799 verify( main )
800 lib.recoverSwitch( main, "leaf3", 9, 38 )
You Wang6d2d6312018-05-08 12:02:02 -0700801 lib.recoverSwitch( main, "leaf2", 10, 48, rediscoverHosts=True,
802 hostsToDiscover=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts )
You Wang5da39c82018-04-26 22:55:08 -0700803 main.disconnectedIpv4Hosts = []
804 main.disconnectedIpv6Hosts = []
You Wang6d2d6312018-05-08 12:02:02 -0700805 verify( main, disconnected=False )
806 # Drop spine102 and leaf-4/5
807 lib.killSwitch( main, "spine102", 9, 30 )
808 verify( main, disconnected=False )
809 lib.killSwitch( main, "leaf4", 8, 24 )
810 lib.killSwitch( main, "leaf5", 7, 20 )
811 main.disconnectedIpv4Hosts = [ "h8v4", "h9v4", "h10v4", "h11v4" ]
812 main.disconnectedIpv6Hosts = [ "h8v6", "h9v6", "h10v6", "h11v6" ]
813 verify( main, external=False )
814 lib.recoverSwitch( main, "spine102", 8, 30 )
815 verify( main, external=False )
816 lib.recoverSwitch( main, "leaf5", 9, 38 )
817 lib.recoverSwitch( main, "leaf4", 10, 48, rediscoverHosts=True,
818 hostsToDiscover=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts )
819 main.disconnectedIpv4Hosts = []
820 main.disconnectedIpv6Hosts = []
821 verify( main, disconnected=False )
822 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
823
824 def CASE620( self, main ):
825 """
826 Take down one of double links towards the spine from all leaf switches and
827 check that buckets in select groups change accordingly
828 Bring up links again and check that buckets in select groups change accordingly
829 """
You Wang6d2d6312018-05-08 12:02:02 -0700830 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
831 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
832 main.case( "Take down one of double links towards the spine" )
833 setupTest( main, test_idx=620, onosNodes=3 )
834 verify( main, disconnected=False )
You Wangc02f3be2018-05-18 12:14:23 -0700835 groupBuckets = { "of:0000000000000002": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
836 "10.2.0.0/24": 1, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
837 "10.2.10.0/24": 4, "10.2.40.0/24": 4,
838 "10.3.0.0/24": 4, "10.3.10.0/24": 8, "10.3.30.0/24": 8,
839 "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 },
840 "of:0000000000000003": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
841 "10.2.0.0/24": 4, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
842 "10.2.10.0/24": 1, "10.2.40.0/24": 1,
843 "10.3.0.0/24": 4, "10.3.10.0/24": 8, "10.3.30.0/24": 8,
844 "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 },
845 "of:0000000000000004": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
846 "10.2.0.0/24": 4, "10.2.30.0/24": 8, "10.2.20.0/24": 8,
847 "10.2.10.0/24": 4, "10.2.40.0/24": 4,
848 "10.3.0.0/24": 1, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
849 "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 },
850 "of:0000000000000005": { "10.1.0.0/24": 4, "10.1.10.0/24": 4,
851 "10.2.0.0/24": 4, "10.2.30.0/24": 8, "10.2.20.0/24": 8,
852 "10.2.10.0/24": 4, "10.2.40.0/24": 4,
853 "10.3.0.0/24": 4, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
854 "10.3.20.0/24": 1, "10.5.10.0/24": 4, "10.5.20.0/24": 4 } }
855 for switch, subnets in groupBuckets.items():
856 lib.checkGroupsForBuckets( main, switch, subnets )
857 # Take down one of double links
You Wang6d2d6312018-05-08 12:02:02 -0700858 portsToDisable = [ [ "of:0000000000000002", 1 ], [ "of:0000000000000002", 3 ],
859 [ "of:0000000000000003", 1 ], [ "of:0000000000000003", 3 ],
860 [ "of:0000000000000004", 1 ], [ "of:0000000000000004", 3 ],
861 [ "of:0000000000000005", 1 ], [ "of:0000000000000005", 3 ] ]
You Wang85747762018-05-11 15:51:50 -0700862 lib.disablePortBatch( main, portsToDisable, 10, 32 )
You Wangc02f3be2018-05-18 12:14:23 -0700863 groupBucketsNew = { "of:0000000000000002": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
864 "10.2.0.0/24": 1, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
865 "10.2.10.0/24": 2, "10.2.40.0/24": 2,
866 "10.3.0.0/24": 2, "10.3.10.0/24": 4, "10.3.30.0/24": 4,
867 "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 },
868 "of:0000000000000003": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
869 "10.2.0.0/24": 2, "10.2.30.0/24": 1, "10.2.20.0/24": 1,
870 "10.2.10.0/24": 1, "10.2.40.0/24": 1,
871 "10.3.0.0/24": 2, "10.3.10.0/24": 4, "10.3.30.0/24": 4,
872 "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 },
873 "of:0000000000000004": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
874 "10.2.0.0/24": 2, "10.2.30.0/24": 4, "10.2.20.0/24": 4,
875 "10.2.10.0/24": 2, "10.2.40.0/24": 2,
876 "10.3.0.0/24": 1, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
877 "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 },
878 "of:0000000000000005": { "10.1.0.0/24": 2, "10.1.10.0/24": 2,
879 "10.2.0.0/24": 2, "10.2.30.0/24": 4, "10.2.20.0/24": 4,
880 "10.2.10.0/24": 2, "10.2.40.0/24": 2,
881 "10.3.0.0/24": 2, "10.3.10.0/24": 1, "10.3.30.0/24": 1,
882 "10.3.20.0/24": 1, "10.5.10.0/24": 2, "10.5.20.0/24": 2 } }
883 for switch, subnets in groupBucketsNew.items():
884 lib.checkGroupsForBuckets( main, switch, subnets )
You Wang6d2d6312018-05-08 12:02:02 -0700885 verify( main, disconnected=False )
You Wangc02f3be2018-05-18 12:14:23 -0700886 # Bring up the links
You Wang85747762018-05-11 15:51:50 -0700887 lib.enablePortBatch( main, portsToDisable, 10, 48 )
You Wangc02f3be2018-05-18 12:14:23 -0700888 for switch, subnets in groupBuckets.items():
889 lib.checkGroupsForBuckets( main, switch, subnets )
You Wang6d2d6312018-05-08 12:02:02 -0700890 verify( main, disconnected=False )
891 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
892
893 def CASE621( self, main ):
894 """
895 Remove all the links in the network and restore all Links (repeat x3)
896 """
897 import time
898 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
899 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
900 main.case( "Remove all the links in the network and restore all Links" )
901 setupTest( main, test_idx=621, onosNodes=3 )
902 verify( main, disconnected=False )
903 linksToRemove = [ ["spine101", "spine103"], ["spine102", "spine104"],
904 ["spine103", "leaf6"], ["spine103", "leaf1"],
905 ["spine104", "leaf6"], ["spine104", "leaf1"],
906 ["spine101", "leaf2"], ["spine101", "leaf3"], ["spine101", "leaf4"], ["spine101", "leaf5"],
907 ["spine102", "leaf2"], ["spine102", "leaf3"], ["spine102", "leaf4"], ["spine102", "leaf5"],
908 ["leaf2", "leaf3"], ["leaf4", "leaf5"] ]
909 portsToDisable = [ [ "of:0000000000000001", 3 ], [ "of:0000000000000001", 4 ],
910 [ "of:0000000000000001", 5 ], [ "of:0000000000000001", 6 ],
911 [ "of:0000000000000002", 6 ], [ "of:0000000000000002", 7 ],
912 [ "of:0000000000000002", 8 ], [ "of:0000000000000002", 9 ],
913 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ],
914 [ "of:0000000000000003", 6 ], [ "of:0000000000000003", 7 ],
915 [ "of:0000000000000003", 8 ], [ "of:0000000000000003", 9 ],
916 [ "of:0000000000000003", 10 ], [ "of:0000000000000003", 11 ],
917 [ "of:0000000000000003", 12 ], [ "of:0000000000000003", 13 ],
918 [ "of:0000000000000004", 6 ], [ "of:0000000000000004", 7 ],
919 [ "of:0000000000000004", 8 ], [ "of:0000000000000004", 9 ],
920 [ "of:0000000000000004", 10 ], [ "of:0000000000000004", 11 ],
921 [ "of:0000000000000004", 12 ], [ "of:0000000000000004", 13 ], [ "of:0000000000000004", 14 ],
922 [ "of:0000000000000005", 6 ], [ "of:0000000000000005", 7 ],
923 [ "of:0000000000000005", 8 ], [ "of:0000000000000005", 9 ],
924 [ "of:0000000000000005", 10 ], [ "of:0000000000000005", 11 ],
925 [ "of:0000000000000005", 12 ], [ "of:0000000000000005", 13 ],
926 [ "of:0000000000000005", 14 ], [ "of:0000000000000005", 15 ],
927 [ "of:0000000000000006", 3 ], [ "of:0000000000000006", 4 ],
928 [ "of:0000000000000006", 5 ], [ "of:0000000000000006", 6 ] ]
929 for i in range( 0, 3 ):
930 lib.killLinkBatch( main, linksToRemove, 0, 10 )
You Wang85747762018-05-11 15:51:50 -0700931 lib.disablePortBatch( main, portsToDisable, 10, 0 )
You Wang6d2d6312018-05-08 12:02:02 -0700932 main.disconnectedIpv4Hosts = main.internalIpv4Hosts
933 main.disconnectedIpv6Hosts = main.internalIpv6Hosts
934 verify( main )
935 lib.restoreLinkBatch( main, linksToRemove, 48, 10 )
You Wang85747762018-05-11 15:51:50 -0700936 lib.enablePortBatch( main, portsToDisable, 10, 48 )
You Wang6d2d6312018-05-08 12:02:02 -0700937 main.Network.discoverHosts( hostList=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts )
938 time.sleep( 10 )
939 main.disconnectedIpv4Hosts = []
940 main.disconnectedIpv6Hosts = []
941 verify( main )
942 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
943
944 def CASE622( self, main ):
945 """
946 Take down all uplinks from a paired leaf switch
947 """
You Wang6d2d6312018-05-08 12:02:02 -0700948 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
949 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
950 from core import utilities
951 main.case( "Take down all uplinks from a paired leaf switch" )
952 setupTest( main, test_idx=622, onosNodes=3 )
953 verify( main, disconnected=False )
You Wang85747762018-05-11 15:51:50 -0700954 hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ],
955 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
956 "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ],
957 "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] }
958 lib.verifyHostLocations( main, hostLocations )
You Wang6d2d6312018-05-08 12:02:02 -0700959 linksToRemove = [ ["spine101", "leaf2"], ["spine102", "leaf2"] ]
960 lib.killLinkBatch( main, linksToRemove, 40, 10 )
961 # TODO: more verifications are required
You Wangc02f3be2018-05-18 12:14:23 -0700962 main.disconnectedIpv4Hosts = [ "h3v4" ]
963 main.disconnectedIpv6Hosts = [ "h3v6" ]
You Wangd66de192018-04-30 17:30:12 -0700964 verify( main )
You Wang85747762018-05-11 15:51:50 -0700965 hostLocations = { "h4v6": "of:0000000000000003/6",
You Wangbe98fb12018-05-24 16:15:17 -0700966 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
You Wang85747762018-05-11 15:51:50 -0700967 "h4v4": "of:0000000000000003/10",
968 "h5v4": "of:0000000000000003/11" }
969 lib.verifyHostLocations( main, hostLocations )
You Wang6d2d6312018-05-08 12:02:02 -0700970 lib.restoreLinkBatch( main, linksToRemove, 48, 10 )
You Wangc02f3be2018-05-18 12:14:23 -0700971 main.disconnectedIpv4Hosts = []
972 main.disconnectedIpv6Hosts = []
973 verify( main, disconnected=False )
You Wang85747762018-05-11 15:51:50 -0700974 hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ],
975 "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ],
976 "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ],
977 "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] }
978 lib.verifyHostLocations( main, hostLocations )
You Wang6d2d6312018-05-08 12:02:02 -0700979 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
980
981 def CASE630( self, main ):
982 """
983 Bring an instance down
984 Drop a device
985 Bring that same instance up again and observe that this specific instance sees that the device is down.
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( "Bring an instance down and drop a device" )
991 setupTest( main, test_idx=630, onosNodes=3 )
992 onosToKill = 0
993 deviceToDrop = "spine101"
994 lib.killOnos( main, [ onosToKill ], 10, 48, 2 )
995 lib.killSwitch( main, deviceToDrop, 9, 30 )
996 lib.recoverOnos( main, [ onosToKill ], 9, 30, 3 )
997 result = main.Cluster.runningNodes[ onosToKill ].CLI.checkStatus( 9, 30, 3 )
998 utilities.assert_equals( expect=main.TRUE, actual=result,
999 onpass="ONOS instance {} sees correct device numbers".format( onosToKill ),
1000 onfail="ONOS instance {} doesn't see correct device numbers".format( onosToKill ) )
You Wang5da39c82018-04-26 22:55:08 -07001001 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001002
Jon Halla604fd42018-05-04 14:27:27 -07001003 def CASE640( self, main ):
1004 """
1005 Controller instance going down and switch coming down at the same time and then we bring them up together
1006
1007 A. Instance goes down and SPINE-1 goes down
1008 - All connectivity should be there
1009 - Bring them up together
1010 - All connectivity should be there
1011 B. Instance goes down and HAGG-1 goes down
1012 - All connectivity should be there
1013 - Bring them up together
1014 - All connectivity should be there
1015 C. Instance goes down and a paired leaf switch goes down
1016 - Single homed hosts in this leaf should lose connectivity all others should be ok
1017 - Bring them up together
1018 - Test connectivity
1019 """
1020 import time
1021 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1022 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1023 main.case( "Drop an ONOS instance and switch(es) at the same time" )
1024 caseDict = { 'A': { 'switches': "spine101",
You Wangbe98fb12018-05-24 16:15:17 -07001025 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001026 'disconnectedV4': [],
1027 'disconnectedV6': [],
1028 'expectedSwitches': 9,
1029 'expectedLinks': 30 },
1030 'B': { 'switches': "spine103",
You Wangbe98fb12018-05-24 16:15:17 -07001031 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001032 'disconnectedV4': [],
1033 'disconnectedV6': [],
1034 'expectedSwitches': 9,
1035 'expectedLinks': 42 },
1036 'C': { 'switches': "leaf2",
You Wangbe98fb12018-05-24 16:15:17 -07001037 'ports': [ [ "of:0000000000000002", 7 ], [ "of:0000000000000002", 8 ],
1038 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ] ],
Jon Halla604fd42018-05-04 14:27:27 -07001039 'disconnectedV4': [ "h3v4" ],
1040 'disconnectedV6': [ "h3v6" ],
1041 'expectedSwitches': 9,
1042 'expectedLinks': 38 } }
1043 totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
1044 totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] )
1045 nodeIndex = 0
1046 cases = sorted( caseDict.keys() )
1047 for case in cases:
1048 switches = caseDict[ case ][ 'switches' ]
You Wangbe98fb12018-05-24 16:15:17 -07001049 ports = caseDict[ case ][ 'ports' ]
Jon Halla604fd42018-05-04 14:27:27 -07001050 expectedSwitches = caseDict[ case ][ 'expectedSwitches' ]
1051 expectedLinks = caseDict[ case ][ 'expectedLinks' ]
1052 main.step( "\n640{}: Drop ONOS{} and switch(es) {} at the same time".format( case,
1053 nodeIndex + 1,
1054 switches ) )
1055 setupTest( main, test_idx=640 )
1056 main.Cluster.next().CLI.balanceMasters()
1057 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1058 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
1059 instance = main.Cluster.controllers[ nodeIndex ]
1060 verify( main, disconnected=False, external=False )
1061
1062 # Simultaneous failures
1063 main.step( "Kill ONOS{}: {}".format( nodeIndex + 1, instance.ipAddress ) )
1064 killResult = main.ONOSbench.onosDie( instance.ipAddress )
1065 utilities.assert_equals( expect=main.TRUE, actual=killResult,
1066 onpass="ONOS node killed",
1067 onfail="Failed to kill ONOS node" )
1068 instance.active = False
1069 main.Cluster.reset()
You Wangbe98fb12018-05-24 16:15:17 -07001070 if ports:
1071 lib.disablePortBatch( main, ports, 10, 48, 0 )
Jon Halla604fd42018-05-04 14:27:27 -07001072 # TODO: Remove sleeps from the concurrent events
1073 lib.killSwitch( main, switches, expectedSwitches, expectedLinks )
1074 main.disconnectedIpv4Hosts = caseDict[ case ][ 'disconnectedV4' ]
1075 main.disconnectedIpv6Hosts = caseDict[ case ][ 'disconnectedV6' ]
1076
1077 # verify functionality
1078 main.log.debug( main.Cluster.next().summary() )
1079 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
1080 main.log.debug( main.Cluster.next().summary() )
1081 lib.verifyTopology( main, expectedSwitches, expectedLinks, main.Cluster.numCtrls - 1 )
1082 lib.verifyNodes( main )
1083 verify( main, external=False )
1084
1085 # Bring everything back up
1086 lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True )
1087 main.disconnectedIpv4Hosts = []
1088 main.disconnectedIpv6Hosts = []
1089 lib.recoverOnos( main, [ nodeIndex ], expectedSwitches, expectedLinks, main.Cluster.numCtrls )
1090
1091 # Verify functionality
1092 lib.verifyNodes( main )
1093 verify( main, disconnected=False, external=False )
1094 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1095 nodeIndex = ( nodeIndex + 1 ) % main.Cluster.numCtrls
1096
1097 def CASE641( self, main ):
1098 """
1099 Controller instance going down while switch comes up at the same time
1100
1101 A. Take down SPINE-1
1102 - Test connectivity
1103 - Bring up SPINE-1 and drop an instance at the same time
1104 - Test connectivity
1105 - Bring up instance one
1106 - Test connectivity
1107 B. Take down HAGG-1
1108 - Test connectivity
1109 - Bring up HAGG-1 and drop an instance at the same time
1110 - Test connectivity
1111 - Bring up instance one
1112 - Test connectivity
1113 C. Take down a paired leaf switch
1114 - Test connectivity ( single homed hosts on this leaf will lose it )
1115 - Bring up paired leaf switch and drop a controller instance at the same time
1116 - Test connectivity
1117 - Bring up the instance
1118 - Test connectivity
1119 """
1120 import time
1121 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1122 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1123 main.case( "Drop an ONOS instance and recover switch(es) at the same time" )
1124 caseDict = { 'A': { 'switches': "spine101",
You Wangbe98fb12018-05-24 16:15:17 -07001125 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001126 'disconnectedV4': [],
1127 'disconnectedV6': [],
1128 'expectedSwitches': 9,
1129 'expectedLinks': 30 },
1130 'B': { 'switches': "spine103",
You Wangbe98fb12018-05-24 16:15:17 -07001131 'ports': [],
Jon Halla604fd42018-05-04 14:27:27 -07001132 'disconnectedV4': [],
1133 'disconnectedV6': [],
1134 'expectedSwitches': 9,
1135 'expectedLinks': 42 },
1136 'C': { 'switches': "leaf2",
You Wangbe98fb12018-05-24 16:15:17 -07001137 'ports': [ [ "of:0000000000000002", 7 ], [ "of:0000000000000002", 8 ],
1138 [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ] ],
Jon Halla604fd42018-05-04 14:27:27 -07001139 'disconnectedV4': [ "h3v4" ],
1140 'disconnectedV6': [ "h3v6" ],
1141 'expectedSwitches': 9,
1142 'expectedLinks': 38 } }
1143 totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
1144 totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] )
1145 nodeIndex = 0
1146 cases = sorted( caseDict.keys() )
1147 for case in cases:
1148 switches = caseDict[ case ][ 'switches' ]
You Wangbe98fb12018-05-24 16:15:17 -07001149 ports = caseDict[ case ][ 'ports' ]
Jon Halla604fd42018-05-04 14:27:27 -07001150 expectedSwitches = caseDict[ case ][ 'expectedSwitches' ]
1151 expectedLinks = caseDict[ case ][ 'expectedLinks' ]
1152 main.step( "\n641{}: Drop ONOS{} and recover switch(es) {} at the same time".format( case,
1153 nodeIndex + 1,
1154 switches ) )
1155 setupTest( main, test_idx=641 )
1156 main.Cluster.next().CLI.balanceMasters()
1157 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1158 main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts )
1159 instance = main.Cluster.controllers[ nodeIndex ]
1160 verify( main, disconnected=False, external=False )
1161 # Drop the switch to setup scenario
You Wangbe98fb12018-05-24 16:15:17 -07001162 if ports:
1163 lib.disablePortBatch( main, ports, 10, 48, 5 )
Jon Halla604fd42018-05-04 14:27:27 -07001164 lib.killSwitch( main, switches, expectedSwitches, expectedLinks )
1165 main.disconnectedIpv4Hosts = caseDict[ case ][ 'disconnectedV4' ]
1166 main.disconnectedIpv6Hosts = caseDict[ case ][ 'disconnectedV6' ]
1167 verify( main, external=False )
1168
1169 # Simultaneous node failure and switch recovery
1170 main.step( "Kill ONOS{}: {}".format( nodeIndex + 1, instance.ipAddress ) )
1171 killResult = main.ONOSbench.onosDie( instance.ipAddress )
1172 utilities.assert_equals( expect=main.TRUE, actual=killResult,
1173 onpass="ONOS node killed",
1174 onfail="Failed to kill ONOS node" )
1175 instance.active = False
1176 main.Cluster.reset()
1177 # TODO: Remove sleeps from the concurrent events
1178 lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True )
1179 main.disconnectedIpv4Hosts = []
1180 main.disconnectedIpv6Hosts = []
1181
1182 # verify functionality
1183 main.log.debug( main.Cluster.next().summary() )
Jon Halla604fd42018-05-04 14:27:27 -07001184 lib.verifyTopology( main, totalSwitches, totalLinks, main.Cluster.numCtrls - 1 )
1185 lib.verifyNodes( main )
1186 verify( main, disconnected=False, external=False )
1187
1188 # Bring everything back up and verify functionality
1189 lib.recoverOnos( main, [ nodeIndex ], totalSwitches, totalLinks, main.Cluster.numCtrls )
1190 lib.verifyNodes( main )
1191 verify( main, external=False )
1192 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1193 nodeIndex = ( nodeIndex + 1 ) % main.Cluster.numCtrls
1194
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001195 def CASE642( self, main ):
1196 """
1197 Drop one link from each double link
1198 Drop a link between DAAS-1 and HAAG-1
1199 Drop a link between HAGG-2 and SPINE-2
1200 Drop one ONOS instance
1201 Test connectivity (expect no failure)
1202 Bring up all links and ONOS instance
1203 Test connectivity (expect no failure)
1204 """
1205 import time
1206 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1207 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1208 main.case( "Drop ONOS instance and links at the same time" )
1209 setupTest( main, test_idx=642, onosNodes=3 )
1210 main.Cluster.active( 0 ).CLI.balanceMasters()
1211 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1212 verify( main )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001213 portsToDisable = [ [ "of:0000000000000001", 1 ], [ "of:0000000000000103", 1 ],
1214 [ "of:0000000000000006", 1 ], [ "of:0000000000000103", 2 ],
1215 [ "of:0000000000000101", 9 ], [ "of:0000000000000103", 3 ],
1216 [ "of:0000000000000002", 1 ], [ "of:0000000000000101", 1 ],
1217 [ "of:0000000000000003", 1 ], [ "of:0000000000000101", 3 ],
1218 [ "of:0000000000000004", 1 ], [ "of:0000000000000101", 5 ],
1219 [ "of:0000000000000005", 1 ], [ "of:0000000000000101", 7 ],
1220 [ "of:0000000000000002", 3 ], [ "of:0000000000000102", 1 ],
1221 [ "of:0000000000000003", 3 ], [ "of:0000000000000102", 3 ],
1222 [ "of:0000000000000004", 3 ], [ "of:0000000000000102", 5 ],
1223 [ "of:0000000000000005", 3 ], [ "of:0000000000000102", 7 ] ]
You Wang85747762018-05-11 15:51:50 -07001224 lib.disablePortBatch( main, portsToDisable,
1225 int( main.params[ "TOPO" ][ "switchNum" ] ),
1226 int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ),
1227 sleep=0 )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001228 lib.killOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1229 int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ), 2 )
1230 verify( main )
You Wang85747762018-05-11 15:51:50 -07001231 lib.enablePortBatch( main, portsToDisable,
1232 int( main.params[ "TOPO" ][ "switchNum" ] ),
1233 int( main.params[ "TOPO" ][ "linkNum" ] ),
1234 sleep=0 )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001235 lib.recoverOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1236 int( main.params[ "TOPO" ][ "linkNum" ] ), 3 )
1237 verify( main )
1238 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
1239
1240 def CASE643( self, main ):
1241 """
1242 Drop one link from each double link
1243 Drop a link between DAAS-1 and HAAG-1
1244 Drop a link between HAGG-2 and SPINE-2
1245 Test connectivity (expect no failure)
1246 Bring up all links
1247 Drop one ONOS instance
1248 Test connectivity (expect no failure)
1249 Bring up ONOS instance
1250 Test connectivity (expect no failure)
1251 """
1252 import time
1253 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1254 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1255 main.case( "Drop ONOS instances and bring up links at the same time" )
1256 setupTest( main, test_idx=643, onosNodes=3 )
1257 main.Cluster.active( 0 ).CLI.balanceMasters()
1258 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1259 verify( main )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001260 portsToDisable = [ [ "of:0000000000000001", 1 ], [ "of:0000000000000103", 1 ],
1261 [ "of:0000000000000006", 1 ], [ "of:0000000000000103", 2 ],
1262 [ "of:0000000000000101", 9 ], [ "of:0000000000000103", 3 ],
1263 [ "of:0000000000000002", 1 ], [ "of:0000000000000101", 1 ],
1264 [ "of:0000000000000003", 1 ], [ "of:0000000000000101", 3 ],
1265 [ "of:0000000000000004", 1 ], [ "of:0000000000000101", 5 ],
1266 [ "of:0000000000000005", 1 ], [ "of:0000000000000101", 7 ],
1267 [ "of:0000000000000002", 3 ], [ "of:0000000000000102", 1 ],
1268 [ "of:0000000000000003", 3 ], [ "of:0000000000000102", 3 ],
1269 [ "of:0000000000000004", 3 ], [ "of:0000000000000102", 5 ],
1270 [ "of:0000000000000005", 3 ], [ "of:0000000000000102", 7 ] ]
You Wang85747762018-05-11 15:51:50 -07001271 lib.disablePortBatch( main, portsToDisable,
1272 int( main.params[ "TOPO" ][ "switchNum" ] ),
1273 int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ) )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001274 verify( main )
You Wang85747762018-05-11 15:51:50 -07001275 lib.enablePortBatch( main, portsToDisable,
1276 int( main.params[ "TOPO" ][ "switchNum" ] ),
1277 int( main.params[ "TOPO" ][ "linkNum" ] ) )
Jonghwan Hyun25c98a62018-05-04 13:59:09 -07001278 lib.killOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1279 int( main.params[ "TOPO" ][ "linkNum" ] ), 2 )
1280 verify( main )
1281 lib.recoverOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ),
1282 int( main.params[ "TOPO" ][ "linkNum" ] ), 3 )
1283 verify( main )
1284 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001285
1286 def CASE651( self, main ):
1287 """
1288 Move a single-homed host from port A to port B in DAAS-1
1289 Test connectivity (expect no failure)
1290
1291 Repeat with DAAS-2
1292 """
1293 import time
1294 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1295 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1296 main.case( "Move a single-homed host to another port in the same DAAS" )
1297 setupTest( main, test_idx=651, onosNodes=3 )
1298 main.Cluster.active( 0 ).CLI.balanceMasters()
1299 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1300 verify( main )
1301
1302 h1v4cfg = '{"of:0000000000000001/7" : { "interfaces" : [ { "ips" : [ "10.1.0.254/24" ], "vlan-untagged": 10 } ] } }'
1303 lib.moveHost( main, "h1v4", "leaf1", "leaf1", "10.1.0.254", prefixLen=24, cfg=h1v4cfg )
You Wang7ea90582018-07-19 15:27:58 -07001304 hostLocations = { "h1v4": "of:0000000000000001/7" }
1305 lib.verifyHostLocations( main, hostLocations )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001306 verify( main )
1307
You Wang6260ed52018-07-18 17:54:25 -07001308 h1v6cfg = '{"of:0000000000000001/8" : { "interfaces" : [ { "ips" : [ "1000::3ff/120" ], "vlan-untagged": 21 } ] } }'
1309 lib.moveHost( main, "h1v6", "leaf1", "leaf1", "1000::3fe", prefixLen=128, cfg=h1v6cfg, ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001310 hostLocations = { "h1v6": "of:0000000000000001/8" }
1311 lib.verifyHostLocations( main, hostLocations )
You Wang6260ed52018-07-18 17:54:25 -07001312 verify( main )
1313
1314 h13v4cfg = '{"of:0000000000000006/7" : { "interfaces" : [ { "ips" : [ "10.5.20.254/24" ], "vlan-untagged": 20 } ] } }'
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001315 lib.moveHost( main, "h13v4", "leaf6", "leaf6", "10.5.20.254", prefixLen=24, cfg=h13v4cfg )
You Wang7ea90582018-07-19 15:27:58 -07001316 hostLocations = { "h13v4": "of:0000000000000006/7" }
1317 lib.verifyHostLocations( main, hostLocations )
Jonghwan Hyun785471d2018-05-14 14:48:19 -07001318 verify( main )
You Wang6260ed52018-07-18 17:54:25 -07001319
1320 h13v6cfg = '{"of:0000000000000006/8" : { "interfaces" : [ { "ips" : [ "1012::3ff/120" ], "vlan-untagged": 26 } ] } }'
1321 lib.moveHost( main, "h13v6", "leaf6", "leaf6", "1012::3fe", prefixLen=128, cfg=h13v6cfg, ipv6=True )
You Wang7ea90582018-07-19 15:27:58 -07001322 hostLocations = { "h13v6": "of:0000000000000006/8" }
1323 lib.verifyHostLocations( main, hostLocations )
You Wang6260ed52018-07-18 17:54:25 -07001324 verify( main )
You Wang7ea90582018-07-19 15:27:58 -07001325
1326 # TODO: test vlan tagged hosts
You Wangb2549812018-07-23 11:56:46 -07001327 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang7ea90582018-07-19 15:27:58 -07001328
1329 def CASE652( self, main ):
1330 """
1331 Move a dual-homed host from porst 1A and 1B to ports 2A and 2B
1332 Host retains the same MAC and IP address
1333 Test connectivity (expect no failure)
1334 """
1335 import time
1336 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1337 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1338 main.case( "Move a dual-homed host from porst 1A and 1B to ports 2A and 2B with the same MAC and IP" )
1339 setupTest( main, test_idx=652, onosNodes=3 )
1340 main.Cluster.active( 0 ).CLI.balanceMasters()
1341 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1342 verify( main )
1343
1344 h4v4cfg = '''{"of:0000000000000002/12" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] },
1345 "of:0000000000000003/14" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] } }'''
1346 lib.moveDualHomedHost( main, "h4v4", "leaf2", "leaf3", "leaf2", "leaf3", "10.2.30.254", prefixLen=24, cfg=h4v4cfg )
1347 hostLocations = { "h4v4": [ "of:0000000000000002/12", "of:0000000000000003/14" ] }
1348 lib.verifyHostLocations( main, hostLocations )
1349 verify( main )
1350
1351 h4v6cfg = '''{"of:0000000000000002/13" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] },
1352 "of:0000000000000003/15" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] } }'''
1353 lib.moveDualHomedHost( main, "h4v6", "leaf2", "leaf3", "leaf2", "leaf3", "1003::3fe", prefixLen=128, cfg=h4v6cfg, ipv6=True )
1354 hostLocations = { "h4v6": [ "of:0000000000000002/13", "of:0000000000000003/15" ] }
1355 lib.verifyHostLocations( main, hostLocations )
1356 verify( main )
1357
1358 # TODO: test static routes that point to the moved host
1359 # TODO: test vlan tagged hosts
You Wangb2549812018-07-23 11:56:46 -07001360 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )
You Wang7ea90582018-07-19 15:27:58 -07001361
1362 def CASE653( self, main ):
1363 """
1364 Move a dual-homed host from porst 1A and 1B to ports 2A and 2B
1365 Host retains the same IP but MAC address changes
1366 Test connectivity (expect no failure)
1367 """
1368 import time
1369 from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import *
1370 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
1371 main.case( "Move a dual-homed host from porst 1A and 1B to ports 2A and 2B with the same IP and different MAC" )
1372 setupTest( main, test_idx=653, onosNodes=3 )
1373 main.Cluster.active( 0 ).CLI.balanceMasters()
1374 time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) )
1375 verify( main )
1376
1377 h4v4cfg = '''{"of:0000000000000002/12" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] },
1378 "of:0000000000000003/14" : { "interfaces" : [ { "ips" : [ "10.2.30.254/24" ], "vlan-untagged": 16 } ] } }'''
1379 lib.moveDualHomedHost( main, "h4v4", "leaf2", "leaf3", "leaf2", "leaf3", "10.2.30.254", macAddr="00:aa:01:00:00:03", prefixLen=24, cfg=h4v4cfg )
1380 hostLocations = { "h4v4": [ "of:0000000000000002/12", "of:0000000000000003/14" ] }
1381 lib.verifyHostLocations( main, hostLocations )
1382 verify( main )
1383
1384 h4v6cfg = '''{"of:0000000000000002/13" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] },
1385 "of:0000000000000003/15" : { "interfaces" : [ { "ips" : [ "1003::3ff/120" ], "vlan-untagged": 24 } ] } }'''
1386 lib.moveDualHomedHost( main, "h4v6", "leaf2", "leaf3", "leaf2", "leaf3", "1003::3fe", macAddr="00:bb:01:00:00:03", prefixLen=128, cfg=h4v6cfg, ipv6=True )
1387 hostLocations = { "h4v6": [ "of:0000000000000002/13", "of:0000000000000003/15" ] }
1388 lib.verifyHostLocations( main, hostLocations )
1389 verify( main )
1390
1391 # TODO: test static routes that point to the moved host
1392 # TODO: test vlan tagged hosts
You Wangb2549812018-07-23 11:56:46 -07001393 lib.cleanup( main, copyKarafLog=False, removeHostComponent=True )