Andreas Pantelopoulos | 90f0b10 | 2018-02-01 13:21:45 -0800 | [diff] [blame] | 1 | """ |
| 2 | Copyright 2017 Open Networking Foundation ( ONF ) |
| 3 | |
| 4 | Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>, |
| 5 | the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>, |
| 6 | or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg> |
| 7 | |
| 8 | TestON is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation, either version 2 of the License, or |
| 11 | ( at your option ) any later version. |
| 12 | |
| 13 | TestON is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with TestON. If not, see <http://www.gnu.org/licenses/>. |
| 20 | """ |
| 21 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 22 | def setupTest( main, test_idx, onosNodes=-1, ipv4=True, ipv6=True, |
| 23 | external=True, static=False, countFlowsGroups=False ): |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 24 | """ |
| 25 | SRRouting test setup |
| 26 | """ |
| 27 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 28 | import time |
| 29 | |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 30 | skipPackage = False |
| 31 | init = False |
| 32 | if not hasattr( main, 'apps' ): |
| 33 | init = True |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 34 | lib.initTest( main ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 35 | if onosNodes < 0: |
| 36 | onosNodes = main.Cluster.numCtrls |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 37 | # Skip onos packaging if the cluster size stays the same |
| 38 | if not init and onosNodes == main.Cluster.numCtrls: |
| 39 | skipPackage = True |
| 40 | |
| 41 | main.internalIpv4Hosts = main.params[ 'TOPO' ][ 'internalIpv4Hosts' ].split( ',' ) |
| 42 | main.internalIpv6Hosts = main.params[ 'TOPO' ][ 'internalIpv6Hosts' ].split( ',' ) |
| 43 | main.externalIpv4Hosts = main.params[ 'TOPO' ][ 'externalIpv4Hosts' ].split( ',' ) |
| 44 | main.externalIpv6Hosts = main.params[ 'TOPO' ][ 'externalIpv6Hosts' ].split( ',' ) |
You Wang | 4efd66b | 2018-06-12 14:47:26 -0700 | [diff] [blame] | 45 | main.staticIpv4Hosts = main.params[ 'TOPO' ][ 'staticIpv4Hosts' ].split( ',' ) |
| 46 | main.staticIpv6Hosts = main.params[ 'TOPO' ][ 'staticIpv6Hosts' ].split( ',' ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 47 | main.disconnectedIpv4Hosts = [] |
| 48 | main.disconnectedIpv6Hosts = [] |
You Wang | 4efd66b | 2018-06-12 14:47:26 -0700 | [diff] [blame] | 49 | main.disconnectedExternalIpv4Hosts = [] |
| 50 | main.disconnectedExternalIpv6Hosts = [] |
| 51 | main.disconnectedStaticIpv4Hosts = [] |
| 52 | main.disconnectedStaticIpv6Hosts = [] |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 53 | main.resultFileName = 'CASE%03d' % test_idx |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 54 | main.Cluster.setRunningNode( onosNodes ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 55 | |
You Wang | 2a1a335 | 2018-07-31 14:35:01 -0700 | [diff] [blame] | 56 | lib.installOnos( main, skipPackage=skipPackage, cliSleep=5 ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 57 | |
| 58 | # Load configuration files |
Andreas Pantelopoulos | 1e0665a | 2018-06-05 13:34:59 -0700 | [diff] [blame] | 59 | main.cfgName = 'TEST_CONFIG_ipv4={}_ipv6={}'.format( 1 if ipv4 else 0, |
| 60 | 1 if ipv6 else 0) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 61 | lib.loadJson( main ) |
| 62 | time.sleep( float( main.params[ 'timers' ][ 'loadNetcfgSleep' ] ) ) |
| 63 | lib.loadHost( main ) |
| 64 | |
| 65 | # if static route flag add routes |
| 66 | # these routes are topology specific |
| 67 | if static: |
| 68 | if ipv4: |
| 69 | lib.addStaticOnosRoute( main, "10.0.88.0/24", "10.0.1.1") |
You Wang | 0f745de | 2018-07-27 15:49:22 -0700 | [diff] [blame] | 70 | lib.addStaticOnosRoute( main, "10.0.88.0/24", "10.0.5.1") |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 71 | if ipv6: |
| 72 | lib.addStaticOnosRoute( main, "2000::8700/120", "2000::101") |
You Wang | 0f745de | 2018-07-27 15:49:22 -0700 | [diff] [blame] | 73 | lib.addStaticOnosRoute( main, "2000::8700/120", "2000::501") |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 74 | if countFlowsGroups: |
| 75 | lib.loadCount( main ) |
| 76 | |
| 77 | if hasattr( main, 'Mininet1' ): |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 78 | # Run the test with Mininet |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 79 | mininet_args = ' --dhcp=1 --routers=1 --ipv6={} --ipv4={}'.format( 1 if ipv6 else 0, |
| 80 | 1 if ipv4 else 0 ) |
| 81 | lib.startMininet( main, main.params[ 'DEPENDENCY' ][ 'topology' ], args=mininet_args ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 82 | time.sleep( float( main.params[ "timers" ][ "startMininetSleep" ] ) ) |
| 83 | else: |
| 84 | # Run the test with physical devices |
| 85 | lib.connectToPhysicalNetwork( main, self.switchNames ) |
| 86 | # Check if the devices are up |
| 87 | lib.checkDevices( main, switches=len( self.switchNames ) ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 88 | # wait some time for onos to install the rules! |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 89 | time.sleep( float( main.params[ 'timers' ][ 'dhcpSleep' ] ) ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 90 | |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 91 | def verifyPingInternal( main, ipv4=True, ipv6=True, disconnected=True ): |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 92 | """ |
| 93 | Verify all connected internal hosts are able to reach each other, |
| 94 | and disconnected internal hosts cannot reach any other internal host |
| 95 | """ |
| 96 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 97 | # Verify connected hosts |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 98 | if ipv4: |
| 99 | lib.verifyPing( main, |
| 100 | [ h for h in main.internalIpv4Hosts if h not in main.disconnectedIpv4Hosts ], |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 101 | [ h for h in main.internalIpv4Hosts if h not in main.disconnectedIpv4Hosts ], |
| 102 | stepMsg="Verify reachability of connected internal IPv4 hosts" ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 103 | if ipv6: |
| 104 | lib.verifyPing( main, |
| 105 | [ h for h in main.internalIpv6Hosts if h not in main.disconnectedIpv6Hosts ], |
| 106 | [ h for h in main.internalIpv6Hosts if h not in main.disconnectedIpv6Hosts ], |
You Wang | 42f9e8a | 2018-07-11 13:25:11 -0700 | [diff] [blame] | 107 | ipv6=True, |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 108 | stepMsg="Verify reachability of connected internal IPv6 hosts" ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 109 | # Verify disconnected hosts |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 110 | if disconnected: |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 111 | if main.disconnectedIpv4Hosts: |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 112 | lib.verifyPing( main, main.internalIpv4Hosts, main.disconnectedIpv4Hosts, expect=False, |
| 113 | stepMsg="Verify unreachability of disconnected internal IPv4 hosts" ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 114 | if main.disconnectedIpv6Hosts: |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 115 | lib.verifyPing( main, main.internalIpv6Hosts, main.disconnectedIpv6Hosts, ipv6=True, expect=False, |
| 116 | stepMsg="Verify unreachability of disconnected internal IPv6 hosts" ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 117 | |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 118 | def verifyPingExternal( main, ipv4=True, ipv6=True, disconnected=True ): |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 119 | """ |
| 120 | Verify all connected internal hosts are able to reach external hosts, |
| 121 | and disconnected internal hosts cannot reach any external host |
| 122 | """ |
| 123 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 124 | # Verify connected hosts |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 125 | if ipv4: |
| 126 | lib.verifyPing( main, |
| 127 | [ h for h in main.internalIpv4Hosts if h not in main.disconnectedIpv4Hosts ], |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 128 | [ h for h in main.externalIpv4Hosts if h not in main.disconnectedExternalIpv4Hosts ], |
You Wang | 54b1d67 | 2018-06-11 16:44:13 -0700 | [diff] [blame] | 129 | stepMsg="Verify reachability from connected internal IPv4 hosts to external IPv4 hosts", |
| 130 | t3Simple=False ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 131 | if ipv6: |
| 132 | lib.verifyPing( main, |
| 133 | [ h for h in main.internalIpv6Hosts if h not in main.disconnectedIpv6Hosts ], |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 134 | [ h for h in main.externalIpv6Hosts if h not in main.disconnectedExternalIpv6Hosts ], |
You Wang | 42f9e8a | 2018-07-11 13:25:11 -0700 | [diff] [blame] | 135 | ipv6=True, |
You Wang | 54b1d67 | 2018-06-11 16:44:13 -0700 | [diff] [blame] | 136 | stepMsg="Verify reachability from connected internal IPv6 hosts to external IPv6 hosts", |
| 137 | t3Simple=False ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 138 | # Verify disconnected hosts |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 139 | if disconnected: |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 140 | # Disconnected internal to connected external |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 141 | if main.disconnectedIpv4Hosts: |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 142 | lib.verifyPing( main, main.disconnectedIpv4Hosts, |
| 143 | [ h for h in main.externalIpv4Hosts if h not in main.disconnectedExternalIpv4Hosts ], |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 144 | expect=False, |
You Wang | 54b1d67 | 2018-06-11 16:44:13 -0700 | [diff] [blame] | 145 | stepMsg="Verify unreachability of disconnected internal IPv4 hosts to connected external IPv4 hosts", |
| 146 | t3Simple=False ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 147 | if main.disconnectedIpv6Hosts: |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 148 | lib.verifyPing( main, main.disconnectedIpv6Hosts, |
| 149 | [ h for h in main.externalIpv6Hosts if h not in main.disconnectedExternalIpv6Hosts ], |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 150 | ipv6=True, expect=False, |
You Wang | 54b1d67 | 2018-06-11 16:44:13 -0700 | [diff] [blame] | 151 | stepMsg="Verify unreachability of disconnected internal IPv6 hosts to connected external IPv6 hosts", |
| 152 | t3Simple=False ) |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 153 | # Connected internal to disconnected external |
| 154 | if main.disconnectedExternalIpv4Hosts: |
| 155 | lib.verifyPing( main, |
| 156 | [ h for h in main.internalIpv4Hosts if h not in main.disconnectedIpv4Hosts ], |
| 157 | main.disconnectedExternalIpv4Hosts, |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 158 | expect=False, |
You Wang | 54b1d67 | 2018-06-11 16:44:13 -0700 | [diff] [blame] | 159 | stepMsg="Verify unreachability of connected internal IPv4 hosts to disconnected external IPv4 hosts", |
| 160 | t3Simple=False ) |
Jonghwan Hyun | 3759e47 | 2018-05-01 15:40:08 -0700 | [diff] [blame] | 161 | if main.disconnectedExternalIpv6Hosts: |
| 162 | lib.verifyPing( main, |
| 163 | [ h for h in main.internalIpv6Hosts if h not in main.disconnectedIpv6Hosts ], |
| 164 | main.disconnectedExternalIpv6Hosts, |
You Wang | 8574776 | 2018-05-11 15:51:50 -0700 | [diff] [blame] | 165 | ipv6=True, expect=False, |
You Wang | 54b1d67 | 2018-06-11 16:44:13 -0700 | [diff] [blame] | 166 | stepMsg="Verify unreachability of connected internal IPv6 hosts to disconnected external IPv6 hosts", |
| 167 | t3Simple=False ) |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 168 | |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 169 | def verifyPing( main, ipv4=True, ipv6=True, disconnected=False, internal=True, external=True ): |
You Wang | 5da39c8 | 2018-04-26 22:55:08 -0700 | [diff] [blame] | 170 | """ |
| 171 | Verify reachability and unreachability of connected/disconnected hosts |
| 172 | """ |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 173 | if internal: |
| 174 | verifyPingInternal( main, ipv4, ipv6, disconnected ) |
| 175 | if external: |
| 176 | verifyPingExternal( main, ipv4, ipv6, disconnected ) |
| 177 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 178 | def verifyLinkFailure( main, ipv4=True, ipv6=True, disconnected=False, |
| 179 | internal=True, external=True, countFlowsGroups=False ): |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 180 | """ |
| 181 | Kill and recover all links to spine101 and 102 sequencially and run verifications |
| 182 | """ |
| 183 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 184 | linksToRemove = [ ["spine103", "spine101"], |
| 185 | ["leaf2", "spine101"], |
| 186 | ["leaf3", "spine101"], |
| 187 | ["leaf4", "spine101"], |
| 188 | ["leaf5", "spine101"] ] |
| 189 | lib.killLinkBatch( main, linksToRemove, 30, 10 ) |
| 190 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 191 | lib.restoreLinkBatch( main, linksToRemove, 48, 10 ) |
| 192 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 193 | linksToRemove = [ ["spine104", "spine102"], |
| 194 | ["leaf2", "spine102"], |
| 195 | ["leaf3", "spine102"], |
| 196 | ["leaf4", "spine102"], |
| 197 | ["leaf5", "spine102"] ] |
| 198 | lib.killLinkBatch( main, linksToRemove, 30, 10 ) |
| 199 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 200 | lib.restoreLinkBatch( main, linksToRemove, 48, 10 ) |
| 201 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 202 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 203 | def verifySwitchFailure( main, ipv4=True, ipv6=True, disconnected=False, |
| 204 | internal=True, external=True, countFlowsGroups=False ): |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 205 | """ |
| 206 | Kill and recover spine101 and 102 sequencially and run verifications |
| 207 | """ |
| 208 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 209 | for switchToKill in [ "spine101", "spine102" ]: |
| 210 | lib.killSwitch( main, switchToKill, 9, 30 ) |
| 211 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 212 | lib.recoverSwitch( main, switchToKill, 10, 48 ) |
| 213 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 214 | |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 215 | def verifyOnosFailure( main, ipv4=True, ipv6=True, disconnected=False, |
| 216 | internal=True, external=True, countFlowsGroups=False ): |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 217 | """ |
| 218 | Kill and recover onos nodes sequencially and run verifications |
| 219 | """ |
| 220 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 221 | import json |
| 222 | import time |
| 223 | |
| 224 | numCtrls = len( main.Cluster.runningNodes ) |
| 225 | links = len( json.loads( main.Cluster.next().links() ) ) |
| 226 | switches = len( json.loads( main.Cluster.next().devices() ) ) |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 227 | mastershipSleep = float( main.params[ 'timers' ][ 'balanceMasterSleep' ] ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 228 | for ctrl in xrange( numCtrls ): |
| 229 | # Kill node |
| 230 | lib.killOnos( main, [ ctrl ], switches, links, ( numCtrls - 1 ) ) |
| 231 | main.Cluster.active(0).CLI.balanceMasters() |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 232 | time.sleep( mastershipSleep ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 233 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 234 | # Recover node |
| 235 | lib.recoverOnos( main, [ ctrl ], switches, links, numCtrls ) |
| 236 | main.Cluster.active(0).CLI.balanceMasters() |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 237 | time.sleep( mastershipSleep ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 238 | verify( main, ipv4, ipv6, disconnected, internal, external, countFlowsGroups ) |
| 239 | |
| 240 | def verify( main, ipv4=True, ipv6=True, disconnected=True, internal=True, external=True, countFlowsGroups=False ): |
| 241 | """ |
| 242 | Verify host IP assignment, flow/group number and pings |
| 243 | """ |
| 244 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 245 | # Verify host IP assignment |
| 246 | lib.verifyOnosHostIp( main ) |
| 247 | lib.verifyNetworkHostIp( main ) |
| 248 | # check flows / groups numbers |
| 249 | if countFlowsGroups: |
Jon Hall | a604fd4 | 2018-05-04 14:27:27 -0700 | [diff] [blame] | 250 | lib.checkFlowsGroupsFromFile( main ) |
You Wang | d66de19 | 2018-04-30 17:30:12 -0700 | [diff] [blame] | 251 | # ping hosts |
| 252 | verifyPing( main, ipv4, ipv6, disconnected, internal, external ) |
You Wang | 0f745de | 2018-07-27 15:49:22 -0700 | [diff] [blame] | 253 | |
| 254 | def verifyRouterFailure( main, routerToKill, affectedIpv4Hosts=[], affectedIpv6Hosts=[], |
| 255 | ipv4=True, ipv6=True, countFlowsGroups=False ): |
| 256 | """ |
| 257 | Kill and recover a quagga router and verify connectivities to external hosts |
| 258 | """ |
| 259 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib |
| 260 | lib.killRouter( main, routerToKill, 5 ) |
| 261 | main.disconnectedExternalIpv4Hosts = affectedIpv4Hosts |
| 262 | main.disconnectedExternalIpv6Hosts = affectedIpv6Hosts |
| 263 | verify( main, ipv4, ipv6, True if (affectedIpv4Hosts or affectedIpv6Hosts) else False, False, True, countFlowsGroups ) |
| 264 | lib.recoverRouter( main, routerToKill, 5 ) |
| 265 | main.disconnectedExternalIpv4Hosts = [] |
| 266 | main.disconnectedExternalIpv6Hosts = [] |
| 267 | verify( main, ipv4, ipv6, False, False, True, countFlowsGroups ) |