Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 1 | """ |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 2 | Copyright 2015 Open Networking Foundation ( ONF ) |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 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 |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 11 | ( at your option ) any later version. |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 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 | """ |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 21 | # Testing the basic intent for ipv6 functionality of ONOS |
| 22 | |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 23 | |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 24 | class FUNCipv6Intent: |
| 25 | |
| 26 | def __init__( self ): |
| 27 | self.default = '' |
| 28 | |
| 29 | def CASE1( self, main ): |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 30 | import imp |
| 31 | import re |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 32 | """ |
| 33 | - Construct tests variables |
| 34 | - GIT ( optional ) |
| 35 | - Checkout ONOS master branch |
| 36 | - Pull latest ONOS code |
| 37 | - Building ONOS ( optional ) |
| 38 | - Install ONOS package |
| 39 | - Build ONOS package |
| 40 | """ |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 41 | try: |
| 42 | from tests.dependencies.ONOSSetup import ONOSSetup |
| 43 | main.testSetUp = ONOSSetup() |
| 44 | except ImportError: |
| 45 | main.log.error( "ONOSSetup not found. exiting the test" ) |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 46 | main.cleanAndExit() |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 47 | main.testSetUp.envSetupDescription() |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 48 | stepResult = main.FALSE |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 49 | # Test variables |
| 50 | try: |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 51 | main.apps = main.params[ 'ENV' ][ 'cellApps' ] |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 52 | main.dependencyPath = main.testOnDirectory + \ |
| 53 | main.params[ 'DEPENDENCY' ][ 'path' ] |
| 54 | main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ] |
| 55 | main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 56 | wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ] |
| 57 | wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ] |
| 58 | wrapperFile3 = main.params[ 'DEPENDENCY' ][ 'wrapper3' ] |
| 59 | main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] ) |
| 60 | main.checkIntentSleep = int( main.params[ 'SLEEP' ][ 'checkintent' ] ) |
| 61 | main.removeIntentSleep = int( main.params[ 'SLEEP' ][ 'removeintent' ] ) |
| 62 | main.rerouteSleep = int( main.params[ 'SLEEP' ][ 'reroute' ] ) |
| 63 | main.fwdSleep = int( main.params[ 'SLEEP' ][ 'fwd' ] ) |
| 64 | main.checkTopoAttempts = int( main.params[ 'SLEEP' ][ 'topoAttempts' ] ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 65 | main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] ) |
| 66 | main.numLinks = int( main.params[ 'MININET' ][ 'links' ] ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 67 | main.hostsData = {} |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 68 | main.assertReturnString = '' # Assembled assert return string |
| 69 | |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 70 | # -- INIT SECTION, ONLY RUNS ONCE -- # |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 71 | |
| 72 | main.intentFunction = imp.load_source( wrapperFile2, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 73 | main.dependencyPath + |
| 74 | wrapperFile2 + |
| 75 | ".py" ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 76 | |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 77 | copyResult1 = main.ONOSbench.scp( main.Mininet1, |
| 78 | main.dependencyPath + |
| 79 | main.topology, |
Devin Lim | 29a9e3d | 2018-01-30 14:09:47 -0800 | [diff] [blame] | 80 | main.Mininet1.home + "custom/", |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 81 | direction="to" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 82 | stepResult = main.testSetUp.envSetup() |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 83 | except Exception as e: |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 84 | main.testSetUp.envSetupException( e ) |
| 85 | main.testSetUp.evnSetupConclusion( stepResult ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 86 | |
| 87 | def CASE2( self, main ): |
| 88 | """ |
| 89 | - Set up cell |
| 90 | - Create cell file |
| 91 | - Set cell file |
| 92 | - Verify cell file |
| 93 | - Kill ONOS process |
| 94 | - Uninstall ONOS cluster |
| 95 | - Verify ONOS start up |
| 96 | - Install ONOS cluster |
| 97 | - Connect to cli |
| 98 | """ |
alison | a2905c1 | 2016-09-19 15:18:07 -0700 | [diff] [blame] | 99 | import time |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 100 | |
You Wang | a0f6ff6 | 2018-01-11 15:46:30 -0800 | [diff] [blame] | 101 | main.initialized = main.testSetUp.ONOSSetUp( main.Cluster, True ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 102 | |
Jon Hall | 11845ed | 2016-02-11 11:25:31 -0800 | [diff] [blame] | 103 | main.step( "Checking that ONOS is ready" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 104 | |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 105 | ready = utilities.retry( main.Cluster.command, |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 106 | False, |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 107 | kwargs={ "function": "summary", "contentCheck": True }, |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 108 | sleep=30, |
| 109 | attempts=3 ) |
Jon Hall | 11845ed | 2016-02-11 11:25:31 -0800 | [diff] [blame] | 110 | utilities.assert_equals( expect=True, actual=ready, |
| 111 | onpass="ONOS summary command succeded", |
| 112 | onfail="ONOS summary command failed" ) |
| 113 | if not ready: |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 114 | main.cleanAndExit() |
| 115 | main.cleanAndExit() |
Jon Hall | 11845ed | 2016-02-11 11:25:31 -0800 | [diff] [blame] | 116 | |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 117 | main.step( "setup the ipv6NeighbourDiscovery" ) |
You Wang | 6ce33b0 | 2017-08-08 13:05:09 -0700 | [diff] [blame] | 118 | cfgResult1 = main.Cluster.active( 0 ).CLI.setCfg( "org.onosproject.net.neighbour.impl.NeighbourResolutionManager", "ndpEnabled", "true" ) |
| 119 | cfgResult2 = main.Cluster.active( 0 ).CLI.setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "requestIpv6ND", "true" ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 120 | cfgResult = cfgResult1 and cfgResult2 |
| 121 | utilities.assert_equals( expect=main.TRUE, actual=cfgResult, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 122 | onpass="ipv6NeighborDiscovery cfg is set to true", |
| 123 | onfail="Failed to cfg set ipv6NeighborDiscovery" ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 124 | |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 125 | main.intentFunction.report( main ) |
| 126 | |
| 127 | def CASE11( self, main ): |
| 128 | """ |
| 129 | Start Mininet topology with OF 1.3 switches |
| 130 | """ |
| 131 | main.OFProtocol = "1.3" |
| 132 | main.log.report( "Start Mininet topology with OF 1.3 switches" ) |
| 133 | main.case( "Start Mininet topology with OF 1.3 switches" ) |
| 134 | main.caseExplanation = "Start mininet topology with OF 1.3 " +\ |
| 135 | "switches to test intents, exits out if " +\ |
| 136 | "topology did not start correctly" |
| 137 | |
| 138 | main.step( "Starting Mininet topology with OF 1.3 switches" ) |
| 139 | args = "--switch ovs,protocols=OpenFlow13" |
Devin Lim | 29a9e3d | 2018-01-30 14:09:47 -0800 | [diff] [blame] | 140 | topoResult = main.Mininet1.startNet( topoFile=main.Mininet1.home + "custom/" + main.topology, |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 141 | args=args ) |
| 142 | stepResult = topoResult |
| 143 | utilities.assert_equals( expect=main.TRUE, |
| 144 | actual=stepResult, |
| 145 | onpass="Successfully loaded topology", |
| 146 | onfail="Failed to load topology" ) |
| 147 | # Exit if topology did not load properly |
| 148 | if not topoResult: |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 149 | main.cleanAndExit() |
| 150 | main.cleanAndExit() |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 151 | |
| 152 | def CASE12( self, main ): |
| 153 | """ |
| 154 | Assign mastership to controllers |
| 155 | """ |
| 156 | import re |
| 157 | |
| 158 | main.case( "Assign switches to controllers" ) |
| 159 | main.step( "Assigning switches to controllers" ) |
| 160 | main.caseExplanation = "Assign OF " + main.OFProtocol +\ |
| 161 | " switches to ONOS nodes" |
| 162 | |
| 163 | assignResult = main.TRUE |
| 164 | switchList = [] |
| 165 | |
| 166 | # Creates a list switch name, use getSwitch() function later... |
| 167 | for i in range( 1, ( main.numSwitch + 1 ) ): |
| 168 | switchList.append( 's' + str( i ) ) |
| 169 | |
| 170 | tempONOSip = [] |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 171 | for ctrl in main.Cluster.active(): |
| 172 | tempONOSip.append( ctrl.ipAddress ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 173 | |
| 174 | assignResult = main.Mininet1.assignSwController( sw=switchList, |
| 175 | ip=tempONOSip, |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 176 | port='6633' ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 177 | if not assignResult: |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 178 | main.cleanAndExit() |
| 179 | main.cleanAndExit() |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 180 | |
| 181 | for i in range( 1, ( main.numSwitch + 1 ) ): |
| 182 | response = main.Mininet1.getSwController( "s" + str( i ) ) |
| 183 | print( "Response is " + str( response ) ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 184 | if re.search( "tcp:" + main.Cluster.active( 0 ).ipAddress, response ): |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 185 | assignResult = assignResult and main.TRUE |
| 186 | else: |
| 187 | assignResult = main.FALSE |
| 188 | stepResult = assignResult |
| 189 | utilities.assert_equals( expect=main.TRUE, |
| 190 | actual=stepResult, |
| 191 | onpass="Successfully assigned switches" + |
| 192 | "to controller", |
| 193 | onfail="Failed to assign switches to " + |
| 194 | "controller" ) |
| 195 | |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 196 | def CASE13( self, main ): |
| 197 | """ |
| 198 | Discover all hosts and store its data to a dictionary |
| 199 | """ |
| 200 | main.case( "Discover all hosts" ) |
| 201 | |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 202 | main.step( "Discover all hosts using pingall " ) |
| 203 | stepResult = main.intentFunction.getHostsData( main ) |
| 204 | utilities.assert_equals( expect=main.TRUE, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 205 | actual=stepResult, |
| 206 | onpass="Successfully discovered hosts", |
| 207 | onfail="Failed to discover hosts" ) |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 208 | |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 209 | def CASE16( self, main ): |
| 210 | """ |
| 211 | Balance Masters |
| 212 | """ |
| 213 | main.case( "Balance mastership of switches" ) |
| 214 | main.step( "Balancing mastership of switches" ) |
| 215 | |
| 216 | balanceResult = main.FALSE |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 217 | balanceResult = utilities.retry( f=main.Cluster.active( 0 ).CLI.balanceMasters, retValue=main.FALSE, args=[] ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 218 | |
| 219 | utilities.assert_equals( expect=main.TRUE, |
| 220 | actual=balanceResult, |
| 221 | onpass="Successfully balanced mastership of switches", |
| 222 | onfail="Failed to balance mastership of switches" ) |
| 223 | |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 224 | def CASE14( self, main ): |
| 225 | """ |
| 226 | Stop mininet |
| 227 | """ |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 228 | try: |
| 229 | from tests.dependencies.utils import Utils |
| 230 | except ImportError: |
| 231 | main.log.error( "Utils not found exiting the test" ) |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 232 | main.cleanAndExit() |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 233 | try: |
| 234 | main.Utils |
| 235 | except ( NameError, AttributeError ): |
| 236 | main.Utils = Utils() |
| 237 | main.Utils.mininetCleanIntro() |
| 238 | topoResult = main.Utils.mininetCleanup( main.Mininet1 ) |
Subhash Kumar Singh | c73b3a7 | 2015-11-03 21:34:04 -0800 | [diff] [blame] | 239 | # Exit if topology did not load properly |
| 240 | if not topoResult: |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 241 | main.cleanAndExit() |
| 242 | main.cleanAndExit() |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 243 | |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 244 | def CASE1000( self, main ): |
| 245 | """ |
| 246 | Add host intents between 2 host: |
| 247 | - Discover hosts |
| 248 | - Add host intents |
| 249 | - Check intents |
| 250 | - Verify flows |
| 251 | - Ping hosts |
| 252 | - Reroute |
| 253 | - Link down |
| 254 | - Verify flows |
| 255 | - Check topology |
| 256 | - Ping hosts |
| 257 | - Link up |
| 258 | - Verify flows |
| 259 | - Check topology |
| 260 | - Ping hosts |
| 261 | - Remove intents |
| 262 | """ |
| 263 | import time |
| 264 | import json |
| 265 | import re |
| 266 | |
| 267 | # Assert variables - These variable's name|format must be followed |
| 268 | # if you want to use the wrapper function |
| 269 | assert main, "There is no main" |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 270 | assert main.Mininet1, "Mininet handle should be named Mininet1" |
| 271 | assert main.numSwitch, "Placed the total number of switch topology in \ |
| 272 | main.numSwitch" |
| 273 | |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 274 | intentLeadersOld = main.Cluster.active( 0 ).CLI.leaderCandidates() |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 275 | |
| 276 | main.testName = "Host Intents" |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 277 | main.case( main.testName + " Test - " + str( main.Cluster.numCtrls ) + |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 278 | " NODE(S) - OF " + main.OFProtocol ) |
| 279 | main.caseExplanation = "This test case tests Host intents using " +\ |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 280 | str( main.Cluster.numCtrls ) + " node(s) cluster;\n" +\ |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 281 | "Different type of hosts will be tested in " +\ |
| 282 | "each step such as IPV6, Dual stack, VLAN " +\ |
| 283 | "etc;\nThe test will use OF " + main.OFProtocol\ |
| 284 | + " OVS running in Mininet" |
| 285 | |
| 286 | main.step( "IPV6: Add host intents between h1 and h9" ) |
| 287 | stepResult = main.TRUE |
| 288 | stepResult = main.intentFunction.hostIntent( main, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 289 | name='IPV6', |
| 290 | host1='h1', |
| 291 | host2='h9', |
| 292 | host1Id='00:00:00:00:00:01/-1', |
| 293 | host2Id='00:00:00:00:00:09/-1', |
| 294 | sw1='s5', |
| 295 | sw2='s2', |
| 296 | expectedLink=18 ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 297 | |
| 298 | utilities.assert_equals( expect=main.TRUE, |
| 299 | actual=stepResult, |
| 300 | onpass="IPV6: Host intent test successful " + |
| 301 | "between two IPV6 hosts", |
| 302 | onfail="IPV6: Host intent test failed " + |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 303 | "between two IPV6 hosts" ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 304 | |
| 305 | main.step( "DUALSTACK1: Add host intents between h3 and h11" ) |
| 306 | stepResult = main.TRUE |
| 307 | stepResult = main.intentFunction.hostIntent( main, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 308 | name='DUALSTACK', |
| 309 | host1='h3', |
| 310 | host2='h11', |
| 311 | host1Id='00:00:00:00:00:03/-1', |
| 312 | host2Id='00:00:00:00:00:0B/-1', |
| 313 | sw1='s5', |
| 314 | sw2='s2', |
| 315 | expectedLink=18 ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 316 | |
| 317 | utilities.assert_equals( expect=main.TRUE, |
| 318 | actual=stepResult, |
| 319 | onpass="DUALSTACK: Host intent test " + |
| 320 | "successful between two " + |
| 321 | "dual stack host using IPV6", |
| 322 | onfail="DUALSTACK: Host intent test " + |
| 323 | "failed between two" + |
| 324 | "dual stack host using IPV6" ) |
| 325 | |
| 326 | main.step( "1HOP: Add host intents between h1 and h3" ) |
| 327 | stepResult = main.TRUE |
| 328 | stepResult = main.intentFunction.hostIntent( main, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 329 | name='1HOP', |
| 330 | host1='h1', |
| 331 | host2='h9', |
| 332 | host1Id='00:00:00:00:00:01/-1', |
| 333 | host2Id='00:00:00:00:00:09/-1' ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 334 | |
| 335 | utilities.assert_equals( expect=main.TRUE, |
| 336 | actual=stepResult, |
| 337 | onpass="1HOP: Host intent test " + |
| 338 | "successful between two " + |
| 339 | "host using IPV6 in the same switch", |
| 340 | onfail="1HOP: Host intent test " + |
| 341 | "failed between two" + |
| 342 | "host using IPV6 in the same switch" ) |
| 343 | |
| 344 | main.step( "VLAN: Add vlan host intents between h5 and h24" ) |
| 345 | stepResult = main.TRUE |
| 346 | stepResult = main.intentFunction.hostIntent( main, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 347 | name='VLAN1', |
| 348 | host1='h5', |
| 349 | host2='h24', |
| 350 | host1Id='00:00:00:00:00:05/100', |
| 351 | host2Id='00:00:00:00:00:18/100', |
| 352 | sw1='s5', |
| 353 | sw2='s2', |
| 354 | expectedLink=18 ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 355 | |
| 356 | utilities.assert_equals( expect=main.TRUE, |
| 357 | actual=stepResult, |
| 358 | onpass="VLAN: Host intent test " + |
| 359 | "successful between two " + |
| 360 | "host using IPV6 in the same VLAN", |
| 361 | onfail="VLAN1: Host intent test " + |
| 362 | "failed between two" + |
| 363 | "host using IPV6 in the same VLAN" ) |
| 364 | |
| 365 | main.intentFunction.report( main ) |
| 366 | |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 367 | def CASE2000( self, main ): |
| 368 | """ |
| 369 | add point intents between 2 hosts: |
| 370 | - Get device ids | ports |
| 371 | - Add point intents |
| 372 | - Check intents |
| 373 | - Verify flows |
| 374 | - Ping hosts |
| 375 | - Reroute |
| 376 | - Link down |
| 377 | - Verify flows |
| 378 | - Check topology |
| 379 | - Ping hosts |
| 380 | - Link up |
| 381 | - Verify flows |
| 382 | - Check topology |
| 383 | - Ping hosts |
| 384 | - Remove intents |
| 385 | """ |
| 386 | import time |
| 387 | import json |
| 388 | import re |
| 389 | |
| 390 | # Assert variables - These variable's name|format must be followed |
| 391 | # if you want to use the wrapper function |
| 392 | assert main, "There is no main" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 393 | assert main.Mininet1, "Mininet handle should be named Mininet1" |
| 394 | assert main.numSwitch, "Placed the total number of switch topology in \ |
| 395 | main.numSwitch" |
| 396 | |
| 397 | main.testName = "Point Intents" |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 398 | main.case( main.testName + " Test - " + str( main.Cluster.numCtrls ) + |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 399 | " NODE(S) - OF " + main.OFProtocol ) |
| 400 | main.caseExplanation = "This test case will test point to point" +\ |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 401 | " intents using " + str( main.Cluster.numCtrls ) +\ |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 402 | " node(s) cluster;\n" +\ |
| 403 | "Different type of hosts will be tested in " +\ |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 404 | "each step such as IPV6, Dual stack, VLAN etc" +\ |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 405 | ";\nThe test will use OF " + main.OFProtocol +\ |
| 406 | " OVS running in Mininet" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 407 | # No option point intents |
| 408 | main.step( "NOOPTION: Add point intents between h1 and h9, ipv6 hosts" ) |
| 409 | main.assertReturnString = "Assertion Result for NOOPTION point intent\n" |
| 410 | stepResult = main.TRUE |
| 411 | stepResult = main.intentFunction.pointIntent( |
| 412 | main, |
| 413 | name="NOOPTION", |
| 414 | host1="h1", |
| 415 | host2="h9", |
| 416 | deviceId1="of:0000000000000005/1", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 417 | deviceId2="of:0000000000000006/1" ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 418 | |
| 419 | utilities.assert_equals( expect=main.TRUE, |
| 420 | actual=stepResult, |
| 421 | onpass=main.assertReturnString, |
| 422 | onfail=main.assertReturnString ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 423 | stepResult = main.TRUE |
| 424 | main.step( "IPV6: Add point intents between h1 and h9" ) |
| 425 | main.assertReturnString = "Assertion Result for IPV6 point intent\n" |
| 426 | stepResult = main.intentFunction.pointIntent( |
| 427 | main, |
| 428 | name="IPV6", |
| 429 | host1="h1", |
| 430 | host2="h9", |
| 431 | deviceId1="of:0000000000000005/1", |
| 432 | deviceId2="of:0000000000000006/1", |
| 433 | port1="", |
| 434 | port2="", |
| 435 | ethType="IPV6", |
| 436 | mac1="00:00:00:00:00:01", |
| 437 | mac2="00:00:00:00:00:09", |
| 438 | bandwidth="", |
| 439 | lambdaAlloc=False, |
| 440 | ipProto="", |
| 441 | ip1="", |
| 442 | ip2="", |
| 443 | tcp1="", |
| 444 | tcp2="", |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 445 | sw1="s5", |
| 446 | sw2="s2", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 447 | expectedLink=18 ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 448 | utilities.assert_equals( expect=main.TRUE, |
| 449 | actual=stepResult, |
| 450 | onpass=main.assertReturnString, |
| 451 | onfail=main.assertReturnString ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 452 | main.step( "IPV6_2: Add point intents between h1 and h9" ) |
| 453 | main.assertReturnString = "Assertion Result for IPV6 no mac address point intents\n" |
| 454 | stepResult = main.intentFunction.pointIntent( |
| 455 | main, |
| 456 | name="IPV6_2", |
| 457 | host1="h1", |
| 458 | host2="h9", |
| 459 | deviceId1="of:0000000000000005/1", |
| 460 | deviceId2="of:0000000000000006/1", |
| 461 | ipProto="", |
| 462 | ip1="", |
| 463 | ip2="", |
| 464 | tcp1="", |
| 465 | tcp2="", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 466 | expectedLink="" ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 467 | utilities.assert_equals( expect=main.TRUE, |
| 468 | actual=stepResult, |
| 469 | onpass=main.assertReturnString, |
| 470 | onfail=main.assertReturnString ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 471 | main.step( "SDNIP-ICMP: Add point intents between h1 and h9" ) |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 472 | main.assertReturnString = "Assertion Result for SDNIP-ICMP IPV6 using ICMP point intents\n" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 473 | mac1 = main.hostsData[ 'h1' ][ 'mac' ] |
| 474 | mac2 = main.hostsData[ 'h9' ][ 'mac' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 475 | main.log.debug( mac2 ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 476 | ipProto = main.params[ 'SDNIP' ][ 'icmpProto' ] |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 477 | ip1 = str( main.hostsData[ 'h1' ][ 'ipAddresses' ][ 0 ] ) + "/128" |
| 478 | ip2 = str( main.hostsData[ 'h9' ][ 'ipAddresses' ][ 0 ] ) + "/128" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 479 | stepResult = main.intentFunction.pointIntent( |
| 480 | main, |
| 481 | name="SDNIP-ICMP", |
| 482 | host1="h1", |
| 483 | host2="h9", |
| 484 | deviceId1="of:0000000000000005/1", |
| 485 | deviceId2="of:0000000000000006/1", |
| 486 | mac1=mac1, |
| 487 | mac2=mac2, |
| 488 | ethType="IPV6", |
| 489 | ipProto=ipProto, |
| 490 | ip1=ip1, |
| 491 | ip2=ip2 ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 492 | utilities.assert_equals( expect=main.TRUE, |
| 493 | actual=stepResult, |
| 494 | onpass=main.assertReturnString, |
| 495 | onfail=main.assertReturnString ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 496 | main.step( "SDNIP-TCP: Add point intents between h1 and h9" ) |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 497 | main.assertReturnString = "Assertion Result for SDNIP-TCP IPV6 using TCP point intents\n" |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 498 | mac1 = main.hostsData[ 'h1' ][ 'mac' ] |
| 499 | mac2 = main.hostsData[ 'h9' ][ 'mac' ] |
| 500 | ip1 = str( main.hostsData[ 'h1' ][ 'ipAddresses' ][ 0 ] ) + "/128" |
| 501 | ip2 = str( main.hostsData[ 'h9' ][ 'ipAddresses' ][ 0 ] ) + "/128" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 502 | ipProto = main.params[ 'SDNIP' ][ 'tcpProto' ] |
| 503 | tcp1 = main.params[ 'SDNIP' ][ 'srcPort' ] |
| 504 | tcp2 = main.params[ 'SDNIP' ][ 'dstPort' ] |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 505 | stepResult = main.intentFunction.pointIntentTcp( |
| 506 | main, |
| 507 | name="SDNIP-TCP", |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 508 | host1="h1", |
| 509 | host2="h9", |
| 510 | deviceId1="of:0000000000000005/1", |
| 511 | deviceId2="of:0000000000000006/1", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 512 | mac1=mac1, |
| 513 | mac2=mac2, |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 514 | ethType="IPV6", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 515 | ipProto=ipProto, |
| 516 | ip1=ip1, |
| 517 | ip2=ip2, |
| 518 | tcp1=tcp1, |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 519 | tcp2=tcp2, |
| 520 | sw1="", |
| 521 | sw2="", |
| 522 | expectedLink="" ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 523 | utilities.assert_equals( expect=main.TRUE, |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 524 | actual=stepResult, |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 525 | onpass=main.assertReturnString, |
| 526 | onfail=main.assertReturnString ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 527 | main.step( "DUALSTACK1: Add point intents between h3 and h11" ) |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 528 | main.assertReturnString = "Assertion Result for Dualstack1 IPV6 with mac address point intents\n" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 529 | stepResult = main.intentFunction.pointIntent( |
| 530 | main, |
| 531 | name="DUALSTACK1", |
| 532 | host1="h3", |
| 533 | host2="h11", |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 534 | deviceId1="of:0000000000000005/3", |
| 535 | deviceId2="of:0000000000000006/3", |
| 536 | port1="", |
| 537 | port2="", |
| 538 | ethType="IPV6", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 539 | mac1="00:00:00:00:00:03", |
| 540 | mac2="00:00:00:00:00:0B", |
| 541 | bandwidth="", |
| 542 | lambdaAlloc=False, |
| 543 | ipProto="", |
| 544 | ip1="", |
| 545 | ip2="", |
| 546 | tcp1="", |
| 547 | tcp2="", |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 548 | sw1="s5", |
| 549 | sw2="s2", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 550 | expectedLink=18 ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 551 | utilities.assert_equals( expect=main.TRUE, |
| 552 | actual=stepResult, |
| 553 | onpass=main.assertReturnString, |
| 554 | onfail=main.assertReturnString ) |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 555 | main.step( "VLAN: Add point intents between h5 and h24" ) |
| 556 | main.assertReturnString = "Assertion Result for VLAN IPV6 with mac address point intents\n" |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 557 | stepResult = main.intentFunction.pointIntent( |
| 558 | main, |
| 559 | name="VLAN", |
| 560 | host1="h5", |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 561 | host2="h24", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 562 | deviceId1="of:0000000000000005/5", |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 563 | deviceId2="of:0000000000000007/8", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 564 | port1="", |
| 565 | port2="", |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 566 | ethType="IPV6", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 567 | mac1="00:00:00:00:00:05", |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 568 | mac2="00:00:00:00:00:18", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 569 | bandwidth="", |
| 570 | lambdaAlloc=False, |
| 571 | ipProto="", |
| 572 | ip1="", |
| 573 | ip2="", |
| 574 | tcp1="", |
| 575 | tcp2="", |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 576 | sw1="s5", |
| 577 | sw2="s2", |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 578 | expectedLink=18 ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 579 | utilities.assert_equals( expect=main.TRUE, |
| 580 | actual=stepResult, |
| 581 | onpass=main.assertReturnString, |
| 582 | onfail=main.assertReturnString ) |
sathishm | ad95346 | 2015-12-03 17:42:07 +0530 | [diff] [blame] | 583 | main.step( "1HOP: Add point intents between h1 and h9" ) |
| 584 | main.assertReturnString = "Assertion Result for 1HOP IPV6 with no mac address point intents\n" |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 585 | stepResult = main.intentFunction.pointIntent( main, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 586 | name='1HOP', |
| 587 | host1="h1", |
| 588 | host2="h9", |
| 589 | deviceId1="of:0000000000000005/1", |
| 590 | deviceId2="of:0000000000000006/1" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 591 | utilities.assert_equals( expect=main.TRUE, |
| 592 | actual=stepResult, |
| 593 | onpass=main.assertReturnString, |
| 594 | onfail=main.assertReturnString ) |
| 595 | main.intentFunction.report( main ) |
| 596 | |
| 597 | def CASE3000( self, main ): |
| 598 | """ |
| 599 | Add single point to multi point intents |
| 600 | - Get device ids |
| 601 | - Add single point to multi point intents |
| 602 | - Check intents |
| 603 | - Verify flows |
| 604 | - Ping hosts |
| 605 | - Reroute |
| 606 | - Link down |
| 607 | - Verify flows |
| 608 | - Check topology |
| 609 | - Ping hosts |
| 610 | - Link up |
| 611 | - Verify flows |
| 612 | - Check topology |
| 613 | - Ping hosts |
| 614 | - Remove intents |
| 615 | """ |
| 616 | import time |
| 617 | import json |
| 618 | import re |
| 619 | assert main, "There is no main" |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 620 | assert main.Mininet1, "Mininet handle should be named Mininet1" |
| 621 | assert main.numSwitch, "Placed the total number of switch topology in \ |
| 622 | main.numSwitch" |
| 623 | main.testName = "Single to Multi Point Intents" |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 624 | main.case( main.testName + " Test - " + str( main.Cluster.numCtrls ) + " NODE(S) - OF " + main.OFProtocol ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 625 | main.caseExplanation = "This test case will test single point to" +\ |
| 626 | " multi point intents using " +\ |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 627 | str( main.Cluster.numCtrls ) + " node(s) cluster;\n" +\ |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 628 | "Different type of hosts will be tested in " +\ |
| 629 | "each step such as IPV6, Dual stack, VLAN etc" +\ |
| 630 | ";\nThe test will use OF " + main.OFProtocol +\ |
| 631 | " OVS running in Mininet " |
| 632 | main.step( "NOOPTION: Add single point to multi point intents" ) |
| 633 | hostNames = [ 'h1', 'h9', 'h17' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 634 | devices = [ 'of:0000000000000005/1', 'of:0000000000000006/1', 'of:0000000000000007/1' ] |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 635 | main.assertReturnString = "Assertion results for IPV6 single to multi point intent with no options set\n" |
| 636 | stepResult = main.TRUE |
| 637 | stepResult = main.intentFunction.singleToMultiIntent( |
| 638 | main, |
| 639 | name="NOOPTION", |
| 640 | hostNames=hostNames, |
| 641 | devices=devices, |
| 642 | sw1="s5", |
| 643 | sw2="s2", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 644 | expectedLink=18 ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 645 | utilities.assert_equals( expect=main.TRUE, |
| 646 | actual=stepResult, |
| 647 | onpass=main.assertReturnString, |
| 648 | onfail=main.assertReturnString ) |
| 649 | main.step( "IPV6: Add single point to multi point intents" ) |
| 650 | main.assertReturnString = "Assertion results for IPV6 single to multi point intent with IPV6 type and MAC addresses\n" |
| 651 | hostNames = [ 'h1', 'h9', 'h17' ] |
| 652 | devices = [ 'of:0000000000000005/1', 'of:0000000000000006/1', 'of:0000000000000007/1' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 653 | macs = [ '00:00:00:00:00:01', '00:00:00:00:00:09', '00:00:00:00:00:11' ] |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 654 | stepResult = main.TRUE |
| 655 | stepResult = main.intentFunction.singleToMultiIntent( |
| 656 | main, |
| 657 | name="IPV6", |
| 658 | hostNames=hostNames, |
| 659 | devices=devices, |
| 660 | macs=macs, |
| 661 | ethType="IPV6", |
| 662 | sw1="", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 663 | sw2="" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 664 | utilities.assert_equals( expect=main.TRUE, |
| 665 | actual=stepResult, |
| 666 | onpass=main.assertReturnString, |
| 667 | onfail=main.assertReturnString ) |
| 668 | main.step( "IPV6_2: Add single point to multi point intents" ) |
| 669 | main.assertReturnString = "Assertion results for IPV6 single to multi point intent with IPV6 type and no MAC addresses\n" |
| 670 | hostNames = [ 'h1', 'h9', 'h17' ] |
| 671 | devices = [ 'of:0000000000000005/1', 'of:0000000000000006/1', 'of:0000000000000007/1' ] |
| 672 | stepResult = main.TRUE |
| 673 | stepResult = main.intentFunction.singleToMultiIntent( |
| 674 | main, |
| 675 | name="IPV6_2", |
| 676 | hostNames=hostNames, |
| 677 | devices=devices, |
| 678 | ethType="IPV6", |
| 679 | sw1="", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 680 | sw2="" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 681 | utilities.assert_equals( expect=main.TRUE, |
| 682 | actual=stepResult, |
| 683 | onpass=main.assertReturnString, |
| 684 | onfail=main.assertReturnString ) |
| 685 | main.step( "VLAN: Add single point to multi point intents" ) |
| 686 | main.assertReturnString = "Assertion results for IPV6 single to multi point intent with IPV6 type and MAC addresses in the same VLAN\n" |
| 687 | hostNames = [ 'h5', 'h24' ] |
| 688 | devices = [ 'of:0000000000000005/5', 'of:0000000000000007/8' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 689 | macs = [ '00:00:00:00:00:05', '00:00:00:00:00:18' ] |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 690 | stepResult = main.TRUE |
| 691 | stepResult = main.intentFunction.singleToMultiIntent( |
| 692 | main, |
| 693 | name="IPV6", |
| 694 | hostNames=hostNames, |
| 695 | devices=devices, |
| 696 | macs=macs, |
| 697 | ethType="IPV6", |
| 698 | sw1="", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 699 | sw2="" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 700 | utilities.assert_equals( expect=main.TRUE, |
| 701 | actual=stepResult, |
| 702 | onpass=main.assertReturnString, |
| 703 | onfail=main.assertReturnString ) |
| 704 | main.intentFunction.report( main ) |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 705 | |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 706 | def CASE4000( self, main ): |
| 707 | """ |
| 708 | Add multi point to single point intents |
| 709 | - Get device ids |
| 710 | - Add multi point to single point intents |
| 711 | - Check intents |
| 712 | - Verify flows |
| 713 | - Ping hosts |
| 714 | - Reroute |
| 715 | - Link down |
| 716 | - Verify flows |
| 717 | - Check topology |
| 718 | - Ping hosts |
| 719 | - Link up |
| 720 | - Verify flows |
| 721 | - Check topology |
| 722 | - Ping hosts |
| 723 | - Remove intents |
| 724 | """ |
| 725 | assert main, "There is no main" |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 726 | assert main.Mininet1, "Mininet handle should be named Mininet1" |
| 727 | assert main.numSwitch, "Placed the total number of switch topology in \ |
| 728 | main.numSwitch" |
| 729 | |
| 730 | main.testName = "Multi To Single Point Intents" |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 731 | main.case( main.testName + " Test - " + str( main.Cluster.numCtrls ) + |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 732 | " NODE(S) - OF " + main.OFProtocol ) |
| 733 | main.caseExplanation = "This test case will test single point to" +\ |
| 734 | " multi point intents using " +\ |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 735 | str( main.Cluster.numCtrls ) + " node(s) cluster;\n" +\ |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 736 | "Different type of hosts will be tested in " +\ |
| 737 | "each step such as IPV6, Dual stack, VLAN etc" +\ |
| 738 | ";\nThe test will use OF " + main.OFProtocol +\ |
| 739 | " OVS running in Mininet" |
| 740 | |
| 741 | main.step( "NOOPTION: Add multi point to single point intents" ) |
| 742 | main.assertReturnString = "Assertion results for NOOPTION multi to single point intent\n" |
| 743 | stepResult = main.TRUE |
| 744 | hostNames = [ 'h17', 'h9' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 745 | devices = [ 'of:0000000000000007/1', 'of:0000000000000006/1' ] |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 746 | stepResult = main.intentFunction.multiToSingleIntent( |
| 747 | main, |
| 748 | name="NOOPTION", |
| 749 | hostNames=hostNames, |
| 750 | devices=devices, |
| 751 | sw1="s6", |
| 752 | sw2="s2", |
| 753 | expectedLink=18 ) |
| 754 | utilities.assert_equals( expect=main.TRUE, |
| 755 | actual=stepResult, |
| 756 | onpass=main.assertReturnString, |
| 757 | onfail=main.assertReturnString ) |
| 758 | main.step( "IPV6: Add multi point to single point intents" ) |
| 759 | main.assertReturnString = "Assertion results for IPV6 multi to single point intent with IPV6 type and MAC addresses\n" |
| 760 | hostNames = [ 'h1', 'h9', 'h17' ] |
| 761 | devices = [ 'of:0000000000000005/1', 'of:0000000000000006/1', 'of:0000000000000007/1' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 762 | macs = [ '00:00:00:00:00:01', '00:00:00:00:00:09', '00:00:00:00:00:11' ] |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 763 | stepResult = main.TRUE |
| 764 | installResult = main.intentFunction.multiToSingleIntent( |
| 765 | main, |
| 766 | name="IPV6", |
| 767 | hostNames=hostNames, |
| 768 | devices=devices, |
| 769 | macs=macs, |
| 770 | ethType="IPV6", |
| 771 | sw1="", |
| 772 | sw2="", |
| 773 | expectedLink="" ) |
| 774 | utilities.assert_equals( expect=main.TRUE, |
| 775 | actual=stepResult, |
| 776 | onpass=main.assertReturnString, |
| 777 | onfail=main.assertReturnString ) |
| 778 | main.step( "IPV6_2: Add multi point to single point intents" ) |
| 779 | main.assertReturnString = "Assertion results for IPV6 multi to single point intent with IPV6 type and no MAC addresses\n" |
| 780 | hostNames = [ 'h1', 'h9' ] |
| 781 | devices = [ 'of:0000000000000005/1', 'of:0000000000000006/1' ] |
| 782 | stepResult = main.TRUE |
| 783 | stepResult = main.intentFunction.multiToSingleIntent( |
| 784 | main, |
| 785 | name="IPV6_2", |
| 786 | hostNames=hostNames, |
| 787 | devices=devices, |
| 788 | ethType="IPV6", |
| 789 | sw1="", |
| 790 | sw2="", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 791 | expectedLink="" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 792 | utilities.assert_equals( expect=main.TRUE, |
| 793 | actual=stepResult, |
| 794 | onpass=main.assertReturnString, |
| 795 | onfail=main.assertReturnString ) |
| 796 | |
| 797 | main.step( "VLAN: Add multi point to single point intents" ) |
| 798 | main.assertReturnString = "Assertion results for IPV6 multi to single point intent with IPV6 type and no MAC addresses in the same VLAN\n" |
| 799 | hostNames = [ 'h5', 'h24' ] |
| 800 | devices = [ 'of:0000000000000005/5', 'of:0000000000000007/8' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 801 | macs = [ '00:00:00:00:00:05', '00:00:00:00:00:18' ] |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 802 | stepResult = main.TRUE |
| 803 | stepResult = main.intentFunction.multiToSingleIntent( |
| 804 | main, |
| 805 | name="VLAN", |
| 806 | hostNames=hostNames, |
| 807 | devices=devices, |
| 808 | macs=macs, |
| 809 | ethType="IPV6", |
| 810 | sw1="", |
| 811 | sw2="", |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 812 | expectedLink="" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 813 | utilities.assert_equals( expect=main.TRUE, |
| 814 | actual=stepResult, |
| 815 | onpass=main.assertReturnString, |
| 816 | onfail=main.assertReturnString ) |
| 817 | main.intentFunction.report( main ) |
| 818 | |
| 819 | def CASE5000( self, main ): |
| 820 | """ |
| 821 | Tests Host Mobility |
| 822 | Modifies the topology location of h1 |
| 823 | """ |
| 824 | assert main, "There is no main" |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 825 | assert main.Mininet1, "Mininet handle should be named Mininet1" |
| 826 | assert main.numSwitch, "Placed the total number of switch topology in \ |
| 827 | main.numSwitch" |
| 828 | main.case( "Test host mobility with host intents " ) |
| 829 | main.step( "Testing host mobility by moving h1 from s5 to s6" ) |
| 830 | h1PreMove = main.hostsData[ "h1" ][ "location" ][ 0:19 ] |
| 831 | |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 832 | main.log.info( "Moving h1 from s5 to s6" ) |
| 833 | main.Mininet1.moveHostv6( "h1", "s5", "s6" ) |
Jon Hall | 439c891 | 2016-04-15 02:22:03 -0700 | [diff] [blame] | 834 | main.intentFunction.getHostsData( main ) |
| 835 | h1PostMove = main.hostsData[ "h1" ][ "location" ][ 0:19 ] |
| 836 | |
| 837 | utilities.assert_equals( expect="of:0000000000000006", |
| 838 | actual=h1PostMove, |
| 839 | onpass="Mobility: Successfully moved h1 to s6", |
| 840 | onfail="Mobility: Failed to move h1 to s6" + |
| 841 | " to single point intents" + |
| 842 | " with IPV6 type and MAC addresses" + |
| 843 | " in the same VLAN" ) |
| 844 | main.step( "IPV6: Add host intents between h1 and h9" ) |
| 845 | main.assertReturnString = "Assert result for IPV6 host intent between h1, moved, and h9\n" |
| 846 | stepResult = main.TRUE |
| 847 | stepResult = main.intentFunction.hostIntent( main, |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 848 | name='IPV6 Mobility IPV6', |
| 849 | host1='h1', |
| 850 | host2='h9', |
| 851 | host1Id='00:00:00:00:00:01/-1', |
| 852 | host2Id='00:00:00:00:00:09/-1' ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 853 | |
| 854 | utilities.assert_equals( expect=main.TRUE, |
| 855 | actual=stepResult, |
| 856 | onpass=main.assertReturnString, |
| 857 | onfail=main.assertReturnString ) |
Subhash Kumar Singh | 5ea4d30 | 2015-11-05 14:36:52 +0530 | [diff] [blame] | 858 | main.intentFunction.report( main ) |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 859 | |
| 860 | def CASE6000( self, main ): |
| 861 | """ |
| 862 | Tests Multi to Single Point Intent and Single to Multi Point Intent End Point Failure |
| 863 | """ |
| 864 | assert main, "There is no main" |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 865 | assert main.Mininet1, "Mininet handle should be named Mininet1" |
| 866 | assert main.numSwitch, "Placed the total number of switch topology in \ |
| 867 | main.numSwitch" |
| 868 | main.case( "Test Multi to Single End Point Failure" ) |
| 869 | main.step( "NOOPTION: test end point failure for multi point to single point intents" ) |
| 870 | main.assertReturnString = "Assertion results for IPV6 multi to single \ |
| 871 | point intent end point failure with no options set\n" |
| 872 | hostNames = [ 'h8', 'h17' ] |
| 873 | devices = [ 'of:0000000000000005/8', 'of:0000000000000007/1' ] |
| 874 | testResult = main.TRUE |
| 875 | testResult = main.intentFunction.testEndPointFail( |
| 876 | main, |
| 877 | name="NOOPTION", |
| 878 | test="MultipletoSingle", |
| 879 | hostNames=hostNames, |
| 880 | devices=devices, |
| 881 | sw1="s6", |
| 882 | sw2="s2", |
| 883 | sw3="s4", |
| 884 | sw4="s1", |
| 885 | sw5="s3", |
| 886 | expectedLink1=16, |
| 887 | expectedLink2=14 ) |
| 888 | utilities.assert_equals( expect=main.TRUE, |
| 889 | actual=testResult, |
| 890 | onpass=main.assertReturnString, |
| 891 | onfail=main.assertReturnString ) |
| 892 | |
| 893 | main.step( "IPV6: test end point failure for multi point to single point intents" ) |
| 894 | main.assertReturnString = "Assertion results for IPV6 multi to single \ |
| 895 | point intent end point failure with IPV6 type and MAC addresses\n" |
| 896 | hostNames = [ 'h8', 'h9', 'h17' ] |
| 897 | devices = [ 'of:0000000000000005/8', 'of:0000000000000006/1', 'of:0000000000000007/1' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 898 | macs = [ '00:00:00:00:00:08', '00:00:00:00:00:09', '00:00:00:00:00:11' ] |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 899 | testResult = main.TRUE |
| 900 | testResult = main.intentFunction.testEndPointFail( |
| 901 | main, |
| 902 | test="MultipletoSingle", |
| 903 | name="IPV6", |
| 904 | hostNames=hostNames, |
| 905 | devices=devices, |
| 906 | macs=macs, |
| 907 | ethType="IPV6", |
| 908 | sw1="s6", |
| 909 | sw2="s2", |
| 910 | sw3="s4", |
| 911 | sw4="s1", |
| 912 | sw5="s3", |
| 913 | expectedLink1=16, |
| 914 | expectedLink2=14 ) |
| 915 | utilities.assert_equals( expect=main.TRUE, |
| 916 | actual=testResult, |
| 917 | onpass=main.assertReturnString, |
| 918 | onfail=main.assertReturnString ) |
| 919 | |
| 920 | main.step( "IPV6_2: test end point faliure for multi point to single point intents" ) |
| 921 | main.assertReturnString = "Assertion results for IPV6 multi to single \ |
| 922 | point intent end point failure with IPV6 type and no MAC addresses\n" |
| 923 | hostNames = [ 'h8', 'h17' ] |
| 924 | devices = [ 'of:0000000000000005/8', 'of:0000000000000007/1' ] |
| 925 | testResult = main.TRUE |
| 926 | testResult = main.intentFunction.testEndPointFail( |
| 927 | main, |
| 928 | test="MultipletoSingle", |
| 929 | name="IPV6_2", |
| 930 | hostNames=hostNames, |
| 931 | devices=devices, |
| 932 | ethType="IPV6", |
| 933 | sw1="s6", |
| 934 | sw2="s2", |
| 935 | sw3="s4", |
| 936 | sw4="s1", |
| 937 | sw5="s3", |
| 938 | expectedLink1=16, |
| 939 | expectedLink2=14 ) |
| 940 | |
| 941 | utilities.assert_equals( expect=main.TRUE, |
| 942 | actual=testResult, |
| 943 | onpass=main.assertReturnString, |
| 944 | onfail=main.assertReturnString ) |
| 945 | |
| 946 | main.step( "VLAN: test end point failure for multi point to single point intents" ) |
| 947 | main.assertReturnString = "Assertion results for IPV6 multi to single \ |
| 948 | point intent end point failure with IPV6 type and no MAC addresses in the same VLAN\n" |
| 949 | hostNames = [ 'h5', 'h24' ] |
| 950 | devices = [ 'of:0000000000000005/5', 'of:0000000000000007/8' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 951 | macs = [ '00:00:00:00:00:05', '00:00:00:00:00:18' ] |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 952 | testResult = main.TRUE |
| 953 | testResult = main.intentFunction.testEndPointFail( |
| 954 | main, |
| 955 | test="MultipletoSingle", |
| 956 | name="VLAN", |
| 957 | hostNames=hostNames, |
| 958 | devices=devices, |
| 959 | ethType="IPV6", |
| 960 | sw1="s6", |
| 961 | sw2="s2", |
| 962 | sw3="s4", |
| 963 | sw4="s1", |
| 964 | sw5="s3", |
| 965 | expectedLink1=16, |
| 966 | expectedLink2=14 ) |
| 967 | utilities.assert_equals( expect=main.TRUE, |
| 968 | actual=testResult, |
| 969 | onpass=main.assertReturnString, |
| 970 | onfail=main.assertReturnString ) |
| 971 | |
| 972 | main.case( "Test Single to Multiple End Point Failure" ) |
| 973 | main.step( "NOOPTION: test end point failure for single point to multi point intents" ) |
| 974 | main.assertReturnString = "Assertion results for IPV6 single to multi \ |
| 975 | point intent end point failure with no options set\n" |
| 976 | hostNames = [ 'h8', 'h17' ] |
| 977 | devices = [ 'of:0000000000000005/8', 'of:0000000000000007/1' ] |
| 978 | testResult = main.TRUE |
| 979 | testResult = main.intentFunction.testEndPointFail( |
| 980 | main, |
| 981 | test="SingletoMultiple", |
| 982 | name="NOOPTION", |
| 983 | hostNames=hostNames, |
| 984 | devices=devices, |
| 985 | sw1="s6", |
| 986 | sw2="s2", |
| 987 | sw3="s4", |
| 988 | sw4="s1", |
| 989 | sw5="s3", |
| 990 | expectedLink1=16, |
| 991 | expectedLink2=14 ) |
| 992 | utilities.assert_equals( expect=main.TRUE, |
| 993 | actual=testResult, |
| 994 | onpass=main.assertReturnString, |
| 995 | onfail=main.assertReturnString ) |
| 996 | main.step( "IPV6: test end point failure for single point to multi point intents" ) |
| 997 | main.assertReturnString = "Assertion results for IPV6 single to multi \ |
| 998 | point intent end point failure with IPV6 type and MAC addresses\n" |
| 999 | hostNames = [ 'h8', 'h9', 'h17' ] |
| 1000 | devices = [ 'of:0000000000000005/8', 'of:0000000000000006/1', 'of:0000000000000007/1' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 1001 | macs = [ '00:00:00:00:00:08', '00:00:00:00:00:09', '00:00:00:00:00:11' ] |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 1002 | testResult = main.TRUE |
| 1003 | testResult = main.intentFunction.testEndPointFail( |
| 1004 | main, |
| 1005 | test="SingletoMultiple", |
| 1006 | name="IPV6", |
| 1007 | hostNames=hostNames, |
| 1008 | devices=devices, |
| 1009 | ethType="IPV6", |
| 1010 | macs=macs, |
| 1011 | sw1="s6", |
| 1012 | sw2="s2", |
| 1013 | sw3="s4", |
| 1014 | sw4="s1", |
| 1015 | sw5="s3", |
| 1016 | expectedLink1=16, |
| 1017 | expectedLink2=14 ) |
| 1018 | utilities.assert_equals( expect=main.TRUE, |
| 1019 | actual=testResult, |
| 1020 | onpass=main.assertReturnString, |
| 1021 | onfail=main.assertReturnString ) |
| 1022 | |
| 1023 | main.step( "IPV6_2: test end point failure for single point to multi point intents" ) |
| 1024 | main.assertReturnString = "Assertion results for IPV6 single to multi\ |
| 1025 | point intent endpoint failure with IPV6 type and no MAC addresses\n" |
| 1026 | hostNames = [ 'h8', 'h17' ] |
| 1027 | devices = [ 'of:0000000000000005/8', 'of:0000000000000007/1' ] |
| 1028 | testResult = main.TRUE |
| 1029 | testResult = main.intentFunction.testEndPointFail( |
| 1030 | main, |
| 1031 | test="SingletoMultiple", |
| 1032 | name="IPV6_2", |
| 1033 | hostNames=hostNames, |
| 1034 | devices=devices, |
| 1035 | ethType="IPV6", |
| 1036 | sw1="s6", |
| 1037 | sw2="s2", |
| 1038 | sw3="s4", |
| 1039 | sw4="s1", |
| 1040 | sw5="s3", |
| 1041 | expectedLink1=16, |
| 1042 | expectedLink2=14 ) |
| 1043 | utilities.assert_equals( expect=main.TRUE, |
| 1044 | actual=testResult, |
| 1045 | onpass=main.assertReturnString, |
| 1046 | onfail=main.assertReturnString ) |
| 1047 | |
| 1048 | main.step( "VLAN: test end point failure for single point to multi point intents" ) |
| 1049 | main.assertReturnString = "Assertion results for IPV6 single to multi point\ |
| 1050 | intent endpoint failure with IPV6 type and MAC addresses in the same VLAN\n" |
| 1051 | hostNames = [ 'h5', 'h24' ] |
| 1052 | devices = [ 'of:0000000000000005/5', 'of:0000000000000007/8' ] |
Jon Hall | 314b74a | 2017-05-24 16:25:52 -0700 | [diff] [blame] | 1053 | macs = [ '00:00:00:00:00:05', '00:00:00:00:00:18' ] |
sathishm | c436225 | 2016-04-20 18:29:48 +0530 | [diff] [blame] | 1054 | testResult = main.TRUE |
| 1055 | testResult = main.intentFunction.testEndPointFail( |
| 1056 | main, |
| 1057 | test="SingletoMultiple", |
| 1058 | name="IPV6", |
| 1059 | hostNames=hostNames, |
| 1060 | devices=devices, |
| 1061 | macs=macs, |
| 1062 | ethType="IPV6", |
| 1063 | sw1="s6", |
| 1064 | sw2="s2", |
| 1065 | sw3="s4", |
| 1066 | sw4="s1", |
| 1067 | sw5="s3", |
| 1068 | expectedLink1=16, |
| 1069 | expectedLink2=14 ) |
| 1070 | utilities.assert_equals( expect=main.TRUE, |
| 1071 | actual=testResult, |
| 1072 | onpass=main.assertReturnString, |
| 1073 | onfail=main.assertReturnString ) |
| 1074 | |
| 1075 | main.intentFunction.report( main ) |