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 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 14 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 24 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 25 | def CASE2( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 26 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 27 | Sets up 3 ONOS instances, start H-AGG topology |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 28 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 34 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 44 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 45 | def CASE3( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 46 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 47 | Sets up 3 ONOS instances, start H-AGG topology |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 48 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 54 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 63 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 64 | def CASE4( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 65 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 66 | Sets up 3 ONOS instances, start H-AGG topology |
| 67 | Combines CASE1 and CASE2 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 68 | Verify flows and groups |
| 69 | Verify traffic |
| 70 | Remove sinks |
| 71 | Verify flows and groups |
| 72 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 73 | 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 Wang | 5089522 | 2018-05-03 12:58:55 -0700 | [diff] [blame] | 80 | verifyMcastSinkRemoval( main, "ipv4", 0, [ False, True ] ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 81 | verifyMcastSinkRemoval( main, "ipv4", 1, False ) |
| 82 | verifyMcastSourceRemoval( main, "ipv4", 0, False ) |
| 83 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 84 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 85 | def CASE5( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 86 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 87 | Sets up 3 ONOS instances, start H-AGG topology |
| 88 | Combines CASE2 and CASE3 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 89 | Verify flows and groups |
| 90 | Verify traffic |
| 91 | Remove sinks |
| 92 | Verify flows and groups |
| 93 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 94 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 105 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 106 | def CASE6( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 107 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 108 | Sets up 3 ONOS instances, start H-AGG topology |
| 109 | Combines CASE1 and CASE3 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 110 | Verify flows and groups |
| 111 | Verify traffic |
| 112 | Remove sinks |
| 113 | Verify flows and groups |
| 114 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 115 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 126 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 127 | def CASE7( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 128 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 129 | Sets up 3 ONOS instances, start H-AGG topology |
| 130 | Combines CASE1, CASE2 and CASE3 |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 131 | Verify flows and groups |
| 132 | Verify traffic |
| 133 | Remove sinks |
| 134 | Verify flows and groups |
| 135 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 136 | 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 Wang | 5089522 | 2018-05-03 12:58:55 -0700 | [diff] [blame] | 144 | verifyMcastSinkRemoval( main, "ipv4", 0, [ False, True ] ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 145 | verifyMcastSinkRemoval( main, "ipv4", 1, False ) |
| 146 | verifyMcastSourceRemoval( main, "ipv4", 0, False ) |
| 147 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 148 | |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 149 | def CASE8( self, main ): |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 150 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 151 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 152 | Use all of the four sinks |
| 153 | Verify flows and groups |
| 154 | Verify traffic |
| 155 | Remove sinks |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 156 | Verify flows and groups |
| 157 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 158 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 167 | |
| 168 | def CASE101( self, main ): |
| 169 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 170 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 171 | Combines CASE8 with a link failure (link ingress-spine) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 172 | Verify flows and groups |
| 173 | Verify traffic |
| 174 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 175 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 185 | |
| 186 | def CASE102( self, main ): |
| 187 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 188 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 189 | Combines CASE8 with a link failure (link spine-egress-dt-leaf) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 190 | Verify flows and groups |
| 191 | Verify traffic |
| 192 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 193 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 203 | |
| 204 | def CASE103( self, main ): |
| 205 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 206 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 207 | Combines CASE8 with a link failure (link spine-egress-st-leaf) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 208 | Verify flows and groups |
| 209 | Verify traffic |
| 210 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 211 | 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 Wang | 5c4a638 | 2018-05-16 15:36:41 -0700 | [diff] [blame] | 218 | verifyLinkDown( main, [ "spine103", "spine101" ], 2 ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 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 ) |
You Wang | 33fcb49 | 2018-08-03 15:46:42 -0700 | [diff] [blame] | 254 | verifyPortDown( main, "of:0000000000000002", 10, hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 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 ) |
You Wang | 33fcb49 | 2018-08-03 15:46:42 -0700 | [diff] [blame] | 272 | verifyPortDown( main, "of:0000000000000005", 10, hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 273 | verifyMcastRemoval( main ) |
| 274 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 275 | |
| 276 | def CASE201( self, main ): |
| 277 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 278 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 279 | Combines CASE8 with spine failure |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 280 | Verify flows and groups |
| 281 | Verify traffic |
| 282 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 283 | 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 ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 294 | |
| 295 | def CASE202( self, main ): |
| 296 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 297 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 298 | Combines CASE8 with ingress failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 299 | Verify flows and groups are removed (failure) |
| 300 | Verify flows and groups (recovery) |
| 301 | Verify traffic (recovery) |
| 302 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 303 | 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 Wang | 88b3cbe | 2018-05-10 15:21:39 -0700 | [diff] [blame] | 310 | verifySwitchDown( main, "leaf2", 10, |
| 311 | { "ipv4": False, "ipv6": False }, |
You Wang | 2ce254a | 2018-05-31 15:42:32 -0700 | [diff] [blame] | 312 | [ "h3v4", "h3v6", "h4v4" ], |
| 313 | { "h3v4": "of:0000000000000002/9", |
| 314 | "h3v6": "of:0000000000000002/6", |
| 315 | "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 316 | verifyMcastRemoval( main, removeDHT1=False ) |
| 317 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 318 | |
| 319 | def CASE203( self, main ): |
| 320 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 321 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 322 | Combines CASE8 with egress-dt-leaf failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 323 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 328 | 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 Wang | 88b3cbe | 2018-05-10 15:21:39 -0700 | [diff] [blame] | 335 | verifySwitchDown( main, "leaf5", 10, |
| 336 | hostsToDiscover=[ "h10v4" ], |
| 337 | hostLocations={ "h10v4": ["of:0000000000000004/11", "of:0000000000000005/10"] } ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 338 | verifyMcastRemoval( main, removeDHT1=False ) |
| 339 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 340 | |
| 341 | def CASE204( self, main ): |
| 342 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 343 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 344 | Combines CASE8 with egress-st-leaf failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 345 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 350 | 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 Wang | 88b3cbe | 2018-05-10 15:21:39 -0700 | [diff] [blame] | 357 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 362 | verifyMcastRemoval( main, removeDHT1=False ) |
| 363 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 364 | |
| 365 | def CASE205( self, main ): |
| 366 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 367 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 368 | Combines CASE8 with egress leaves failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 369 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 374 | 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 Wang | 88b3cbe | 2018-05-10 15:21:39 -0700 | [diff] [blame] | 381 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 388 | verifyMcastRemoval( main, removeDHT1=False ) |
| 389 | lib.cleanup( main, copyKarafLog=False ) |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 390 | |
| 391 | def CASE301( self, main ): |
| 392 | """ |
You Wang | e24d627 | 2018-03-27 21:18:50 -0700 | [diff] [blame] | 393 | Sets up 3 ONOS instances, start H-AGG topology |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 394 | Combines CASE8 with ONOS failure and recovery |
Pier | 4b70130 | 2018-03-20 17:26:10 -0700 | [diff] [blame] | 395 | Verify flows and groups (failure) |
| 396 | Verify traffic (failure) |
| 397 | Verify flows and groups (recovery) |
| 398 | Verify traffic (recovery) |
| 399 | """ |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 400 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 431 | # Verify killing one link of dual-homed host h4 |
You Wang | 547893e | 2018-05-08 13:34:59 -0700 | [diff] [blame] | 432 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 434 | # Verify killing one link of dual-homed host h10 |
You Wang | 547893e | 2018-05-08 13:34:59 -0700 | [diff] [blame] | 435 | 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 Wang | 88b3cbe | 2018-05-10 15:21:39 -0700 | [diff] [blame] | 437 | verifySwitchDown( main, "leaf3", 10, |
| 438 | hostsToDiscover=[ "h4v4" ], |
| 439 | hostLocations={ "h4v4": ["of:0000000000000002/10", "of:0000000000000003/10"] } ) |
You Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 440 | 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 Wang | 547893e | 2018-05-08 13:34:59 -0700 | [diff] [blame] | 485 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 487 | # Verify killing one link of dual-homed host h10 |
You Wang | 547893e | 2018-05-08 13:34:59 -0700 | [diff] [blame] | 488 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 490 | 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 Wang | 547893e | 2018-05-08 13:34:59 -0700 | [diff] [blame] | 515 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 517 | # Verify killing one link of dual-homed host h10 |
You Wang | 547893e | 2018-05-08 13:34:59 -0700 | [diff] [blame] | 518 | 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 Wang | c02d835 | 2018-04-17 16:42:10 -0700 | [diff] [blame] | 520 | verifyLinkDown( main, [ [ "leaf3", "spine101" ], [ "leaf2", "spine102" ] ], 8 ) |
| 521 | verifyMcastRemoval( main, removeDHT1=False ) |
| 522 | lib.cleanup( main, copyKarafLog=False ) |