blob: 144b4cf0a145fffb151f669a56d56d6d6f58384f [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 )
218 verifyLinkDown( main, [ "spine103", "spine101" ], 4 )
219 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 Wang547893e2018-05-08 13:34:59 -0700310 verifySwitchDown( main, "leaf2", 10, { "ipv4": False, "ipv6": False }, [ "h4v4" ] )
You Wangc02d8352018-04-17 16:42:10 -0700311 verifyMcastRemoval( main, removeDHT1=False )
312 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700313
314 def CASE203( self, main ):
315 """
You Wange24d6272018-03-27 21:18:50 -0700316 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700317 Combines CASE8 with egress-dt-leaf failure and recovery
Pier4b701302018-03-20 17:26:10 -0700318 Verify flows and groups are removed for the failing sink (failure)
319 Verify traffic on remaining sinks (failure)
320 Verify flows and groups (recovery)
321 Verify traffic (recovery)
322 """
You Wangc02d8352018-04-17 16:42:10 -0700323 import time
324 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
325 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
326 main.case( "Combines CASE8 with egress-dt-leaf failure and recovery" )
327 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
328 setupTest( main, test_idx=203, onosNodes=3 )
329 verifyMcastRoutes( main )
You Wang547893e2018-05-08 13:34:59 -0700330 verifySwitchDown( main, "leaf5", 10, hostsToDiscover=[ "h10v4" ] )
You Wangc02d8352018-04-17 16:42:10 -0700331 verifyMcastRemoval( main, removeDHT1=False )
332 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700333
334 def CASE204( self, main ):
335 """
You Wange24d6272018-03-27 21:18:50 -0700336 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700337 Combines CASE8 with egress-st-leaf failure and recovery
Pier4b701302018-03-20 17:26:10 -0700338 Verify flows and groups are removed for the failing sink (failure)
339 Verify traffic on remaining sinks (failure)
340 Verify flows and groups (recovery)
341 Verify traffic (recovery)
342 """
You Wangc02d8352018-04-17 16:42:10 -0700343 import time
344 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
345 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
346 main.case( "Combines CASE8 with egress-st-leaf failure and recovery" )
347 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
348 setupTest( main, test_idx=204, onosNodes=3 )
349 verifyMcastRoutes( main )
You Wang547893e2018-05-08 13:34:59 -0700350 verifySwitchDown( main, "leaf4", 10, { "ipv4": [ True, False, True ], "ipv6": True }, [ "h8v4", "h10v4" ] )
You Wangc02d8352018-04-17 16:42:10 -0700351 verifyMcastRemoval( main, removeDHT1=False )
352 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700353
354 def CASE205( self, main ):
355 """
You Wange24d6272018-03-27 21:18:50 -0700356 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700357 Combines CASE8 with egress leaves failure and recovery
Pier4b701302018-03-20 17:26:10 -0700358 Verify flows and groups are removed for the failing sinks (failure)
359 Verify traffic on remaining sink (failure)
360 Verify flows and groups (recovery)
361 Verify traffic (recovery)
362 """
You Wangc02d8352018-04-17 16:42:10 -0700363 import time
364 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
365 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
366 main.case( "Combines CASE8 with leaves failure and recovery" )
367 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
368 setupTest( main, test_idx=205, onosNodes=3 )
369 verifyMcastRoutes( main )
You Wang547893e2018-05-08 13:34:59 -0700370 verifySwitchDown( main, [ "leaf1", "leaf3", "leaf4", "leaf5" ], 32, { "ipv4": [ True, False, False ], "ipv6": False }, [ "h4v4", "h8v4", "h10v4", "h1v6"] )
You Wangc02d8352018-04-17 16:42:10 -0700371 verifyMcastRemoval( main, removeDHT1=False )
372 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700373
374 def CASE301( self, main ):
375 """
You Wange24d6272018-03-27 21:18:50 -0700376 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700377 Combines CASE8 with ONOS failure and recovery
Pier4b701302018-03-20 17:26:10 -0700378 Verify flows and groups (failure)
379 Verify traffic (failure)
380 Verify flows and groups (recovery)
381 Verify traffic (recovery)
382 """
You Wangc02d8352018-04-17 16:42:10 -0700383 import time
384 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
385 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
386 main.case( "Combines CASE8 with leaves failure and recovery" )
387 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
388 setupTest( main, test_idx=205, onosNodes=3 )
389 verifyMcastRoutes( main )
390 verifyOnosDown( main )
391 verifyMcastRemoval( main, removeDHT1=False )
392 lib.cleanup( main, copyKarafLog=False )
393
394 def CASE401( self, main ):
395 """
396 Extends MCAST105
397 Create sinks and verify traffic is working
398 Bring down host port and verify traffic is still working for all sinks
399 Bring up host port again and start ping from DTH1 to STS
400 Verify host has both location and stop the ping
401 Kill LEAFA and verify traffic is still working for all sinks
402 Remove IPv6 route
403 Remove DTH2 sink
404 Remove STH2 sink
405 Remove STS
406 """
407 import time
408 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
409 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
410 main.case( "Extends MCAST105" )
411 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
412 setupTest( main, test_idx=401, onosNodes=3 )
413 verifyMcastRoutes( main )
You Wangc02d8352018-04-17 16:42:10 -0700414 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700415 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
416 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700417 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700418 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
419 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
420 verifySwitchDown( main, "leaf3", 10, hostsToDiscover=[ "h4v4" ] )
You Wangc02d8352018-04-17 16:42:10 -0700421 verifyMcastRemoval( main, removeDHT1=False )
422 lib.cleanup( main, copyKarafLog=False )
423
424 def CASE402( self, main ):
425 """
426 No downstream path for DTH2
427 Create sinks and verify traffic is working
428 Kill all up-links of the LEAFB and verify traffic is still working
429 Remove IPv6 route
430 Remove DTH2 sink
431 Remove STH2 sink
432 Remove STS
433 """
434 import time
435 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
436 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
437 main.case( "No downstream path for DTH2" )
438 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
439 setupTest( main, test_idx=402, onosNodes=3 )
440 verifyMcastRoutes( main )
441 verifyLinkDown( main, [ [ "leaf5", "spine101" ], [ "leaf5", "spine102" ] ], 8 )
442 verifyMcastRemoval( main, removeDHT1=False )
443 lib.cleanup( main, copyKarafLog=False )
444
445 def CASE403( self, main ):
446 """
447 No downstream path for DTH1
448 Create sinks and verify traffic is working
449 Bring down host port and verify traffic is still working for all sinks
450 Bring up host port again and start ping from DTH1 to STS
451 Verify host has both location and stop the ping
452 Kill all up-links of the LEAFA and verify traffic is still working
453 Remove IPv6 route
454 Remove DTH2 sink
455 Remove STH2 sink
456 Remove STS
457 """
458 import time
459 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
460 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
461 main.case( "No downstream path for DTH1" )
462 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
463 setupTest( main, test_idx=403, onosNodes=3 )
464 verifyMcastRoutes( main )
465 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700466 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
467 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700468 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700469 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
470 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700471 verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf3", "spine102" ] ], 8 )
472 verifyMcastRemoval( main, removeDHT1=False )
473 lib.cleanup( main, copyKarafLog=False )
474
475 def CASE404( self, main ):
476 """
477 Extends MCAST 403
478 Create sinks and verify traffic is working
479 Bring down host port and verify traffic is still working for all sinks
480 Bring up host port again and start ping from DTH1 to STS
481 Verify host has both location and stop the ping
482 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
483 Remove IPv6 route
484 Remove DTH2 sink
485 Remove STH2 sink
486 Remove STS
487 """
488 import time
489 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
490 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
491 main.case( "Extends MCASR 403" )
492 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
493 setupTest( main, test_idx=404, onosNodes=3 )
494 verifyMcastRoutes( main )
495 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700496 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
497 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700498 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700499 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
500 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700501 verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf2", "spine102" ] ], 8 )
502 verifyMcastRemoval( main, removeDHT1=False )
503 lib.cleanup( main, copyKarafLog=False )