pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 1 | # Testing the functionality of SDN-IP with single ONOS instance |
pingping-lin | 5bb663b | 2015-09-24 11:47:50 -0700 | [diff] [blame] | 2 | class USECASE_SdnipFunction: |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 3 | |
| 4 | def __init__( self ): |
| 5 | self.default = '' |
| 6 | global branchName |
| 7 | |
pingping-lin | b702c60 | 2015-09-10 17:00:29 -0700 | [diff] [blame] | 8 | def CASE100( self, main ): |
| 9 | """ |
| 10 | Start mininet |
| 11 | """ |
| 12 | import os |
Jon Hall | 70b768c | 2016-04-19 08:38:29 -0700 | [diff] [blame] | 13 | main.case( "Setup the Mininet testbed" ) |
pingping-lin | b702c60 | 2015-09-10 17:00:29 -0700 | [diff] [blame] | 14 | main.dependencyPath = main.testDir + \ |
| 15 | main.params[ 'DEPENDENCY' ][ 'path' ] |
| 16 | main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ] |
| 17 | |
| 18 | main.step( "Starting Mininet Topology" ) |
| 19 | topology = main.dependencyPath + main.topology |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 20 | topoResult = main.Mininet.startNet( topoFile=topology ) |
| 21 | utilities.assert_equals( expect=main.TRUE, |
| 22 | actual=topoResult, |
| 23 | onpass="Successfully loaded topology", |
| 24 | onfail="Failed to load topology" ) |
pingping-lin | b702c60 | 2015-09-10 17:00:29 -0700 | [diff] [blame] | 25 | # Exit if topology did not load properly |
| 26 | if not topoResult: |
| 27 | main.cleanup() |
| 28 | main.exit() |
pingping-lin | 5bb663b | 2015-09-24 11:47:50 -0700 | [diff] [blame] | 29 | main.step( "Connect switches to controller" ) |
| 30 | |
| 31 | global ONOS1Ip |
| 32 | ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] ) |
| 33 | # connect all switches to controller |
| 34 | swResult = main.TRUE |
| 35 | for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ): |
| 36 | sw = "sw%s" % ( i ) |
| 37 | swResult = swResult and main.Mininet.assignSwController( sw, ONOS1Ip ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 38 | utilities.assert_equals( expect=main.TRUE, |
| 39 | actual=swResult, |
| 40 | onpass="Successfully connect all switches to ONOS", |
| 41 | onfail="Failed to connect all switches to ONOS" ) |
pingping-lin | 5bb663b | 2015-09-24 11:47:50 -0700 | [diff] [blame] | 42 | if not swResult: |
| 43 | main.cleanup() |
| 44 | main.exit() |
| 45 | |
| 46 | main.step( "Set up tunnel from Mininet node to onos node" ) |
| 47 | forwarding1 = '%s:2000:%s:2000' % ( '1.1.1.2', ONOS1Ip ) |
| 48 | command = 'ssh -nNT -o "PasswordAuthentication no" \ |
| 49 | -o "StrictHostKeyChecking no" -l sdn -L %s %s & ' % ( forwarding1, ONOS1Ip ) |
| 50 | |
| 51 | tunnelResult = main.TRUE |
| 52 | tunnelResult = main.Mininet.node( "root", command ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 53 | utilities.assert_equals( expect=True, |
| 54 | actual=( "PasswordAuthentication" in tunnelResult ), |
| 55 | onpass="Created tunnel succeeded", |
| 56 | onfail="Create tunnel failed" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 57 | if ("PasswordAuthentication" not in tunnelResult) : |
pingping-lin | 5bb663b | 2015-09-24 11:47:50 -0700 | [diff] [blame] | 58 | main.cleanup() |
| 59 | main.exit() |
pingping-lin | 5bb663b | 2015-09-24 11:47:50 -0700 | [diff] [blame] | 60 | |
pingping-lin | b702c60 | 2015-09-10 17:00:29 -0700 | [diff] [blame] | 61 | def CASE101( self, main ): |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 62 | """ |
pingping-lin | ea32cf8 | 2015-10-08 22:37:37 -0700 | [diff] [blame] | 63 | Package ONOS and install it |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 64 | Startup sequence: |
| 65 | cell <name> |
| 66 | onos-verify-cell |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 67 | onos-package |
| 68 | onos-install -f |
| 69 | onos-wait-for-start |
| 70 | """ |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 71 | import time |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 72 | import os |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 73 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 74 | main.case( "Setting up ONOS environment" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 75 | |
| 76 | cellName = main.params[ 'ENV' ][ 'cellName' ] |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 77 | global ONOS1Ip |
| 78 | ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] ) |
| 79 | ipList = [ ONOS1Ip ] |
| 80 | |
Jon Hall | 70b768c | 2016-04-19 08:38:29 -0700 | [diff] [blame] | 81 | main.step( "Copying config files" ) |
| 82 | src = os.path.dirname( main.testFile ) + "/network-cfg.json" |
| 83 | dst = main.ONOSbench.home + "/tools/package/config/network-cfg.json" |
| 84 | status = main.ONOSbench.scp( main.ONOSbench, src, dst, direction="to" ) |
| 85 | utilities.assert_equals( expect=main.TRUE, |
| 86 | actual=status, |
| 87 | onpass="Copy config file succeeded", |
| 88 | onfail="Copy config file failed" ) |
| 89 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 90 | main.step( "Create cell file" ) |
| 91 | cellAppString = main.params[ 'ENV' ][ 'appString' ] |
| 92 | main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName, |
| 93 | main.Mininet.ip_address, |
Devin Lim | 461f087 | 2017-06-05 16:49:33 -0700 | [diff] [blame^] | 94 | cellAppString, ipList, main.ONOScli1.user_name ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 95 | |
| 96 | main.step( "Applying cell variable to environment" ) |
| 97 | cellResult = main.ONOSbench.setCell( cellName ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 98 | utilities.assert_equals( expect=main.TRUE, |
| 99 | actual=cellResult, |
| 100 | onpass="Set cell succeeded", |
| 101 | onfail="Set cell failed" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 102 | |
Jon Hall | 70b768c | 2016-04-19 08:38:29 -0700 | [diff] [blame] | 103 | main.step( "Verify cell connectivity" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 104 | verifyResult = main.ONOSbench.verifyCell() |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 105 | utilities.assert_equals( expect=main.TRUE, |
| 106 | actual=verifyResult, |
| 107 | onpass="Verify cell succeeded", |
| 108 | onfail="Verify cell failed" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 109 | |
| 110 | branchName = main.ONOSbench.getBranchName() |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 111 | main.log.report( "ONOS is on branch: " + branchName ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 112 | |
Jon Hall | 6509dbf | 2016-06-21 17:01:17 -0700 | [diff] [blame] | 113 | main.step( "Uninstalling ONOS" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 114 | uninstallResult = main.ONOSbench.onosUninstall( ONOS1Ip ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 115 | utilities.assert_equals( expect=main.TRUE, |
| 116 | actual=uninstallResult, |
| 117 | onpass="Uninstall ONOS succeeded", |
| 118 | onfail="Uninstall ONOS failed" ) |
pingping-lin | aede031 | 2015-09-30 17:53:19 -0700 | [diff] [blame] | 119 | ''' |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 120 | main.step( "Git pull" ) |
| 121 | gitPullResult = main.ONOSbench.gitPull() |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 122 | main.log.info( "gitPullResult" ) |
| 123 | main.log.info( gitPullResult ) |
| 124 | gitPullResult2 = ( gitPullResult == main.TRUE ) or ( gitPullResult == 3 ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 125 | utilities.assert_equals( expect=True, |
| 126 | actual=gitPullResult2, |
| 127 | onpass="Git pull ONOS succeeded", |
| 128 | onfail="Git pull ONOS failed" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 129 | |
| 130 | main.step( "Using mvn clean install" ) |
| 131 | if gitPullResult == main.TRUE: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 132 | mciResult = main.ONOSbench.cleanInstall( mciTimeout=1000 ) |
| 133 | utilities.assert_equals( expect=main.TRUE, |
| 134 | actual=mciResult, |
| 135 | onpass="Maven clean install ONOS succeeded", |
| 136 | onfail="Maven clean install ONOS failed" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 137 | else: |
| 138 | main.log.warn( "Did not pull new code so skipping mvn " + |
| 139 | "clean install" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 140 | mciResult = main.TRUE |
pingping-lin | aede031 | 2015-09-30 17:53:19 -0700 | [diff] [blame] | 141 | ''' |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 142 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 143 | main.ONOSbench.getVersion( report=True ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 144 | |
| 145 | main.step( "Creating ONOS package" ) |
Jon Hall | bd60ea0 | 2016-08-23 10:03:59 -0700 | [diff] [blame] | 146 | packageResult = main.ONOSbench.buckBuild() |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 147 | utilities.assert_equals( expect=main.TRUE, |
| 148 | actual=packageResult, |
| 149 | onpass="Package ONOS succeeded", |
| 150 | onfail="Package ONOS failed" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 151 | |
| 152 | main.step( "Installing ONOS package" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 153 | onos1InstallResult = main.ONOSbench.onosInstall( options="-f", |
| 154 | node=ONOS1Ip ) |
| 155 | utilities.assert_equals( expect=main.TRUE, |
| 156 | actual=onos1InstallResult, |
| 157 | onpass="Install ONOS succeeded", |
| 158 | onfail="Install ONOS failed" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 159 | |
Chiyu Cheng | ef10950 | 2016-11-21 15:51:38 -0800 | [diff] [blame] | 160 | main.step( "Set up ONOS secure SSH" ) |
| 161 | secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip ) |
| 162 | utilities.assert_equals( expect=main.TRUE, |
| 163 | actual=secureSshResult, |
| 164 | onpass="Set up ONOS secure SSH succeeded", |
| 165 | onfail="Set up ONOS secure SSH failed " ) |
| 166 | |
You Wang | f5de25b | 2017-01-06 15:13:01 -0800 | [diff] [blame] | 167 | main.step( "Checking if ONOS is up yet" ) |
| 168 | onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 ) |
| 169 | utilities.assert_equals( expect=main.TRUE, |
| 170 | actual=onos1UpResult, |
| 171 | onpass="ONOS is up", |
| 172 | onfail="ONOS is NOT up" ) |
| 173 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 174 | main.step( "Checking if ONOS CLI is ready" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 175 | cliResult = main.ONOScli.startOnosCli( ONOS1Ip, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 176 | commandlineTimeout=100, onosStartTimeout=600 ) |
| 177 | utilities.assert_equals( expect=main.TRUE, |
| 178 | actual=cliResult, |
| 179 | onpass="ONOS CLI is ready", |
| 180 | onfail="ONOS CLI is not ready" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 181 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 182 | for i in range( 10 ): |
| 183 | ready = True |
| 184 | output = main.ONOScli.summary() |
| 185 | if not output: |
| 186 | ready = False |
| 187 | if ready: |
| 188 | break |
| 189 | time.sleep( 30 ) |
| 190 | utilities.assert_equals( expect=True, actual=ready, |
| 191 | onpass="ONOS summary command succeded", |
| 192 | onfail="ONOS summary command failed" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 193 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 194 | if not ready: |
| 195 | main.log.error( "ONOS startup failed!" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 196 | main.cleanup() |
| 197 | main.exit() |
| 198 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 199 | def CASE200( self, main ): |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 200 | import json |
| 201 | import time |
| 202 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 203 | main.case( "Activate sdn-ip application" ) |
| 204 | main.log.info( "waiting link discovery......" ) |
| 205 | time.sleep( int( main.params['timers']['TopoDiscovery'] ) ) |
| 206 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 207 | main.log.info( "Get links in the network" ) |
pingping-lin | 3f091d6 | 2015-09-29 12:00:05 -0700 | [diff] [blame] | 208 | summaryResult = main.ONOScli.summary() |
| 209 | linkNum = json.loads( summaryResult )[ "links" ] |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 210 | listResult = main.ONOScli.links( jsonFormat=False ) |
| 211 | main.log.info( listResult ) |
pingping-lin | 3f091d6 | 2015-09-29 12:00:05 -0700 | [diff] [blame] | 212 | if linkNum < 100: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 213 | main.log.error( "Link number is wrong!" ) |
| 214 | time.sleep( int( main.params['timers']['TopoDiscovery'] ) ) |
| 215 | listResult = main.ONOScli.links( jsonFormat=False ) |
pingping-lin | 3f091d6 | 2015-09-29 12:00:05 -0700 | [diff] [blame] | 216 | main.log.info( listResult ) |
| 217 | main.cleanup() |
| 218 | main.exit() |
| 219 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 220 | main.step( "Activate sdn-ip application" ) |
| 221 | activeSDNIPresult = main.ONOScli.activateApp( "org.onosproject.sdnip" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 222 | utilities.assert_equals( expect=main.TRUE, |
| 223 | actual=activeSDNIPresult, |
| 224 | onpass="Activate SDN-IP succeeded", |
| 225 | onfail="Activate SDN-IP failed" ) |
pingping-lin | 3f091d6 | 2015-09-29 12:00:05 -0700 | [diff] [blame] | 226 | if not activeSDNIPresult: |
| 227 | main.log.info( "Activate SDN-IP failed!" ) |
| 228 | main.cleanup() |
| 229 | main.exit() |
| 230 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 231 | |
| 232 | main.log.info( "Wait SDN-IP to finish installing connectivity intents \ |
pingping-lin | b702c60 | 2015-09-10 17:00:29 -0700 | [diff] [blame] | 233 | and the BGP paths in data plane are ready..." ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 234 | time.sleep( int( main.params[ 'timers' ][ 'SdnIpSetup' ] ) ) |
pingping-lin | b702c60 | 2015-09-10 17:00:29 -0700 | [diff] [blame] | 235 | main.log.info( "Wait Quagga to finish delivery all routes to each \ |
| 236 | other and to sdn-ip, plus finish installing all intents..." ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 237 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
| 238 | time.sleep( int( main.params[ 'timers' ][ 'PathAvailable' ] ) ) |
| 239 | |
| 240 | |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 241 | def CASE102( self, main ): |
| 242 | ''' |
| 243 | This test case is to load the methods from other Python files. |
| 244 | ''' |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 245 | import imp |
| 246 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 247 | main.case( "Loading methods from other Python file" ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 248 | # load the methods from other file |
| 249 | wrapperFile = main.params[ 'DEPENDENCY' ][ 'wrapper1' ] |
| 250 | main.Functions = imp.load_source( wrapperFile, |
| 251 | main.dependencyPath + |
| 252 | wrapperFile + |
| 253 | ".py" ) |
| 254 | |
| 255 | |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 256 | def CASE1( self, main ): |
| 257 | ''' |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 258 | ping test from 7 bgp peers to BGP speaker |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 259 | ''' |
pingping-lin | 950b50d | 2015-09-14 12:00:08 -0700 | [diff] [blame] | 260 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 261 | main.case( "Ping tests between BGP peers and speakers" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 262 | main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ], |
| 263 | peers=[ "p64514", "p64515", "p64516" ], |
| 264 | expectAllSuccess=True ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 265 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 266 | main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ], |
| 267 | peers=[ "p64517", "p64518" ], |
| 268 | expectAllSuccess=True ) |
| 269 | |
| 270 | main.Functions.pingSpeakerToPeer( main, speakers=[ "spk3" ], |
| 271 | peers=[ "p64519", "p64520" ], |
| 272 | expectAllSuccess=True ) |
pingping-lin | 950b50d | 2015-09-14 12:00:08 -0700 | [diff] [blame] | 273 | |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 274 | def CASE2( self, main ): |
| 275 | ''' |
| 276 | point-to-point intents test for each BGP peer and BGP speaker pair |
| 277 | ''' |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 278 | import time |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 279 | from operator import eq |
| 280 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 281 | main.case( "Check point-to-point intents" ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 282 | main.log.info( "There are %s BGP peers in total " |
| 283 | % main.params[ 'config' ][ 'peerNum' ] ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 284 | main.step( "Check P2P intents number from ONOS CLI" ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 285 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 286 | getIntentsResult = main.ONOScli.intents( jsonFormat=True ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 287 | bgpIntentsActualNum = \ |
| 288 | main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult ) |
| 289 | bgpIntentsExpectedNum = int( main.params[ 'config' ][ 'peerNum' ] ) * 6 |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 290 | if bgpIntentsActualNum != bgpIntentsExpectedNum: |
| 291 | time.sleep( int( main.params['timers']['RouteDelivery'] ) ) |
Jon Hall | fabd7e5 | 2016-04-19 19:20:59 -0700 | [diff] [blame] | 292 | getIntentsResult = main.ONOScli.intents( jsonFormat=True ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 293 | bgpIntentsActualNum = \ |
| 294 | main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 295 | main.log.info( "bgpIntentsExpected num is:" ) |
| 296 | main.log.info( bgpIntentsExpectedNum ) |
| 297 | main.log.info( "bgpIntentsActual num is:" ) |
| 298 | main.log.info( bgpIntentsActualNum ) |
| 299 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 300 | expect=True, |
| 301 | actual=eq( bgpIntentsExpectedNum, bgpIntentsActualNum ), |
| 302 | onpass="PointToPointIntent Intent Num is correct!", |
| 303 | onfail="PointToPointIntent Intent Num is wrong!" ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 304 | |
| 305 | |
| 306 | def CASE3( self, main ): |
| 307 | ''' |
| 308 | routes and intents check to all BGP peers |
| 309 | ''' |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 310 | import time |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 311 | main.case( "Check routes and M2S intents to all BGP peers" ) |
pingping-lin | 0ce6062 | 2015-09-10 14:37:33 -0700 | [diff] [blame] | 312 | |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 313 | allRoutesExpected = [] |
| 314 | allRoutesExpected.append( "4.0.0.0/24" + "/" + "10.0.4.1" ) |
| 315 | allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" ) |
| 316 | allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" ) |
| 317 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 318 | allRoutesExpected.append( "7.0.0.0/24" + "/" + "10.0.7.1" ) |
| 319 | allRoutesExpected.append( "8.0.0.0/24" + "/" + "10.0.8.1" ) |
| 320 | allRoutesExpected.append( "9.0.0.0/24" + "/" + "10.0.9.1" ) |
| 321 | allRoutesExpected.append( "20.0.0.0/24" + "/" + "10.0.20.1" ) |
| 322 | |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 323 | getRoutesResult = main.ONOScli.routes( jsonFormat=True ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 324 | allRoutesActual = \ |
| 325 | main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult ) |
| 326 | allRoutesStrExpected = str( sorted( allRoutesExpected ) ) |
| 327 | allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 328 | if allRoutesStrActual != allRoutesStrExpected: |
| 329 | time.sleep( int( main.params['timers']['RouteDelivery'] ) ) |
Jon Hall | fabd7e5 | 2016-04-19 19:20:59 -0700 | [diff] [blame] | 330 | getRoutesResult = main.ONOScli.routes( jsonFormat=True ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 331 | allRoutesActual = \ |
| 332 | main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult ) |
| 333 | allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 334 | |
| 335 | main.step( "Check routes installed" ) |
| 336 | main.log.info( "Routes expected:" ) |
| 337 | main.log.info( allRoutesStrExpected ) |
| 338 | main.log.info( "Routes get from ONOS CLI:" ) |
| 339 | main.log.info( allRoutesStrActual ) |
| 340 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 341 | expect=allRoutesStrExpected, actual=allRoutesStrActual, |
| 342 | onpass="Routes are correct!", |
| 343 | onfail="Routes are wrong!" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 344 | |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 345 | main.step( "Check M2S intents installed" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 346 | getIntentsResult = main.ONOScli.intents( jsonFormat=True ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 347 | routeIntentsActualNum = \ |
| 348 | main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 349 | routeIntentsExpectedNum = 7 |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 350 | if routeIntentsActualNum != routeIntentsExpectedNum: |
| 351 | time.sleep( int( main.params['timers']['RouteDelivery'] ) ) |
Jon Hall | fabd7e5 | 2016-04-19 19:20:59 -0700 | [diff] [blame] | 352 | getIntentsResult = main.ONOScli.intents( jsonFormat=True ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 353 | routeIntentsActualNum = \ |
| 354 | main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 355 | |
| 356 | main.log.info( "MultiPointToSinglePoint Intent Num expected is:" ) |
| 357 | main.log.info( routeIntentsExpectedNum ) |
| 358 | main.log.info( "MultiPointToSinglePoint Intent NUM Actual is:" ) |
| 359 | main.log.info( routeIntentsActualNum ) |
| 360 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 361 | expect=routeIntentsExpectedNum, |
| 362 | actual=routeIntentsActualNum, |
| 363 | onpass="MultiPointToSinglePoint Intent Num is correct!", |
| 364 | onfail="MultiPointToSinglePoint Intent Num is wrong!" ) |
pingping-lin | 28e7b21 | 2015-09-10 10:14:58 -0700 | [diff] [blame] | 365 | |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 366 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 367 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 368 | main.FALSE, |
| 369 | kwargs={'isPENDING':False}, |
| 370 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 371 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 372 | expect=main.TRUE, |
| 373 | actual=flowCheck, |
| 374 | onpass="Flow status is correct!", |
| 375 | onfail="Flow status is wrong!" ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 376 | |
pingping-lin | 950b50d | 2015-09-14 12:00:08 -0700 | [diff] [blame] | 377 | |
| 378 | def CASE4( self, main ): |
| 379 | ''' |
| 380 | Ping test in data plane for each route |
| 381 | ''' |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 382 | main.case( "Ping test for each route, all hosts behind BGP peers" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 383 | #No vlan |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 384 | main.Functions.pingHostToHost( main, |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 385 | hosts=[ "h64514", "h64515", "h64516" ], |
| 386 | expectAllSuccess=True ) |
| 387 | #vlan 10 |
| 388 | main.Functions.pingHostToHost( main, |
| 389 | hosts=[ "h64519", "h64520" ], |
| 390 | expectAllSuccess=True ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 391 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 392 | # vlan 20 |
| 393 | main.Functions.pingHostToHost( main, |
| 394 | hosts=[ "h64517", "h64518" ], |
| 395 | expectAllSuccess=True ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 396 | |
| 397 | def CASE5( self, main ): |
| 398 | ''' |
| 399 | Cut links to peers one by one, check routes/intents |
| 400 | ''' |
| 401 | import time |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 402 | main.case( "Bring down links and check routes/intents" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 403 | main.step( "Bring down the link between sw32 and p64514" ) |
| 404 | linkResult1 = main.Mininet.link( END1="sw32", END2="p64514", |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 405 | OPTION="down" ) |
| 406 | utilities.assertEquals( expect=main.TRUE, |
| 407 | actual=linkResult1, |
| 408 | onpass="Bring down link succeeded!", |
| 409 | onfail="Bring down link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 410 | |
| 411 | if linkResult1 == main.TRUE: |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 412 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 413 | main.Functions.checkRouteNum( main, 6 ) #We have 7 links between peers and sw. After one link down, 7-1=6. |
| 414 | main.Functions.checkM2SintentNum( main, 6 ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 415 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 416 | main.log.error( "Bring down link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 417 | main.cleanup() |
| 418 | main.exit() |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 419 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 420 | main.step( "Bring down the link between sw8 and p64515" ) |
| 421 | linkResult2 = main.Mininet.link( END1="sw8", END2="p64515", |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 422 | OPTION="down" ) |
| 423 | utilities.assertEquals( expect=main.TRUE, |
| 424 | actual=linkResult2, |
| 425 | onpass="Bring down link succeeded!", |
| 426 | onfail="Bring down link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 427 | if linkResult2 == main.TRUE: |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 428 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 429 | main.Functions.checkRouteNum( main, 5 ) #2 links down, 7-2=5. |
| 430 | main.Functions.checkM2SintentNum( main, 5 ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 431 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 432 | main.log.error( "Bring down link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 433 | main.cleanup() |
| 434 | main.exit() |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 435 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 436 | main.step( "Bring down the link between sw28 and p64516" ) |
| 437 | linkResult3 = main.Mininet.link( END1="sw28", END2="p64516", |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 438 | OPTION="down" ) |
| 439 | utilities.assertEquals( expect=main.TRUE, |
| 440 | actual=linkResult3, |
| 441 | onpass="Bring down link succeeded!", |
| 442 | onfail="Bring down link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 443 | if linkResult3 == main.TRUE: |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 444 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 445 | main.Functions.checkRouteNum( main, 4 ) #3 links downs 7-3=4 |
| 446 | main.Functions.checkM2SintentNum( main, 4 ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 447 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 448 | main.log.error( "Bring down link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 449 | main.cleanup() |
| 450 | main.exit() |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 451 | |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 452 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 453 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 454 | main.FALSE, |
| 455 | kwargs={'isPENDING':False}, |
| 456 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 457 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 458 | expect=main.TRUE, |
| 459 | actual=flowCheck, |
| 460 | onpass="Flow status is correct!", |
| 461 | onfail="Flow status is wrong!" ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 462 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 463 | # Ping test |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 464 | main.Functions.pingSpeakerToPeer( main, speakers=["spk1"], |
| 465 | peers=["p64514", "p64515", "p64516"], |
| 466 | expectAllSuccess=False ) |
| 467 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 468 | main.Functions.pingHostToHost( main, |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 469 | hosts=["h64514", "h64515", "h64516"], |
| 470 | expectAllSuccess=False ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 471 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 472 | |
| 473 | def CASE6( self, main ): |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 474 | ''' |
| 475 | Recover links to peers one by one, check routes/intents |
| 476 | ''' |
| 477 | import time |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 478 | main.case( "Bring up links and check routes/intents" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 479 | main.step( "Bring up the link between sw32 and p64514" ) |
| 480 | linkResult1 = main.Mininet.link( END1="sw32", END2="p64514", |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 481 | OPTION="up" ) |
| 482 | utilities.assertEquals( expect=main.TRUE, |
| 483 | actual=linkResult1, |
| 484 | onpass="Bring up link succeeded!", |
| 485 | onfail="Bring up link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 486 | if linkResult1 == main.TRUE: |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 487 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 488 | main.Functions.checkRouteNum( main, 5 ) #one links up, 4+1=5 |
| 489 | main.Functions.checkM2SintentNum( main, 5 ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 490 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 491 | main.log.error( "Bring up link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 492 | main.cleanup() |
| 493 | main.exit() |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 494 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 495 | main.step( "Bring up the link between sw8 and p64515" ) |
| 496 | linkResult2 = main.Mininet.link( END1="sw8", END2="p64515", |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 497 | OPTION="up" ) |
| 498 | utilities.assertEquals( expect=main.TRUE, |
| 499 | actual=linkResult2, |
| 500 | onpass="Bring up link succeeded!", |
| 501 | onfail="Bring up link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 502 | if linkResult2 == main.TRUE: |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 503 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 504 | main.Functions.checkRouteNum( main, 6 ) |
| 505 | main.Functions.checkM2SintentNum( main, 6 ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 506 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 507 | main.log.error( "Bring up link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 508 | main.cleanup() |
| 509 | main.exit() |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 510 | |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 511 | main.step( "Bring up the link between sw28 and p64516" ) |
| 512 | linkResult3 = main.Mininet.link( END1="sw28", END2="p64516", |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 513 | OPTION="up" ) |
| 514 | utilities.assertEquals( expect=main.TRUE, |
| 515 | actual=linkResult3, |
| 516 | onpass="Bring up link succeeded!", |
| 517 | onfail="Bring up link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 518 | if linkResult3 == main.TRUE: |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 519 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 520 | main.Functions.checkRouteNum( main, 7 ) |
| 521 | main.Functions.checkM2SintentNum( main, 7 ) |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 522 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 523 | main.log.error( "Bring up link failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 524 | main.cleanup() |
| 525 | main.exit() |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 526 | |
| 527 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 528 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 529 | main.FALSE, |
| 530 | kwargs={'isPENDING':False}, |
| 531 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 532 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 533 | expect=main.TRUE, |
| 534 | actual=flowCheck, |
| 535 | onpass="Flow status is correct!", |
| 536 | onfail="Flow status is wrong!" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 537 | |
| 538 | # Ping test |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 539 | main.Functions.pingSpeakerToPeer( main, speakers=["spk1"], |
| 540 | peers=["p64514", "p64515", "p64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 541 | expectAllSuccess=True ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 542 | main.Functions.pingHostToHost( main, |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 543 | hosts=["h64514", "h64515", "h64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 544 | expectAllSuccess=True ) |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 545 | |
| 546 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 547 | def CASE7( self, main ): |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 548 | ''' |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 549 | Shut down a edge switch, check P-2-P and M-2-S intents, ping test |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 550 | ''' |
| 551 | import time |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 552 | main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" ) |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 553 | main.step( "Stop sw32" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 554 | result = main.Mininet.switch( SW="sw32", OPTION="stop" ) |
| 555 | utilities.assertEquals( expect=main.TRUE, actual=result, |
| 556 | onpass="Stopping switch succeeded!", |
| 557 | onfail="Stopping switch failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 558 | |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 559 | if result == main.TRUE: |
| 560 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 561 | main.Functions.checkRouteNum( main, 6 ) #stop one sw, which bring one link between peer and sw down. |
| 562 | main.Functions.checkM2SintentNum( main, 6 ) |
| 563 | main.Functions.checkP2PintentNum( main, 36 ) #6 intents from sw to speakers x 6 intents to sw x 2 intents between them |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 564 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 565 | main.log.error( "Stopping switch failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 566 | main.cleanup() |
| 567 | main.exit() |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 568 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 569 | main.step( "Check ping between hosts behind BGP peers" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 570 | result1 = main.Mininet.pingHost( src="h64514", target="h64515" ) |
| 571 | result2 = main.Mininet.pingHost( src="h64515", target="h64516" ) |
| 572 | result3 = main.Mininet.pingHost( src="h64514", target="h64516" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 573 | |
| 574 | pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \ |
| 575 | and ( result3 == main.FALSE ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 576 | utilities.assert_equals( expect=True, actual=pingResult1, |
| 577 | onpass="Ping test result is correct", |
| 578 | onfail="Ping test result is wrong" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 579 | |
| 580 | if pingResult1 == False: |
| 581 | main.cleanup() |
| 582 | main.exit() |
| 583 | |
| 584 | main.step( "Check ping between BGP peers and speakers" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 585 | result4 = main.Mininet.pingHost( src="spk1", target="p64514" ) |
| 586 | result5 = main.Mininet.pingHost( src="spk1", target="p64515" ) |
| 587 | result6 = main.Mininet.pingHost( src="spk1", target="p64516" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 588 | |
| 589 | pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \ |
| 590 | and ( result6 == main.TRUE ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 591 | utilities.assert_equals( expect=True, actual=pingResult2, |
| 592 | onpass="Speaker1 ping peers successful", |
| 593 | onfail="Speaker1 ping peers NOT successful" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 594 | |
| 595 | if pingResult2 == False: |
| 596 | main.cleanup() |
| 597 | main.exit() |
| 598 | |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 599 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 600 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 601 | main.FALSE, |
| 602 | kwargs={'isPENDING':False}, |
| 603 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 604 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 605 | expect=main.TRUE, |
| 606 | actual=flowCheck, |
| 607 | onpass="Flow status is correct!", |
| 608 | onfail="Flow status is wrong!" ) |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 609 | |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 610 | |
pingping-lin | 8244a3b | 2015-09-16 13:36:56 -0700 | [diff] [blame] | 611 | def CASE8( self, main ): |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 612 | ''' |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 613 | Bring up the edge switch (sw32) which was shut down in CASE7, |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 614 | check P-2-P and M-2-S intents, ping test |
| 615 | ''' |
| 616 | import time |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 617 | main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" ) |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 618 | main.step( "Start sw32" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 619 | result1 = main.Mininet.switch( SW="sw32", OPTION="start" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 620 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 621 | expect=main.TRUE, |
| 622 | actual=result1, |
| 623 | onpass="Starting switch succeeded!", |
| 624 | onfail="Starting switch failed!" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 625 | |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 626 | result2 = main.Mininet.assignSwController( "sw32", ONOS1Ip ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 627 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 628 | expect=main.TRUE, |
| 629 | actual=result2, |
| 630 | onpass="Connect switch to ONOS succeeded!", |
| 631 | onfail="Connect switch to ONOS failed!" ) |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 632 | |
| 633 | if result1 and result2: |
| 634 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 635 | main.Functions.checkRouteNum( main, 7 ) |
| 636 | main.Functions.checkM2SintentNum( main, 7 ) |
| 637 | main.Functions.checkP2PintentNum( main, 42 ) |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 638 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 639 | main.log.error( "Starting switch failed!" ) |
pingping-lin | d791d34 | 2015-09-17 18:34:31 -0700 | [diff] [blame] | 640 | main.cleanup() |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 641 | main.exit() |
pingping-lin | 4f80c49 | 2015-09-15 14:34:42 -0700 | [diff] [blame] | 642 | |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 643 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 644 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 645 | main.FALSE, |
| 646 | kwargs={'isPENDING':False}, |
| 647 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 648 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 649 | expect=main.TRUE, |
| 650 | actual=flowCheck, |
| 651 | onpass="Flow status is correct!", |
| 652 | onfail="Flow status is wrong!" ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 653 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 654 | # Ping test |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 655 | main.Functions.pingSpeakerToPeer( main, speakers=["spk1"], |
| 656 | peers=["p64514", "p64515", "p64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 657 | expectAllSuccess=True ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 658 | main.Functions.pingHostToHost( main, |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 659 | hosts=["h64514", "h64515", "h64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 660 | expectAllSuccess=True ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 661 | |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 662 | |
| 663 | def CASE9( self, main ): |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 664 | ''' |
| 665 | Bring down a switch in best path, check: |
| 666 | route number, P2P intent number, M2S intent number, ping test |
| 667 | ''' |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 668 | main.case( "Stop sw11 located in best path, \ |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 669 | check route number, P2P intent number, M2S intent number, ping test" ) |
| 670 | |
pingping-lin | 581a366 | 2015-09-29 17:43:39 -0700 | [diff] [blame] | 671 | main.log.info( "Check the flow number correctness before stopping sw11" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 672 | main.Functions.checkFlowNum( main, "sw11", 43 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 673 | main.Functions.checkFlowNum( main, "sw1", 3 ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 674 | main.Functions.checkFlowNum( main, "sw7", 34 ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 675 | main.log.debug( main.Mininet.checkFlows( "sw11" ) ) |
| 676 | main.log.debug( main.Mininet.checkFlows( "sw1" ) ) |
| 677 | main.log.debug( main.Mininet.checkFlows( "sw7" ) ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 678 | |
| 679 | main.step( "Stop sw11" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 680 | result = main.Mininet.switch( SW="sw11", OPTION="stop" ) |
| 681 | utilities.assertEquals( expect=main.TRUE, actual=result, |
| 682 | onpass="Stopping switch succeeded!", |
| 683 | onfail="Stopping switch failed!" ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 684 | if result: |
| 685 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 686 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 687 | main.Functions.checkRouteNum( main, 7 ) |
| 688 | main.Functions.checkM2SintentNum( main, 7 ) |
| 689 | main.Functions.checkP2PintentNum( main, 42 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 690 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 691 | main.log.error( "Stopping switch failed!" ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 692 | main.cleanup() |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 693 | main.exit() |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 694 | |
| 695 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 696 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 697 | main.FALSE, |
| 698 | kwargs={'isPENDING':False}, |
| 699 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 700 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 701 | expect=main.TRUE, |
| 702 | actual=flowCheck, |
| 703 | onpass="Flow status is correct!", |
| 704 | onfail="Flow status is wrong!" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 705 | # Ping test |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 706 | main.Functions.pingSpeakerToPeer( main, speakers=["spk1"], |
| 707 | peers=["p64514", "p64515", "p64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 708 | expectAllSuccess=True ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 709 | main.Functions.pingHostToHost( main, |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 710 | hosts=["h64514", "h64515", "h64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 711 | expectAllSuccess=True ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 712 | |
| 713 | |
| 714 | def CASE10( self, main ): |
| 715 | ''' |
| 716 | Bring up the switch which was stopped in CASE9, check: |
| 717 | route number, P2P intent number, M2S intent number, ping test |
| 718 | ''' |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 719 | main.case( "Start sw11 which was stopped in CASE9, \ |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 720 | check route number, P2P intent number, M2S intent number, ping test" ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 721 | |
pingping-lin | 581a366 | 2015-09-29 17:43:39 -0700 | [diff] [blame] | 722 | main.log.info( "Check the flow status before starting sw11" ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 723 | main.Functions.checkFlowNum( main, "sw1", 33 ) |
| 724 | main.Functions.checkFlowNum( main, "sw7", 28 ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 725 | main.log.debug( main.Mininet.checkFlows( "sw1" ) ) |
| 726 | main.log.debug( main.Mininet.checkFlows( "sw7" ) ) |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 727 | |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 728 | main.step( "Start sw11" ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 729 | result1 = main.Mininet.switch( SW="sw11", OPTION="start" ) |
| 730 | utilities.assertEquals( expect=main.TRUE, actual=result1, |
| 731 | onpass="Starting switch succeeded!", |
| 732 | onfail="Starting switch failed!" ) |
pingping-lin | 0351dee | 2015-09-28 13:26:35 -0700 | [diff] [blame] | 733 | result2 = main.Mininet.assignSwController( "sw11", ONOS1Ip ) |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 734 | utilities.assertEquals( expect=main.TRUE, actual=result2, |
| 735 | onpass="Connect switch to ONOS succeeded!", |
| 736 | onfail="Connect switch to ONOS failed!" ) |
pingping-lin | 0351dee | 2015-09-28 13:26:35 -0700 | [diff] [blame] | 737 | if result1 and result2: |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 738 | time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) ) |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 739 | main.Functions.checkRouteNum( main, 7 ) |
| 740 | main.Functions.checkM2SintentNum( main, 7 ) |
| 741 | main.Functions.checkP2PintentNum( main, 42 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 742 | |
pingping-lin | 3f091d6 | 2015-09-29 12:00:05 -0700 | [diff] [blame] | 743 | main.log.debug( main.Mininet.checkFlows( "sw11" ) ) |
| 744 | main.log.debug( main.Mininet.checkFlows( "sw1" ) ) |
| 745 | main.log.debug( main.Mininet.checkFlows( "sw7" ) ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 746 | else: |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 747 | main.log.error( "Starting switch failed!" ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 748 | main.cleanup() |
pingping-lin | b3ebd3f | 2015-09-28 22:17:05 -0700 | [diff] [blame] | 749 | main.exit() |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 750 | |
| 751 | main.step( "Check whether all flow status are ADDED" ) |
Jon Hall | 1aa0560 | 2016-04-05 10:25:39 -0700 | [diff] [blame] | 752 | flowCheck = utilities.retry( main.ONOScli.checkFlowsState, |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 753 | main.FALSE, |
| 754 | kwargs={'isPENDING':False}, |
| 755 | attempts=10 ) |
pingping-lin | bab7f8a | 2015-09-21 17:33:36 -0700 | [diff] [blame] | 756 | utilities.assertEquals( \ |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 757 | expect=main.TRUE, |
| 758 | actual=flowCheck, |
| 759 | onpass="Flow status is correct!", |
| 760 | onfail="Flow status is wrong!" ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 761 | # Ping test |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 762 | main.Functions.pingSpeakerToPeer( main, speakers=["spk1"], |
| 763 | peers=["p64514", "p64515", "p64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 764 | expectAllSuccess=True ) |
pingping-lin | 829428d | 2015-09-22 20:50:00 -0700 | [diff] [blame] | 765 | main.Functions.pingHostToHost( main, |
alison | e4121a9 | 2016-11-22 16:31:36 -0800 | [diff] [blame] | 766 | hosts=["h64514", "h64515", "h64516"], |
Jon Hall | 6e9897d | 2016-02-29 14:41:32 -0800 | [diff] [blame] | 767 | expectAllSuccess=True ) |