blob: 0d9ea91330d14337034a55eb5141528c9aeb1a4b [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 )
You Wang33fcb492018-08-03 15:46:42 -0700254 verifyPortDown( main, "of:0000000000000002", 10, hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700255 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 )
You Wang33fcb492018-08-03 15:46:42 -0700272 verifyPortDown( main, "of:0000000000000005", 10, hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700273 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 },
You Wang2ce254a2018-05-31 15:42:32 -0700312 [ "h3v4", "h3v6", "h4v4" ],
313 { "h3v4": "of:0000000000000002/9",
314 "h3v6": "of:0000000000000002/6",
315 "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700316 verifyMcastRemoval( main, removeDHT1=False )
317 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700318
319 def CASE203( self, main ):
320 """
You Wange24d6272018-03-27 21:18:50 -0700321 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700322 Combines CASE8 with egress-dt-leaf failure and recovery
Pier4b701302018-03-20 17:26:10 -0700323 Verify flows and groups are removed for the failing sink (failure)
324 Verify traffic on remaining sinks (failure)
325 Verify flows and groups (recovery)
326 Verify traffic (recovery)
327 """
You Wangc02d8352018-04-17 16:42:10 -0700328 import time
329 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
330 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
331 main.case( "Combines CASE8 with egress-dt-leaf failure and recovery" )
332 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
333 setupTest( main, test_idx=203, onosNodes=3 )
334 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700335 verifySwitchDown( main, "leaf5", 10,
336 hostsToDiscover=[ "h10v4" ],
337 hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700338 verifyMcastRemoval( main, removeDHT1=False )
339 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700340
341 def CASE204( self, main ):
342 """
You Wange24d6272018-03-27 21:18:50 -0700343 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700344 Combines CASE8 with egress-st-leaf failure and recovery
Pier4b701302018-03-20 17:26:10 -0700345 Verify flows and groups are removed for the failing sink (failure)
346 Verify traffic on remaining sinks (failure)
347 Verify flows and groups (recovery)
348 Verify traffic (recovery)
349 """
You Wangc02d8352018-04-17 16:42:10 -0700350 import time
351 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
352 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
353 main.case( "Combines CASE8 with egress-st-leaf failure and recovery" )
354 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
355 setupTest( main, test_idx=204, onosNodes=3 )
356 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700357 verifySwitchDown( main, "leaf4", 10,
358 { "ipv4": [ True, False, True ], "ipv6": True },
359 [ "h8v4", "h10v4" ],
360 { "h8v4": ["of:0000000000000004/9"],
361 "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700362 verifyMcastRemoval( main, removeDHT1=False )
363 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700364
365 def CASE205( self, main ):
366 """
You Wange24d6272018-03-27 21:18:50 -0700367 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700368 Combines CASE8 with egress leaves failure and recovery
Pier4b701302018-03-20 17:26:10 -0700369 Verify flows and groups are removed for the failing sinks (failure)
370 Verify traffic on remaining sink (failure)
371 Verify flows and groups (recovery)
372 Verify traffic (recovery)
373 """
You Wangc02d8352018-04-17 16:42:10 -0700374 import time
375 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
376 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
377 main.case( "Combines CASE8 with leaves failure and recovery" )
378 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
379 setupTest( main, test_idx=205, onosNodes=3 )
380 verifyMcastRoutes( main )
You Wang88b3cbe2018-05-10 15:21:39 -0700381 verifySwitchDown( main, [ "leaf1", "leaf3", "leaf4", "leaf5" ], 32,
382 { "ipv4": [ True, False, False ], "ipv6": False },
383 [ "h4v4", "h8v4", "h10v4", "h1v6"],
384 { "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"],
385 "h8v4": ["of:0000000000000004/9"],
386 "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"],
387 "h1v6": ["of:0000000000000001/3"] } )
You Wangc02d8352018-04-17 16:42:10 -0700388 verifyMcastRemoval( main, removeDHT1=False )
389 lib.cleanup( main, copyKarafLog=False )
Pier4b701302018-03-20 17:26:10 -0700390
391 def CASE301( self, main ):
392 """
You Wange24d6272018-03-27 21:18:50 -0700393 Sets up 3 ONOS instances, start H-AGG topology
You Wangc02d8352018-04-17 16:42:10 -0700394 Combines CASE8 with ONOS failure and recovery
Pier4b701302018-03-20 17:26:10 -0700395 Verify flows and groups (failure)
396 Verify traffic (failure)
397 Verify flows and groups (recovery)
398 Verify traffic (recovery)
399 """
You Wangc02d8352018-04-17 16:42:10 -0700400 import time
401 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
402 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
403 main.case( "Combines CASE8 with leaves failure and recovery" )
404 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
405 setupTest( main, test_idx=205, onosNodes=3 )
406 verifyMcastRoutes( main )
407 verifyOnosDown( main )
408 verifyMcastRemoval( main, removeDHT1=False )
409 lib.cleanup( main, copyKarafLog=False )
410
411 def CASE401( self, main ):
412 """
413 Extends MCAST105
414 Create sinks and verify traffic is working
415 Bring down host port and verify traffic is still working for all sinks
416 Bring up host port again and start ping from DTH1 to STS
417 Verify host has both location and stop the ping
418 Kill LEAFA and verify traffic is still working for all sinks
419 Remove IPv6 route
420 Remove DTH2 sink
421 Remove STH2 sink
422 Remove STS
423 """
424 import time
425 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
426 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
427 main.case( "Extends MCAST105" )
428 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
429 setupTest( main, test_idx=401, onosNodes=3 )
430 verifyMcastRoutes( main )
You Wangc02d8352018-04-17 16:42:10 -0700431 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700432 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
433 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700434 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700435 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
436 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wang88b3cbe2018-05-10 15:21:39 -0700437 verifySwitchDown( main, "leaf3", 10,
438 hostsToDiscover=[ "h4v4" ],
439 hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700440 verifyMcastRemoval( main, removeDHT1=False )
441 lib.cleanup( main, copyKarafLog=False )
442
443 def CASE402( self, main ):
444 """
445 No downstream path for DTH2
446 Create sinks and verify traffic is working
447 Kill all up-links of the LEAFB and verify traffic is still working
448 Remove IPv6 route
449 Remove DTH2 sink
450 Remove STH2 sink
451 Remove STS
452 """
453 import time
454 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
455 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
456 main.case( "No downstream path for DTH2" )
457 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
458 setupTest( main, test_idx=402, onosNodes=3 )
459 verifyMcastRoutes( main )
460 verifyLinkDown( main, [ [ "leaf5", "spine101" ], [ "leaf5", "spine102" ] ], 8 )
461 verifyMcastRemoval( main, removeDHT1=False )
462 lib.cleanup( main, copyKarafLog=False )
463
464 def CASE403( self, main ):
465 """
466 No downstream path for DTH1
467 Create sinks and verify traffic is working
468 Bring down host port and verify traffic is still working for all sinks
469 Bring up host port again and start ping from DTH1 to STS
470 Verify host has both location and stop the ping
471 Kill all up-links of the LEAFA and verify traffic is still working
472 Remove IPv6 route
473 Remove DTH2 sink
474 Remove STH2 sink
475 Remove STS
476 """
477 import time
478 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
479 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
480 main.case( "No downstream path for DTH1" )
481 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
482 setupTest( main, test_idx=403, onosNodes=3 )
483 verifyMcastRoutes( main )
484 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700485 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
486 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700487 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700488 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
489 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700490 verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf3", "spine102" ] ], 8 )
491 verifyMcastRemoval( main, removeDHT1=False )
492 lib.cleanup( main, copyKarafLog=False )
493
494 def CASE404( self, main ):
495 """
496 Extends MCAST 403
497 Create sinks and verify traffic is working
498 Bring down host port and verify traffic is still working for all sinks
499 Bring up host port again and start ping from DTH1 to STS
500 Verify host has both location and stop the ping
501 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
502 Remove IPv6 route
503 Remove DTH2 sink
504 Remove STH2 sink
505 Remove STS
506 """
507 import time
508 from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import *
509 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
510 main.case( "Extends MCASR 403" )
511 main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
512 setupTest( main, test_idx=404, onosNodes=3 )
513 verifyMcastRoutes( main )
514 # Verify killing one link of dual-homed host h4
You Wang547893e2018-05-08 13:34:59 -0700515 verifyPortDown( main, "of:0000000000000002", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
516 verifyPortDown( main, "of:0000000000000003", 10, hostsToDiscover=[ "h4v4" ], hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700517 # Verify killing one link of dual-homed host h10
You Wang547893e2018-05-08 13:34:59 -0700518 verifyPortDown( main, "of:0000000000000004", 11, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
519 verifyPortDown( main, "of:0000000000000005", 10, hostsToDiscover=[ "h10v4" ], hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } )
You Wangc02d8352018-04-17 16:42:10 -0700520 verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf2", "spine102" ] ], 8 )
521 verifyMcastRemoval( main, removeDHT1=False )
522 lib.cleanup( main, copyKarafLog=False )