blob: 8a8ba08ba1f72753d7be9f0f9ec81a4e9d1f5952 [file] [log] [blame]
Pier6a0c4de2018-03-18 16:01:30 -07001class SRMulticast:
2 def __init__( self ):
3 self.default = ''
4
5 def CASE1( self, main ):
6 """
You Wange24d6272018-03-27 21:18:50 -07007 Sets up 3 ONOS instances, start H-AGG topology
8 Create a Multicast flow between a source and sink on the same dual-tor leaf
9 Verify flows and groups
10 Verify traffic
11 Remove sink
12 Verify flows and groups
Pier6a0c4de2018-03-18 16:01:30 -070013 """
You Wangc02d8352018-04-17 16:42:10 -070014 import time
15 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
16 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
17 main.case( "Create a Multicast flow between a source and sink on the same dual-tor leaf" )
18 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0 ] } }
19 setupTest( main, test_idx=1, onosNodes=3 )
20 verifyMcastRoutes( main )
21 verifyMcastSinkRemoval( main, "ipv4", 0, False )
22 verifyMcastSourceRemoval( main, "ipv4", 0, False )
23 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -070024
You Wange24d6272018-03-27 21:18:50 -070025 def CASE2( self, main ):
Pier4b701302018-03-20 17:26:10 -070026 """
You Wange24d6272018-03-27 21:18:50 -070027 Sets up 3 ONOS instances, start H-AGG topology
Pier4b701302018-03-20 17:26:10 -070028 Create a Multicast flow between a source and sink on different dual-tor leaves
29 Verify flows and groups
30 Verify traffic
31 Remove sink
32 Verify flows and groups
33 """
You Wangc02d8352018-04-17 16:42:10 -070034 import time
35 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
36 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
37 main.case( "Create a Multicast flow between a source and sink on different dual-tor leaves" )
38 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 1 ] } }
39 setupTest( main, test_idx=2, onosNodes=3 )
40 verifyMcastRoutes( main )
41 verifyMcastSinkRemoval( main, "ipv4", 1, False )
42 verifyMcastSourceRemoval( main, "ipv4", 0, False )
43 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -070044
You Wange24d6272018-03-27 21:18:50 -070045 def CASE3( self, main ):
Pier4b701302018-03-20 17:26:10 -070046 """
You Wange24d6272018-03-27 21:18:50 -070047 Sets up 3 ONOS instances, start H-AGG topology
Pier4b701302018-03-20 17:26:10 -070048 Create a Multicast flow between a source and sink on different leaves (sink on single-tor)
49 Verify flows and groups
50 Verify traffic
51 Remove sink
52 Verify flows and groups
53 """
You Wangc02d8352018-04-17 16:42:10 -070054 import time
55 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
56 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
57 main.case( "Create a Multicast flow between a source and sink on different leaves (sink on single-tor)" )
58 main.mcastRoutes = { "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
59 setupTest( main, test_idx=3, onosNodes=3 )
60 verifyMcastRoutes( main )
61 verifyMcastRouteRemoval( main, "ipv6" )
62 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -070063
You Wange24d6272018-03-27 21:18:50 -070064 def CASE4( self, main ):
Pier4b701302018-03-20 17:26:10 -070065 """
You Wange24d6272018-03-27 21:18:50 -070066 Sets up 3 ONOS instances, start H-AGG topology
67 Combines CASE1 and CASE2
Pier4b701302018-03-20 17:26:10 -070068 Verify flows and groups
69 Verify traffic
70 Remove sinks
71 Verify flows and groups
72 """
You Wangc02d8352018-04-17 16:42:10 -070073 import time
74 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
75 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
76 main.case( "Combines CASE1 and CASE2" )
77 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1 ] } }
78 setupTest( main, test_idx=4, onosNodes=3 )
79 verifyMcastRoutes( main )
You Wang50895222018-05-03 12:58:55 -070080 verifyMcastSinkRemoval( main, "ipv4", 0, [ False, True ] )
You Wangc02d8352018-04-17 16:42:10 -070081 verifyMcastSinkRemoval( main, "ipv4", 1, False )
82 verifyMcastSourceRemoval( main, "ipv4", 0, False )
83 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -070084
You Wange24d6272018-03-27 21:18:50 -070085 def CASE5( self, main ):
Pier4b701302018-03-20 17:26:10 -070086 """
You Wange24d6272018-03-27 21:18:50 -070087 Sets up 3 ONOS instances, start H-AGG topology
88 Combines CASE2 and CASE3
Pier4b701302018-03-20 17:26:10 -070089 Verify flows and groups
90 Verify traffic
91 Remove sinks
92 Verify flows and groups
93 """
You Wangc02d8352018-04-17 16:42:10 -070094 import time
95 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
96 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
97 main.case( "Combines CASE2 and CASE3" )
98 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 1 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
99 setupTest( main, test_idx=5, onosNodes=3 )
100 verifyMcastRoutes( main )
101 verifyMcastRouteRemoval( main, "ipv6" )
102 verifyMcastSinkRemoval( main, "ipv4", 1, False )
103 verifyMcastSourceRemoval( main, "ipv4", 0, False )
104 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700105
You Wange24d6272018-03-27 21:18:50 -0700106 def CASE6( self, main ):
Pier4b701302018-03-20 17:26:10 -0700107 """
You Wange24d6272018-03-27 21:18:50 -0700108 Sets up 3 ONOS instances, start H-AGG topology
109 Combines CASE1 and CASE3
Pier4b701302018-03-20 17:26:10 -0700110 Verify flows and groups
111 Verify traffic
112 Remove sinks
113 Verify flows and groups
114 """
You Wangc02d8352018-04-17 16:42:10 -0700115 import time
116 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
117 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
118 main.case( "Combines CASE1 and CASE3" )
119 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
120 setupTest( main, test_idx=6, onosNodes=3 )
121 verifyMcastRoutes( main )
122 verifyMcastRouteRemoval( main, "ipv6" )
123 verifyMcastSinkRemoval( main, "ipv4", 0, False )
124 verifyMcastSourceRemoval( main, "ipv4", 0, False )
125 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700126
You Wange24d6272018-03-27 21:18:50 -0700127 def CASE7( self, main ):
Pier4b701302018-03-20 17:26:10 -0700128 """
You Wange24d6272018-03-27 21:18:50 -0700129 Sets up 3 ONOS instances, start H-AGG topology
130 Combines CASE1, CASE2 and CASE3
Pier4b701302018-03-20 17:26:10 -0700131 Verify flows and groups
132 Verify traffic
133 Remove sinks
134 Verify flows and groups
135 """
You Wangc02d8352018-04-17 16:42:10 -0700136 import time
137 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
138 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
139 main.case( "Combines CASE1, CASE2 and CASE3" )
140 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
141 setupTest( main, test_idx=7, onosNodes=3 )
142 verifyMcastRoutes( main )
143 verifyMcastRouteRemoval( main, "ipv6" )
You Wang50895222018-05-03 12:58:55 -0700144 verifyMcastSinkRemoval( main, "ipv4", 0, [ False, True ] )
You Wangc02d8352018-04-17 16:42:10 -0700145 verifyMcastSinkRemoval( main, "ipv4", 1, False )
146 verifyMcastSourceRemoval( main, "ipv4", 0, False )
147 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700148
You Wange24d6272018-03-27 21:18:50 -0700149 def CASE8( self, main ):
Pier4b701302018-03-20 17:26:10 -0700150 """
You Wange24d6272018-03-27 21:18:50 -0700151 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700152 Use all of the four sinks
153 Verify flows and groups
154 Verify traffic
155 Remove sinks
Pier4b701302018-03-20 17:26:10 -0700156 Verify flows and groups
157 """
You Wangc02d8352018-04-17 16:42:10 -0700158 import time
159 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
160 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
161 main.case( "Use all of the four sinks" )
162 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
163 setupTest( main, test_idx=8, onosNodes=3 )
164 verifyMcastRoutes( main )
165 verifyMcastRemoval( main )
166 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700167
168 def CASE101( self, main ):
169 """
You Wange24d6272018-03-27 21:18:50 -0700170 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700171 Combines CASE8 with a link failure (link ingress-spine)
Pier4b701302018-03-20 17:26:10 -0700172 Verify flows and groups
173 Verify traffic
174 """
You Wangc02d8352018-04-17 16:42:10 -0700175 import time
176 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
177 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
178 main.case( "Combines CASE8 with a link failure (link ingress-spine)" )
179 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
180 setupTest( main, test_idx=101, onosNodes=3 )
181 verifyMcastRoutes( main )
182 verifyLinkDown( main, [ "leaf2", "spine101" ], 4 )
183 verifyMcastRemoval( main )
184 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700185
186 def CASE102( self, main ):
187 """
You Wange24d6272018-03-27 21:18:50 -0700188 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700189 Combines CASE8 with a link failure (link spine-egress-dt-leaf)
Pier4b701302018-03-20 17:26:10 -0700190 Verify flows and groups
191 Verify traffic
192 """
You Wangc02d8352018-04-17 16:42:10 -0700193 import time
194 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
195 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
196 main.case( "Combines CASE8 with a link failure (link spine-engress-dt-leaf)" )
197 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
198 setupTest( main, test_idx=102, onosNodes=3 )
199 verifyMcastRoutes( main )
200 verifyLinkDown( main, [ "leaf5", "spine101" ], 4 )
201 verifyMcastRemoval( main )
202 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700203
204 def CASE103( self, main ):
205 """
You Wange24d6272018-03-27 21:18:50 -0700206 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700207 Combines CASE8 with a link failure (link spine-egress-st-leaf)
Pier4b701302018-03-20 17:26:10 -0700208 Verify flows and groups
209 Verify traffic
210 """
You Wangc02d8352018-04-17 16:42:10 -0700211 import time
212 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
213 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
214 main.case( "Combines CASE8 with a link failure (link spine-engress-st-leaf)" )
215 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
216 setupTest( main, test_idx=103, onosNodes=3 )
217 verifyMcastRoutes( main )
You Wang5c4a6382018-05-16 15:36:41 -0700218 verifyLinkDown( main, [ "spine103", "spine101" ], 2 )
You Wangc02d8352018-04-17 16:42:10 -0700219 verifyMcastRemoval( main )
220 lib.cleanup( main, copyKarafLog=False )
221
222 def CASE104( self, main ):
223 """
224 Sets up 3 ONOS instances, start H-AGG topology
225 Combines CASE8 with a link failure (link spine-egress-st-leaf-2)
226 Verify flows and groups
227 Verify traffic
228 """
229 import time
230 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
231 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
232 main.case( "Combines CASE8 with a link failure (link spine-engress-st-leaf-2)" )
233 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
234 setupTest( main, test_idx=104, onosNodes=3 )
235 verifyMcastRoutes( main )
236 verifyLinkDown( main, [ "leaf4", "spine101" ], 4 )
237 verifyMcastRemoval( main )
238 lib.cleanup( main, copyKarafLog=False )
239
240 def CASE105( self, main ):
241 """
242 Sets up 3 ONOS instances, start H-AGG topology
243 Combines CASE8 with a link failure (link dt-leaf-sink)
244 Verify flows and groups
245 Verify traffic
246 """
247 import time
248 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
249 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
250 main.case( "Combines CASE8 with a link failure (link dt-leaf-sink)" )
251 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
252 setupTest( main, test_idx=105, onosNodes=3 )
253 verifyMcastRoutes( main )
254 verifyLinkDown( main, [ "leaf2", "h4v4" ], 0 )
255 verifyMcastRemoval( main )
256 lib.cleanup( main, copyKarafLog=False )
257
258 def CASE106( self, main ):
259 """
260 Sets up 3 ONOS instances, start H-AGG topology
261 Combines CASE8 with a link failure (link dt-leaf-sink-2)
262 Verify flows and groups
263 Verify traffic
264 """
265 import time
266 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
267 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
268 main.case( "Combines CASE8 with a link failure (link dt-leaf-sink-2)" )
269 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
270 setupTest( main, test_idx=106, onosNodes=3 )
271 verifyMcastRoutes( main )
272 verifyLinkDown( main, [ "leaf5", "h10v4" ], 0 )
273 verifyMcastRemoval( main )
274 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700275
276 def CASE201( self, main ):
277 """
You Wange24d6272018-03-27 21:18:50 -0700278 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700279 Combines CASE8 with spine failure
Pier4b701302018-03-20 17:26:10 -0700280 Verify flows and groups
281 Verify traffic
282 """
You Wangc02d8352018-04-17 16:42:10 -0700283 import time
284 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
285 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
286 main.case( "Combines CASE8 with spine failure" )
287 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
288 setupTest( main, test_idx=201, onosNodes=3 )
289 verifyMcastRoutes( main )
290 verifySwitchDown( main, "spine101", 18 )
291 verifySwitchDown( main, "spine102", 18 )
292 verifyMcastRemoval( main, removeDHT1=False )
293 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700294
295 def CASE202( self, main ):
296 """
You Wange24d6272018-03-27 21:18:50 -0700297 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700298 Combines CASE8 with ingress failure and recovery
Pier4b701302018-03-20 17:26:10 -0700299 Verify flows and groups are removed (failure)
300 Verify flows and groups (recovery)
301 Verify traffic (recovery)
302 """
You Wangc02d8352018-04-17 16:42:10 -0700303 import time
304 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
305 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
306 main.case( "Combines CASE8 with ingress failure and recovery" )
307 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
308 setupTest( main, test_idx=202, onosNodes=3 )
309 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700310 verifySwitchDown( main, "leaf2", 10,
311 { "ipv4": False, "ipv6": False },
312 [ "h4v4" ],
313 { "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700314 verifyMcastRemoval( main, removeDHT1=False )
315 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700316
317 def CASE203( self, main ):
318 """
You Wange24d6272018-03-27 21:18:50 -0700319 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700320 Combines CASE8 with egress-dt-leaf failure and recovery
Pier4b701302018-03-20 17:26:10 -0700321 Verify flows and groups are removed for the failing sink (failure)
322 Verify traffic on remaining sinks (failure)
323 Verify flows and groups (recovery)
324 Verify traffic (recovery)
325 """
You Wangc02d8352018-04-17 16:42:10 -0700326 import time
327 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
328 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
329 main.case( "Combines CASE8 with egress-dt-leaf failure and recovery" )
330 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
331 setupTest( main, test_idx=203, onosNodes=3 )
332 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700333 verifySwitchDown( main, "leaf5", 10,
334 hostsToDiscover=[ "h10v4" ],
335 hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700336 verifyMcastRemoval( main, removeDHT1=False )
337 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700338
339 def CASE204( self, main ):
340 """
You Wange24d6272018-03-27 21:18:50 -0700341 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700342 Combines CASE8 with egress-st-leaf failure and recovery
Pier4b701302018-03-20 17:26:10 -0700343 Verify flows and groups are removed for the failing sink (failure)
344 Verify traffic on remaining sinks (failure)
345 Verify flows and groups (recovery)
346 Verify traffic (recovery)
347 """
You Wangc02d8352018-04-17 16:42:10 -0700348 import time
349 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
350 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
351 main.case( "Combines CASE8 with egress-st-leaf failure and recovery" )
352 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
353 setupTest( main, test_idx=204, onosNodes=3 )
354 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700355 verifySwitchDown( main, "leaf4", 10,
356 { "ipv4": [ True, False, True ], "ipv6": True },
357 [ "h8v4", "h10v4" ],
358 { "h8v4": ["of:0000000000000004/9"],
359 "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700360 verifyMcastRemoval( main, removeDHT1=False )
361 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700362
363 def CASE205( self, main ):
364 """
You Wange24d6272018-03-27 21:18:50 -0700365 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700366 Combines CASE8 with egress leaves failure and recovery
Pier4b701302018-03-20 17:26:10 -0700367 Verify flows and groups are removed for the failing sinks (failure)
368 Verify traffic on remaining sink (failure)
369 Verify flows and groups (recovery)
370 Verify traffic (recovery)
371 """
You Wangc02d8352018-04-17 16:42:10 -0700372 import time
373 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
374 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
375 main.case( "Combines CASE8 with leaves failure and recovery" )
376 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
377 setupTest( main, test_idx=205, onosNodes=3 )
378 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700379 verifySwitchDown( main, [ "leaf1", "leaf3", "leaf4", "leaf5" ], 32,
380 { "ipv4": [ True, False, False ], "ipv6": False },
381 [ "h4v4", "h8v4", "h10v4", "h1v6"],
382 { "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"],
383 "h8v4": ["of:0000000000000004/9"],
384 "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"],
385 "h1v6": ["of:0000000000000001/3"] } )
You Wangc02d8352018-04-17 16:42:10 -0700386 verifyMcastRemoval( main, removeDHT1=False )
387 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700388
389 def CASE301( self, main ):
390 """
You Wange24d6272018-03-27 21:18:50 -0700391 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700392 Combines CASE8 with ONOS failure and recovery
Pier4b701302018-03-20 17:26:10 -0700393 Verify flows and groups (failure)
394 Verify traffic (failure)
395 Verify flows and groups (recovery)
396 Verify traffic (recovery)
397 """
You Wangc02d8352018-04-17 16:42:10 -0700398 import time
399 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
400 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
401 main.case( "Combines CASE8 with leaves failure and recovery" )
402 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
403 setupTest( main, test_idx=205, onosNodes=3 )
404 verifyMcastRoutes( main )
405 verifyOnosDown( main )
406 verifyMcastRemoval( main, removeDHT1=False )
407 lib.cleanup( main, copyKarafLog=False )
408
409 def CASE401( self, main ):
410 """
411 Extends MCAST105
412 Create sinks and verify traffic is working
413 Bring down host port and verify traffic is still working for all sinks
414 Bring up host port again and start ping from DTH1 to STS
415 Verify host has both location and stop the ping
416 Kill LEAFA and verify traffic is still working for all sinks
417 Remove IPv6 route
418 Remove DTH2 sink
419 Remove STH2 sink
420 Remove STS
421 """
422 import time
423 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
424 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
425 main.case( "Extends MCAST105" )
426 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
427 setupTest( main, test_idx=401, onosNodes=3 )
428 verifyMcastRoutes( main )
You Wangc02d8352018-04-17 16:42:10 -0700429 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700430 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
431 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700432 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700433 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
434 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wang88b3cbe2018-05-10 15:21:39 -0700435 verifySwitchDown( main, "leaf3", 10,
436 hostsToDiscover=[ "h4v4" ],
437 hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700438 verifyMcastRemoval( main, removeDHT1=False )
439 lib.cleanup( main, copyKarafLog=False )
440
441 def CASE402( self, main ):
442 """
443 No downstream path for DTH2
444 Create sinks and verify traffic is working
445 Kill all up-links of the LEAFB and verify traffic is still working
446 Remove IPv6 route
447 Remove DTH2 sink
448 Remove STH2 sink
449 Remove STS
450 """
451 import time
452 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
453 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
454 main.case( "No downstream path for DTH2" )
455 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
456 setupTest( main, test_idx=402, onosNodes=3 )
457 verifyMcastRoutes( main )
458 verifyLinkDown( main, [ [ "leaf5", "spine101" ], [ "leaf5", "spine102" ] ], 8 )
459 verifyMcastRemoval( main, removeDHT1=False )
460 lib.cleanup( main, copyKarafLog=False )
461
462 def CASE403( self, main ):
463 """
464 No downstream path for DTH1
465 Create sinks and verify traffic is working
466 Bring down host port and verify traffic is still working for all sinks
467 Bring up host port again and start ping from DTH1 to STS
468 Verify host has both location and stop the ping
469 Kill all up-links of the LEAFA and verify traffic is still working
470 Remove IPv6 route
471 Remove DTH2 sink
472 Remove STH2 sink
473 Remove STS
474 """
475 import time
476 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
477 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
478 main.case( "No downstream path for DTH1" )
479 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
480 setupTest( main, test_idx=403, onosNodes=3 )
481 verifyMcastRoutes( main )
482 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700483 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
484 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700485 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700486 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
487 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700488 verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf3", "spine102" ] ], 8 )
489 verifyMcastRemoval( main, removeDHT1=False )
490 lib.cleanup( main, copyKarafLog=False )
491
492 def CASE404( self, main ):
493 """
494 Extends MCAST 403
495 Create sinks and verify traffic is working
496 Bring down host port and verify traffic is still working for all sinks
497 Bring up host port again and start ping from DTH1 to STS
498 Verify host has both location and stop the ping
499 Kill up-links of the LEAFA towards SPINEA, kill up-links of the SOURCE LEAF towards SPINEC and verify traffic is still working for all sinks
500 Remove IPv6 route
501 Remove DTH2 sink
502 Remove STH2 sink
503 Remove STS
504 """
505 import time
506 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
507 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
508 main.case( "Extends MCASR 403" )
509 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
510 setupTest( main, test_idx=404, onosNodes=3 )
511 verifyMcastRoutes( main )
512 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700513 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
514 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700515 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700516 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
517 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700518 verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf2", "spine102" ] ], 8 )
519 verifyMcastRemoval( main, removeDHT1=False )
520 lib.cleanup( main, copyKarafLog=False )