Andreas Pantelopoulos | 90f0b10 | 2018-02-01 13:21:45 -0800 | [diff] [blame] | 1 | |
| 2 | class SRRouting: |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 3 | |
Andreas Pantelopoulos | 90f0b10 | 2018-02-01 13:21:45 -0800 | [diff] [blame] | 4 | def __init__( self ): |
| 5 | self.default = '' |
| 6 | |
| 7 | def CASE1( self, main ): |
| 8 | """ |
Andreas Pantelopoulos | b7904ce | 2018-02-07 16:24:49 -0800 | [diff] [blame] | 9 | Ping between all ipv4 hosts in the topology. |
Andreas Pantelopoulos | 90f0b10 | 2018-02-01 13:21:45 -0800 | [diff] [blame] | 10 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 11 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 12 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 13 | main.case( "Ping between all ipv4 hosts in the topology" ) |
| 14 | setupTest( main, test_idx=1, onosNodes=3, ipv6=False, external=False ) |
| 15 | verify( main, ipv6=False, disconnected=False, external=False ) |
| 16 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | f6ed501 | 2018-02-08 21:26:01 -0800 | [diff] [blame] | 17 | |
| 18 | def CASE2( self, main ): |
| 19 | """ |
| 20 | Ping between all ipv6 hosts in the topology. |
| 21 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 22 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 23 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 24 | main.case( "Ping between all ipv6 hosts in the topology" ) |
| 25 | setupTest( main, test_idx=2, onosNodes=3, ipv4=False, external=False ) |
| 26 | verify( main, ipv4=False, disconnected=False, external=False ) |
| 27 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | f6ed501 | 2018-02-08 21:26:01 -0800 | [diff] [blame] | 28 | |
You Wang | 7957781 | 2018-02-27 16:39:50 -0800 | [diff] [blame] | 29 | def CASE3( self, main ): |
| 30 | """ |
| 31 | Ping between all ipv4 and ipv6 hosts in the topology. |
| 32 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 33 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 34 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 35 | main.case( "Ping between all ipv4 and ipv6 hosts in the topology" ) |
| 36 | setupTest( main, test_idx=3, onosNodes=3, external=False ) |
| 37 | verify( main, disconnected=False, external=False ) |
| 38 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | ba231e7 | 2018-03-01 13:18:21 -0800 | [diff] [blame] | 39 | |
| 40 | def CASE4( self, main ): |
| 41 | """ |
| 42 | Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts |
| 43 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 44 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 45 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 46 | main.case( "Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts" ) |
| 47 | setupTest( main, test_idx=4, onosNodes=3, ipv6=False ) |
| 48 | verify( main, ipv6=False, disconnected=False ) |
| 49 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | ba231e7 | 2018-03-01 13:18:21 -0800 | [diff] [blame] | 50 | |
| 51 | def CASE5( self, main ): |
| 52 | """ |
| 53 | Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts |
| 54 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 55 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 56 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 57 | main.case( "Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts" ) |
| 58 | setupTest( main, test_idx=5, onosNodes=3, ipv4=False ) |
| 59 | verify( main, ipv4=False, disconnected=False ) |
| 60 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | ba231e7 | 2018-03-01 13:18:21 -0800 | [diff] [blame] | 61 | |
| 62 | def CASE6( self, main ): |
| 63 | """ |
| 64 | Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts |
| 65 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 66 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 67 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 68 | main.case( "Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external hosts" ) |
| 69 | setupTest( main, test_idx=6, onosNodes=3 ) |
| 70 | verify( main, disconnected=False ) |
| 71 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | 2eae324 | 2018-03-06 13:47:20 -0800 | [diff] [blame] | 72 | |
| 73 | def CASE7( self, main ): |
| 74 | """ |
| 75 | Ping between ipv4 hosts and an external host that is not configured in |
| 76 | external router config, but reachable through the use of route-add |
| 77 | command. |
| 78 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 79 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 80 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 81 | main.case( "Ping between from ipv4 hosts to external host configured with route-add command" ) |
| 82 | setupTest( main, test_idx=7, onosNodes=3, ipv6=False, external=False ) |
| 83 | verify( main, ipv6=False, internal=False, disconnected=False ) |
| 84 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | 2eae324 | 2018-03-06 13:47:20 -0800 | [diff] [blame] | 85 | |
| 86 | def CASE8( self, main ): |
| 87 | """ |
| 88 | Ping between ipv6 hosts and an external host that is not configured in |
| 89 | external router config, but reachable through the use of route-add |
| 90 | command. |
| 91 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 92 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 93 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 94 | main.case( "Ping between from ipv6 hosts to external host configured with route-add command" ) |
| 95 | setupTest( main, test_idx=8, onosNodes=3, ipv4=False, external=False ) |
| 96 | verify( main, ipv6=False, internal=False, disconnected=False ) |
| 97 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | 2eae324 | 2018-03-06 13:47:20 -0800 | [diff] [blame] | 98 | |
| 99 | def CASE9( self, main ): |
| 100 | """ |
| 101 | Ping between ipv4 and pv6 hosts and external hosts that is not configured in |
| 102 | external router config, but reachable through the use of route-add |
| 103 | command. |
| 104 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 105 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 106 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 107 | main.case( "Ping between from ipv4 and ipv6 hosts to external host configured with route-add command" ) |
| 108 | setupTest( main, test_idx=9, onosNodes=3, external=False ) |
| 109 | verify( main, internal=False, disconnected=False ) |
| 110 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 111 | |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 112 | def CASE101( self, main ): |
| 113 | """ |
| 114 | Kill and recover links |
| 115 | Ping between all ipv4 hosts in the topology. |
| 116 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 117 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 118 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 119 | main.case( "Test link failures with IPv4 hosts" ) |
| 120 | setupTest( main, test_idx=101, onosNodes=3, ipv6=False, external=False ) |
| 121 | verify( main, ipv6=False, external=False, disconnected=False ) |
| 122 | verifyLinkFailure( main, ipv6=False, external=False ) |
| 123 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 124 | |
| 125 | def CASE102( self, main ): |
| 126 | """ |
| 127 | Kill and recover links |
| 128 | Ping between all ipv6 hosts in the topology. |
| 129 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 130 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 131 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 132 | main.case( "Test link failures with IPv6 hosts" ) |
| 133 | setupTest( main, test_idx=102, onosNodes=3, ipv4=False, external=False ) |
| 134 | verify( main, ipv4=False, external=False, disconnected=False ) |
| 135 | verifyLinkFailure( main, ipv4=False, external=False ) |
| 136 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 137 | |
| 138 | def CASE103( self, main ): |
| 139 | """ |
| 140 | Kill and recover links |
| 141 | Ping between all ipv4 and ipv6 hosts in the topology. |
| 142 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 143 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 144 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 145 | main.case( "Test link failures with IPv4 and IPv6 hosts" ) |
| 146 | setupTest( main, test_idx=103, onosNodes=3, external=False ) |
| 147 | verify( main, external=False, disconnected=False ) |
| 148 | verifyLinkFailure( main, external=False ) |
| 149 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 150 | |
| 151 | def CASE104( self, main ): |
| 152 | """ |
| 153 | Kill and recover links |
| 154 | Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts |
| 155 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 156 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 157 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 158 | main.case( "Test link failures with IPv4 hosts including external hosts" ) |
| 159 | setupTest( main, test_idx=104, onosNodes=3, ipv6=False ) |
| 160 | verify( main, ipv6=False, disconnected=False ) |
| 161 | verifyLinkFailure( main, ipv6=False ) |
| 162 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 163 | |
| 164 | def CASE105( self, main ): |
| 165 | """ |
| 166 | Kill and recover links |
| 167 | Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts |
| 168 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 169 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 170 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 171 | main.case( "Test link failures with IPv6 hosts including external hosts" ) |
| 172 | setupTest( main, test_idx=105, onosNodes=3, ipv4=False ) |
| 173 | verify( main, ipv4=False, disconnected=False ) |
| 174 | verifyLinkFailure( main, ipv4=False ) |
| 175 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 176 | |
| 177 | def CASE106( self, main ): |
| 178 | """ |
| 179 | Kill and recover links |
| 180 | Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts |
| 181 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 182 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 183 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 184 | main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts" ) |
| 185 | setupTest( main, test_idx=106, onosNodes=3 ) |
| 186 | verify( main, disconnected=False ) |
| 187 | verifyLinkFailure( main ) |
| 188 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 189 | |
| 190 | def CASE107( self, main ): |
| 191 | """ |
| 192 | Kill and recover links |
| 193 | Ping between ipv4 hosts and an external host that is not configured in |
| 194 | external router config, but reachable through the use of route-add command. |
| 195 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 196 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 197 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 198 | main.case( "Test link failures with IPv4 hosts including external hosts configured with route-add command" ) |
| 199 | setupTest( main, test_idx=107, onosNodes=3, ipv6=False, external=False ) |
| 200 | verify( main, ipv6=False, disconnected=False ) |
| 201 | verifyLinkFailure( main, ipv6=False, internal=False ) |
| 202 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 203 | |
| 204 | def CASE108( self, main ): |
| 205 | """ |
| 206 | Kill and recover links |
| 207 | Ping between ipv6 hosts and an external host that is not configured in |
| 208 | external router config, but reachable through the use of route-add command. |
| 209 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 210 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 211 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 212 | main.case( "Test link failures with IPv6 hosts including external hosts configured with route-add command" ) |
| 213 | setupTest( main, test_idx=108, onosNodes=3, ipv4=False, external=False ) |
| 214 | verify( main, ipv4=False, disconnected=False ) |
| 215 | verifyLinkFailure( main, ipv4=False, internal=False ) |
| 216 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 217 | |
| 218 | def CASE109( self, main ): |
| 219 | """ |
| 220 | Kill and recover links |
| 221 | Ping between ipv4 and pv6 hosts and external hosts that is not configured in |
| 222 | external router config, but reachable through the use of route-add command. |
| 223 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 224 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 225 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 226 | main.case( "Test link failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" ) |
| 227 | setupTest( main, test_idx=109, onosNodes=3, external=False ) |
| 228 | verify( main, disconnected=False ) |
| 229 | verifyLinkFailure( main, internal=False ) |
| 230 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 231 | |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 232 | def CASE201( self, main ): |
| 233 | """ |
| 234 | Kill and recover spine switches |
| 235 | Ping between all ipv4 hosts in the topology. |
| 236 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 237 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 238 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 239 | main.case( "Test switch failures with IPv4 hosts" ) |
| 240 | setupTest( main, test_idx=201, onosNodes=3, ipv6=False, external=False ) |
| 241 | verify( main, ipv6=False, external=False, disconnected=False ) |
| 242 | verifySwitchFailure( main, ipv6=False, external=False ) |
| 243 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 244 | |
| 245 | def CASE202( self, main ): |
| 246 | """ |
| 247 | Kill and recover spine switches |
| 248 | Ping between all ipv6 hosts in the topology. |
| 249 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 250 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 251 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 252 | main.case( "Test switch failures with IPv6 hosts" ) |
| 253 | setupTest( main, test_idx=202, onosNodes=3, ipv4=False, external=False ) |
| 254 | verify( main, ipv4=False, external=False, disconnected=False ) |
| 255 | verifySwitchFailure( main, ipv4=False, external=False ) |
| 256 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 257 | |
| 258 | def CASE203( self, main ): |
| 259 | """ |
| 260 | Kill and recover spine switches |
| 261 | Ping between all ipv4 and ipv6 hosts in the topology. |
| 262 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 263 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 264 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 265 | main.case( "Test switch failures with IPv4 and IPv6 hosts" ) |
| 266 | setupTest( main, test_idx=203, onosNodes=3, external=False ) |
| 267 | verify( main, external=False, disconnected=False ) |
| 268 | verifySwitchFailure( main, external=False ) |
| 269 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 270 | |
| 271 | def CASE204( self, main ): |
| 272 | """ |
| 273 | Kill and recover spine switches |
| 274 | Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts |
| 275 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 276 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 277 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 278 | main.case( "Test switch failures with IPv4 hosts including external hosts" ) |
| 279 | setupTest( main, test_idx=204, onosNodes=3, ipv6=False ) |
| 280 | verify( main, ipv6=False, disconnected=False ) |
| 281 | verifySwitchFailure( main, ipv6=False ) |
| 282 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 283 | |
| 284 | def CASE205( self, main ): |
| 285 | """ |
| 286 | Kill and recover spine switches |
| 287 | Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts |
| 288 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 289 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 290 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 291 | main.case( "Test switch failures with IPv6 hosts including external hosts" ) |
| 292 | setupTest( main, test_idx=205, onosNodes=3, ipv4=False ) |
| 293 | verify( main, ipv4=False, disconnected=False ) |
| 294 | verifySwitchFailure( main, ipv4=False ) |
| 295 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 296 | |
| 297 | def CASE206( self, main ): |
| 298 | """ |
| 299 | Kill and recover spine switches |
| 300 | Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts |
| 301 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 302 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 303 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 304 | main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts" ) |
| 305 | setupTest( main, test_idx=206, onosNodes=3 ) |
| 306 | verify( main, disconnected=False ) |
| 307 | verifySwitchFailure( main ) |
| 308 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 309 | |
| 310 | def CASE207( self, main ): |
| 311 | """ |
| 312 | Kill and recover spine switches |
| 313 | Ping between ipv4 hosts and an external host that is not configured in |
| 314 | external router config, but reachable through the use of route-add command. |
| 315 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 316 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 317 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 318 | main.case( "Test switch failures with IPv4 hosts including external hosts configured with route-add command" ) |
| 319 | setupTest( main, test_idx=207, onosNodes=3, ipv6=False, external=False ) |
| 320 | verify( main, ipv6=False, disconnected=False ) |
| 321 | verifySwitchFailure( main, ipv6=False, internal=False ) |
| 322 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 323 | |
| 324 | def CASE208( self, main ): |
| 325 | """ |
| 326 | Kill and recover spine switches |
| 327 | Ping between ipv6 hosts and an external host that is not configured in |
| 328 | external router config, but reachable through the use of route-add command. |
| 329 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 330 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 331 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 332 | main.case( "Test switch failures with IPv6 hosts including external hosts configured with route-add command" ) |
| 333 | setupTest( main, test_idx=208, onosNodes=3, ipv4=False, external=False ) |
| 334 | verify( main, ipv4=False, disconnected=False ) |
| 335 | verifySwitchFailure( main, ipv4=False, internal=False ) |
| 336 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
You Wang | 2731757 | 2018-03-06 12:13:11 -0800 | [diff] [blame] | 337 | |
| 338 | def CASE209( self, main ): |
| 339 | """ |
| 340 | Kill and recover spine switches |
| 341 | Ping between ipv4 and pv6 hosts and external hosts that is not configured in |
| 342 | external router config, but reachable through the use of route-add command. |
| 343 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 344 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 345 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 346 | main.case( "Test switch failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" ) |
| 347 | setupTest( main, test_idx=209, onosNodes=3, external=False ) |
| 348 | verify( main, disconnected=False ) |
| 349 | verifySwitchFailure( main, internal=False ) |
| 350 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 351 | |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 352 | def CASE301( self, main ): |
| 353 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 354 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 355 | Ping between all ipv4 hosts in the topology. |
| 356 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 357 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 358 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 359 | main.case( "Test onos failures with IPv4 hosts" ) |
| 360 | setupTest( main, test_idx=301, onosNodes=3, ipv6=False, external=False ) |
| 361 | verify( main, ipv6=False, external=False, disconnected=False ) |
| 362 | verifyOnosFailure( main, ipv6=False, external=False ) |
| 363 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 364 | |
| 365 | def CASE302( self, main ): |
| 366 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 367 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 368 | Ping between all ipv6 hosts in the topology. |
| 369 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 370 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 371 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 372 | main.case( "Test onos failures with IPv6 hosts" ) |
| 373 | setupTest( main, test_idx=302, onosNodes=3, ipv4=False, external=False ) |
| 374 | verify( main, ipv4=False, external=False, disconnected=False ) |
| 375 | verifyOnosFailure( main, ipv4=False, external=False ) |
| 376 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 377 | |
| 378 | def CASE303( self, main ): |
| 379 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 380 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 381 | Ping between all ipv4 and ipv6 hosts in the topology. |
| 382 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 383 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 384 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 385 | main.case( "Test onos failures with IPv4 and IPv6 hosts" ) |
| 386 | setupTest( main, test_idx=303, onosNodes=3, external=False ) |
| 387 | verify( main, external=False, disconnected=False ) |
| 388 | verifyOnosFailure( main, external=False ) |
| 389 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 390 | |
| 391 | def CASE304( self, main ): |
| 392 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 393 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 394 | Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts |
| 395 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 396 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 397 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 398 | main.case( "Test onos failures with IPv4 hosts including external hosts" ) |
| 399 | setupTest( main, test_idx=304, onosNodes=3, ipv6=False ) |
| 400 | verify( main, ipv6=False, disconnected=False ) |
| 401 | verifyOnosFailure( main, ipv6=False ) |
| 402 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 403 | |
| 404 | def CASE305( self, main ): |
| 405 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 406 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 407 | Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts |
| 408 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 409 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 410 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 411 | main.case( "Test onos failures with IPv6 hosts including external hosts" ) |
| 412 | setupTest( main, test_idx=305, onosNodes=3, ipv4=False ) |
| 413 | verify( main, ipv4=False, disconnected=False ) |
| 414 | verifyOnosFailure( main, ipv4=False ) |
| 415 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 416 | |
| 417 | def CASE306( self, main ): |
| 418 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 419 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 420 | Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts |
| 421 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 422 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 423 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 424 | main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts" ) |
| 425 | setupTest( main, test_idx=306, onosNodes=3 ) |
| 426 | verify( main, disconnected=False ) |
| 427 | verifyOnosFailure( main ) |
| 428 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 429 | |
| 430 | def CASE307( self, main ): |
| 431 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 432 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 433 | Ping between ipv4 hosts and an external host that is not configured in |
| 434 | external router config, but reachable through the use of route-add command. |
| 435 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 436 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 437 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 438 | main.case( "Test onos failures with IPv4 hosts including external hosts configured with route-add command" ) |
| 439 | setupTest( main, test_idx=307, onosNodes=3, ipv6=False, external=False ) |
| 440 | verify( main, ipv6=False, disconnected=False ) |
| 441 | verifyOnosFailure( main, ipv6=False, internal=False ) |
| 442 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 443 | |
| 444 | def CASE308( self, main ): |
| 445 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 446 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 447 | Ping between ipv6 hosts and an external host that is not configured in |
| 448 | external router config, but reachable through the use of route-add command. |
| 449 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 450 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 451 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 452 | main.case( "Test onos failures with IPv6 hosts including external hosts configured with route-add command" ) |
| 453 | setupTest( main, test_idx=308, onosNodes=3, ipv4=False, external=False ) |
| 454 | verify( main, ipv4=False, disconnected=False ) |
| 455 | verifyOnosFailure( main, ipv4=False, internal=False ) |
| 456 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 457 | |
| 458 | def CASE309( self, main ): |
| 459 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 460 | Kill and recover onos nodes |
Jon Hall | 3c91016 | 2018-03-07 14:42:16 -0800 | [diff] [blame] | 461 | Ping between ipv4 and pv6 hosts and external hosts that is not configured in |
| 462 | external router config, but reachable through the use of route-add command. |
| 463 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 464 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 465 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 466 | main.case( "Test onos failures with IPv4 and IPv6 hosts including external hosts configured with route-add command" ) |
| 467 | setupTest( main, test_idx=309, onosNodes=3, external=False ) |
| 468 | verify( main, disconnected=False ) |
| 469 | verifyOnosFailure( main, internal=False ) |
| 470 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Andreas Pantelopoulos | fab6bf3 | 2018-03-06 18:56:35 -0800 | [diff] [blame] | 471 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 472 | def CASE601( self, main ): |
| 473 | """ |
| 474 | Bring down all switches |
| 475 | Verify Topology |
| 476 | Bring up all switches |
| 477 | Verify |
| 478 | |
| 479 | repeat x3 |
| 480 | """ |
| 481 | import time |
| 482 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 483 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 484 | main.case( "Bring down all switches then recover" ) |
| 485 | setupTest( main, test_idx=601, external=False ) |
| 486 | main.Cluster.next().CLI.balanceMasters() |
| 487 | time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) ) |
| 488 | main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts ) |
| 489 | totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] ) |
| 490 | totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] ) |
| 491 | switchList = [ 'spine101', 'spine102', 'spine103', 'spine104', |
| 492 | 'leaf1', 'leaf2', 'leaf3', 'leaf4', 'leaf5', 'leaf6' ] |
| 493 | verify( main, disconnected=False, external=False ) |
| 494 | for i in range( 1, 4 ): |
| 495 | main.log.info( "Beginning iteration {} of stopping then starting all switches".format( i ) ) |
| 496 | main.log.debug( main.Cluster.next().summary() ) |
| 497 | # Bring down all switches |
| 498 | main.step( "Stopping switches - iteration " + str( i ) ) |
| 499 | switchStop = main.TRUE |
| 500 | for switch in switchList: |
| 501 | switchStop = switchStop and main.Network.switch( SW=switch, OPTION="stop" ) |
| 502 | utilities.assert_equals( expect=main.TRUE, actual=switchStop, |
| 503 | onpass="All switches stopped", |
| 504 | onfail="Failed to stop all switches" ) |
| 505 | |
| 506 | time.sleep( 60 ) |
| 507 | lib.verifyTopology( main, 0, 0, main.Cluster.numCtrls ) |
| 508 | # Bring up all switches |
| 509 | main.log.debug( main.Cluster.next().summary() ) |
| 510 | main.step( "Starting switches - iteration " + str( i ) ) |
| 511 | switchStart = main.TRUE |
| 512 | for switch in switchList: |
| 513 | switchStart = switchStart and main.Network.switch( SW=switch, OPTION="start" ) |
| 514 | utilities.assert_equals( expect=main.TRUE, actual=switchStart, |
| 515 | onpass="All switches started", |
| 516 | onfail="Failed to start all switches" ) |
| 517 | |
| 518 | main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts ) |
| 519 | lib.verifyTopology( main, totalSwitches, totalLinks, main.Cluster.numCtrls ) |
| 520 | main.log.debug( main.Cluster.next().summary() ) |
| 521 | time.sleep( 60 ) |
| 522 | main.log.debug( main.Cluster.next().summary() ) |
| 523 | time.sleep( 60 ) |
| 524 | main.log.debug( main.Cluster.next().summary() ) |
| 525 | verifyPing( main ) |
| 526 | verify( main, disconnected=False, external=False ) |
| 527 | verify( main, disconnected=False, external=False ) |
| 528 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 529 | |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 530 | def CASE602( self, main ): |
| 531 | """" |
| 532 | Take down a leaf switch that is paired and has a dual homed host |
| 533 | Restore the leaf switch |
| 534 | Repeat for various dual homed hosts and paired switches |
| 535 | """ |
| 536 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 537 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 538 | main.case( "Drop a leaf switch that is paired and has a dual homed host." ) |
| 539 | setupTest( main, test_idx=602, onosNodes=3 ) |
| 540 | verify( main, disconnected=False ) |
| 541 | # Kill leaf-2 |
| 542 | lib.killSwitch( main, "leaf2", 9, 38 ) |
| 543 | hostLocations = { "h4v6": "of:0000000000000003/6", |
| 544 | "h5v6": "of:0000000000000003/7", |
| 545 | "h4v4": "of:0000000000000003/10", |
| 546 | "h5v4": "of:0000000000000003/11" } |
| 547 | lib.verifyHostLocations( main, hostLocations ) |
| 548 | main.disconnectedIpv4Hosts = [ "h3v4" ] |
| 549 | main.disconnectedIpv6Hosts = [ "h3v6" ] |
| 550 | verify( main ) |
| 551 | # Recover leaf-2 |
| 552 | lib.recoverSwitch( main, "leaf2", 10, 48, rediscoverHosts=True) |
| 553 | hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ], |
| 554 | "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ], |
| 555 | "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ], |
| 556 | "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] } |
| 557 | lib.verifyHostLocations( main, hostLocations ) |
| 558 | main.disconnectedIpv4Hosts = [] |
| 559 | main.disconnectedIpv6Hosts = [] |
| 560 | verify( main, disconnected=False ) |
| 561 | # Kill leaf-4 |
| 562 | lib.killSwitch( main, "leaf4", 9, 38 ) |
| 563 | hostLocations = { "h9v6": "of:0000000000000005/6", |
| 564 | "h10v6": "of:0000000000000005/7", |
| 565 | "h9v4": "of:0000000000000005/9", |
| 566 | "h10v4": "of:0000000000000005/10" } |
| 567 | lib.verifyHostLocations( main, hostLocations ) |
| 568 | main.disconnectedIpv4Hosts = [ "h8v4" ] |
| 569 | main.disconnectedIpv6Hosts = [ "h8v6" ] |
| 570 | verify( main ) |
| 571 | # Recover leaf-4 |
| 572 | lib.recoverSwitch( main, "leaf4", 10, 48, rediscoverHosts=True) |
| 573 | hostLocations = { "h9v6": [ "of:0000000000000004/7", "of:0000000000000005/6" ], |
| 574 | "h10v6": [ "of:0000000000000004/8", "of:0000000000000005/7" ], |
| 575 | "h9v4": [ "of:0000000000000004/10", "of:0000000000000005/9" ], |
| 576 | "h10v4": [ "of:0000000000000004/11", "of:0000000000000005/10" ] } |
| 577 | lib.verifyHostLocations( main, hostLocations ) |
| 578 | main.disconnectedIpv4Hosts = [] |
| 579 | main.disconnectedIpv6Hosts = [] |
| 580 | verify( main, disconnected=False ) |
| 581 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 582 | |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 583 | def CASE603( self, main ): |
| 584 | """" |
| 585 | Drop HAGG-1 device and test connectivity. |
| 586 | Drop DAAS-1 device and test connectivity (some hosts lost it) |
| 587 | Bring up DAAS-1 and test connectivity (all hosts gained it again) |
| 588 | |
| 589 | Repeat the same with HAGG-2 and DAAS-2. |
| 590 | """ |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 591 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 592 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 593 | main.case( "Drop hagg spine switch along with dass leaf switch." ) |
| 594 | setupTest( main, test_idx=603, onosNodes=3 ) |
| 595 | main.disconnectedIpv4Hosts = [] |
| 596 | main.disconnectedIpv6Hosts = [] |
| 597 | |
| 598 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 599 | lib.killSwitch( main, "spine103", |
| 600 | int( main.params[ "TOPO" ]["switchNum" ] ) - 1, |
| 601 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 602 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 603 | lib.killSwitch( main, "leaf6", |
| 604 | int( main.params[ "TOPO" ]["switchNum" ] ) - 2, |
| 605 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 606 | main.disconnectedIpv4Hosts = [ 'h12v4', 'h13v4'] |
| 607 | main.disconnectedIpv6Hosts = [ 'h12v6', 'h13v6'] |
| 608 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 609 | lib.recoverSwitch( main, "leaf6", |
| 610 | int( main.params[ "TOPO" ]["switchNum" ] ) - 1, |
| 611 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6, |
| 612 | rediscoverHosts=True) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 613 | main.disconnectedIpv4Hosts = [] |
| 614 | main.disconnectedIpv6Hosts = [] |
| 615 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 616 | lib.recoverSwitch( main, "spine103", |
| 617 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 618 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 619 | verify( main ) |
| 620 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 621 | lib.killSwitch( main, "spine104", |
| 622 | int( main.params[ "TOPO" ]["switchNum" ] ) - 1, |
| 623 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 624 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 625 | lib.killSwitch( main, "leaf1", |
| 626 | int( main.params[ "TOPO" ]["switchNum" ] ) - 2, |
| 627 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 8 ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 628 | main.disconnectedIpv4Hosts = [ 'h1v4', 'h2v4'] |
| 629 | main.disconnectedIpv6Hosts = [ 'h1v6', 'h2v6'] |
| 630 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 631 | lib.recoverSwitch( main, "leaf1", |
| 632 | int( main.params[ "TOPO" ]["switchNum" ] ) - 1, |
| 633 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6, |
| 634 | rediscoverHosts=True ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 635 | main.disconnectedIpv4Hosts = [] |
| 636 | main.disconnectedIpv6Hosts = [] |
| 637 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 638 | lib.recoverSwitch( main, "spine104", |
| 639 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 640 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 641 | verify( main ) |
| 642 | |
| 643 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 644 | |
| 645 | def CASE604( self, main ): |
| 646 | """" |
| 647 | Drop HAGG-1 device and test connectivity. |
| 648 | Bring up HAGG-1 and test connectivity. |
| 649 | Drop HAGG-2 device and test connectivity. |
| 650 | Bring up HAGG-2 device and test connectivity |
| 651 | """ |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 652 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 653 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 654 | main.case( "Drop hagg spine switches." ) |
| 655 | setupTest( main, test_idx=604, onosNodes=3 ) |
| 656 | main.disconnectedIpv4Hosts = [] |
| 657 | main.disconnectedIpv6Hosts = [] |
| 658 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 659 | lib.killSwitch( main, "spine103", |
| 660 | int( main.params[ "TOPO" ]["switchNum" ] ) - 1, |
| 661 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 662 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 663 | lib.recoverSwitch( main, "spine103", |
| 664 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 665 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 666 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 667 | lib.killSwitch( main, "spine104", |
| 668 | int( main.params[ "TOPO" ]["switchNum" ] ) - 1, |
| 669 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 670 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 671 | lib.recoverSwitch( main, "spine104", |
| 672 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 673 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
Andreas Pantelopoulos | 74c7ff2 | 2018-05-01 15:42:02 -0700 | [diff] [blame] | 674 | verify( main ) |
| 675 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 676 | |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 677 | def CASE605( self, main ): |
| 678 | """ |
| 679 | Drop HAGG-1 and test connectivity (expect no failure) |
| 680 | Drop all leafs in big fabric and test connectivity (expect some failures) |
| 681 | Bring up HAGG-1 and test connectivity (still expect some failures) |
| 682 | Bring up all leafs in big fabric and test connectivity (expect no failure) |
| 683 | Repeat above with HAGG-2 |
| 684 | """ |
| 685 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 686 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 687 | main.case( "Drop one hagg and all leafs in big fabric" ) |
| 688 | setupTest( main, test_idx=605, onosNodes=3 ) |
| 689 | main.disconnectedIpv4Hosts = [] |
| 690 | main.disconnectedIpv6Hosts = [] |
| 691 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 692 | lib.killSwitch( main, "spine103", |
| 693 | int( main.params[ "TOPO" ][ "switchNum" ] ) - 1, |
| 694 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 ) |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 695 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 696 | lib.killSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ], |
| 697 | int( main.params[ "TOPO" ][ "switchNum" ] ) - 5, |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 698 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 42 ) |
| 699 | main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4" ] |
| 700 | main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6" ] |
| 701 | main.disconnectedExternalIpv4Hosts = [ "rh1v4", "rh2v4", "rh5v4" ] |
| 702 | main.disconnectedExternalIpv6Hosts = [ "rh1v6", "rh11v6", "rh5v6", "rh2v6", "rh22v6" ] |
| 703 | verify( main, disconnected=True ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 704 | lib.recoverSwitch( main, "spine103", |
| 705 | int( main.params[ "TOPO" ][ "switchNum" ] ) - 4, |
| 706 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 36 ) |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 707 | verify( main, disconnected=True ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 708 | lib.recoverSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ], |
| 709 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 710 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
| 711 | main.disconnectedIpv4Hosts = [] |
| 712 | main.disconnectedIpv6Hosts = [] |
| 713 | main.disconnectedExternalIpv4Hosts = [ ] |
| 714 | main.disconnectedExternalIpv6Hosts = [ ] |
| 715 | verify( main ) |
| 716 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 717 | lib.killSwitch( main, "spine104", |
| 718 | int( main.params[ "TOPO" ][ "switchNum" ] ) - 1, |
| 719 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 6 ) |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 720 | verify( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 721 | lib.killSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ], |
| 722 | int( main.params[ "TOPO" ][ "switchNum" ] ) - 5, |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 723 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 42 ) |
| 724 | main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4" ] |
| 725 | main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6" ] |
| 726 | main.disconnectedExternalIpv4Hosts = [ "rh1v4", "rh2v4", "rh5v4" ] |
| 727 | main.disconnectedExternalIpv6Hosts = [ "rh1v6", "rh11v6", "rh5v6", "rh2v6", "rh22v6" ] |
| 728 | verify( main, disconnected=True ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 729 | lib.recoverSwitch( main, "spine104", |
| 730 | int( main.params[ "TOPO" ][ "switchNum" ] ) - 4, |
| 731 | int( main.params[ "TOPO" ][ "linkNum" ] ) - 36 ) |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 732 | verify( main, disconnected=True ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 733 | lib.recoverSwitch( main, [ "leaf2", "leaf3", "leaf4", "leaf5" ], |
| 734 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 735 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
| 736 | main.disconnectedIpv4Hosts = [] |
| 737 | main.disconnectedIpv6Hosts = [] |
| 738 | main.disconnectedExternalIpv4Hosts = [ ] |
| 739 | main.disconnectedExternalIpv6Hosts = [ ] |
| 740 | verify( main ) |
| 741 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 742 | |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 743 | def CASE606( self, main ): |
| 744 | """ |
| 745 | Drop SPINE-1 and test connectivity |
| 746 | Drop paired leaf and test connectivity (expect some failures) |
| 747 | Bring up SPINE-1 and test connectivity (still expect some failures) |
| 748 | Bring up the paired leaf and test connectivity |
| 749 | Repeat above with SPINE-2 and a different paired leaf |
| 750 | """ |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 751 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 752 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 753 | main.case( "Drop spine and paired leaf" ) |
| 754 | setupTest( main, test_idx=606, onosNodes=3 ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 755 | verify( main, disconnected=False ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 756 | # Drop spine101 and leaf-2/3 |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 757 | lib.killSwitch( main, "spine101", 9, 30 ) |
| 758 | verify( main, disconnected=False ) |
| 759 | lib.killSwitch( main, "leaf2", 8, 24 ) |
| 760 | lib.killSwitch( main, "leaf3", 7, 20 ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 761 | main.disconnectedIpv4Hosts = [ "h3v4", "h4v4", "h5v4", "h6v4", "h7v4" ] |
| 762 | main.disconnectedIpv6Hosts = [ "h3v6", "h4v6", "h5v6", "h6v6", "h7v6" ] |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 763 | verify( main ) |
| 764 | lib.recoverSwitch( main, "spine101", 8, 30 ) |
| 765 | verify( main ) |
| 766 | lib.recoverSwitch( main, "leaf3", 9, 38 ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 767 | lib.recoverSwitch( main, "leaf2", 10, 48, rediscoverHosts=True, |
| 768 | hostsToDiscover=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 769 | main.disconnectedIpv4Hosts = [] |
| 770 | main.disconnectedIpv6Hosts = [] |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 771 | verify( main, disconnected=False ) |
| 772 | # Drop spine102 and leaf-4/5 |
| 773 | lib.killSwitch( main, "spine102", 9, 30 ) |
| 774 | verify( main, disconnected=False ) |
| 775 | lib.killSwitch( main, "leaf4", 8, 24 ) |
| 776 | lib.killSwitch( main, "leaf5", 7, 20 ) |
| 777 | main.disconnectedIpv4Hosts = [ "h8v4", "h9v4", "h10v4", "h11v4" ] |
| 778 | main.disconnectedIpv6Hosts = [ "h8v6", "h9v6", "h10v6", "h11v6" ] |
| 779 | verify( main, external=False ) |
| 780 | lib.recoverSwitch( main, "spine102", 8, 30 ) |
| 781 | verify( main, external=False ) |
| 782 | lib.recoverSwitch( main, "leaf5", 9, 38 ) |
| 783 | lib.recoverSwitch( main, "leaf4", 10, 48, rediscoverHosts=True, |
| 784 | hostsToDiscover=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts ) |
| 785 | main.disconnectedIpv4Hosts = [] |
| 786 | main.disconnectedIpv6Hosts = [] |
| 787 | verify( main, disconnected=False ) |
| 788 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 789 | |
| 790 | def CASE620( self, main ): |
| 791 | """ |
| 792 | Take down one of double links towards the spine from all leaf switches and |
| 793 | check that buckets in select groups change accordingly |
| 794 | Bring up links again and check that buckets in select groups change accordingly |
| 795 | """ |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 796 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 797 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 798 | main.case( "Take down one of double links towards the spine" ) |
| 799 | setupTest( main, test_idx=620, onosNodes=3 ) |
| 800 | verify( main, disconnected=False ) |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 801 | groupBuckets = { "of:0000000000000002": { "10.1.0.0/24": 4, "10.1.10.0/24": 4, |
| 802 | "10.2.0.0/24": 1, "10.2.30.0/24": 1, "10.2.20.0/24": 1, |
| 803 | "10.2.10.0/24": 4, "10.2.40.0/24": 4, |
| 804 | "10.3.0.0/24": 4, "10.3.10.0/24": 8, "10.3.30.0/24": 8, |
| 805 | "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 }, |
| 806 | "of:0000000000000003": { "10.1.0.0/24": 4, "10.1.10.0/24": 4, |
| 807 | "10.2.0.0/24": 4, "10.2.30.0/24": 1, "10.2.20.0/24": 1, |
| 808 | "10.2.10.0/24": 1, "10.2.40.0/24": 1, |
| 809 | "10.3.0.0/24": 4, "10.3.10.0/24": 8, "10.3.30.0/24": 8, |
| 810 | "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 }, |
| 811 | "of:0000000000000004": { "10.1.0.0/24": 4, "10.1.10.0/24": 4, |
| 812 | "10.2.0.0/24": 4, "10.2.30.0/24": 8, "10.2.20.0/24": 8, |
| 813 | "10.2.10.0/24": 4, "10.2.40.0/24": 4, |
| 814 | "10.3.0.0/24": 1, "10.3.10.0/24": 1, "10.3.30.0/24": 1, |
| 815 | "10.3.20.0/24": 4, "10.5.10.0/24": 4, "10.5.20.0/24": 4 }, |
| 816 | "of:0000000000000005": { "10.1.0.0/24": 4, "10.1.10.0/24": 4, |
| 817 | "10.2.0.0/24": 4, "10.2.30.0/24": 8, "10.2.20.0/24": 8, |
| 818 | "10.2.10.0/24": 4, "10.2.40.0/24": 4, |
| 819 | "10.3.0.0/24": 4, "10.3.10.0/24": 1, "10.3.30.0/24": 1, |
| 820 | "10.3.20.0/24": 1, "10.5.10.0/24": 4, "10.5.20.0/24": 4 } } |
| 821 | for switch, subnets in groupBuckets.items(): |
| 822 | lib.checkGroupsForBuckets( main, switch, subnets ) |
| 823 | # Take down one of double links |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 824 | portsToDisable = [ [ "of:0000000000000002", 1 ], [ "of:0000000000000002", 3 ], |
| 825 | [ "of:0000000000000003", 1 ], [ "of:0000000000000003", 3 ], |
| 826 | [ "of:0000000000000004", 1 ], [ "of:0000000000000004", 3 ], |
| 827 | [ "of:0000000000000005", 1 ], [ "of:0000000000000005", 3 ] ] |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 828 | lib.disablePortBatch( main, portsToDisable, 10, 32 ) |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 829 | groupBucketsNew = { "of:0000000000000002": { "10.1.0.0/24": 2, "10.1.10.0/24": 2, |
| 830 | "10.2.0.0/24": 1, "10.2.30.0/24": 1, "10.2.20.0/24": 1, |
| 831 | "10.2.10.0/24": 2, "10.2.40.0/24": 2, |
| 832 | "10.3.0.0/24": 2, "10.3.10.0/24": 4, "10.3.30.0/24": 4, |
| 833 | "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 }, |
| 834 | "of:0000000000000003": { "10.1.0.0/24": 2, "10.1.10.0/24": 2, |
| 835 | "10.2.0.0/24": 2, "10.2.30.0/24": 1, "10.2.20.0/24": 1, |
| 836 | "10.2.10.0/24": 1, "10.2.40.0/24": 1, |
| 837 | "10.3.0.0/24": 2, "10.3.10.0/24": 4, "10.3.30.0/24": 4, |
| 838 | "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 }, |
| 839 | "of:0000000000000004": { "10.1.0.0/24": 2, "10.1.10.0/24": 2, |
| 840 | "10.2.0.0/24": 2, "10.2.30.0/24": 4, "10.2.20.0/24": 4, |
| 841 | "10.2.10.0/24": 2, "10.2.40.0/24": 2, |
| 842 | "10.3.0.0/24": 1, "10.3.10.0/24": 1, "10.3.30.0/24": 1, |
| 843 | "10.3.20.0/24": 2, "10.5.10.0/24": 2, "10.5.20.0/24": 2 }, |
| 844 | "of:0000000000000005": { "10.1.0.0/24": 2, "10.1.10.0/24": 2, |
| 845 | "10.2.0.0/24": 2, "10.2.30.0/24": 4, "10.2.20.0/24": 4, |
| 846 | "10.2.10.0/24": 2, "10.2.40.0/24": 2, |
| 847 | "10.3.0.0/24": 2, "10.3.10.0/24": 1, "10.3.30.0/24": 1, |
| 848 | "10.3.20.0/24": 1, "10.5.10.0/24": 2, "10.5.20.0/24": 2 } } |
| 849 | for switch, subnets in groupBucketsNew.items(): |
| 850 | lib.checkGroupsForBuckets( main, switch, subnets ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 851 | verify( main, disconnected=False ) |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 852 | # Bring up the links |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 853 | lib.enablePortBatch( main, portsToDisable, 10, 48 ) |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 854 | for switch, subnets in groupBuckets.items(): |
| 855 | lib.checkGroupsForBuckets( main, switch, subnets ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 856 | verify( main, disconnected=False ) |
| 857 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 858 | |
| 859 | def CASE621( self, main ): |
| 860 | """ |
| 861 | Remove all the links in the network and restore all Links (repeat x3) |
| 862 | """ |
| 863 | import time |
| 864 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 865 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 866 | main.case( "Remove all the links in the network and restore all Links" ) |
| 867 | setupTest( main, test_idx=621, onosNodes=3 ) |
| 868 | verify( main, disconnected=False ) |
| 869 | linksToRemove = [ ["spine101", "spine103"], ["spine102", "spine104"], |
| 870 | ["spine103", "leaf6"], ["spine103", "leaf1"], |
| 871 | ["spine104", "leaf6"], ["spine104", "leaf1"], |
| 872 | ["spine101", "leaf2"], ["spine101", "leaf3"], ["spine101", "leaf4"], ["spine101", "leaf5"], |
| 873 | ["spine102", "leaf2"], ["spine102", "leaf3"], ["spine102", "leaf4"], ["spine102", "leaf5"], |
| 874 | ["leaf2", "leaf3"], ["leaf4", "leaf5"] ] |
| 875 | portsToDisable = [ [ "of:0000000000000001", 3 ], [ "of:0000000000000001", 4 ], |
| 876 | [ "of:0000000000000001", 5 ], [ "of:0000000000000001", 6 ], |
| 877 | [ "of:0000000000000002", 6 ], [ "of:0000000000000002", 7 ], |
| 878 | [ "of:0000000000000002", 8 ], [ "of:0000000000000002", 9 ], |
| 879 | [ "of:0000000000000002", 10 ], [ "of:0000000000000002", 11 ], |
| 880 | [ "of:0000000000000003", 6 ], [ "of:0000000000000003", 7 ], |
| 881 | [ "of:0000000000000003", 8 ], [ "of:0000000000000003", 9 ], |
| 882 | [ "of:0000000000000003", 10 ], [ "of:0000000000000003", 11 ], |
| 883 | [ "of:0000000000000003", 12 ], [ "of:0000000000000003", 13 ], |
| 884 | [ "of:0000000000000004", 6 ], [ "of:0000000000000004", 7 ], |
| 885 | [ "of:0000000000000004", 8 ], [ "of:0000000000000004", 9 ], |
| 886 | [ "of:0000000000000004", 10 ], [ "of:0000000000000004", 11 ], |
| 887 | [ "of:0000000000000004", 12 ], [ "of:0000000000000004", 13 ], [ "of:0000000000000004", 14 ], |
| 888 | [ "of:0000000000000005", 6 ], [ "of:0000000000000005", 7 ], |
| 889 | [ "of:0000000000000005", 8 ], [ "of:0000000000000005", 9 ], |
| 890 | [ "of:0000000000000005", 10 ], [ "of:0000000000000005", 11 ], |
| 891 | [ "of:0000000000000005", 12 ], [ "of:0000000000000005", 13 ], |
| 892 | [ "of:0000000000000005", 14 ], [ "of:0000000000000005", 15 ], |
| 893 | [ "of:0000000000000006", 3 ], [ "of:0000000000000006", 4 ], |
| 894 | [ "of:0000000000000006", 5 ], [ "of:0000000000000006", 6 ] ] |
| 895 | for i in range( 0, 3 ): |
| 896 | lib.killLinkBatch( main, linksToRemove, 0, 10 ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 897 | lib.disablePortBatch( main, portsToDisable, 10, 0 ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 898 | main.disconnectedIpv4Hosts = main.internalIpv4Hosts |
| 899 | main.disconnectedIpv6Hosts = main.internalIpv6Hosts |
| 900 | verify( main ) |
| 901 | lib.restoreLinkBatch( main, linksToRemove, 48, 10 ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 902 | lib.enablePortBatch( main, portsToDisable, 10, 48 ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 903 | main.Network.discoverHosts( hostList=main.disconnectedIpv4Hosts + main.disconnectedIpv6Hosts ) |
| 904 | time.sleep( 10 ) |
| 905 | main.disconnectedIpv4Hosts = [] |
| 906 | main.disconnectedIpv6Hosts = [] |
| 907 | verify( main ) |
| 908 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 909 | |
| 910 | def CASE622( self, main ): |
| 911 | """ |
| 912 | Take down all uplinks from a paired leaf switch |
| 913 | """ |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 914 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 915 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 916 | from core import utilities |
| 917 | main.case( "Take down all uplinks from a paired leaf switch" ) |
| 918 | setupTest( main, test_idx=622, onosNodes=3 ) |
| 919 | verify( main, disconnected=False ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 920 | hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ], |
| 921 | "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ], |
| 922 | "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ], |
| 923 | "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] } |
| 924 | lib.verifyHostLocations( main, hostLocations ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 925 | linksToRemove = [ ["spine101", "leaf2"], ["spine102", "leaf2"] ] |
| 926 | lib.killLinkBatch( main, linksToRemove, 40, 10 ) |
| 927 | # TODO: more verifications are required |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 928 | main.disconnectedIpv4Hosts = [ "h3v4" ] |
| 929 | main.disconnectedIpv6Hosts = [ "h3v6" ] |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 930 | verify( main ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 931 | hostLocations = { "h4v6": "of:0000000000000003/6", |
| 932 | "h5v6": "of:0000000000000003/7", |
| 933 | "h4v4": "of:0000000000000003/10", |
| 934 | "h5v4": "of:0000000000000003/11" } |
| 935 | lib.verifyHostLocations( main, hostLocations ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 936 | lib.restoreLinkBatch( main, linksToRemove, 48, 10 ) |
You Wang | c02f3be | 2018-05-18 12:14:23 -0700 | [diff] [blame] | 937 | main.disconnectedIpv4Hosts = [] |
| 938 | main.disconnectedIpv6Hosts = [] |
| 939 | verify( main, disconnected=False ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 940 | hostLocations = { "h4v6": [ "of:0000000000000002/7", "of:0000000000000003/6" ], |
| 941 | "h5v6": [ "of:0000000000000002/8", "of:0000000000000003/7" ], |
| 942 | "h4v4": [ "of:0000000000000002/10", "of:0000000000000003/10" ], |
| 943 | "h5v4": [ "of:0000000000000002/11", "of:0000000000000003/11" ] } |
| 944 | lib.verifyHostLocations( main, hostLocations ) |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 945 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 946 | |
| 947 | def CASE630( self, main ): |
| 948 | """ |
| 949 | Bring an instance down |
| 950 | Drop a device |
| 951 | Bring that same instance up again and observe that this specific instance sees that the device is down. |
| 952 | """ |
You Wang | 6d2d631 | 2018-05-08 12:02:02 -0700 | [diff] [blame] | 953 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 954 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 955 | from core import utilities |
| 956 | main.case( "Bring an instance down and drop a device" ) |
| 957 | setupTest( main, test_idx=630, onosNodes=3 ) |
| 958 | onosToKill = 0 |
| 959 | deviceToDrop = "spine101" |
| 960 | lib.killOnos( main, [ onosToKill ], 10, 48, 2 ) |
| 961 | lib.killSwitch( main, deviceToDrop, 9, 30 ) |
| 962 | lib.recoverOnos( main, [ onosToKill ], 9, 30, 3 ) |
| 963 | result = main.Cluster.runningNodes[ onosToKill ].CLI.checkStatus( 9, 30, 3 ) |
| 964 | utilities.assert_equals( expect=main.TRUE, actual=result, |
| 965 | onpass="ONOS instance {} sees correct device numbers".format( onosToKill ), |
| 966 | onfail="ONOS instance {} doesn't see correct device numbers".format( onosToKill ) ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 967 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 968 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 969 | def CASE640( self, main ): |
| 970 | """ |
| 971 | Controller instance going down and switch coming down at the same time and then we bring them up together |
| 972 | |
| 973 | A. Instance goes down and SPINE-1 goes down |
| 974 | - All connectivity should be there |
| 975 | - Bring them up together |
| 976 | - All connectivity should be there |
| 977 | B. Instance goes down and HAGG-1 goes down |
| 978 | - All connectivity should be there |
| 979 | - Bring them up together |
| 980 | - All connectivity should be there |
| 981 | C. Instance goes down and a paired leaf switch goes down |
| 982 | - Single homed hosts in this leaf should lose connectivity all others should be ok |
| 983 | - Bring them up together |
| 984 | - Test connectivity |
| 985 | """ |
| 986 | import time |
| 987 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 988 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 989 | main.case( "Drop an ONOS instance and switch(es) at the same time" ) |
| 990 | caseDict = { 'A': { 'switches': "spine101", |
| 991 | 'disconnectedV4': [], |
| 992 | 'disconnectedV6': [], |
| 993 | 'expectedSwitches': 9, |
| 994 | 'expectedLinks': 30 }, |
| 995 | 'B': { 'switches': "spine103", |
| 996 | 'disconnectedV4': [], |
| 997 | 'disconnectedV6': [], |
| 998 | 'expectedSwitches': 9, |
| 999 | 'expectedLinks': 42 }, |
| 1000 | 'C': { 'switches': "leaf2", |
| 1001 | 'disconnectedV4': [ "h3v4" ], |
| 1002 | 'disconnectedV6': [ "h3v6" ], |
| 1003 | 'expectedSwitches': 9, |
| 1004 | 'expectedLinks': 38 } } |
| 1005 | totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] ) |
| 1006 | totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] ) |
| 1007 | nodeIndex = 0 |
| 1008 | cases = sorted( caseDict.keys() ) |
| 1009 | for case in cases: |
| 1010 | switches = caseDict[ case ][ 'switches' ] |
| 1011 | expectedSwitches = caseDict[ case ][ 'expectedSwitches' ] |
| 1012 | expectedLinks = caseDict[ case ][ 'expectedLinks' ] |
| 1013 | main.step( "\n640{}: Drop ONOS{} and switch(es) {} at the same time".format( case, |
| 1014 | nodeIndex + 1, |
| 1015 | switches ) ) |
| 1016 | setupTest( main, test_idx=640 ) |
| 1017 | main.Cluster.next().CLI.balanceMasters() |
| 1018 | time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) ) |
| 1019 | main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts ) |
| 1020 | instance = main.Cluster.controllers[ nodeIndex ] |
| 1021 | verify( main, disconnected=False, external=False ) |
| 1022 | |
| 1023 | # Simultaneous failures |
| 1024 | main.step( "Kill ONOS{}: {}".format( nodeIndex + 1, instance.ipAddress ) ) |
| 1025 | killResult = main.ONOSbench.onosDie( instance.ipAddress ) |
| 1026 | utilities.assert_equals( expect=main.TRUE, actual=killResult, |
| 1027 | onpass="ONOS node killed", |
| 1028 | onfail="Failed to kill ONOS node" ) |
| 1029 | instance.active = False |
| 1030 | main.Cluster.reset() |
| 1031 | # TODO: Remove sleeps from the concurrent events |
| 1032 | lib.killSwitch( main, switches, expectedSwitches, expectedLinks ) |
| 1033 | main.disconnectedIpv4Hosts = caseDict[ case ][ 'disconnectedV4' ] |
| 1034 | main.disconnectedIpv6Hosts = caseDict[ case ][ 'disconnectedV6' ] |
| 1035 | |
| 1036 | # verify functionality |
| 1037 | main.log.debug( main.Cluster.next().summary() ) |
| 1038 | main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts ) |
| 1039 | main.log.debug( main.Cluster.next().summary() ) |
| 1040 | lib.verifyTopology( main, expectedSwitches, expectedLinks, main.Cluster.numCtrls - 1 ) |
| 1041 | lib.verifyNodes( main ) |
| 1042 | verify( main, external=False ) |
| 1043 | |
| 1044 | # Bring everything back up |
| 1045 | lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True ) |
| 1046 | main.disconnectedIpv4Hosts = [] |
| 1047 | main.disconnectedIpv6Hosts = [] |
| 1048 | lib.recoverOnos( main, [ nodeIndex ], expectedSwitches, expectedLinks, main.Cluster.numCtrls ) |
| 1049 | |
| 1050 | # Verify functionality |
| 1051 | lib.verifyNodes( main ) |
| 1052 | verify( main, disconnected=False, external=False ) |
| 1053 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 1054 | nodeIndex = ( nodeIndex + 1 ) % main.Cluster.numCtrls |
| 1055 | |
| 1056 | def CASE641( self, main ): |
| 1057 | """ |
| 1058 | Controller instance going down while switch comes up at the same time |
| 1059 | |
| 1060 | A. Take down SPINE-1 |
| 1061 | - Test connectivity |
| 1062 | - Bring up SPINE-1 and drop an instance at the same time |
| 1063 | - Test connectivity |
| 1064 | - Bring up instance one |
| 1065 | - Test connectivity |
| 1066 | B. Take down HAGG-1 |
| 1067 | - Test connectivity |
| 1068 | - Bring up HAGG-1 and drop an instance at the same time |
| 1069 | - Test connectivity |
| 1070 | - Bring up instance one |
| 1071 | - Test connectivity |
| 1072 | C. Take down a paired leaf switch |
| 1073 | - Test connectivity ( single homed hosts on this leaf will lose it ) |
| 1074 | - Bring up paired leaf switch and drop a controller instance at the same time |
| 1075 | - Test connectivity |
| 1076 | - Bring up the instance |
| 1077 | - Test connectivity |
| 1078 | """ |
| 1079 | import time |
| 1080 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 1081 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 1082 | main.case( "Drop an ONOS instance and recover switch(es) at the same time" ) |
| 1083 | caseDict = { 'A': { 'switches': "spine101", |
| 1084 | 'disconnectedV4': [], |
| 1085 | 'disconnectedV6': [], |
| 1086 | 'expectedSwitches': 9, |
| 1087 | 'expectedLinks': 30 }, |
| 1088 | 'B': { 'switches': "spine103", |
| 1089 | 'disconnectedV4': [], |
| 1090 | 'disconnectedV6': [], |
| 1091 | 'expectedSwitches': 9, |
| 1092 | 'expectedLinks': 42 }, |
| 1093 | 'C': { 'switches': "leaf2", |
| 1094 | 'disconnectedV4': [ "h3v4" ], |
| 1095 | 'disconnectedV6': [ "h3v6" ], |
| 1096 | 'expectedSwitches': 9, |
| 1097 | 'expectedLinks': 38 } } |
| 1098 | totalSwitches = int( main.params[ 'TOPO' ][ 'switchNum' ] ) |
| 1099 | totalLinks = int( main.params[ 'TOPO' ][ 'linkNum' ] ) |
| 1100 | nodeIndex = 0 |
| 1101 | cases = sorted( caseDict.keys() ) |
| 1102 | for case in cases: |
| 1103 | switches = caseDict[ case ][ 'switches' ] |
| 1104 | expectedSwitches = caseDict[ case ][ 'expectedSwitches' ] |
| 1105 | expectedLinks = caseDict[ case ][ 'expectedLinks' ] |
| 1106 | main.step( "\n641{}: Drop ONOS{} and recover switch(es) {} at the same time".format( case, |
| 1107 | nodeIndex + 1, |
| 1108 | switches ) ) |
| 1109 | setupTest( main, test_idx=641 ) |
| 1110 | main.Cluster.next().CLI.balanceMasters() |
| 1111 | time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) ) |
| 1112 | main.Network.discoverHosts( hostList=main.internalIpv4Hosts + main.internalIpv6Hosts ) |
| 1113 | instance = main.Cluster.controllers[ nodeIndex ] |
| 1114 | verify( main, disconnected=False, external=False ) |
| 1115 | # Drop the switch to setup scenario |
| 1116 | lib.killSwitch( main, switches, expectedSwitches, expectedLinks ) |
| 1117 | main.disconnectedIpv4Hosts = caseDict[ case ][ 'disconnectedV4' ] |
| 1118 | main.disconnectedIpv6Hosts = caseDict[ case ][ 'disconnectedV6' ] |
| 1119 | verify( main, external=False ) |
| 1120 | |
| 1121 | # Simultaneous node failure and switch recovery |
| 1122 | main.step( "Kill ONOS{}: {}".format( nodeIndex + 1, instance.ipAddress ) ) |
| 1123 | killResult = main.ONOSbench.onosDie( instance.ipAddress ) |
| 1124 | utilities.assert_equals( expect=main.TRUE, actual=killResult, |
| 1125 | onpass="ONOS node killed", |
| 1126 | onfail="Failed to kill ONOS node" ) |
| 1127 | instance.active = False |
| 1128 | main.Cluster.reset() |
| 1129 | # TODO: Remove sleeps from the concurrent events |
| 1130 | lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True ) |
| 1131 | main.disconnectedIpv4Hosts = [] |
| 1132 | main.disconnectedIpv6Hosts = [] |
| 1133 | |
| 1134 | # verify functionality |
| 1135 | main.log.debug( main.Cluster.next().summary() ) |
| 1136 | lib.recoverSwitch( main, switches, totalSwitches, totalLinks, rediscoverHosts=True ) |
| 1137 | main.log.debug( main.Cluster.next().summary() ) |
| 1138 | lib.verifyTopology( main, totalSwitches, totalLinks, main.Cluster.numCtrls - 1 ) |
| 1139 | lib.verifyNodes( main ) |
| 1140 | verify( main, disconnected=False, external=False ) |
| 1141 | |
| 1142 | # Bring everything back up and verify functionality |
| 1143 | lib.recoverOnos( main, [ nodeIndex ], totalSwitches, totalLinks, main.Cluster.numCtrls ) |
| 1144 | lib.verifyNodes( main ) |
| 1145 | verify( main, external=False ) |
| 1146 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 1147 | nodeIndex = ( nodeIndex + 1 ) % main.Cluster.numCtrls |
| 1148 | |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1149 | def CASE642( self, main ): |
| 1150 | """ |
| 1151 | Drop one link from each double link |
| 1152 | Drop a link between DAAS-1 and HAAG-1 |
| 1153 | Drop a link between HAGG-2 and SPINE-2 |
| 1154 | Drop one ONOS instance |
| 1155 | Test connectivity (expect no failure) |
| 1156 | Bring up all links and ONOS instance |
| 1157 | Test connectivity (expect no failure) |
| 1158 | """ |
| 1159 | import time |
| 1160 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 1161 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 1162 | main.case( "Drop ONOS instance and links at the same time" ) |
| 1163 | setupTest( main, test_idx=642, onosNodes=3 ) |
| 1164 | main.Cluster.active( 0 ).CLI.balanceMasters() |
| 1165 | time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) ) |
| 1166 | verify( main ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1167 | portsToDisable = [ [ "of:0000000000000001", 1 ], [ "of:0000000000000103", 1 ], |
| 1168 | [ "of:0000000000000006", 1 ], [ "of:0000000000000103", 2 ], |
| 1169 | [ "of:0000000000000101", 9 ], [ "of:0000000000000103", 3 ], |
| 1170 | [ "of:0000000000000002", 1 ], [ "of:0000000000000101", 1 ], |
| 1171 | [ "of:0000000000000003", 1 ], [ "of:0000000000000101", 3 ], |
| 1172 | [ "of:0000000000000004", 1 ], [ "of:0000000000000101", 5 ], |
| 1173 | [ "of:0000000000000005", 1 ], [ "of:0000000000000101", 7 ], |
| 1174 | [ "of:0000000000000002", 3 ], [ "of:0000000000000102", 1 ], |
| 1175 | [ "of:0000000000000003", 3 ], [ "of:0000000000000102", 3 ], |
| 1176 | [ "of:0000000000000004", 3 ], [ "of:0000000000000102", 5 ], |
| 1177 | [ "of:0000000000000005", 3 ], [ "of:0000000000000102", 7 ] ] |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 1178 | lib.disablePortBatch( main, portsToDisable, |
| 1179 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1180 | int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ), |
| 1181 | sleep=0 ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1182 | lib.killOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1183 | int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ), 2 ) |
| 1184 | verify( main ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 1185 | lib.enablePortBatch( main, portsToDisable, |
| 1186 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1187 | int( main.params[ "TOPO" ][ "linkNum" ] ), |
| 1188 | sleep=0 ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1189 | lib.recoverOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1190 | int( main.params[ "TOPO" ][ "linkNum" ] ), 3 ) |
| 1191 | verify( main ) |
| 1192 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
| 1193 | |
| 1194 | def CASE643( self, main ): |
| 1195 | """ |
| 1196 | Drop one link from each double link |
| 1197 | Drop a link between DAAS-1 and HAAG-1 |
| 1198 | Drop a link between HAGG-2 and SPINE-2 |
| 1199 | Test connectivity (expect no failure) |
| 1200 | Bring up all links |
| 1201 | Drop one ONOS instance |
| 1202 | Test connectivity (expect no failure) |
| 1203 | Bring up ONOS instance |
| 1204 | Test connectivity (expect no failure) |
| 1205 | """ |
| 1206 | import time |
| 1207 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 1208 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 1209 | main.case( "Drop ONOS instances and bring up links at the same time" ) |
| 1210 | setupTest( main, test_idx=643, onosNodes=3 ) |
| 1211 | main.Cluster.active( 0 ).CLI.balanceMasters() |
| 1212 | time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) ) |
| 1213 | verify( main ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1214 | portsToDisable = [ [ "of:0000000000000001", 1 ], [ "of:0000000000000103", 1 ], |
| 1215 | [ "of:0000000000000006", 1 ], [ "of:0000000000000103", 2 ], |
| 1216 | [ "of:0000000000000101", 9 ], [ "of:0000000000000103", 3 ], |
| 1217 | [ "of:0000000000000002", 1 ], [ "of:0000000000000101", 1 ], |
| 1218 | [ "of:0000000000000003", 1 ], [ "of:0000000000000101", 3 ], |
| 1219 | [ "of:0000000000000004", 1 ], [ "of:0000000000000101", 5 ], |
| 1220 | [ "of:0000000000000005", 1 ], [ "of:0000000000000101", 7 ], |
| 1221 | [ "of:0000000000000002", 3 ], [ "of:0000000000000102", 1 ], |
| 1222 | [ "of:0000000000000003", 3 ], [ "of:0000000000000102", 3 ], |
| 1223 | [ "of:0000000000000004", 3 ], [ "of:0000000000000102", 5 ], |
| 1224 | [ "of:0000000000000005", 3 ], [ "of:0000000000000102", 7 ] ] |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 1225 | lib.disablePortBatch( main, portsToDisable, |
| 1226 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1227 | int( main.params[ "TOPO" ][ "linkNum" ] ) - len( portsToDisable ) ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1228 | verify( main ) |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 1229 | lib.enablePortBatch( main, portsToDisable, |
| 1230 | int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1231 | int( main.params[ "TOPO" ][ "linkNum" ] ) ) |
Jonghwan Hyun | 25c98a6 | 2018-05-04 13:59:09 -0700 | [diff] [blame] | 1232 | lib.killOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1233 | int( main.params[ "TOPO" ][ "linkNum" ] ), 2 ) |
| 1234 | verify( main ) |
| 1235 | lib.recoverOnos( main, [ 2, ], int( main.params[ "TOPO" ][ "switchNum" ] ), |
| 1236 | int( main.params[ "TOPO" ][ "linkNum" ] ), 3 ) |
| 1237 | verify( main ) |
| 1238 | lib.cleanup( main, copyKarafLog=False, removeHostComponent=True ) |
Jonghwan Hyun | 785471d | 2018-05-14 14:48:19 -0700 | [diff] [blame] | 1239 | |
| 1240 | def CASE651( self, main ): |
| 1241 | """ |
| 1242 | Move a single-homed host from port A to port B in DAAS-1 |
| 1243 | Test connectivity (expect no failure) |
| 1244 | |
| 1245 | Repeat with DAAS-2 |
| 1246 | """ |
| 1247 | import time |
| 1248 | from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import * |
| 1249 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 1250 | main.case( "Move a single-homed host to another port in the same DAAS" ) |
| 1251 | setupTest( main, test_idx=651, onosNodes=3 ) |
| 1252 | main.Cluster.active( 0 ).CLI.balanceMasters() |
| 1253 | time.sleep( float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) ) |
| 1254 | verify( main ) |
| 1255 | |
| 1256 | h1v4cfg = '{"of:0000000000000001/7" : { "interfaces" : [ { "ips" : [ "10.1.0.254/24" ], "vlan-untagged": 10 } ] } }' |
| 1257 | lib.moveHost( main, "h1v4", "leaf1", "leaf1", "10.1.0.254", prefixLen=24, cfg=h1v4cfg ) |
| 1258 | verify( main ) |
| 1259 | |
| 1260 | h13v4cfg = '''{"of:0000000000000006/7" : { "interfaces" : [ { "ips" : [ "10.5.20.254/24" ], "vlan-untagged": 20 } ] } }''' |
| 1261 | lib.moveHost( main, "h13v4", "leaf6", "leaf6", "10.5.20.254", prefixLen=24, cfg=h13v4cfg ) |
| 1262 | verify( main ) |