Pier | 6a0c4de | 2018-03-18 16:01:30 -0700 | [diff] [blame] | 1 | class SRMulticast: |
| 2 | def __init__( self ): |
| 3 | self.default = '' |
| 4 | |
| 5 | def CASE1( self, main ): |
| 6 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 7 | 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 |
Pier | 6a0c4de | 2018-03-18 16:01:30 -0700 | [diff] [blame] | 13 | """ |
| 14 | try: |
| 15 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 16 | except ImportError: |
| 17 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 18 | main.cleanAndExit() |
| 19 | try: |
| 20 | main.funcs |
| 21 | except ( NameError, AttributeError ): |
| 22 | main.funcs = SRMulticastTest() |
| 23 | main.funcs.runTest( main, |
| 24 | test_idx=1, |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 25 | onosNodes=3, |
| 26 | description="Create a Multicast flow between a source and sink on the same dual-tor leaf" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 27 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 28 | def CASE2( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 29 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 30 | Sets up 3 ONOS instances, start H-AGG topology |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 31 | Create a Multicast flow between a source and sink on different dual-tor leaves |
| 32 | Verify flows and groups |
| 33 | Verify traffic |
| 34 | Remove sink |
| 35 | Verify flows and groups |
| 36 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 37 | try: |
| 38 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 39 | except ImportError: |
| 40 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 41 | main.cleanAndExit() |
| 42 | try: |
| 43 | main.funcs |
| 44 | except ( NameError, AttributeError ): |
| 45 | main.funcs = SRMulticastTest() |
| 46 | main.funcs.runTest( main, |
| 47 | test_idx=2, |
| 48 | onosNodes=3, |
| 49 | description="Create a Multicast flow between a source and sink on different dual-tor leaves" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 50 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 51 | def CASE3( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 52 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 53 | Sets up 3 ONOS instances, start H-AGG topology |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 54 | Create a Multicast flow between a source and sink on different leaves (sink on single-tor) |
| 55 | Verify flows and groups |
| 56 | Verify traffic |
| 57 | Remove sink |
| 58 | Verify flows and groups |
| 59 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 60 | try: |
| 61 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 62 | except ImportError: |
| 63 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 64 | main.cleanAndExit() |
| 65 | try: |
| 66 | main.funcs |
| 67 | except ( NameError, AttributeError ): |
| 68 | main.funcs = SRMulticastTest() |
| 69 | main.funcs.runTest( main, |
| 70 | test_idx=3, |
| 71 | onosNodes=3, |
| 72 | description="Create a Multicast flow between a source and sink on different leaves (sink on single-tor)" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 73 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 74 | def CASE4( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 75 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 76 | Sets up 3 ONOS instances, start H-AGG topology |
| 77 | Combines CASE1 and CASE2 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 78 | Verify flows and groups |
| 79 | Verify traffic |
| 80 | Remove sinks |
| 81 | Verify flows and groups |
| 82 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 83 | try: |
| 84 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 85 | except ImportError: |
| 86 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 87 | main.cleanAndExit() |
| 88 | try: |
| 89 | main.funcs |
| 90 | except ( NameError, AttributeError ): |
| 91 | main.funcs = SRMulticastTest() |
| 92 | main.funcs.runTest( main, |
| 93 | test_idx=4, |
| 94 | onosNodes=3, |
| 95 | description="Combines CASE1 and CASE2" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 96 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 97 | def CASE5( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 98 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 99 | Sets up 3 ONOS instances, start H-AGG topology |
| 100 | Combines CASE2 and CASE3 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 101 | Verify flows and groups |
| 102 | Verify traffic |
| 103 | Remove sinks |
| 104 | Verify flows and groups |
| 105 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 106 | try: |
| 107 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 108 | except ImportError: |
| 109 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 110 | main.cleanAndExit() |
| 111 | try: |
| 112 | main.funcs |
| 113 | except ( NameError, AttributeError ): |
| 114 | main.funcs = SRMulticastTest() |
| 115 | main.funcs.runTest( main, |
| 116 | test_idx=5, |
| 117 | onosNodes=3, |
| 118 | description="Combines CASE2 and CASE3" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 119 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 120 | def CASE6( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 121 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 122 | Sets up 3 ONOS instances, start H-AGG topology |
| 123 | Combines CASE1 and CASE3 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 124 | Verify flows and groups |
| 125 | Verify traffic |
| 126 | Remove sinks |
| 127 | Verify flows and groups |
| 128 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 129 | try: |
| 130 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 131 | except ImportError: |
| 132 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 133 | main.cleanAndExit() |
| 134 | try: |
| 135 | main.funcs |
| 136 | except ( NameError, AttributeError ): |
| 137 | main.funcs = SRMulticastTest() |
| 138 | main.funcs.runTest( main, |
| 139 | test_idx=5, |
| 140 | onosNodes=3, |
| 141 | description="Combines CASE1 and CASE3" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 142 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 143 | def CASE7( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 144 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 145 | Sets up 3 ONOS instances, start H-AGG topology |
| 146 | Combines CASE1, CASE2 and CASE3 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 147 | Verify flows and groups |
| 148 | Verify traffic |
| 149 | Remove sinks |
| 150 | Verify flows and groups |
| 151 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 152 | try: |
| 153 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 154 | except ImportError: |
| 155 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 156 | main.cleanAndExit() |
| 157 | try: |
| 158 | main.funcs |
| 159 | except ( NameError, AttributeError ): |
| 160 | main.funcs = SRMulticastTest() |
| 161 | main.funcs.runTest( main, |
| 162 | test_idx=7, |
| 163 | onosNodes=3, |
| 164 | description="Combines CASE7 with route removal" ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 165 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 166 | def CASE8( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 167 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 168 | Sets up 3 ONOS instances, start H-AGG topology |
| 169 | Combines CASE7 with route removal |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 170 | Verify flows and groups |
| 171 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 172 | try: |
| 173 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 174 | except ImportError: |
| 175 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 176 | main.cleanAndExit() |
| 177 | try: |
| 178 | main.funcs |
| 179 | except ( NameError, AttributeError ): |
| 180 | main.funcs = SRMulticastTest() |
| 181 | main.funcs.runTest( main, |
| 182 | test_idx=8, |
| 183 | onosNodes=3, |
| 184 | description="Combines CASE7 with route removal", |
| 185 | removeRoute=True ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 186 | |
| 187 | def CASE101( self, main ): |
| 188 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 189 | Sets up 3 ONOS instances, start H-AGG topology |
| 190 | Combines CASE7 with a link failure (link ingress-spine) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 191 | Verify flows and groups |
| 192 | Verify traffic |
| 193 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 194 | try: |
| 195 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 196 | except ImportError: |
| 197 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 198 | main.cleanAndExit() |
| 199 | try: |
| 200 | main.funcs |
| 201 | except ( NameError, AttributeError ): |
| 202 | main.funcs = SRMulticastTest() |
| 203 | main.funcs.runTest( main, |
| 204 | test_idx=101, |
| 205 | onosNodes=3, |
| 206 | description="Combines CASE7 with a link failure (link ingress-spine)", |
| 207 | linkFailure=True ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 208 | |
| 209 | def CASE102( self, main ): |
| 210 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 211 | Sets up 3 ONOS instances, start H-AGG topology |
| 212 | Combines CASE7 with a link failure (link spine-egress-dt-leaf) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 213 | Verify flows and groups |
| 214 | Verify traffic |
| 215 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 216 | try: |
| 217 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 218 | except ImportError: |
| 219 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 220 | main.cleanAndExit() |
| 221 | try: |
| 222 | main.funcs |
| 223 | except ( NameError, AttributeError ): |
| 224 | main.funcs = SRMulticastTest() |
| 225 | main.funcs.runTest( main, |
| 226 | test_idx=102, |
| 227 | onosNodes=3, |
| 228 | description="Combines CASE7 with a link failure (link spine-engress-dt-leaf)", |
| 229 | linkFailure=True ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 230 | |
| 231 | def CASE103( self, main ): |
| 232 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 233 | Sets up 3 ONOS instances, start H-AGG topology |
| 234 | Combines CASE7 with a link failure (link spine-egress-st-leaf) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 235 | Verify flows and groups |
| 236 | Verify traffic |
| 237 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 238 | try: |
| 239 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 240 | except ImportError: |
| 241 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 242 | main.cleanAndExit() |
| 243 | try: |
| 244 | main.funcs |
| 245 | except ( NameError, AttributeError ): |
| 246 | main.funcs = SRMulticastTest() |
| 247 | main.funcs.runTest( main, |
| 248 | test_idx=103, |
| 249 | onosNodes=3, |
| 250 | description="Combines CASE7 with a link failure (link spine-engress-st-leaf)", |
| 251 | linkFailure=True ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 252 | |
| 253 | def CASE201( self, main ): |
| 254 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 255 | Sets up 3 ONOS instances, start H-AGG topology |
| 256 | Combines CASE7 with spine failure |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 257 | Verify flows and groups |
| 258 | Verify traffic |
| 259 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 260 | try: |
| 261 | from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest |
| 262 | except ImportError: |
| 263 | main.log.error( "SRMulticastTest not found. Exiting the test" ) |
| 264 | main.cleanAndExit() |
| 265 | try: |
| 266 | main.funcs |
| 267 | except ( NameError, AttributeError ): |
| 268 | main.funcs = SRMulticastTest() |
| 269 | main.funcs.runTest( main, |
| 270 | test_idx=201, |
| 271 | onosNodes=3, |
| 272 | description="Combines CASE7 with spine failure", |
| 273 | switchFailure=True ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 274 | |
| 275 | def CASE202( self, main ): |
| 276 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 277 | Sets up 3 ONOS instances, start H-AGG topology |
| 278 | Combines CASE7 with ingress failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 279 | Verify flows and groups are removed (failure) |
| 280 | Verify flows and groups (recovery) |
| 281 | Verify traffic (recovery) |
| 282 | """ |
| 283 | pass |
| 284 | |
| 285 | def CASE203( self, main ): |
| 286 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 287 | Sets up 3 ONOS instances, start H-AGG topology |
| 288 | Combines CASE7 with egress-dt-leaf failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 289 | Verify flows and groups are removed for the failing sink (failure) |
| 290 | Verify traffic on remaining sinks (failure) |
| 291 | Verify flows and groups (recovery) |
| 292 | Verify traffic (recovery) |
| 293 | """ |
| 294 | pass |
| 295 | |
| 296 | def CASE204( self, main ): |
| 297 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 298 | Sets up 3 ONOS instances, start H-AGG topology |
| 299 | Combines CASE7 with egress-st-leaf failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 300 | Verify flows and groups are removed for the failing sink (failure) |
| 301 | Verify traffic on remaining sinks (failure) |
| 302 | Verify flows and groups (recovery) |
| 303 | Verify traffic (recovery) |
| 304 | """ |
| 305 | pass |
| 306 | |
| 307 | def CASE205( self, main ): |
| 308 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 309 | Sets up 3 ONOS instances, start H-AGG topology |
| 310 | Combines CASE7 with egress leaves failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 311 | Verify flows and groups are removed for the failing sinks (failure) |
| 312 | Verify traffic on remaining sink (failure) |
| 313 | Verify flows and groups (recovery) |
| 314 | Verify traffic (recovery) |
| 315 | """ |
| 316 | pass |
| 317 | |
| 318 | def CASE301( self, main ): |
| 319 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 320 | Sets up 3 ONOS instances, start H-AGG topology |
| 321 | Combines CASE7 with ONOS failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 322 | Verify flows and groups (failure) |
| 323 | Verify traffic (failure) |
| 324 | Verify flows and groups (recovery) |
| 325 | Verify traffic (recovery) |
| 326 | """ |
| 327 | pass |