Creating subfolders for test suites
allow teston to look in subfolders
create subfolders for current test suites
move tests into sub folders
create HA suite dependencies folder and moved all common files there
minor driver and test updates
standardize on the name dependencies for the directory
change from admin to sdn users
Conflicts:
TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.topo
Change-Id: I849e45ab67da8b285c36c5fdf43b34323876e741
diff --git a/TestON/tests/CHO/CHOtest/CHOtest.params b/TestON/tests/CHO/CHOtest/CHOtest.params
new file mode 100644
index 0000000..45d0fef
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/CHOtest.params
@@ -0,0 +1,116 @@
+<PARAMS>
+ # 1,20,3,47,147,[5,60,160,70,170,80,180,10,5,90,190,71,171,81,181,10]*10,200,21,3,48,148,[5,61,161,72,172,82,182,10,5,91,191,73,173,83,183,10]*10,200,22,3,49,149,[5,62,162,74,174,84,184,10,5,92,192,75,175,85,185,10]*10
+ # 1. Starts ONOS cluster with 5 nodes
+ # 20. Starts Att Topology
+ # 21. Starts Chordal Topology
+ # 22. Starts Spine-Leaf Topology
+ # 3. Checks the consistency of ONOS and Mininet's topologies
+ # 4X. Reactive forwarding | host discovery
+ # 14X. IPv6 Reative forwarding | host discovery
+ # 5. ONOS Topology verification
+ # 6X. host intents
+ # 16X. IPv6 ping across host intents
+ # 7X. Bring random links down( Unique for each topology)
+ # 17X. IPv6 ping after link down
+ # 8X. Bring random links back up
+ # 18X. IPv6 ping after link backs up
+ # 9X. Point,Multi-single,Single-Multi Intents
+ # 19X. IPv6 ping across Point,Multi-single,Single-Multi Intents
+
+ <testcases>
+ 1,21,3,48,148,[5,61,161,72,172,82,182,10,5,91,191,73,173,83,183,10]*20,200,20,3,47,147,[5,60,160,70,170,80,180,10,5,90,190,71,171,81,181,10]*20,200,22,3,49,149,[5,62,162,74,174,84,184,10,5,92,192,75,175,85,185,10]*20
+ </testcases>
+
+ <DEPENDENCY>
+ <path>/tests/CHOtest/dependencies/</path>
+ <wrapper>CHOtestFunctions</wrapper>
+ </DEPENDENCY>
+
+ <GIT>
+ #autoPull 'on' or 'off'
+ <autoPull>off</autoPull>
+ <branch>master</branch>
+ </GIT>
+
+ <CTRL>
+ <numCtrl>3</numCtrl>
+ <karafCliTimeout>7200000</karafCliTimeout>
+ </CTRL>
+
+ <TOPO1>
+ <topo>topoAttIpv6.py</topo>
+ <numSwitches>25</numSwitches>
+ <numHosts>25</numHosts>
+ <numLinks>112</numLinks>
+ <numPaths>1</numPaths>
+ </TOPO1>
+
+ <TOPO2>
+ <topo>topoChordalIpv6.py</topo>
+ <numSwitches>25</numSwitches>
+ <numHosts>25</numHosts>
+ <numLinks>600</numLinks>
+ <numPaths>1</numPaths>
+ </TOPO2>
+
+ <TOPO3>
+ <topo>topoSpineIpv6.py</topo>
+ <numSwitches>78</numSwitches>
+ <numHosts>68</numHosts>
+ <numLinks>284</numLinks>
+ <numPaths>1</numPaths>
+ </TOPO3>
+
+ <HOSTS>
+ <startMAC>00:00:00:00:00:01</startMAC>
+ <endMAC>00:00:00:00:00:19</endMAC>
+ </HOSTS>
+
+ <ATTCORELINKS>
+ <toggleLinks>1</toggleLinks>
+
+ <linkS3a>s3</linkS3a>
+ <linkS3b>s1,s4,s7,s10,s16,s17,s18,s21,s22</linkS3b>
+ #######s1,s4,s7,s10,s16,s17,s18,s21,s22########
+
+ <linkS14a>s14</linkS14a>
+ <linkS14b>s6,s9,s10,s11,s12,s13,s16,s17,s23</linkS14b>
+ ########s6,s9,s10,s11,s12,s13,s16,s17,s18,s23########
+
+ <linkS18a>s18</linkS18a>
+ <linkS18b>s14,s16,s17,s19,s20,s21,s22,s23</linkS18b>
+ #######s3,s14,s16,s17,s19,s20,s21,s22,s23########
+ </ATTCORELINKS>
+
+ <SPINECORELINKS>
+ <linkS9>s9</linkS9>
+ <linkS9top>s1,s3,s5,s7</linkS9top>
+ <linkS9bot>s11,s12</linkS9bot>
+ <linkS10>s10</linkS10>
+ <linkS10top>s2,s4,s6,s8</linkS10top>
+ <linkS10bot>s13,s14</linkS10bot>
+ </SPINECORELINKS>
+
+ <timers>
+ <LinkDiscovery>10</LinkDiscovery>
+ <SwitchDiscovery>10</SwitchDiscovery>
+ <IntentPurgeDelay>15</IntentPurgeDelay>
+ <CheckIntentDelay>15</CheckIntentDelay>
+ <topoCheckDelay>15</topoCheckDelay>
+ <pingSleep>15</pingSleep>
+ <pingTimeoutSmallTopo>180</pingTimeoutSmallTopo>
+ <pingTimeoutLargeTopo>300</pingTimeoutLargeTopo>
+ <remHostDelay>60</remHostDelay>
+ <remDevDelay>60</remDevDelay>
+ </timers>
+
+ <TEST>
+ <pauseTest>off</pauseTest>
+ <email>off</email>
+ <intentChecks>10</intentChecks>
+ <linkChecks>3</linkChecks>
+ <topoChecks>3</topoChecks>
+ <numPings>3</numPings>
+ </TEST>
+
+</PARAMS>
diff --git a/TestON/tests/CHO/CHOtest/CHOtest.py b/TestON/tests/CHO/CHOtest/CHOtest.py
new file mode 100644
index 0000000..a1fb04f
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/CHOtest.py
@@ -0,0 +1,3814 @@
+import sys
+import os
+import re
+import time
+import json
+import itertools
+
+
+class CHOtest:
+
+ def __init__( self ):
+ self.default = ''
+
+ def CASE1( self, main ):
+ """
+ Startup sequence:
+ apply cell <name>
+ git pull
+ mvn clean install
+ onos-package
+ onos-verify-cell
+ onos-uninstall
+ onos-install
+ onos-start-cli
+ """
+ import time
+ import re
+ import imp
+
+ global intentState
+ main.threadID = 0
+ main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
+ main.dependencyPath = main.testOnDirectory + \
+ main.params[ 'DEPENDENCY' ][ 'path' ]
+ wrapperFile = main.params[ 'DEPENDENCY' ][ 'wrapper' ]
+ main.numCtrls = main.params[ 'CTRL' ][ 'numCtrl' ]
+ git_pull = main.params[ 'GIT' ][ 'autoPull' ]
+ git_branch = main.params[ 'GIT' ][ 'branch' ]
+ karafTimeout = main.params['CTRL']['karafCliTimeout']
+ main.linkSleep = int( main.params['timers']['LinkDiscovery'] )
+ main.checkIntentsDelay = int( main.params['timers']['CheckIntentDelay'] )
+ main.pingSleep = int( main.params['timers']['pingSleep'] )
+ main.topoCheckDelay = int( main.params['timers']['topoCheckDelay'] )
+ main.pingTimeoutSmallTopo = int( main.params['timers']['pingTimeoutSmallTopo'] )
+ main.pingTimeoutLargeTopo = int( main.params['timers']['pingTimeoutLargeTopo'] )
+ main.remHostDelay = int( main.params['timers']['remHostDelay'] )
+ main.remDevDelay = int( main.params['timers']['remDevDelay'] )
+ main.failSwitch = main.params['TEST']['pauseTest']
+ main.emailOnStop = main.params['TEST']['email']
+ main.intentCheck = int( main.params['TEST']['intentChecks'] )
+ main.linkCheck = int( main.params['TEST']['linkChecks'] )
+ main.topoCheck = int( main.params['TEST']['topoChecks'] )
+ main.numPings = int( main.params['TEST']['numPings'] )
+ main.newTopo = ""
+ main.CLIs = []
+
+ main.failSwitch = True if main.failSwitch == "on" else False
+ main.emailOnStop = True if main.emailOnStop == "on" else False
+
+ for i in range( 1, int(main.numCtrls) + 1 ):
+ main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+
+ main.CHOtestFunctions = imp.load_source( wrapperFile,
+ main.dependencyPath +
+ wrapperFile +
+ ".py" )
+
+ main.case( "Set up test environment" )
+ main.log.report( "Set up test environment" )
+ main.log.report( "_______________________" )
+
+ main.step( "Apply Cell environment for ONOS" )
+ if ( main.onoscell ):
+ cellName = main.onoscell
+ cell_result = main.ONOSbench.setCell( cellName )
+ utilities.assert_equals( expect=main.TRUE, actual=cell_result,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+ else:
+ main.log.error( "Please provide onoscell option at TestON CLI to run CHO tests" )
+ main.log.error( "Example: ~/TestON/bin/cli.py run OnosCHO onoscell <cellName>" )
+ main.cleanup()
+ main.exit()
+
+ main.step( "Git checkout and pull " + git_branch )
+ if git_pull == 'on':
+ checkout_result = main.ONOSbench.gitCheckout( git_branch )
+ pull_result = main.ONOSbench.gitPull()
+ cp_result = ( checkout_result and pull_result )
+ else:
+ checkout_result = main.TRUE
+ pull_result = main.TRUE
+ main.log.info( "Skipped git checkout and pull" )
+ cp_result = ( checkout_result and pull_result )
+ utilities.assert_equals( expect=main.TRUE, actual=cp_result,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+
+ main.step( "mvn clean & install" )
+ if git_pull == 'on':
+ mvn_result = main.ONOSbench.cleanInstall()
+ utilities.assert_equals( expect=main.TRUE, actual=mvn_result,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+ else:
+ mvn_result = main.TRUE
+ main.log.info("Skipped mvn clean install as git pull is disabled in params file")
+
+ main.ONOSbench.getVersion( report=True )
+
+ main.step( "Create ONOS package" )
+ packageResult = main.ONOSbench.onosPackage()
+ utilities.assert_equals( expect=main.TRUE, actual=packageResult,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+
+ main.step( "Uninstall ONOS package on all Nodes" )
+ uninstallResult = main.TRUE
+ for i in range( int( main.numCtrls ) ):
+ main.log.info( "Uninstalling package on ONOS Node IP: " + main.onosIPs[i] )
+ u_result = main.ONOSbench.onosUninstall( main.onosIPs[i] )
+ utilities.assert_equals( expect=main.TRUE, actual=u_result,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+ uninstallResult = ( uninstallResult and u_result )
+
+ main.step( "Install ONOS package on all Nodes" )
+ installResult = main.TRUE
+ for i in range( int( main.numCtrls ) ):
+ main.log.info( "Installing package on ONOS Node IP: " + main.onosIPs[i] )
+ i_result = main.ONOSbench.onosInstall( node=main.onosIPs[i] )
+ utilities.assert_equals( expect=main.TRUE, actual=i_result,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+ installResult = ( installResult and i_result )
+
+ main.step( "Verify ONOS nodes UP status" )
+ statusResult = main.TRUE
+ for i in range( int( main.numCtrls ) ):
+ main.log.info( "ONOS Node " + main.onosIPs[i] + " status:" )
+ onos_status = main.ONOSbench.onosStatus( node=main.onosIPs[i] )
+ utilities.assert_equals( expect=main.TRUE, actual=onos_status,
+ onpass="Test step PASS",
+ onfail="Test step FAIL" )
+ statusResult = ( statusResult and onos_status )
+
+ main.step( "Start ONOS CLI on all nodes" )
+ cliResult = main.TRUE
+ main.log.step(" Start ONOS cli using thread ")
+ startCliResult = main.TRUE
+ pool = []
+ time1 = time.time()
+ for i in range( int( main.numCtrls) ):
+ t = main.Thread( target=main.CLIs[i].startOnosCli,
+ threadID=main.threadID,
+ name="startOnosCli",
+ args=[ main.onosIPs[i], karafTimeout ] )
+ pool.append(t)
+ t.start()
+ main.threadID = main.threadID + 1
+ for t in pool:
+ t.join()
+ startCliResult = startCliResult and t.result
+ time2 = time.time()
+
+ if not startCliResult:
+ main.log.info("ONOS CLI did not start up properly")
+ main.cleanup()
+ main.exit()
+ else:
+ main.log.info("Successful CLI startup")
+ startCliResult = main.TRUE
+
+ main.step( "Set IPv6 cfg parameters for Neighbor Discovery" )
+ time.sleep(30)
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.proxyarp.ProxyArp", "ipv6NeighborDiscovery", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "ipv6NeighborDiscovery", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="ipv6NeighborDiscovery cfg is set to true",
+ onfail="Failed to cfg set ipv6NeighborDiscovery" )
+
+ case1Result = installResult and uninstallResult and statusResult and startCliResult and cfgResult
+ main.log.info("Time for connecting to CLI: %2f seconds" %(time2-time1))
+ utilities.assert_equals( expect=main.TRUE, actual=case1Result,
+ onpass="Set up test environment PASS",
+ onfail="Set up test environment FAIL" )
+
+ def CASE20( self, main ):
+ """
+ This test script Loads a new Topology (Att) on CHO setup and balances all switches
+ """
+ import re
+ import time
+ import copy
+
+ main.prefix = 0
+ main.numMNswitches = int ( main.params[ 'TOPO1' ][ 'numSwitches' ] )
+ main.numMNlinks = int ( main.params[ 'TOPO1' ][ 'numLinks' ] )
+ main.numMNhosts = int ( main.params[ 'TOPO1' ][ 'numHosts' ] )
+ main.pingTimeout = main.pingTimeoutSmallTopo
+
+ main.log.report(
+ "Load Att topology and Balance all Mininet switches across controllers" )
+ main.log.report(
+ "________________________________________________________________________" )
+ main.case(
+ "Assign and Balance all Mininet switches across controllers" )
+
+ main.step( "Start Mininet with Att topology" )
+ main.newTopo = main.params['TOPO1']['topo']
+ mininetDir = main.Mininet1.home + "/custom/"
+ topoPath = main.testDir + "/" + main.TEST + "/dependencies/" + main.newTopo
+ main.ONOSbench.secureCopy(main.Mininet1.user_name, main.Mininet1.ip_address, topoPath, mininetDir, direction="to")
+ topoPath = mininetDir + main.newTopo
+ startStatus = main.Mininet1.startNet(topoFile = topoPath)
+
+ main.step( "Assign switches to controllers" )
+ for i in range( 1, ( main.numMNswitches + 1 ) ): # 1 to ( num of switches +1 )
+ main.Mininet1.assignSwController(
+ sw="s" + str( i ),
+ ip=main.onosIPs )
+
+ switch_mastership = main.TRUE
+ for i in range( 1, ( main.numMNswitches + 1 ) ):
+ response = main.Mininet1.getSwController( "s" + str( i ) )
+ print( "Response is " + str( response ) )
+ if re.search( "tcp:" + main.onosIPs[0], response ):
+ switch_mastership = switch_mastership and main.TRUE
+ else:
+ switch_mastership = main.FALSE
+
+ if switch_mastership == main.TRUE:
+ main.log.report( "Controller assignment successfull" )
+ else:
+ main.log.report( "Controller assignment failed" )
+
+ time.sleep(30) # waiting here to make sure topology converges across all nodes
+
+ main.step( "Balance devices across controllers" )
+ balanceResult = main.ONOScli1.balanceMasters()
+ # giving some breathing time for ONOS to complete re-balance
+ time.sleep( 5 )
+
+ topology_output = main.ONOScli1.topology()
+ topology_result = main.ONOSbench.getTopology( topology_output )
+ case2Result = ( switch_mastership and startStatus )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=case2Result,
+ onpass="Starting new Att topology test PASS",
+ onfail="Starting new Att topology test FAIL" )
+
+ def CASE21( self, main ):
+ """
+ This test script Loads a new Topology (Chordal) on CHO setup and balances all switches
+ """
+ import re
+ import time
+ import copy
+
+ main.prefix = 1
+ main.newTopo = main.params['TOPO2']['topo']
+ main.numMNswitches = int ( main.params[ 'TOPO2' ][ 'numSwitches' ] )
+ main.numMNlinks = int ( main.params[ 'TOPO2' ][ 'numLinks' ] )
+ main.numMNhosts = int ( main.params[ 'TOPO2' ][ 'numHosts' ] )
+ main.pingTimeout = main.pingTimeoutSmallTopo
+
+ main.log.report(
+ "Load Chordal topology and Balance all Mininet switches across controllers" )
+ main.log.report(
+ "________________________________________________________________________" )
+ main.case(
+ "Assign and Balance all Mininet switches across controllers" )
+
+ main.step("Start Mininet with Chordal topology")
+ mininetDir = main.Mininet1.home + "/custom/"
+ topoPath = main.testDir + "/" + main.TEST + "/dependencies/" + main.newTopo
+ main.ONOSbench.secureCopy(main.Mininet1.user_name, main.Mininet1.ip_address, topoPath, mininetDir, direction="to")
+ topoPath = mininetDir + main.newTopo
+ startStatus = main.Mininet1.startNet(topoFile = topoPath)
+
+ main.step( "Assign switches to controllers" )
+
+ for i in range( 1, ( main.numMNswitches + 1 ) ): # 1 to ( num of switches +1 )
+ main.Mininet1.assignSwController(
+ sw="s" + str( i ),
+ ip=main.onosIPs )
+
+ switch_mastership = main.TRUE
+ for i in range( 1, ( main.numMNswitches + 1 ) ):
+ response = main.Mininet1.getSwController( "s" + str( i ) )
+ print( "Response is " + str( response ) )
+ if re.search( "tcp:" + main.onosIPs[0], response ):
+ switch_mastership = switch_mastership and main.TRUE
+ else:
+ switch_mastership = main.FALSE
+
+ if switch_mastership == main.TRUE:
+ main.log.report( "Controller assignment successfull" )
+ else:
+ main.log.report( "Controller assignment failed" )
+
+ main.step( "Balance devices across controllers" )
+ balanceResult = main.ONOScli1.balanceMasters()
+ # giving some breathing time for ONOS to complete re-balance
+ time.sleep( 5 )
+
+ caseResult = switch_mastership
+ time.sleep(30)
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Starting new Chordal topology test PASS",
+ onfail="Starting new Chordal topology test FAIL" )
+
+ def CASE22( self, main ):
+ """
+ This test script Loads a new Topology (Spine) on CHO setup and balances all switches
+ """
+ import re
+ import time
+ import copy
+
+ main.prefix = 2
+ main.newTopo = main.params['TOPO3']['topo']
+ main.numMNswitches = int ( main.params[ 'TOPO3' ][ 'numSwitches' ] )
+ main.numMNlinks = int ( main.params[ 'TOPO3' ][ 'numLinks' ] )
+ main.numMNhosts = int ( main.params[ 'TOPO3' ][ 'numHosts' ] )
+ main.pingTimeout = main.pingTimeoutLargeTopo
+
+ main.log.report(
+ "Load Spine and Leaf topology and Balance all Mininet switches across controllers" )
+ main.log.report(
+ "________________________________________________________________________" )
+ main.case( "Assign and Balance all Mininet switches across controllers" )
+
+ main.step("Start Mininet with Spine topology")
+ mininetDir = main.Mininet1.home + "/custom/"
+ topoPath = main.testDir + "/" + main.TEST + "/dependencies/" + main.newTopo
+ main.ONOSbench.secureCopy(main.Mininet1.user_name, main.Mininet1.ip_address, topoPath, mininetDir, direction="to")
+ topoPath = mininetDir + main.newTopo
+ startStatus = main.Mininet1.startNet(topoFile = topoPath)
+
+ for i in range( 1, ( main.numMNswitches + 1 ) ): # 1 to ( num of switches +1 )
+ main.Mininet1.assignSwController(
+ sw="s" + str( i ),
+ ip=main.onosIPs )
+
+ switch_mastership = main.TRUE
+ for i in range( 1, ( main.numMNswitches + 1 ) ):
+ response = main.Mininet1.getSwController( "s" + str( i ) )
+ print( "Response is " + str( response ) )
+ if re.search( "tcp:" + main.onosIPs[0], response ):
+ switch_mastership = switch_mastership and main.TRUE
+ else:
+ switch_mastership = main.FALSE
+
+ if switch_mastership == main.TRUE:
+ main.log.report( "Controller assignment successfull" )
+ else:
+ main.log.report( "Controller assignment failed" )
+ time.sleep( 5 )
+
+ main.step( "Balance devices across controllers" )
+ for i in range( int( main.numCtrls ) ):
+ balanceResult = main.ONOScli1.balanceMasters()
+ # giving some breathing time for ONOS to complete re-balance
+ time.sleep( 3 )
+
+ caseResult = switch_mastership
+ time.sleep(60)
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Starting new Spine topology test PASS",
+ onfail="Starting new Spine topology test FAIL" )
+
+ def CASE3( self, main ):
+ """
+ This Test case will be extended to collect and store more data related
+ ONOS state.
+ """
+ import re
+ import copy
+ main.deviceDPIDs = []
+ main.hostMACs = []
+ main.deviceLinks = []
+ main.deviceActiveLinksCount = []
+ main.devicePortsEnabledCount = []
+
+ main.log.report(
+ "Collect and Store topology details from ONOS before running any Tests" )
+ main.log.report(
+ "____________________________________________________________________" )
+ main.case( "Collect and Store Topology Details from ONOS" )
+ main.step( "Collect and store current number of switches and links" )
+ topology_output = main.ONOScli1.topology()
+ topology_result = main.ONOSbench.getTopology( topology_output )
+ numOnosDevices = topology_result[ 'devices' ]
+ numOnosLinks = topology_result[ 'links' ]
+ topoResult = main.TRUE
+
+ for check in range(main.topoCheck):
+ if ( ( main.numMNswitches == int(numOnosDevices) ) and ( main.numMNlinks == int(numOnosLinks) ) ):
+ main.step( "Store Device DPIDs" )
+ for i in range( 1, (main.numMNswitches+1) ):
+ main.deviceDPIDs.append( "of:00000000000000" + format( i, "02x" ) )
+ print "Device DPIDs in Store: \n", str( main.deviceDPIDs )
+
+ main.step( "Store Host MACs" )
+ for i in range( 1, ( main.numMNhosts + 1 ) ):
+ main.hostMACs.append( "00:00:00:00:00:" + format( i, '02x' ) + "/-1" )
+ print "Host MACs in Store: \n", str( main.hostMACs )
+ main.MACsDict = {}
+ print "Creating dictionary of DPID and HostMacs"
+ for i in range(len(main.hostMACs)):
+ main.MACsDict[main.deviceDPIDs[i]] = main.hostMACs[i].split('/')[0]
+ print main.MACsDict
+ main.step( "Collect and store all Devices Links" )
+ linksResult = main.ONOScli1.links( jsonFormat=False )
+ ansi_escape = re.compile( r'\x1b[^m]*m' )
+ linksResult = ansi_escape.sub( '', linksResult )
+ linksResult = linksResult.replace( " links", "" ).replace( "\r\r", "" )
+ linksResult = linksResult.splitlines()
+ main.deviceLinks = copy.copy( linksResult )
+ print "Device Links Stored: \n", str( main.deviceLinks )
+ # this will be asserted to check with the params provided count of
+ # links
+ print "Length of Links Store", len( main.deviceLinks )
+
+ main.step( "Collect and store each Device ports enabled Count" )
+ time1 = time.time()
+ for i in xrange(1,(main.numMNswitches + 1), int( main.numCtrls ) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= main.numMNswitches + 1:
+ break
+ dpid = "of:00000000000000" + format( i, "02x" )
+ t = main.Thread(target = cli.getDevicePortsEnabledCount,threadID = main.threadID, name = "getDevicePortsEnabledCount",args = [dpid])
+ t.start()
+ pool.append(t)
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ portResult = thread.result
+ main.devicePortsEnabledCount.append( portResult )
+ print "Device Enabled Port Counts Stored: \n", str( main.devicePortsEnabledCount )
+ time2 = time.time()
+ main.log.info("Time for counting enabled ports of the switches: %2f seconds" %(time2-time1))
+
+ main.step( "Collect and store each Device active links Count" )
+ time1 = time.time()
+
+ for i in xrange( 1,( main.numMNswitches + 1 ), int( main.numCtrls) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= main.numMNswitches + 1:
+ break
+ dpid = "of:00000000000000" + format( i, "02x" )
+ t = main.Thread( target = cli.getDeviceLinksActiveCount,
+ threadID = main.threadID,
+ name = "getDevicePortsEnabledCount",
+ args = [dpid])
+ t.start()
+ pool.append(t)
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ linkCountResult = thread.result
+ main.deviceActiveLinksCount.append( linkCountResult )
+ print "Device Active Links Count Stored: \n", str( main.deviceActiveLinksCount )
+ time2 = time.time()
+ main.log.info("Time for counting all enabled links of the switches: %2f seconds" %(time2-time1))
+
+ # Exit out of the topo check loop
+ break
+
+ else:
+ main.log.info("Devices (expected): %s, Links (expected): %s" %
+ ( str( main.numMNswitches ), str( main.numMNlinks ) ) )
+ main.log.info("Devices (actual): %s, Links (actual): %s" %
+ ( numOnosDevices , numOnosLinks ) )
+ main.log.info("Topology does not match, trying again...")
+ topoResult = main.FALSE
+ time.sleep(main.topoCheckDelay)
+
+ # just returning TRUE for now as this one just collects data
+ case3Result = topoResult
+ utilities.assert_equals( expect=main.TRUE, actual=case3Result,
+ onpass="Saving ONOS topology data test PASS",
+ onfail="Saving ONOS topology data test FAIL" )
+
+
+
+ def CASE200( self, main ):
+
+ import time
+ main.log.report( "Clean up ONOS" )
+ main.log.case( "Stop topology and remove hosts and devices" )
+
+ main.step( "Stop Topology" )
+ stopStatus = main.Mininet1.stopNet()
+ utilities.assert_equals( expect=main.TRUE, actual=stopStatus,
+ onpass="Stopped mininet",
+ onfail="Failed to stop mininet" )
+
+
+ main.log.info( "Constructing host id list" )
+ hosts = []
+ for i in range( main.numMNhosts ):
+ hosts.append( "h" + str(i+1) )
+
+ main.step( "Getting host ids" )
+ hostList = main.CLIs[0].getHostsId( hosts )
+ hostIdResult = True if hostList else False
+ utilities.assert_equals( expect=True, actual=hostIdResult,
+ onpass="Successfully obtained the host ids.",
+ onfail="Failed to obtain the host ids" )
+
+ main.step( "Removing hosts" )
+ hostResult = main.CLIs[0].removeHost( hostList )
+ utilities.assert_equals( expect=main.TRUE, actual=hostResult,
+ onpass="Successfully removed hosts",
+ onfail="Failed remove hosts" )
+
+ time.sleep( main.remHostDelay )
+
+ main.log.info( "Constructing device uri list" )
+ deviceList = []
+ for i in range( main.numMNswitches ):
+ deviceList.append( "of:00000000000000" + format( i+1, "02x" ) )
+
+ main.step( "Removing devices" )
+ deviceResult = main.CLIs[0].removeDevice( deviceList )
+ utilities.assert_equals( expect=main.TRUE, actual=deviceResult,
+ onpass="Successfully removed devices",
+ onfail="Failed remove devices" )
+
+ time.sleep( main.remDevDelay )
+
+ main.log.info( "Summary\n{}".format( main.CLIs[0].summary( jsonFormat=False ) ) )
+
+
+ def CASE40( self, main ):
+ """
+ Verify Reactive forwarding
+ """
+ import time
+ main.log.report( "Verify Reactive forwarding" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify pingall, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else:
+ break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+ onpass="Reactive Mode IPv4 Pingall test PASS",
+ onfail="Reactive Mode IPv4 Pingall test FAIL" )
+
+ if not pingResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
+ def CASE41( self, main ):
+ """
+ Verify Reactive forwarding (Chordal Topology)
+ """
+ import re
+ import copy
+ import time
+ main.log.report( "Verify Reactive forwarding (Chordal Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding and Verify ping all" )
+ main.step( "Enable Reactive forwarding" )
+ installResult = main.TRUE
+ # Activate fwd app
+ appResults = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+
+ appCheck = main.TRUE
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ time.sleep( 10 )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ if not pingResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ if pingResult == main.TRUE:
+ main.log.report( "IPv4 Pingall Test in Reactive mode successful" )
+ else:
+ main.log.report( "IPv4 Pingall Test in Reactive mode failed" )
+
+ caseResult = appCheck and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Reactive Mode IPv4 Pingall test PASS",
+ onfail="Reactive Mode IPv4 Pingall test FAIL" )
+
+ def CASE42( self, main ):
+ """
+ Verify Reactive forwarding (Spine Topology)
+ """
+ import re
+ import copy
+ import time
+ main.log.report( "Verify Reactive forwarding (Spine Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding and Verify ping all" )
+ main.step( "Enable Reactive forwarding" )
+ installResult = main.TRUE
+ # Activate fwd app
+ appResults = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+
+ appCheck = main.TRUE
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ time.sleep( 10 )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ if not pingResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ if pingResult == main.TRUE:
+ main.log.report( "IPv4 Pingall Test in Reactive mode successful" )
+ else:
+ main.log.report( "IPv4 Pingall Test in Reactive mode failed" )
+
+ caseResult = appCheck and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Reactive Mode IPv4 Pingall test PASS",
+ onfail="Reactive Mode IPv4 Pingall test FAIL" )
+
+ def CASE47( self, main ):
+ """
+ Verify reactive forwarding in ATT topology, use a different ping method than CASE40
+ """
+ import time
+ main.log.report( "Verify Reactive forwarding (ATT Topology) " )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify ping, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ numHosts = int( main.params['TOPO1']['numHosts'] )
+
+ for i in range(numHosts):
+ src = "h1"
+ dest = "h" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping " + dest + " -c 3 -i 1 -W 1" )
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
+ def CASE48( self, main ):
+ """
+ Verify reactive forwarding in Chordal topology, use a different ping method than CASE41
+ """
+ import time
+ main.log.report( "Verify Reactive forwarding (Chordal Topology) " )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify ping, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ numHosts = int( main.params['TOPO2']['numHosts'] )
+
+ for i in range(numHosts):
+ src = "h1"
+ dest = "h" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping " + dest + " -c 3 -i 1 -W 1" )
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
+ def CASE49( self, main ):
+ """
+ Verify reactive forwarding in Spine-leaf topology, use a different ping method than CASE42
+ """
+ import time
+ main.log.report( "Verify Reactive forwarding (Spine-leaf Topology) " )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify ping, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ numHosts = int( main.params['TOPO3']['numHosts'] )
+
+ for i in range(11, numHosts+10):
+ src = "h11"
+ dest = "h" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping " + dest + " -c 3 -i 1 -W 1" )
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
+ def CASE140( self, main ):
+ """
+ Verify IPv6 Reactive forwarding (Att Topology)
+ """
+ import re
+ import copy
+ import time
+ main.log.report( "Verify IPv6 Reactive forwarding (Att Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable IPv6 Reactive forwarding and Verify ping all" )
+ hostList = [ ('h'+ str(x + 1)) for x in range (main.numMNhosts) ]
+
+ main.step( "Set IPv6 cfg parameters for Reactive forwarding" )
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="Reactive mode ipv6Fowarding cfg is set to true",
+ onfail="Failed to cfg set Reactive mode ipv6Fowarding" )
+
+ main.step( "Verify IPv6 Pingall" )
+ pingResult = main.FALSE
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall( protocol="IPv6", timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Trying again..")
+ pingResult = main.Mininet1.pingall( protocol="IPv6", timeout=main.pingTimeout )
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for IPv6 Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ if pingResult == main.TRUE:
+ main.log.report( "IPv6 Pingall Test in Reactive mode successful" )
+ else:
+ main.log.report( "IPv6 Pingall Test in Reactive mode failed" )
+
+
+ caseResult = appCheck and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Reactive Mode IPv6 Pingall test PASS",
+ onfail="Reactive Mode IPv6 Pingall test FAIL" )
+
+ def CASE141( self, main ):
+ """
+ Verify IPv6 Reactive forwarding (Chordal Topology)
+ """
+ import re
+ import copy
+ import time
+ main.log.report( "Verify IPv6 Reactive forwarding (Chordal Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable IPv6 Reactive forwarding and Verify ping all" )
+ hostList = [ ('h'+ str(x + 1)) for x in range (main.numMNhosts) ]
+
+ main.step( "Set IPv6 cfg parameters for Reactive forwarding" )
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="Reactive mode ipv6Fowarding cfg is set to true",
+ onfail="Failed to cfg set Reactive mode ipv6Fowarding" )
+
+ main.step( "Verify IPv6 Pingall" )
+ pingResult = main.FALSE
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall( protocol="IPv6", timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Trying again..")
+ pingResult = main.Mininet1.pingall( protocol="IPv6", timeout=main.pingTimeout )
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for IPv6 Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ if pingResult == main.TRUE:
+ main.log.report( "IPv6 Pingall Test in Reactive mode successful" )
+ else:
+ main.log.report( "IPv6 Pingall Test in Reactive mode failed" )
+
+ main.step( "Disable Reactive forwarding" )
+
+ main.log.info( "Uninstall reactive forwarding app" )
+ appCheck = main.TRUE
+ appResults = appResults and main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ # Waiting for reative flows to be cleared.
+ time.sleep( 30 )
+ caseResult = appCheck and cfgResult and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Reactive Mode IPv6 Pingall test PASS",
+ onfail="Reactive Mode IPv6 Pingall test FAIL" )
+
+ def CASE142( self, main ):
+ """
+ Verify IPv6 Reactive forwarding (Spine Topology)
+ """
+ import re
+ import copy
+ import time
+ main.log.report( "Verify IPv6 Reactive forwarding (Spine Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable IPv6 Reactive forwarding and Verify ping all" )
+ # Spine topology do not have hosts h1-h10
+ hostList = [ ('h'+ str(x + 11)) for x in range (main.numMNhosts) ]
+ main.step( "Set IPv6 cfg parameters for Reactive forwarding" )
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="Reactive mode ipv6Fowarding cfg is set to true",
+ onfail="Failed to cfg set Reactive mode ipv6Fowarding" )
+
+ main.step( "Verify IPv6 Pingall" )
+ pingResult = main.FALSE
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall( protocol="IPv6", timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Trying again...")
+ pingResult = main.Mininet1.pingall( protocol="IPv6", timeout=main.pingTimeout )
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for IPv6 Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ if pingResult == main.TRUE:
+ main.log.report( "IPv6 Pingall Test in Reactive mode successful" )
+ else:
+ main.log.report( "IPv6 Pingall Test in Reactive mode failed" )
+
+ main.step( "Disable Reactive forwarding" )
+
+ main.log.info( "Uninstall reactive forwarding app" )
+ appCheck = main.TRUE
+ appResults = appResults and main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ # Waiting for reative flows to be cleared.
+ time.sleep( 30 )
+ caseResult = appCheck and cfgResult and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Reactive Mode IPv6 Pingall test PASS",
+ onfail="Reactive Mode IPv6 Pingall test FAIL" )
+
+ def CASE147( self, main ):
+ """
+ Verify IPv6 reactive forwarding in ATT topology, use a different ping method than CASE140
+ """
+ import time
+ main.log.report( "Verify IPv6 Reactive forwarding (ATT Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify ping6, and disable reactive forwarding" )
+
+ main.step( "Enable IPv4 Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ main.step( "Set IPv6 cfg parameters for Reactive forwarding" )
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="Reactive mode ipv6Fowarding cfg is set to true",
+ onfail="Failed to cfg set Reactive mode ipv6Fowarding" )
+
+ main.step( "Discover hosts using ping" )
+ numHosts = int( main.params['TOPO1']['numHosts'] )
+ for i in range(numHosts):
+ src = "h1"
+ dest = "1000::" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping6 " + dest + " -c 3 -i 1 -W 1")
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ main.log.info( "Uninstall IPv6 reactive forwarding app" )
+ appCheck = main.TRUE
+ appResults = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ # Waiting for reative flows to be cleared.
+ time.sleep( 30 )
+
+ main.step( "Disable IPv4 Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated IPv4 fwd app",
+ onfail="Failed to deactivate IPv4 fwd app" )
+
+ def CASE148( self, main ):
+ """
+ Verify reactive forwarding in Chordal topology, use a different ping method than CASE141
+ """
+ import time
+ main.log.report( "Verify IPv6 Reactive forwarding (Chordal Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify ping6, and disable reactive forwarding" )
+
+ main.step( "Enable IPv4 Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ main.step( "Set IPv6 cfg parameters for Reactive forwarding" )
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="Reactive mode ipv6Fowarding cfg is set to true",
+ onfail="Failed to cfg set Reactive mode ipv6Fowarding" )
+
+ main.step( "Discover hosts using ping" )
+ numHosts = int( main.params['TOPO2']['numHosts'] )
+ for i in range(numHosts):
+ src = "h1"
+ dest = "1000::" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping6 " + dest + " -c 3 -i 1 -W 1")
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ main.log.info( "Uninstall IPv6 reactive forwarding app" )
+ appCheck = main.TRUE
+ appResults = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ # Waiting for reative flows to be cleared.
+ time.sleep( 30 )
+
+ main.step( "Disable IPv4 Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated IPv4 fwd app",
+ onfail="Failed to deactivate IPv4 fwd app" )
+
+ def CASE149( self, main ):
+ """
+ Verify reactive forwarding in Spine-leaf topology, use a different ping method than CASE142
+ """
+ import time
+ main.log.report( "Verify IPv6 Reactive forwarding (Spine-leaf Topology)" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify ping6, and disable reactive forwarding" )
+
+ main.step( "Enable IPv4 Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ main.step( "Set IPv6 cfg parameters for Reactive forwarding" )
+ cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true" )
+ cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true" )
+ cfgResult = cfgResult1 and cfgResult2
+ utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
+ onpass="Reactive mode ipv6Fowarding cfg is set to true",
+ onfail="Failed to cfg set Reactive mode ipv6Fowarding" )
+
+ main.step( "Discover hosts using ping" )
+ numHosts = int( main.params['TOPO3']['numHosts'] )
+ for i in range(11, numHosts+10):
+ src = "h11"
+ dest = "1000::" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping6 " + dest + " -c 3 -i 1 -W 1")
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ main.log.info( "Uninstall IPv6 reactive forwarding app" )
+ appCheck = main.TRUE
+ appResults = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ pool = []
+ for cli in main.CLIs:
+ t = main.Thread( target=cli.appToIDCheck,
+ name="appToIDCheck-" + str( i ),
+ args=[] )
+ pool.append( t )
+ t.start()
+
+ for t in pool:
+ t.join()
+ appCheck = appCheck and t.result
+ utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+ onpass="App Ids seem to be correct",
+ onfail="Something is wrong with app Ids" )
+
+ if appCheck != main.TRUE:
+ main.log.warn( main.CLIs[0].apps() )
+ main.log.warn( main.CLIs[0].appIDs() )
+
+ # Waiting for reative flows to be cleared.
+ time.sleep( 30 )
+
+ main.step( "Disable IPv4 Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated IPv4 fwd app",
+ onfail="Failed to deactivate IPv4 fwd app" )
+
+ def CASE5( self, main ):
+ """
+ Compare current ONOS topology with reference data
+ """
+ import re
+
+ devicesDPIDTemp = []
+ hostMACsTemp = []
+ deviceLinksTemp = []
+ deviceActiveLinksCountTemp = []
+ devicePortsEnabledCountTemp = []
+
+ main.log.report(
+ "Compare ONOS topology with reference data in Stores" )
+ main.log.report( "__________________________________________________" )
+ main.case( "Compare ONOS topology with reference data" )
+
+ main.step( "Compare current Device ports enabled with reference" )
+
+ for check in range(main.topoCheck):
+ time1 = time.time()
+ for i in xrange( 1,(main.numMNswitches + 1), int( main.numCtrls ) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= main.numMNswitches + 1:
+ break
+ dpid = "of:00000000000000" + format( i, "02x" )
+ t = main.Thread(target = cli.getDevicePortsEnabledCount,
+ threadID = main.threadID,
+ name = "getDevicePortsEnabledCount",
+ args = [dpid])
+ t.start()
+ pool.append(t)
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ portResult = thread.result
+ #portTemp = re.split( r'\t+', portResult )
+ #portCount = portTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
+ devicePortsEnabledCountTemp.append( portResult )
+
+ time2 = time.time()
+ main.log.info("Time for counting enabled ports of the switches: %2f seconds" %(time2-time1))
+ main.log.info (
+ "Device Enabled ports EXPECTED: %s" %
+ str( main.devicePortsEnabledCount ) )
+ main.log.info (
+ "Device Enabled ports ACTUAL: %s" %
+ str( devicePortsEnabledCountTemp ) )
+
+ if ( cmp( main.devicePortsEnabledCount,
+ devicePortsEnabledCountTemp ) == 0 ):
+ stepResult1 = main.TRUE
+ else:
+ stepResult1 = main.FALSE
+
+ main.step( "Compare Device active links with reference" )
+ time1 = time.time()
+ for i in xrange( 1, ( main.numMNswitches + 1) , int( main.numCtrls ) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= main.numMNswitches + 1:
+ break
+ dpid = "of:00000000000000" + format( i, "02x" )
+ t = main.Thread(target = cli.getDeviceLinksActiveCount,
+ threadID = main.threadID,
+ name = "getDeviceLinksActiveCount",
+ args = [dpid])
+ t.start()
+ pool.append(t)
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ linkCountResult = thread.result
+ #linkCountTemp = re.split( r'\t+', linkCountResult )
+ #linkCount = linkCountTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
+ deviceActiveLinksCountTemp.append( linkCountResult )
+
+ time2 = time.time()
+ main.log.info("Time for counting all enabled links of the switches: %2f seconds" %(time2-time1))
+ main.log.info (
+ "Device Active links EXPECTED: %s" %
+ str( main.deviceActiveLinksCount ) )
+ main.log.info (
+ "Device Active links ACTUAL: %s" % str( deviceActiveLinksCountTemp ) )
+ if ( cmp( main.deviceActiveLinksCount, deviceActiveLinksCountTemp ) == 0 ):
+ stepResult2 = main.TRUE
+ else:
+ stepResult2 = main.FALSE
+
+ """
+ place holder for comparing devices, hosts, paths and intents if required.
+ Links and ports data would be incorrect with out devices anyways.
+ """
+ caseResult = ( stepResult1 and stepResult2 )
+
+ if caseResult:
+ break
+ else:
+ time.sleep( main.topoCheckDelay )
+ main.log.warn( "Topology check failed. Trying again..." )
+
+
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Compare Topology test PASS",
+ onfail="Compare Topology test FAIL" )
+
+ def CASE60( self ):
+ """
+ Install 300 host intents and verify ping all (Att Topology)
+ """
+ main.log.report( "Add 300 host intents and verify pingall (Att Topology)" )
+ main.log.report( "_______________________________________" )
+ main.case( "Install 300 host intents" )
+
+ main.step( "Add host Intents" )
+ intentIdList = main.CHOtestFunctions.installHostIntents()
+ main.intentIds = list(intentIdList)
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = ( intentState and pingResult )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 300 Host Intents and Ping All test PASS",
+ onfail="Install 300 Host Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE61( self ):
+ """
+ Install 300 host intents and verify ping all for Chordal Topology
+ """
+ main.log.report( "Add 300 host intents and verify pingall (Chordal Topo)" )
+ main.log.report( "_______________________________________" )
+ main.case( "Install 300 host intents" )
+
+ main.step( "Add host Intents" )
+ intentIdList = main.CHOtestFunctions.installHostIntents()
+ main.intentIds = list(intentIdList)
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = ( intentState and pingResult )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 300 Host Intents and Ping All test PASS",
+ onfail="Install 300 Host Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE62( self ):
+ """
+ Install 2278 host intents and verify ping all for Spine Topology
+ """
+ main.log.report( "Add 2278 host intents and verify pingall (Spine Topo)" )
+ main.log.report( "_______________________________________" )
+ main.case( "Install 2278 host intents" )
+
+ main.step( "Add host Intents" )
+ intentIdList = main.CHOtestFunctions.installHostIntents()
+ main.intentIds = list(intentIdList)
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = ( intentState and pingResult )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 2278 Host Intents and Ping All test PASS",
+ onfail="Install 2278 Host Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE160( self ):
+ """
+ Verify IPv6 ping across 300 host intents (Att Topology)
+ """
+ main.log.report( "Verify IPv6 ping across 300 host intents (Att Topology)" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all 300 host intents" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 300 host intents test PASS",
+ onfail="IPv6 Ping across 300 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE161( self ):
+ """
+ Verify IPv6 ping across 300 host intents (Chordal Topology)
+ """
+ main.log.report( "Verify IPv6 ping across 300 host intents (Chordal Topology)" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all 300 host intents" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 300 host intents test PASS",
+ onfail="IPv6 Ping across 300 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE162( self ):
+ """
+ Verify IPv6 ping across 2278 host intents (Spine Topology)
+ """
+ main.log.report( "Verify IPv6 ping across 2278 host intents (Spine Topology)" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all 2278 host intents" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 2278 host intents test PASS",
+ onfail="IPv6 Ping across 2278 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE70( self, main ):
+ """
+ Randomly bring some core links down and verify ping all ( Host Intents-Att Topo)
+ """
+ import random
+ main.randomLink1 = []
+ main.randomLink2 = []
+ main.randomLink3 = []
+ link1End1 = main.params[ 'ATTCORELINKS' ][ 'linkS3a' ]
+ link1End2 = main.params[ 'ATTCORELINKS' ][ 'linkS3b' ].split( ',' )
+ link2End1 = main.params[ 'ATTCORELINKS' ][ 'linkS14a' ]
+ link2End2 = main.params[ 'ATTCORELINKS' ][ 'linkS14b' ].split( ',' )
+ link3End1 = main.params[ 'ATTCORELINKS' ][ 'linkS18a' ]
+ link3End2 = main.params[ 'ATTCORELINKS' ][ 'linkS18b' ].split( ',' )
+ switchLinksToToggle = main.params[ 'ATTCORELINKS' ][ 'toggleLinks' ]
+
+ main.log.report( "Randomly bring some core links down and verify ping all (Host Intents-Att Topo)" )
+ main.log.report( "___________________________________________________________________________" )
+ main.case( "Host intents - Randomly bring some core links down and verify ping all" )
+ main.step( "Verify number of Switch links to toggle on each Core Switch are between 1 - 5" )
+ if ( int( switchLinksToToggle ) ==
+ 0 or int( switchLinksToToggle ) > 5 ):
+ main.log.info( "Please check your PARAMS file. Valid range for number of switch links to toggle is between 1 to 5" )
+ #main.cleanup()
+ #main.exit()
+ else:
+ main.log.info( "User provided Core switch links range to toggle is correct, proceeding to run the test" )
+
+ main.step( "Cut links on Core devices using user provided range" )
+ main.randomLink1 = random.sample( link1End2, int( switchLinksToToggle ) )
+ main.randomLink2 = random.sample( link2End2, int( switchLinksToToggle ) )
+ main.randomLink3 = random.sample( link3End2, int( switchLinksToToggle ) )
+ for i in range( int( switchLinksToToggle ) ):
+ main.Mininet1.link(
+ END1=link1End1,
+ END2=main.randomLink1[ i ],
+ OPTION="down" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link2End1,
+ END2=main.randomLink2[ i ],
+ OPTION="down" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link3End1,
+ END2=main.randomLink3[ i ],
+ OPTION="down" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link down is discoverd by onos")
+ linkDown = main.CHOtestFunctions.checkLinkEvents( "down",
+ int( main.numMNlinks ) -
+ int( switchLinksToToggle ) * 6 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkDown,
+ onpass="Link down discovered properly",
+ onfail="Link down was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkDown and pingResult and intentState
+ utilities.assert_equals( expect=main.TRUE,
+ actual=caseResult,
+ onpass="Random Link cut Test PASS",
+ onfail="Random Link cut Test FAIL" )
+
+ # Printing what exactly failed
+ if not linkDown:
+ main.log.debug( "Link down was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE80( self, main ):
+ """
+ Bring the core links up that are down and verify ping all ( Host Intents-Att Topo )
+ """
+ import random
+ link1End1 = main.params[ 'ATTCORELINKS' ][ 'linkS3a' ]
+ link2End1 = main.params[ 'ATTCORELINKS' ][ 'linkS14a' ]
+ link3End1 = main.params[ 'ATTCORELINKS' ][ 'linkS18a' ]
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+ switchLinksToToggle = main.params[ 'ATTCORELINKS' ][ 'toggleLinks' ]
+
+ main.log.report(
+ "Bring the core links up that are down and verify ping all (Host Intents-Att Topo" )
+ main.log.report(
+ "__________________________________________________________________" )
+ main.case(
+ "Host intents - Bring the core links up that are down and verify ping all" )
+ main.step( "Bring randomly cut links on Core devices up" )
+ for i in range( int( switchLinksToToggle ) ):
+ main.Mininet1.link(
+ END1=link1End1,
+ END2=main.randomLink1[ i ],
+ OPTION="up" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link2End1,
+ END2=main.randomLink2[ i ],
+ OPTION="up" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link3End1,
+ END2=main.randomLink3[ i ],
+ OPTION="up" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link up is discoverd by onos")
+ linkUp = main.CHOtestFunctions.checkLinkEvents( "up",
+ int( main.numMNlinks ) )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkUp,
+ onpass="Link up discovered properly",
+ onfail="Link up was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkUp and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Link Up Test PASS",
+ onfail="Link Up Test FAIL" )
+ # Printing what exactly failed
+ if not linkUp:
+ main.log.debug( "Link up was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE71( self, main ):
+ """
+ Randomly bring some core links down and verify ping all ( Point Intents-Att Topo)
+ """
+ import random
+ main.randomLink1 = []
+ main.randomLink2 = []
+ main.randomLink3 = []
+ link1End1 = main.params[ 'ATTCORELINKS' ][ 'linkS3a' ]
+ link1End2 = main.params[ 'ATTCORELINKS' ][ 'linkS3b' ].split( ',' )
+ link2End1 = main.params[ 'ATTCORELINKS' ][ 'linkS14a' ]
+ link2End2 = main.params[ 'ATTCORELINKS' ][ 'linkS14b' ].split( ',' )
+ link3End1 = main.params[ 'ATTCORELINKS' ][ 'linkS18a' ]
+ link3End2 = main.params[ 'ATTCORELINKS' ][ 'linkS18b' ].split( ',' )
+ switchLinksToToggle = main.params[ 'ATTCORELINKS' ][ 'toggleLinks' ]
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report( "Randomly bring some core links down and verify ping all (Point Intents-Att Topo)" )
+ main.log.report( "___________________________________________________________________________" )
+ main.case( "Point intents - Randomly bring some core links down and verify ping all" )
+ main.step( "Verify number of Switch links to toggle on each Core Switch are between 1 - 5" )
+ if ( int( switchLinksToToggle ) ==
+ 0 or int( switchLinksToToggle ) > 5 ):
+ main.log.info( "Please check your PARAMS file. Valid range for number of switch links to toggle is between 1 to 5" )
+ #main.cleanup()
+ #main.exit()
+ else:
+ main.log.info( "User provided Core switch links range to toggle is correct, proceeding to run the test" )
+
+ main.step( "Cut links on Core devices using user provided range" )
+ main.randomLink1 = random.sample( link1End2, int( switchLinksToToggle ) )
+ main.randomLink2 = random.sample( link2End2, int( switchLinksToToggle ) )
+ main.randomLink3 = random.sample( link3End2, int( switchLinksToToggle ) )
+ for i in range( int( switchLinksToToggle ) ):
+ main.Mininet1.link(
+ END1=link1End1,
+ END2=main.randomLink1[ i ],
+ OPTION="down" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link2End1,
+ END2=main.randomLink2[ i ],
+ OPTION="down" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link3End1,
+ END2=main.randomLink3[ i ],
+ OPTION="down" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link down is discoverd by onos")
+ linkDown = main.CHOtestFunctions.checkLinkEvents( "down",
+ int( main.numMNlinks ) - int( switchLinksToToggle ) * 6 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkDown,
+ onpass="Link down discovered properly",
+ onfail="Link down was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkDown and pingResult and intentState
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Random Link cut Test PASS",
+ onfail="Random Link cut Test FAIL" )
+
+ # Printing what exactly failed
+ if not linkDown:
+ main.log.debug( "Link down was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE81( self, main ):
+ """
+ Bring the core links up that are down and verify ping all ( Point Intents-Att Topo )
+ """
+ import random
+ link1End1 = main.params[ 'ATTCORELINKS' ][ 'linkS3a' ]
+ link2End1 = main.params[ 'ATTCORELINKS' ][ 'linkS14a' ]
+ link3End1 = main.params[ 'ATTCORELINKS' ][ 'linkS18a' ]
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+ switchLinksToToggle = main.params[ 'ATTCORELINKS' ][ 'toggleLinks' ]
+
+ main.log.report(
+ "Bring the core links up that are down and verify ping all ( Point Intents-Att Topo" )
+ main.log.report(
+ "__________________________________________________________________" )
+ main.case(
+ "Point intents - Bring the core links up that are down and verify ping all" )
+ main.step( "Bring randomly cut links on Core devices up" )
+ for i in range( int( switchLinksToToggle ) ):
+ main.Mininet1.link(
+ END1=link1End1,
+ END2=main.randomLink1[ i ],
+ OPTION="up" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link2End1,
+ END2=main.randomLink2[ i ],
+ OPTION="up" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link(
+ END1=link3End1,
+ END2=main.randomLink3[ i ],
+ OPTION="up" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link up is discoverd by onos")
+ linkUp = main.CHOtestFunctions.checkLinkEvents( "up", int( main.numMNlinks ) )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkUp,
+ onpass="Link up discovered properly",
+ onfail="Link up was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkUp and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Link Up Test PASS",
+ onfail="Link Up Test FAIL" )
+ # Printing what exactly failed
+ if not linkUp:
+ main.log.debug( "Link up was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE72( self, main ):
+ """
+ Randomly bring some links down and verify ping all ( Host Intents-Chordal Topo)
+ """
+ import random
+ import itertools
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report( "Randomly bring some core links down and verify ping all (Host Intents-Chordal Topo)" )
+ main.log.report( "___________________________________________________________________________" )
+ main.case( "Host intents - Randomly bring some core links down and verify ping all" )
+ switches = []
+ switchesComb = []
+ for i in range( main.numMNswitches ):
+ switches.append('s%d'%(i+1))
+ switchesLinksComb = list(itertools.combinations(switches,2))
+ main.randomLinks = random.sample(switchesLinksComb, 5 )
+ print main.randomLinks
+ main.step( "Cut links on random devices" )
+
+ for switch in main.randomLinks:
+ main.Mininet1.link(
+ END1=switch[0],
+ END2=switch[1],
+ OPTION="down")
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link down is discoverd by onos")
+ linkDown = main.CHOtestFunctions.checkLinkEvents( "down", int( main.numMNlinks ) - 5 * 2 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkDown,
+ onpass="Link down discovered properly",
+ onfail="Link down was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkDown and pingResult and intentState
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Random Link cut Test PASS",
+ onfail="Random Link cut Test FAIL" )
+
+ # Printing what exactly failed
+ if not linkDown:
+ main.log.debug( "Link down was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE82( self, main ):
+ """
+ Bring the core links up that are down and verify ping all ( Host Intents Chordal Topo )
+ """
+ import random
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report(
+ "Bring the core links up that are down and verify ping all (Host Intents-Chordal Topo" )
+ main.log.report(
+ "__________________________________________________________________" )
+ main.case(
+ "Host intents - Bring the core links up that are down and verify ping all" )
+ main.step( "Bring randomly cut links on devices up" )
+
+ for switch in main.randomLinks:
+ main.Mininet1.link(
+ END1=switch[0],
+ END2=switch[1],
+ OPTION="up")
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link up is discoverd by onos")
+ linkUp = main.CHOtestFunctions.checkLinkEvents( "up", int( main.numMNlinks ) )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkUp,
+ onpass="Link up discovered properly",
+ onfail="Link up was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkUp and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Link Up Test PASS",
+ onfail="Link Up Test FAIL" )
+ # Printing what exactly failed
+ if not linkUp:
+ main.log.debug( "Link up was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE73( self, main ):
+ """
+ Randomly bring some links down and verify ping all ( Point Intents-Chordal Topo)
+ """
+ import random
+ import itertools
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report( "Randomly bring some core links down and verify ping all ( Point Intents-Chordal Topo)" )
+ main.log.report( "___________________________________________________________________________" )
+ main.case( "Point intents - Randomly bring some core links down and verify ping all" )
+ switches = []
+ switchesComb = []
+ for i in range( main.numMNswitches ):
+ switches.append('s%d'%(i+1))
+ switchesLinksComb = list(itertools.combinations(switches,2))
+ main.randomLinks = random.sample(switchesLinksComb, 5 )
+ print main.randomLinks
+ main.step( "Cut links on random devices" )
+
+ for switch in main.randomLinks:
+ main.Mininet1.link(
+ END1=switch[0],
+ END2=switch[1],
+ OPTION="down")
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link down is discoverd by onos")
+ linkDown = main.CHOtestFunctions.checkLinkEvents( "down", int( main.numMNlinks ) - 5 * 2 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkDown,
+ onpass="Link down discovered properly",
+ onfail="Link down was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkDown and pingResult and intentState
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Random Link cut Test PASS",
+ onfail="Random Link cut Test FAIL" )
+
+ # Printing what exactly failed
+ if not linkDown:
+ main.log.debug( "Link down was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE83( self, main ):
+ """
+ Bring the core links up that are down and verify ping all ( Point Intents Chordal Topo )
+ """
+ import random
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report(
+ "Bring the core links up that are down and verify ping all ( Point Intents-Chordal Topo" )
+ main.log.report(
+ "__________________________________________________________________" )
+ main.case(
+ "Point intents - Bring the core links up that are down and verify ping all" )
+ main.step( "Bring randomly cut links on devices up" )
+
+ for switch in main.randomLinks:
+ main.Mininet1.link(
+ END1=switch[0],
+ END2=switch[1],
+ OPTION="up")
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link up is discoverd by onos")
+ linkUp = main.CHOtestFunctions.checkLinkEvents( "up", int( main.numMNlinks ) )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkUp,
+ onpass="Link up discovered properly",
+ onfail="Link up was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkUp and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Link Up Test PASS",
+ onfail="Link Up Test FAIL" )
+ # Printing what exactly failed
+ if not linkUp:
+ main.log.debug( "Link up was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE74( self, main ):
+ """
+ Randomly bring some core links down and verify ping all ( Host Intents-Spine Topo)
+ """
+ import random
+ main.randomLink1 = []
+ main.randomLink2 = []
+ main.randomLink3 = []
+ main.randomLink4 = []
+ link1End1 = main.params[ 'SPINECORELINKS' ][ 'linkS9' ]
+ link1End2top = main.params[ 'SPINECORELINKS' ][ 'linkS9top' ].split( ',' )
+ link1End2bot = main.params[ 'SPINECORELINKS' ][ 'linkS9bot' ].split( ',' )
+ link2End1 = main.params[ 'SPINECORELINKS' ][ 'linkS10' ]
+ link2End2top = main.params[ 'SPINECORELINKS' ][ 'linkS10top' ].split( ',' )
+ link2End2bot = main.params[ 'SPINECORELINKS' ][ 'linkS10bot' ].split( ',' )
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report( "Bring some core links down and verify ping all (Host Intents-Spine Topo)" )
+ main.log.report( "___________________________________________________________________________" )
+ main.log.case( "Bring some core links down and verify ping all (Host Intents-Spine Topo)" )
+
+ main.step( "Bring some core links down" )
+ linkIndex = range(4)
+ linkIndexS9 = random.sample(linkIndex,1)[0]
+ linkIndex.remove(linkIndexS9)
+ linkIndexS10 = random.sample(linkIndex,1)[0]
+ main.randomLink1 = link1End2top[linkIndexS9]
+ main.randomLink2 = link2End2top[linkIndexS10]
+ main.randomLink3 = random.sample(link1End2bot,1)[0]
+ main.randomLink4 = random.sample(link2End2bot,1)[0]
+
+ # Work around for link state propagation delay. Added some sleep time.
+ # main.Mininet1.link( END1=link1End1, END2=main.randomLink1, OPTION="down" )
+ # main.Mininet1.link( END1=link2End1, END2=main.randomLink2, OPTION="down" )
+ main.Mininet1.link( END1=link1End1, END2=main.randomLink3, OPTION="down" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="down" )
+ time.sleep( main.linkSleep )
+
+ main.step( "Verify link down is discoverd by onos" )
+ linkDown = main.CHOtestFunctions.checkLinkEvents( "down", int( main.numMNlinks ) - 4 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkDown,
+ onpass="Link down discovered properly",
+ onfail="Link down was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step( "Verify intents are installed" )
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkDown and pingResult and intentState
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Random Link cut Test PASS",
+ onfail="Random Link cut Test FAIL" )
+
+ # Printing what exactly failed
+ if not linkDown:
+ main.log.debug( "Link down was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE84( self, main ):
+ """
+ Bring the core links up that are down and verify ping all ( Host Intents-Spine Topo )
+ """
+ import random
+ link1End1 = main.params[ 'SPINECORELINKS' ][ 'linkS9' ]
+ link2End1 = main.params[ 'SPINECORELINKS' ][ 'linkS10' ]
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+ main.log.report(
+ "Bring the core links up that are down and verify ping all (Host Intents-Spine Topo" )
+ main.log.report(
+ "__________________________________________________________________" )
+ main.case(
+ "Host intents - Bring the core links up that are down and verify ping all" )
+
+ main.step( "Bring up the core links that are down" )
+ # Work around for link state propagation delay. Added some sleep time.
+ # main.Mininet1.link( END1=link1End1, END2=main.randomLink1, OPTION="up" )
+ # main.Mininet1.link( END1=link2End1, END2=main.randomLink2, OPTION="up" )
+ main.Mininet1.link( END1=link1End1, END2=main.randomLink3, OPTION="up" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="up" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link up is discoverd by onos")
+ linkUp = main.CHOtestFunctions.checkLinkEvents( "up", int( main.numMNlinks ) )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkUp,
+ onpass="Link up discovered properly",
+ onfail="Link up was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkUp and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Link Up Test PASS",
+ onfail="Link Up Test FAIL" )
+ # Printing what exactly failed
+ if not linkUp:
+ main.log.debug( "Link up was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE75( self, main ):
+ """
+ Randomly bring some core links down and verify ping all ( Point Intents-Spine Topo)
+ """
+ import random
+ main.randomLink1 = []
+ main.randomLink2 = []
+ main.randomLink3 = []
+ main.randomLink4 = []
+ link1End1 = main.params[ 'SPINECORELINKS' ][ 'linkS9' ]
+ link1End2top = main.params[ 'SPINECORELINKS' ][ 'linkS9top' ].split( ',' )
+ link1End2bot = main.params[ 'SPINECORELINKS' ][ 'linkS9bot' ].split( ',' )
+ link2End1 = main.params[ 'SPINECORELINKS' ][ 'linkS10' ]
+ link2End2top = main.params[ 'SPINECORELINKS' ][ 'linkS10top' ].split( ',' )
+ link2End2bot = main.params[ 'SPINECORELINKS' ][ 'linkS10bot' ].split( ',' )
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+
+ main.log.report( "Bring some core links down and verify ping all (Point Intents-Spine Topo)" )
+ main.log.report( "___________________________________________________________________________" )
+ main.case( "Bring some core links down and verify ping all (Point Intents-Spine Topo)" )
+
+ main.step( "Bring some core links down" )
+ linkIndex = range(4)
+ linkIndexS9 = random.sample(linkIndex,1)[0]
+ linkIndex.remove(linkIndexS9)
+ linkIndexS10 = random.sample(linkIndex,1)[0]
+ main.randomLink1 = link1End2top[linkIndexS9]
+ main.randomLink2 = link2End2top[linkIndexS10]
+ main.randomLink3 = random.sample(link1End2bot,1)[0]
+ main.randomLink4 = random.sample(link2End2bot,1)[0]
+
+ # Work around for link state propagation delay. Added some sleep time.
+ # main.Mininet1.link( END1=link1End1, END2=main.randomLink1, OPTION="down" )
+ # main.Mininet1.link( END1=link2End1, END2=main.randomLink2, OPTION="down" )
+ main.Mininet1.link( END1=link1End1, END2=main.randomLink3, OPTION="down" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="down" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link down is discoverd by onos")
+ linkDown = main.CHOtestFunctions.checkLinkEvents( "down", int( main.numMNlinks ) - 4 )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkDown,
+ onpass="Link down discovered properly",
+ onfail="Link down was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkDown and pingResult and intentState
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Random Link cut Test PASS",
+ onfail="Random Link cut Test FAIL" )
+
+ # Printing what exactly failed
+ if not linkDown:
+ main.log.debug( "Link down was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE85( self, main ):
+ """
+ Bring the core links up that are down and verify ping all ( Point Intents-Spine Topo )
+ """
+ import random
+ link1End1 = main.params[ 'SPINECORELINKS' ][ 'linkS9' ]
+ link2End1 = main.params[ 'SPINECORELINKS' ][ 'linkS10' ]
+ main.linkSleep = int( main.params[ 'timers' ][ 'LinkDiscovery' ] )
+ main.log.report(
+ "Bring the core links up that are down and verify ping all (Point Intents-Spine Topo" )
+ main.log.report(
+ "__________________________________________________________________" )
+ main.case(
+ "Point intents - Bring the core links up that are down and verify ping all" )
+
+ main.step( "Bring up the core links that are down" )
+ # Work around for link state propagation delay. Added some sleep time.
+ # main.Mininet1.link( END1=link1End1, END2=main.randomLink1, OPTION="up" )
+ # main.Mininet1.link( END1=link2End1, END2=main.randomLink2, OPTION="up" )
+ main.Mininet1.link( END1=link1End1, END2=main.randomLink3, OPTION="up" )
+ time.sleep( main.linkSleep )
+ main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="up" )
+ time.sleep( main.linkSleep )
+
+ main.step("Verify link up is discoverd by onos")
+ linkUp = main.CHOtestFunctions.checkLinkEvents( "up", int( main.numMNlinks ) )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=linkUp,
+ onpass="Link up discovered properly",
+ onfail="Link up was not discovered in " +
+ str( main.linkSleep * main.linkCheck ) +
+ " seconds" )
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = linkUp and pingResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Link Up Test PASS",
+ onfail="Link Up Test FAIL" )
+ # Printing what exactly failed
+ if not linkUp:
+ main.log.debug( "Link up was not discovered correctly" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not intentState:
+ main.log.debug( "Intents are not all installed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE170( self ):
+ """
+ IPv6 ping all with some core links down( Host Intents-Att Topo)
+ """
+ main.log.report( "IPv6 ping all with some core links down( Host Intents-Att Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with some core links down( Host Intents-Att Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 300 host intents test PASS",
+ onfail="IPv6 Ping across 300 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE180( self ):
+ """
+ IPv6 ping all with after core links back up( Host Intents-Att Topo)
+ """
+ main.log.report( "IPv6 ping all with after core links back up( Host Intents-Att Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with after core links back up( Host Intents-Att Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 300 host intents test PASS",
+ onfail="IPv6 Ping across 300 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE171( self ):
+ """
+ IPv6 ping all with some core links down( Point Intents-Att Topo)
+ """
+ main.log.report( "IPv6 ping all with some core links down( Point Intents-Att Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with some core links down( Point Intents-Att Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 600 point intents test PASS",
+ onfail="IPv6 Ping across 600 point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE181( self ):
+ """
+ IPv6 ping all with after core links back up( Point Intents-Att Topo)
+ """
+ main.log.report( "IPv6 ping all with after core links back up( Point Intents-Att Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with after core links back up( Point Intents-Att Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 600 Point intents test PASS",
+ onfail="IPv6 Ping across 600 Point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE172( self ):
+ """
+ IPv6 ping all with some core links down( Host Intents-Chordal Topo)
+ """
+ main.log.report( "IPv6 ping all with some core links down( Host Intents-Chordal Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with some core links down( Host Intents-Chordal Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 300 host intents test PASS",
+ onfail="IPv6 Ping across 300 host intents test FAIL" )
+
+ def CASE182( self ):
+ """
+ IPv6 ping all with after core links back up( Host Intents-Chordal Topo)
+ """
+ main.log.report( "IPv6 ping all with after core links back up( Host Intents-Chordal Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with after core links back up( Host Intents-Chordal Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 300 host intents test PASS",
+ onfail="IPv6 Ping across 300 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE173( self ):
+ """
+ IPv6 ping all with some core links down( Point Intents-Chordal Topo)
+ """
+ main.log.report( "IPv6 ping all with some core links down( Point Intents-Chordal Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with some core links down( Point Intents-Chordal Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 600 point intents test PASS",
+ onfail="IPv6 Ping across 600 point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE183( self ):
+ """
+ IPv6 ping all with after core links back up( Point Intents-Chordal Topo)
+ """
+ main.log.report( "IPv6 ping all with after core links back up( Point Intents-Chordal Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with after core links back up( Point Intents-Chordal Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 600 Point intents test PASS",
+ onfail="IPv6 Ping across 600 Point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE174( self ):
+ """
+ IPv6 ping all with some core links down( Host Intents-Spine Topo)
+ """
+ main.log.report( "IPv6 ping all with some core links down( Host Intents-Spine Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with some core links down( Host Intents-Spine Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 2278 host intents test PASS",
+ onfail="IPv6 Ping across 2278 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE184( self ):
+ """
+ IPv6 ping all with after core links back up( Host Intents-Spine Topo)
+ """
+ main.log.report( "IPv6 ping all with after core links back up( Host Intents-Spine Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with after core links back up( Host Intents-Spine Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 2278 host intents test PASS",
+ onfail="IPv6 Ping across 2278 host intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE175( self ):
+ """
+ IPv6 ping all with some core links down( Point Intents-Spine Topo)
+ """
+ main.log.report( "IPv6 ping all with some core links down( Point Intents-Spine Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with some core links down( Point Intents-Spine Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 4556 point intents test PASS",
+ onfail="IPv6 Ping across 4556 point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE185( self ):
+ """
+ IPv6 ping all with after core links back up( Point Intents-Spine Topo)
+ """
+ main.log.report( "IPv6 ping all with after core links back up( Point Intents-Spine Topo )" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all with after core links back up( Point Intents-Spine Topo )" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 4556 Point intents test PASS",
+ onfail="IPv6 Ping across 4556 Point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE90( self ):
+ """
+ Install 600 point intents and verify ping all (Att Topology)
+ """
+ main.log.report( "Add 600 point intents and verify pingall (Att Topology)" )
+ main.log.report( "_______________________________________" )
+ main.case( "Install 600 point intents" )
+
+ main.step( "Add point Intents" )
+ intentIdList = main.CHOtestFunctions.installPointIntents()
+ main.intentIds = list(intentIdList)
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = ( intentState and pingResult )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 600 point Intents and Ping All test PASS",
+ onfail="Install 600 point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE91( self ):
+ """
+ Install 600 point intents and verify ping all (Chordal Topology)
+ """
+ main.log.report( "Add 600 point intents and verify pingall (Chordal Topology)" )
+ main.log.report( "_______________________________________" )
+ main.case( "Install 600 point intents" )
+
+ main.step( "Add point Intents" )
+ intentIdList = main.CHOtestFunctions.installPointIntents()
+ main.intentIds = list(intentIdList)
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = ( intentState and pingResult )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 600 point Intents and Ping All test PASS",
+ onfail="Install 600 point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE92( self ):
+ """
+ Install 4556 point intents and verify ping all (Spine Topology)
+ """
+ main.log.report( "Add 4556 point intents and verify pingall (Spine Topology)" )
+ main.log.report( "_______________________________________" )
+ main.case( "Install 4556 point intents" )
+
+ main.step( "Add point Intents" )
+ intentIdList = main.CHOtestFunctions.installPointIntents()
+ main.intentIds = list(intentIdList)
+
+ main.step("Verify intents are installed")
+ intentState = main.CHOtestFunctions.checkIntents()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step( "Verify Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall()
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = ( intentState and pingResult )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 4556 point Intents and Ping All test PASS",
+ onfail="Install 4556 point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE93( self ):
+ """
+ Install multi-single point intents and verify Ping all works
+ for att topology
+ """
+ import copy
+ import time
+ from collections import Counter
+ main.log.report( "Install multi-single point intents and verify Ping all" )
+ main.log.report( "___________________________________________" )
+ main.case( "Install multi-single point intents and Ping all" )
+ deviceDPIDsCopy = copy.copy(main.deviceDPIDs)
+ portIngressList = ['1']*(len(deviceDPIDsCopy) - 1)
+ intentIdList = []
+ main.log.info( "MACsDict" + str(main.MACsDict) )
+ time1 = time.time()
+ for i in xrange(0,len(deviceDPIDsCopy),int(main.numCtrls)):
+ pool = []
+ for cli in main.CLIs:
+ egressDevice = deviceDPIDsCopy[i]
+ ingressDeviceList = copy.copy(deviceDPIDsCopy)
+ ingressDeviceList.remove(egressDevice)
+ if i >= len( deviceDPIDsCopy ):
+ break
+ t = main.Thread( target=cli.addMultipointToSinglepointIntent,
+ threadID=main.threadID,
+ name="addMultipointToSinglepointIntent",
+ args =[ingressDeviceList,egressDevice,portIngressList,'1','','',main.MACsDict.get(egressDevice)])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ time2 = time.time()
+ main.log.info("Time for adding point intents: %2f seconds" %(time2-time1))
+
+ main.step("Verify intents are installed")
+ # Giving onos multiple chances to install intents
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentState = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ IntentStateIndividual = main.CLIs[e].checkIntentState( intentsId=intentIdList )
+ if not IntentStateIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentState = intentState and IntentStateIndividual
+ if intentState:
+ break
+ if not intentState:
+ #Dumping intent summary
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step("Verify flows are all added")
+
+ for i in range( main.flowCheck ):
+ if i != 0:
+ main.log.warn( "verification failed. Retrying..." )
+ main.log.info( "Waiting for onos to add flows..." )
+ time.sleep( main.checkFlowsDelay )
+
+ flowState = main.TRUE
+ for cli in main.CLIs:
+ flowState = cli.checkFlowState()
+ if not flowState:
+ main.log.warn( "Not all flows added" )
+ if flowState:
+ break
+ else:
+ #Dumping summary
+ main.log.info( "Summary:\n" + str( main.ONOScli1.summary(jsonFormat=False) ) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=flowState,
+ onpass="FLOWS INSTALLED",
+ onfail="SOME FLOWS NOT ADDED" )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ caseResult = ( checkFlowsState and pingResult and intentState )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 25 multi to single point Intents and Ping All test PASS",
+ onfail="Install 25 multi to single point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not checkFlowsState:
+ main.log.debug( "Flows failed to add completely" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE94( self ):
+ """
+ Install multi-single point intents and verify Ping all works
+ for Chordal topology
+ """
+ import copy
+ import time
+ main.log.report( "Install multi-single point intents and verify Ping all" )
+ main.log.report( "___________________________________________" )
+ main.case( "Install multi-single point intents and Ping all" )
+ deviceDPIDsCopy = copy.copy(main.deviceDPIDs)
+ portIngressList = ['1']*(len(deviceDPIDsCopy) - 1)
+ intentIdList = []
+ main.log.info( "MACsDict" + str(main.MACsDict) )
+ time1 = time.time()
+ for i in xrange(0,len(deviceDPIDsCopy),int(main.numCtrls)):
+ pool = []
+ for cli in main.CLIs:
+ egressDevice = deviceDPIDsCopy[i]
+ ingressDeviceList = copy.copy(deviceDPIDsCopy)
+ ingressDeviceList.remove(egressDevice)
+ if i >= len( deviceDPIDsCopy ):
+ break
+ t = main.Thread( target=cli.addMultipointToSinglepointIntent,
+ threadID=main.threadID,
+ name="addMultipointToSinglepointIntent",
+ args =[ingressDeviceList,egressDevice,portIngressList,'1','','',main.MACsDict.get(egressDevice)])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ time2 = time.time()
+ main.log.info("Time for adding point intents: %2f seconds" %(time2-time1))
+
+ main.step("Verify intents are installed")
+ # Giving onos multiple chances to install intents
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentState = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ IntentStateIndividual = main.CLIs[e].checkIntentState( intentsId=intentIdList )
+ if not IntentStateIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentState = intentState and IntentStateIndividual
+ if intentState:
+ break
+ if not intentState:
+ #Dumping intent summary
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step("Verify flows are all added")
+
+ for i in range( main.flowCheck ):
+ if i != 0:
+ main.log.warn( "verification failed. Retrying..." )
+ main.log.info( "Waiting for onos to add flows..." )
+ time.sleep( main.checkFlowsDelay )
+
+ flowState = main.TRUE
+ for cli in main.CLIs:
+ flowState = cli.checkFlowState()
+ if not flowState:
+ main.log.warn( "Not all flows added" )
+ if flowState:
+ break
+ else:
+ #Dumping summary
+ main.log.info( "Summary:\n" + str( main.ONOScli1.summary(jsonFormat=False) ) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=flowState,
+ onpass="FLOWS INSTALLED",
+ onfail="SOME FLOWS NOT ADDED" )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ caseResult = ( checkFlowsState and pingResult and intentState )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 25 multi to single point Intents and Ping All test PASS",
+ onfail="Install 25 multi to single point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not checkFlowsState:
+ main.log.debug( "Flows failed to add completely" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE95( self ):
+ """
+ Install multi-single point intents and verify Ping all works
+ for Spine topology
+ """
+ import copy
+ import time
+ main.log.report( "Install multi-single point intents and verify Ping all" )
+ main.log.report( "___________________________________________" )
+ main.case( "Install multi-single point intents and Ping all" )
+ deviceDPIDsCopy = copy.copy(main.deviceDPIDs)
+ portIngressList = ['1']*(len(deviceDPIDsCopy) - 1)
+ intentIdList = []
+ main.log.info( "MACsDict" + str(main.MACsDict) )
+ time1 = time.time()
+ for i in xrange(0,len(deviceDPIDsCopy),int(main.numCtrls)):
+ pool = []
+ for cli in main.CLIs:
+ egressDevice = deviceDPIDsCopy[i]
+ ingressDeviceList = copy.copy(deviceDPIDsCopy)
+ ingressDeviceList.remove(egressDevice)
+ if i >= len( deviceDPIDsCopy ):
+ break
+ t = main.Thread( target=cli.addMultipointToSinglepointIntent,
+ threadID=main.threadID,
+ name="addMultipointToSinglepointIntent",
+ args =[ingressDeviceList,egressDevice,portIngressList,'1','','',main.MACsDict.get(egressDevice)])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ time2 = time.time()
+ main.log.info("Time for adding point intents: %2f seconds" %(time2-time1))
+
+ main.step("Verify intents are installed")
+ # Giving onos multiple chances to install intents
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentState = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ IntentStateIndividual = main.CLIs[e].checkIntentState( intentsId=intentIdList )
+ if not IntentStateIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentState = intentState and IntentStateIndividual
+ if intentState:
+ break
+ if not intentState:
+ #Dumping intent summary
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step("Verify flows are all added")
+
+ for i in range( main.flowCheck ):
+ if i != 0:
+ main.log.warn( "verification failed. Retrying..." )
+ main.log.info( "Waiting for onos to add flows..." )
+ time.sleep( main.checkFlowsDelay )
+
+ flowState = main.TRUE
+ for cli in main.CLIs:
+ flowState = cli.checkFlowState()
+ if not flowState:
+ main.log.warn( "Not all flows added" )
+ if flowState:
+ break
+ else:
+ #Dumping summary
+ main.log.info( "Summary:\n" + str( main.ONOScli1.summary(jsonFormat=False) ) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=flowState,
+ onpass="FLOWS INSTALLED",
+ onfail="SOME FLOWS NOT ADDED" )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ caseResult = ( checkFlowsState and pingResult and intentState )
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 25 multi to single point Intents and Ping All test PASS",
+ onfail="Install 25 multi to single point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not checkFlowsState:
+ main.log.debug( "Flows failed to add completely" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE96( self ):
+ """
+ Install single-multi point intents and verify Ping all works
+ for att topology
+ """
+ import copy
+ main.log.report( "Install single-multi point intents and verify Ping all" )
+ main.log.report( "___________________________________________" )
+ main.case( "Install single-multi point intents and Ping all" )
+ deviceDPIDsCopy = copy.copy(main.deviceDPIDs)
+ portEgressList = ['1']*(len(deviceDPIDsCopy) - 1)
+ intentIdList = []
+ main.log.info( "MACsDict" + str(main.MACsDict) )
+ time1 = time.time()
+ for i in xrange(0,len(deviceDPIDsCopy),int(main.numCtrls)):
+ pool = []
+ for cli in main.CLIs:
+ ingressDevice = deviceDPIDsCopy[i]
+ egressDeviceList = copy.copy(deviceDPIDsCopy)
+ egressDeviceList.remove(ingressDevice)
+ if i >= len( deviceDPIDsCopy ):
+ break
+ t = main.Thread( target=cli.addSinglepointToMultipointIntent,
+ threadID=main.threadID,
+ name="addSinglepointToMultipointIntent",
+ args =[ingressDevice,egressDeviceList,'1',portEgressList,'',main.MACsDict.get(ingressDevice)])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ time2 = time.time()
+ main.log.info("Time for adding point intents: %2f seconds" %(time2-time1))
+
+ main.step("Verify intents are installed")
+ # Giving onos multiple chances to install intents
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentState = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ IntentStateIndividual = main.CLIs[e].checkIntentState( intentsId=intentIdList )
+ if not IntentStateIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentState = intentState and IntentStateIndividual
+ if intentState:
+ break
+ if not intentState:
+ #Dumping intent summary
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step("Verify flows are all added")
+
+ for i in range( main.flowCheck ):
+ if i != 0:
+ main.log.warn( "verification failed. Retrying..." )
+ main.log.info( "Waiting for onos to add flows..." )
+ time.sleep( main.checkFlowsDelay )
+
+ flowState = main.TRUE
+ for cli in main.CLIs:
+ flowState = cli.checkFlowState()
+ if not flowState:
+ main.log.warn( "Not all flows added" )
+ if flowState:
+ break
+ else:
+ #Dumping summary
+ main.log.info( "Summary:\n" + str( main.ONOScli1.summary(jsonFormat=False) ) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=flowState,
+ onpass="FLOWS INSTALLED",
+ onfail="SOME FLOWS NOT ADDED" )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ caseResult = ( pingResult and intentState and flowState)
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 25 single to multi point Intents and Ping All test PASS",
+ onfail="Install 25 single to multi point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not checkFlowsState:
+ main.log.debug( "Flows failed to add completely" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE97( self ):
+ """
+ Install single-multi point intents and verify Ping all works
+ for Chordal topology
+ """
+ import copy
+ main.log.report( "Install single-multi point intents and verify Ping all" )
+ main.log.report( "___________________________________________" )
+ main.case( "Install single-multi point intents and Ping all" )
+ deviceDPIDsCopy = copy.copy(main.deviceDPIDs)
+ portEgressList = ['1']*(len(deviceDPIDsCopy) - 1)
+ intentIdList = []
+ main.log.info( "MACsDict" + str(main.MACsDict) )
+ time1 = time.time()
+ for i in xrange(0,len(deviceDPIDsCopy),int(main.numCtrls)):
+ pool = []
+ for cli in main.CLIs:
+ ingressDevice = deviceDPIDsCopy[i]
+ egressDeviceList = copy.copy(deviceDPIDsCopy)
+ egressDeviceList.remove(ingressDevice)
+ if i >= len( deviceDPIDsCopy ):
+ break
+ t = main.Thread( target=cli.addSinglepointToMultipointIntent,
+ threadID=main.threadID,
+ name="addSinglepointToMultipointIntent",
+ args =[ingressDevice,egressDeviceList,'1',portEgressList,'',main.MACsDict.get(ingressDevice),''])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ time2 = time.time()
+ main.log.info("Time for adding point intents: %2f seconds" %(time2-time1))
+
+ main.step("Verify intents are installed")
+ # Giving onos multiple chances to install intents
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentState = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ IntentStateIndividual = main.CLIs[e].checkIntentState( intentsId=intentIdList )
+ if not IntentStateIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentState = intentState and IntentStateIndividual
+ if intentState:
+ break
+ if not intentState:
+ #Dumping intent summary
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step("Verify flows are all added")
+
+ for i in range( main.flowCheck ):
+ if i != 0:
+ main.log.warn( "verification failed. Retrying..." )
+ main.log.info( "Waiting for onos to add flows..." )
+ time.sleep( main.checkFlowsDelay )
+
+ flowState = main.TRUE
+ for cli in main.CLIs:
+ flowState = cli.checkFlowState()
+ if not flowState:
+ main.log.warn( "Not all flows added" )
+ if flowState:
+ break
+ else:
+ #Dumping summary
+ main.log.info( "Summary:\n" + str( main.ONOScli1.summary(jsonFormat=False) ) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=flowState,
+ onpass="FLOWS INSTALLED",
+ onfail="SOME FLOWS NOT ADDED" )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ caseResult = ( pingResult and intentState and flowState)
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 25 single to multi point Intents and Ping All test PASS",
+ onfail="Install 25 single to multi point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not checkFlowsState:
+ main.log.debug( "Flows failed to add completely" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE98( self ):
+ """
+ Install single-multi point intents and verify Ping all works
+ for Spine topology
+ """
+ import copy
+ main.log.report( "Install single-multi point intents and verify Ping all" )
+ main.log.report( "___________________________________________" )
+ main.case( "Install single-multi point intents and Ping all" )
+ deviceDPIDsCopy = copy.copy( main.deviceDPIDs )
+ deviceDPIDsCopy = deviceDPIDsCopy[ 10: ]
+ portEgressList = [ '1' ]*(len(deviceDPIDsCopy) - 1)
+ intentIdList = []
+ MACsDictCopy = {}
+ for i in range( len( deviceDPIDsCopy ) ):
+ MACsDictCopy[ deviceDPIDsCopy[ i ] ] = main.hostMACs[i].split( '/' )[ 0 ]
+
+ main.log.info( "deviceDPIDsCopy" + str(deviceDPIDsCopy) )
+ main.log.info( "MACsDictCopy" + str(MACsDictCopy) )
+ time1 = time.time()
+ for i in xrange(0,len(deviceDPIDsCopy),int(main.numCtrls)):
+ pool = []
+ for cli in main.CLIs:
+ if i >= len( deviceDPIDsCopy ):
+ break
+ ingressDevice = deviceDPIDsCopy[i]
+ egressDeviceList = copy.copy(deviceDPIDsCopy)
+ egressDeviceList.remove(ingressDevice)
+ t = main.Thread( target=cli.addSinglepointToMultipointIntent,
+ threadID=main.threadID,
+ name="addSinglepointToMultipointIntent",
+ args =[ingressDevice,egressDeviceList,'1',portEgressList,'',MACsDictCopy.get(ingressDevice),''])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ time2 = time.time()
+ main.log.info("Time for adding point intents: %2f seconds" %(time2-time1))
+
+ main.step("Verify intents are installed")
+ # Giving onos multiple chances to install intents
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentState = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ IntentStateIndividual = main.CLIs[e].checkIntentState( intentsId=intentIdList )
+ if not IntentStateIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentState = intentState and IntentStateIndividual
+ if intentState:
+ break
+ if not intentState:
+ #Dumping intent summary
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=intentState,
+ onpass="INTENTS INSTALLED",
+ onfail="SOME INTENTS NOT INSTALLED" )
+
+ main.step("Verify flows are all added")
+
+ for i in range( main.flowCheck ):
+ if i != 0:
+ main.log.warn( "verification failed. Retrying..." )
+ main.log.info( "Waiting for onos to add flows..." )
+ time.sleep( main.checkFlowsDelay )
+
+ flowState = main.TRUE
+ for cli in main.CLIs:
+ flowState = cli.checkFlowState()
+ if not flowState:
+ main.log.warn( "Not all flows added" )
+ if flowState:
+ break
+ else:
+ #Dumping summary
+ main.log.info( "Summary:\n" + str( main.ONOScli1.summary(jsonFormat=False) ) )
+
+ utilities.assert_equals( expect=main.TRUE, actual=flowState,
+ onpass="FLOWS INSTALLED",
+ onfail="SOME FLOWS NOT ADDED" )
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ caseResult = ( pingResult and intentState and flowState)
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="Install 25 single to multi point Intents and Ping All test PASS",
+ onfail="Install 25 single to multi point Intents and Ping All test FAIL" )
+
+ if not intentState:
+ main.log.debug( "Intents failed to install completely" )
+ if not pingResult:
+ main.log.debug( "Pingall failed" )
+ if not checkFlowsState:
+ main.log.debug( "Flows failed to add completely" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE190( self ):
+ """
+ Verify IPv6 ping across 600 Point intents (Att Topology)
+ """
+ main.log.report( "Verify IPv6 ping across 600 Point intents (Att Topology)" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all 600 Point intents" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 600 Point intents test PASS",
+ onfail="IPv6 Ping across 600 Point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE191( self ):
+ """
+ Verify IPv6 ping across 600 Point intents (Chordal Topology)
+ """
+ main.log.report( "Verify IPv6 ping across 600 Point intents (Chordal Topology)" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all 600 Point intents" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 600 Point intents test PASS",
+ onfail="IPv6 Ping across 600 Point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE192( self ):
+ """
+ Verify IPv6 ping across 4556 Point intents (Spine Topology)
+ """
+ main.log.report( "Verify IPv6 ping across 4556 Point intents (Spine Topology)" )
+ main.log.report( "_________________________________________________" )
+ main.case( "IPv6 ping all 4556 Point intents" )
+
+ main.step( "Verify IPv6 Ping across all hosts" )
+ pingResult = main.CHOtestFunctions.checkPingall( protocol="IPv6" )
+ utilities.assert_equals( expect=main.TRUE,
+ actual=pingResult,
+ onpass="PING ALL PASS",
+ onfail="PING ALL FAIL" )
+
+ caseResult = pingResult
+ utilities.assert_equals(
+ expect=main.TRUE,
+ actual=caseResult,
+ onpass="IPv6 Ping across 4556 Point intents test PASS",
+ onfail="IPv6 Ping across 4556 Point intents test FAIL" )
+
+ if not caseResult and main.failSwitch:
+ main.log.report("Stopping test")
+ main.stop( email=main.emailOnStop )
+
+ def CASE10( self ):
+ import time
+ import re
+ """
+ Remove all Intents
+ """
+ main.log.report( "Remove all intents that were installed previously" )
+ main.log.report( "______________________________________________" )
+ main.log.info( "Remove all intents" )
+ main.case( "Removing intents" )
+ purgeDelay = int( main.params[ "timers" ][ "IntentPurgeDelay" ] )
+ main.step( "Obtain the intent id's first" )
+ intentsList = main.ONOScli1.getAllIntentIds()
+ ansi_escape = re.compile( r'\x1b[^m]*m' )
+ intentsList = ansi_escape.sub( '', intentsList )
+ intentsList = intentsList.replace(
+ " onos:intents | grep id=",
+ "" ).replace(
+ "id=",
+ "" ).replace(
+ "\r\r",
+ "" )
+ intentsList = intentsList.splitlines()
+ intentIdList = []
+ step1Result = main.TRUE
+ moreIntents = main.TRUE
+ removeIntentCount = 0
+ intentsCount = len(intentsList)
+ main.log.info ( "Current number of intents: " + str(intentsCount) )
+
+ main.step( "Remove all installed intents" )
+ if ( len( intentsList ) > 1 ):
+ results = main.TRUE
+ main.log.info("Removing intent...")
+ while moreIntents:
+ # This is a work around only: cycle through intents removal for up to 5 times.
+ if removeIntentCount == 5:
+ break
+ removeIntentCount = removeIntentCount + 1
+ intentsList1 = main.ONOScli1.getAllIntentIds()
+ if len( intentsList1 ) == 0:
+ break
+ ansi_escape = re.compile( r'\x1b[^m]*m' )
+ intentsList1 = ansi_escape.sub( '', intentsList1 )
+ intentsList1 = intentsList1.replace(
+ " onos:intents | grep id=",
+ "" ).replace(
+ " state=",
+ "" ).replace(
+ "\r\r",
+ "" )
+ intentsList1 = intentsList1.splitlines()
+ main.log.info ( "Round %d intents to remove: " %(removeIntentCount) )
+ print intentsList1
+ intentIdList1 = []
+ if ( len( intentsList1 ) > 0 ):
+ moreIntents = main.TRUE
+ for i in range( len( intentsList1 ) ):
+ intentsTemp1 = intentsList1[ i ].split( ',' )
+ intentIdList1.append( intentsTemp1[ 0 ].split('=')[1] )
+ main.log.info ( "Leftover Intent IDs: " + str(intentIdList1) )
+ main.log.info ( "Length of Leftover Intents list: " + str(len(intentIdList1)) )
+ time1 = time.time()
+ for i in xrange( 0, len( intentIdList1 ), int(main.numCtrls) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= len( intentIdList1 ):
+ break
+ t = main.Thread( target=cli.removeIntent,
+ threadID=main.threadID,
+ name="removeIntent",
+ args=[intentIdList1[i],'org.onosproject.cli',False,False])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append(thread.result)
+ #time.sleep(2)
+ time2 = time.time()
+ main.log.info("Time for removing host intents: %2f seconds" %(time2-time1))
+ time.sleep( purgeDelay )
+ main.log.info("Purging WITHDRAWN Intents")
+ purgeResult = main.ONOScli1.purgeWithdrawnIntents()
+ else:
+ time.sleep(10)
+ if len( main.ONOScli1.intents()):
+ continue
+ break
+ time.sleep( purgeDelay )
+ else:
+ print "Removed %d intents" %(intentsCount)
+ step1Result = main.TRUE
+ else:
+ print "No Intent IDs found in Intents list: ", intentsList
+ step1Result = main.FALSE
+
+ print main.ONOScli1.intents()
+
+ main.log.info( main.ONOScli1.summary( jsonFormat=False ) )
+ caseResult = step1Result
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Intent removal test successful",
+ onfail="Intent removal test failed" )
+
+ def CASE12( self, main ):
+ """
+ Enable onos-app-ifwd, Verify Intent based Reactive forwarding through ping all and Disable it
+ """
+ import re
+ import copy
+ import time
+
+ threadID = 0
+
+ main.log.report( "Enable Intent based Reactive forwarding and Verify ping all" )
+ main.log.report( "_____________________________________________________" )
+ main.case( "Enable Intent based Reactive forwarding and Verify ping all" )
+ main.step( "Enable intent based Reactive forwarding" )
+ installResult = main.FALSE
+ feature = "onos-app-ifwd"
+
+ pool = []
+ time1 = time.time()
+ for cli,feature in main.CLIs:
+ t = main.Thread(target=cli,threadID=threadID,
+ name="featureInstall",args=[feature])
+ pool.append(t)
+ t.start()
+ threadID = threadID + 1
+
+ results = []
+ for thread in pool:
+ thread.join()
+ results.append(thread.result)
+ time2 = time.time()
+
+ if( all(result == main.TRUE for result in results) == False):
+ main.log.info("Did not install onos-app-ifwd feature properly")
+ #main.cleanup()
+ #main.exit()
+ else:
+ main.log.info("Successful feature:install onos-app-ifwd")
+ installResult = main.TRUE
+ main.log.info("Time for feature:install onos-app-ifwd: %2f seconds" %(time2-time1))
+
+ main.step( "Verify Ping across all hosts" )
+ for i in range(main.numPings):
+ time1 = time.time()
+ pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(main.pingSleep)
+ else: break
+
+ time2 = time.time()
+ timeDiff = round( ( time2 - time1 ), 2 )
+ main.log.report(
+ "Time taken for Ping All: " +
+ str( timeDiff ) +
+ " seconds" )
+
+ if pingResult == main.TRUE:
+ main.log.report( "Pingall Test in Reactive mode successful" )
+ else:
+ main.log.report( "Pingall Test in Reactive mode failed" )
+
+ main.step( "Disable Intent based Reactive forwarding" )
+ uninstallResult = main.FALSE
+
+ pool = []
+ time1 = time.time()
+ for cli,feature in main.CLIs:
+ t = main.Thread(target=cli,threadID=threadID,
+ name="featureUninstall",args=[feature])
+ pool.append(t)
+ t.start()
+ threadID = threadID + 1
+
+ results = []
+ for thread in pool:
+ thread.join()
+ results.append(thread.result)
+ time2 = time.time()
+
+ if( all(result == main.TRUE for result in results) == False):
+ main.log.info("Did not uninstall onos-app-ifwd feature properly")
+ uninstallResult = main.FALSE
+ #main.cleanup()
+ #main.exit()
+ else:
+ main.log.info("Successful feature:uninstall onos-app-ifwd")
+ uninstallResult = main.TRUE
+ main.log.info("Time for feature:uninstall onos-app-ifwd: %2f seconds" %(time2-time1))
+
+ # Waiting for reative flows to be cleared.
+ time.sleep( 10 )
+
+ caseResult = installResult and pingResult and uninstallResult
+ utilities.assert_equals( expect=main.TRUE, actual=caseResult,
+ onpass="Intent based Reactive forwarding Pingall test PASS",
+ onfail="Intent based Reactive forwarding Pingall test FAIL" )
diff --git a/TestON/tests/CHO/CHOtest/CHOtest.topo b/TestON/tests/CHO/CHOtest/CHOtest.topo
new file mode 100644
index 0000000..01801e7
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/CHOtest.topo
@@ -0,0 +1,50 @@
+<TOPOLOGY>
+ <COMPONENT>
+
+ <ONOSbench>
+ <host>localhost</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosDriver</type>
+ <connect_order>1</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOSbench>
+
+ <ONOScli1>
+ <host>localhost</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosCliDriver</type>
+ <connect_order>2</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOScli1>
+
+ <ONOScli2>
+ <host>localhost</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosCliDriver</type>
+ <connect_order>3</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOScli2>
+
+ <ONOScli3>
+ <host>localhost</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosCliDriver</type>
+ <connect_order>4</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOScli3>
+
+ <Mininet1>
+ <host>OCN</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>MininetCliDriver</type>
+ <connect_order>12</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </Mininet1>
+
+ </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/CHO/CHOtest/README b/TestON/tests/CHO/CHOtest/README
new file mode 100644
index 0000000..1e8720a
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/README
@@ -0,0 +1,40 @@
+CHO TEST
+
+Summary:
+ This is a long-term regression test that is aimed to run
+ for weeks at a time. It's goal is to find memory leaks or bugs that
+ otherwise cannot be easily seen with short-term tests. The following
+ is an overview of the steps that are performed in this test.
+ Steps:
+ - Discover IPv4 and IPv6 hosts
+ - Add host intents
+ - Ping all hosts
+ - Bring links down
+ - Ping all hosts
+ - Bring links back up
+ - Ping all hosts
+ - remove intents
+
+ These steps are iterated over and over again. The number of iterations can
+ be found in the params file.
+
+Topology:
+ Att topology - 25 switches and 25 hosts and its structure is designed to simulate
+ a real world configuration,
+ Chordal topology - 25 swithces and 25 hosts and because of its chordal graph structure,
+ it's particulary useful in testing the rerouting capability of ONOS.
+ Leaf-spine topology - 78 switches and 68 hosts and designed to simulate modern data centers.
+
+Pre-requisites:
+ To run out-of-the box this test requires 3 NODES. The cell file
+ must be passed through the startup test command, e.g.,
+
+ ./cli.py run CHOtest onoscell <cell name>.
+
+ Passwordless login must be set from TestStation "sdn" root user.
+ This test relies on the topology files to start Mininet located in
+ the dependencies folder. Be sure to check that each topology file can
+ be loaded properly by Mininet by using this command:
+
+ sudo ~/<dependencies path>/<topology name>
+
diff --git a/TestON/tests/CHO/CHOtest/__init__.py b/TestON/tests/CHO/CHOtest/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/__init__.py
diff --git a/TestON/tests/CHO/CHOtest/dependencies/CHOtestFunctions.py b/TestON/tests/CHO/CHOtest/dependencies/CHOtestFunctions.py
new file mode 100644
index 0000000..7441a5b
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/CHOtestFunctions.py
@@ -0,0 +1,152 @@
+"""
+Wrapper functions for CHOtest
+Author: you@onlab.us
+"""
+
+def __init__( self ):
+ self.default = ''
+
+def installHostIntents():
+ """
+ Install one host intent for each combination of hosts in the topology
+ """
+ import itertools
+ import time
+
+ hostCombos = list( itertools.combinations( main.hostMACs, 2 ) )
+ intentIdList = []
+ for i in xrange( 0, len( hostCombos ), int( main.numCtrls ) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= len( hostCombos ):
+ break
+ t = main.Thread( target=cli.addHostIntent,
+ threadID=main.threadID,
+ name="addHostIntent",
+ args=[hostCombos[i][0],
+ hostCombos[i][1]])
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append( thread.result )
+
+ return intentIdList
+
+def installPointIntents():
+ """
+ Install one point intent for each permutation of devices in the topology
+ """
+ import itertools
+ import time
+
+ if main.prefix == 2:
+ # Spine-leaf topology is a special case
+ for i in range( len( main.hostMACs ) ):
+ main.MACsDict[ main.deviceDPIDs[ i+10 ] ] = main.hostMACs[ i ].split('/')[0]
+ deviceCombos = list( itertools.permutations( main.deviceDPIDs[10:], 2 ) )
+ else:
+ deviceCombos = list( itertools.permutations( main.deviceDPIDs, 2 ) )
+ intentIdList = []
+ time1 = time.time()
+ for i in xrange( 0, len( deviceCombos ), int( main.numCtrls ) ):
+ pool = []
+ for cli in main.CLIs:
+ if i >= len( deviceCombos ):
+ break
+ t = main.Thread( target=cli.addPointIntent,
+ threadID=main.threadID,
+ name="addPointIntent",
+ args=[ deviceCombos[i][0],
+ deviceCombos[i][1],
+ 1, 1, '',
+ main.MACsDict.get( deviceCombos[i][0] ),
+ main.MACsDict.get( deviceCombos[i][1] ) ] )
+ pool.append(t)
+ t.start()
+ i = i + 1
+ main.threadID = main.threadID + 1
+ for thread in pool:
+ thread.join()
+ intentIdList.append( thread.result )
+ time2 = time.time()
+ main.log.info("Time taken for adding point intents: %2f seconds" %( time2 - time1 ) )
+
+ return intentIdList
+
+def checkIntents():
+ """
+ Check if all the intents are in INSTALLED state
+ """
+ import time
+
+ intentResult = main.TRUE
+ for i in range( main.intentCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info("Waiting for onos to install intents...")
+ time.sleep( main.checkIntentsDelay )
+
+ intentResult = main.TRUE
+ for e in range(int(main.numCtrls)):
+ main.log.info( "Checking intents on CLI %s" % (e+1) )
+ intentResultIndividual = main.CLIs[e].checkIntentState( intentsId=main.intentIds )
+ if not intentResultIndividual:
+ main.log.warn( "Not all intents installed on ONOS%s" % (e+1) )
+ intentResult = intentResult and intentResultIndividual
+ if intentResult:
+ break
+ if not intentResult:
+ main.log.info( "**** Intent Summary ****\n" + str(main.ONOScli1.intents( jsonFormat=False, summary=True)) )
+
+ return intentResult
+
+def checkPingall( protocol="IPv4" ):
+ """
+ Verify ping across all hosts
+ """
+ import time
+
+ pingResult = main.TRUE
+ for i in range( main.numPings ):
+ if i != 0:
+ main.log.warn( "Pingall failed. Retrying..." )
+ main.log.info( "Giving ONOS some time...")
+ time.sleep( main.pingSleep )
+
+ pingResult = main.Mininet1.pingall( protocol=protocol, timeout=main.pingTimeout )
+ if pingResult:
+ break
+
+ return pingResult
+
+def checkLinkEvents( linkEvent, linkNum ):
+ """
+ Verify link down/up events are correctly discovered by ONOS
+ linkNum: the correct link number after link down/up
+ """
+ import time
+
+ linkResult = main.TRUE
+ for i in range( main.linkCheck ):
+ if i != 0:
+ main.log.warn( "Verification failed. Retrying..." )
+ main.log.info( "Giving ONOS some time..." )
+ time.sleep( main.linkSleep )
+
+ linkResult = main.TRUE
+ for e in range( int( main.numCtrls ) ):
+ main.log.info( "Checking link number on ONOS%s" % (e+1) )
+ topology_output = main.CLIs[e].topology()
+ linkResultIndividual = main.ONOSbench.checkStatus( topology_output,
+ main.numMNswitches,
+ str( linkNum ) )
+ if not linkResultIndividual:
+ main.log.warn( "Link %s not discovered by ONOS%s" % ( linkEvent, (e+1) ) )
+ linkResult = linkResult and linkResultIndividual
+ if linkResult:
+ break
+
+ return linkResult
diff --git a/TestON/tests/CHO/CHOtest/dependencies/topoAtt.py b/TestON/tests/CHO/CHOtest/dependencies/topoAtt.py
new file mode 100755
index 0000000..4291f8b
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/topoAtt.py
@@ -0,0 +1,182 @@
+#!/usr/bin/python
+
+"""
+Custom topology for Mininet
+"""
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import RemoteController
+from mininet.node import Node
+from mininet.node import CPULimitedHost
+from mininet.link import TCLink
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class attTopo( Topo ):
+
+ def __init__( self, **opts ):
+ "Create a topology."
+
+ # Initialize Topology
+ Topo.__init__( self, **opts )
+
+ # add nodes, switches first...
+ NY54 = self.addSwitch( 's1' )
+ CMBR = self.addSwitch( 's2' )
+ CHCG = self.addSwitch( 's3' )
+ CLEV = self.addSwitch( 's4' )
+ RLGH = self.addSwitch( 's5' )
+ ATLN = self.addSwitch( 's6' )
+ PHLA = self.addSwitch( 's7' )
+ WASH = self.addSwitch( 's8' )
+ NSVL = self.addSwitch( 's9' )
+ STLS = self.addSwitch( 's10' )
+ NWOR = self.addSwitch( 's11' )
+ HSTN = self.addSwitch( 's12' )
+ SNAN = self.addSwitch( 's13' )
+ DLLS = self.addSwitch( 's14' )
+ ORLD = self.addSwitch( 's15' )
+ DNVR = self.addSwitch( 's16' )
+ KSCY = self.addSwitch( 's17' )
+ SNFN = self.addSwitch( 's18' )
+ SCRM = self.addSwitch( 's19' )
+ PTLD = self.addSwitch( 's20' )
+ STTL = self.addSwitch( 's21' )
+ SLKC = self.addSwitch( 's22' )
+ LA03 = self.addSwitch( 's23' )
+ SNDG = self.addSwitch( 's24' )
+ PHNX = self.addSwitch( 's25' )
+
+ # ... and now hosts
+ NY54_host = self.addHost( 'h1' )
+ CMBR_host = self.addHost( 'h2' )
+ CHCG_host = self.addHost( 'h3' )
+ CLEV_host = self.addHost( 'h4' )
+ RLGH_host = self.addHost( 'h5' )
+ ATLN_host = self.addHost( 'h6' )
+ PHLA_host = self.addHost( 'h7' )
+ WASH_host = self.addHost( 'h8' )
+ NSVL_host = self.addHost( 'h9' )
+ STLS_host = self.addHost( 'h10' )
+ NWOR_host = self.addHost( 'h11' )
+ HSTN_host = self.addHost( 'h12' )
+ SNAN_host = self.addHost( 'h13' )
+ DLLS_host = self.addHost( 'h14' )
+ ORLD_host = self.addHost( 'h15' )
+ DNVR_host = self.addHost( 'h16' )
+ KSCY_host = self.addHost( 'h17' )
+ SNFN_host = self.addHost( 'h18' )
+ SCRM_host = self.addHost( 'h19' )
+ PTLD_host = self.addHost( 'h20' )
+ STTL_host = self.addHost( 'h21' )
+ SLKC_host = self.addHost( 'h22' )
+ LA03_host = self.addHost( 'h23' )
+ SNDG_host = self.addHost( 'h24' )
+ PHNX_host = self.addHost( 'h25' )
+
+ # add edges between switch and corresponding host
+ self.addLink( NY54 , NY54_host )
+ self.addLink( CMBR , CMBR_host )
+ self.addLink( CHCG , CHCG_host )
+ self.addLink( CLEV , CLEV_host )
+ self.addLink( RLGH , RLGH_host )
+ self.addLink( ATLN , ATLN_host )
+ self.addLink( PHLA , PHLA_host )
+ self.addLink( WASH , WASH_host )
+ self.addLink( NSVL , NSVL_host )
+ self.addLink( STLS , STLS_host )
+ self.addLink( NWOR , NWOR_host )
+ self.addLink( HSTN , HSTN_host )
+ self.addLink( SNAN , SNAN_host )
+ self.addLink( DLLS , DLLS_host )
+ self.addLink( ORLD , ORLD_host )
+ self.addLink( DNVR , DNVR_host )
+ self.addLink( KSCY , KSCY_host )
+ self.addLink( SNFN , SNFN_host )
+ self.addLink( SCRM , SCRM_host )
+ self.addLink( PTLD , PTLD_host )
+ self.addLink( STTL , STTL_host )
+ self.addLink( SLKC , SLKC_host )
+ self.addLink( LA03 , LA03_host )
+ self.addLink( SNDG , SNDG_host )
+ self.addLink( PHNX , PHNX_host )
+
+ # add edges between switches
+ self.addLink( NY54 , CMBR, bw=10, delay='0.979030824185ms')
+ self.addLink( NY54 , CHCG, bw=10, delay='0.806374975652ms')
+ self.addLink( NY54 , PHLA, bw=10, delay='0.686192970166ms')
+ self.addLink( NY54 , WASH, bw=10, delay='0.605826192092ms')
+ self.addLink( CMBR , PHLA, bw=10, delay='1.4018238197ms')
+ self.addLink( CHCG , CLEV, bw=10, delay='0.232315346482ms')
+ self.addLink( CHCG , PHLA, bw=10, delay='1.07297714274ms')
+ self.addLink( CHCG , STLS, bw=10, delay='1.12827896944ms')
+ self.addLink( CHCG , DNVR, bw=10, delay='1.35964770335ms')
+ self.addLink( CHCG , KSCY, bw=10, delay='1.5199778541ms')
+ self.addLink( CHCG , SNFN, bw=10, delay='0.620743405435ms')
+ self.addLink( CHCG , STTL, bw=10, delay='0.93027212534ms')
+ self.addLink( CHCG , SLKC, bw=10, delay='0.735621751348ms')
+ self.addLink( CLEV , NSVL, bw=10, delay='0.523419372248ms')
+ self.addLink( CLEV , STLS, bw=10, delay='1.00360290845ms')
+ self.addLink( CLEV , PHLA, bw=10, delay='0.882912133249ms')
+ self.addLink( RLGH , ATLN, bw=10, delay='1.1644489729ms')
+ self.addLink( RLGH , WASH, bw=10, delay='1.48176810502ms')
+ self.addLink( ATLN , WASH, bw=10, delay='0.557636936322ms')
+ self.addLink( ATLN , NSVL, bw=10, delay='1.32869749865ms')
+ self.addLink( ATLN , STLS, bw=10, delay='0.767705554748ms')
+ self.addLink( ATLN , DLLS, bw=10, delay='0.544782086448ms')
+ self.addLink( ATLN , ORLD, bw=10, delay='1.46119152532ms')
+ self.addLink( PHLA , WASH, bw=10, delay='0.372209320106ms')
+ self.addLink( NSVL , STLS, bw=10, delay='1.43250491305ms')
+ self.addLink( NSVL , DLLS, bw=10, delay='1.67698215288ms')
+ self.addLink( STLS , DLLS, bw=10, delay='0.256389964194ms')
+ self.addLink( STLS , KSCY, bw=10, delay='0.395511571791ms')
+ self.addLink( STLS , LA03, bw=10, delay='0.257085227363ms')
+ self.addLink( NWOR , HSTN, bw=10, delay='0.0952906633914ms')
+ self.addLink( NWOR , DLLS, bw=10, delay='1.60231329739ms')
+ self.addLink( NWOR , ORLD, bw=10, delay='0.692731063896ms')
+ self.addLink( HSTN , SNAN, bw=10, delay='0.284150653798ms')
+ self.addLink( HSTN , DLLS, bw=10, delay='1.65690128332ms')
+ self.addLink( HSTN , ORLD, bw=10, delay='0.731886304782ms')
+ self.addLink( SNAN , PHNX, bw=10, delay='1.34258627257ms')
+ self.addLink( SNAN , DLLS, bw=10, delay='1.50063532341ms')
+ self.addLink( DLLS , DNVR, bw=10, delay='0.251471593235ms')
+ self.addLink( DLLS , KSCY, bw=10, delay='0.18026026737ms')
+ self.addLink( DLLS , SNFN, bw=10, delay='0.74304274592ms')
+ self.addLink( DLLS , LA03, bw=10, delay='0.506439293357ms')
+ self.addLink( DNVR , KSCY, bw=10, delay='0.223328790403ms')
+ self.addLink( DNVR , SNFN, bw=10, delay='0.889017541903ms')
+ self.addLink( DNVR , SLKC, bw=10, delay='0.631898982721ms')
+ self.addLink( KSCY , SNFN, bw=10, delay='0.922778522233ms')
+ self.addLink( SNFN , SCRM, bw=10, delay='0.630352278097ms')
+ self.addLink( SNFN , PTLD, bw=10, delay='0.828572513655ms')
+ self.addLink( SNFN , STTL, bw=10, delay='1.54076081649ms')
+ self.addLink( SNFN , SLKC, bw=10, delay='0.621507502625ms')
+ self.addLink( SNFN , LA03, bw=10, delay='0.602936230151ms')
+ self.addLink( SCRM , SLKC, bw=10, delay='0.461350343644ms')
+ self.addLink( PTLD , STTL, bw=10, delay='1.17591515181ms')
+ self.addLink( SLKC , LA03, bw=10, delay='0.243225267023ms')
+ self.addLink( LA03 , SNDG, bw=10, delay='0.681264950821ms')
+ self.addLink( LA03 , PHNX, bw=10, delay='0.343709457969ms')
+ self.addLink( SNDG , PHNX, bw=10, delay='0.345064487693ms')
+
+topos = { 'att': ( lambda: attTopo() ) }
+
+# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
+
+def setupNetwork():
+ "Create network"
+ topo = attTopo()
+ #if controller_ip == '':
+ #controller_ip = '10.0.2.2';
+ # controller_ip = '127.0.0.1';
+ network = Mininet(topo=topo, link=TCLink, autoSetMacs=True, controller=None)
+ network.start()
+ CLI( network )
+ network.stop()
+
+if __name__ == '__main__':
+ setLogLevel('info')
+ #setLogLevel('debug')
+ setupNetwork()
diff --git a/TestON/tests/CHO/CHOtest/dependencies/topoAttIpv6.py b/TestON/tests/CHO/CHOtest/dependencies/topoAttIpv6.py
new file mode 100755
index 0000000..f9a103c
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/topoAttIpv6.py
@@ -0,0 +1,188 @@
+#!/usr/bin/python
+
+"""
+Custom topology for Mininet
+"""
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import Host, RemoteController
+from mininet.node import Node
+from mininet.node import CPULimitedHost
+from mininet.link import TCLink
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class dualStackHost( Host ):
+ def config( self, v6Addr='1000:1/64', **params ):
+ r = super( Host, self ).config( **params )
+ intf = self.defaultIntf()
+ self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
+ return r
+
+class attTopo( Topo ):
+
+ def __init__( self, **opts ):
+ "Create a topology."
+
+ # Initialize Topology
+ Topo.__init__( self, **opts )
+
+ NY54 = self.addSwitch( 's1' )
+ CMBR = self.addSwitch( 's2' )
+ CHCG = self.addSwitch( 's3' )
+ CLEV = self.addSwitch( 's4' )
+ RLGH = self.addSwitch( 's5' )
+ ATLN = self.addSwitch( 's6' )
+ PHLA = self.addSwitch( 's7' )
+ WASH = self.addSwitch( 's8' )
+ NSVL = self.addSwitch( 's9' )
+ STLS = self.addSwitch( 's10' )
+ NWOR = self.addSwitch( 's11' )
+ HSTN = self.addSwitch( 's12' )
+ SNAN = self.addSwitch( 's13' )
+ DLLS = self.addSwitch( 's14' )
+ ORLD = self.addSwitch( 's15' )
+ DNVR = self.addSwitch( 's16' )
+ KSCY = self.addSwitch( 's17' )
+ SNFN = self.addSwitch( 's18' )
+ SCRM = self.addSwitch( 's19' )
+ PTLD = self.addSwitch( 's20' )
+ STTL = self.addSwitch( 's21' )
+ SLKC = self.addSwitch( 's22' )
+ LA03 = self.addSwitch( 's23' )
+ SNDG = self.addSwitch( 's24' )
+ PHNX = self.addSwitch( 's25' )
+
+ # ... and now hosts
+ NY54_host = self.addHost( 'h1', ip='10.1.0.1/24', cls=dualStackHost, v6Addr='1000::1/64' )
+ CMBR_host = self.addHost( 'h2', ip='10.1.0.2/24', cls=dualStackHost, v6Addr='1000::2/64' )
+ CHCG_host = self.addHost( 'h3', ip='10.1.0.3/24', cls=dualStackHost, v6Addr='1000::3/64' )
+ CLEV_host = self.addHost( 'h4', ip='10.1.0.4/24', cls=dualStackHost, v6Addr='1000::4/64' )
+ RLGH_host = self.addHost( 'h5', ip='10.1.0.5/24', cls=dualStackHost, v6Addr='1000::5/64' )
+ ATLN_host = self.addHost( 'h6', ip='10.1.0.6/24', cls=dualStackHost, v6Addr='1000::6/64' )
+ PHLA_host = self.addHost( 'h7', ip='10.1.0.7/24', cls=dualStackHost, v6Addr='1000::7/64' )
+ WASH_host = self.addHost( 'h8', ip='10.1.0.8/24', cls=dualStackHost, v6Addr='1000::8/64' )
+ NSVL_host = self.addHost( 'h9', ip='10.1.0.9/24', cls=dualStackHost, v6Addr='1000::9/64' )
+ STLS_host = self.addHost( 'h10', ip='10.1.0.10/24', cls=dualStackHost, v6Addr='1000::10/64' )
+ NWOR_host = self.addHost( 'h11', ip='10.1.0.11/24', cls=dualStackHost, v6Addr='1000::11/64' )
+ HSTN_host = self.addHost( 'h12', ip='10.1.0.12/24', cls=dualStackHost, v6Addr='1000::12/64' )
+ SNAN_host = self.addHost( 'h13', ip='10.1.0.13/24', cls=dualStackHost, v6Addr='1000::13/64' )
+ DLLS_host = self.addHost( 'h14', ip='10.1.0.14/24', cls=dualStackHost, v6Addr='1000::14/64' )
+ ORLD_host = self.addHost( 'h15', ip='10.1.0.15/24', cls=dualStackHost, v6Addr='1000::15/64' )
+ DNVR_host = self.addHost( 'h16', ip='10.1.0.16/24', cls=dualStackHost, v6Addr='1000::16/64' )
+ KSCY_host = self.addHost( 'h17', ip='10.1.0.17/24', cls=dualStackHost, v6Addr='1000::17/64' )
+ SNFN_host = self.addHost( 'h18', ip='10.1.0.18/24', cls=dualStackHost, v6Addr='1000::18/64' )
+ SCRM_host = self.addHost( 'h19', ip='10.1.0.19/24', cls=dualStackHost, v6Addr='1000::19/64' )
+ PTLD_host = self.addHost( 'h20', ip='10.1.0.20/24', cls=dualStackHost, v6Addr='1000::20/64' )
+ STTL_host = self.addHost( 'h21', ip='10.1.0.21/24', cls=dualStackHost, v6Addr='1000::21/64' )
+ SLKC_host = self.addHost( 'h22', ip='10.1.0.22/24', cls=dualStackHost, v6Addr='1000::22/64' )
+ LA03_host = self.addHost( 'h23', ip='10.1.0.23/24', cls=dualStackHost, v6Addr='1000::23/64' )
+ SNDG_host = self.addHost( 'h24', ip='10.1.0.24/24', cls=dualStackHost, v6Addr='1000::24/64' )
+ PHNX_host = self.addHost( 'h25', ip='10.1.0.25/24', cls=dualStackHost, v6Addr='1000::25/64' )
+
+ # add edges between switch and corresponding host
+ self.addLink( NY54 , NY54_host )
+ self.addLink( CMBR , CMBR_host )
+ self.addLink( CHCG , CHCG_host )
+ self.addLink( CLEV , CLEV_host )
+ self.addLink( RLGH , RLGH_host )
+ self.addLink( ATLN , ATLN_host )
+ self.addLink( PHLA , PHLA_host )
+ self.addLink( WASH , WASH_host )
+ self.addLink( NSVL , NSVL_host )
+ self.addLink( STLS , STLS_host )
+ self.addLink( NWOR , NWOR_host )
+ self.addLink( HSTN , HSTN_host )
+ self.addLink( SNAN , SNAN_host )
+ self.addLink( DLLS , DLLS_host )
+ self.addLink( ORLD , ORLD_host )
+ self.addLink( DNVR , DNVR_host )
+ self.addLink( KSCY , KSCY_host )
+ self.addLink( SNFN , SNFN_host )
+ self.addLink( SCRM , SCRM_host )
+ self.addLink( PTLD , PTLD_host )
+ self.addLink( STTL , STTL_host )
+ self.addLink( SLKC , SLKC_host )
+ self.addLink( LA03 , LA03_host )
+ self.addLink( SNDG , SNDG_host )
+ self.addLink( PHNX , PHNX_host )
+
+ # add edges between switches
+ self.addLink( NY54 , CMBR, bw=10, delay='0.979030824185ms')
+ self.addLink( NY54 , CHCG, bw=10, delay='0.806374975652ms')
+ self.addLink( NY54 , PHLA, bw=10, delay='0.686192970166ms')
+ self.addLink( NY54 , WASH, bw=10, delay='0.605826192092ms')
+ self.addLink( CMBR , PHLA, bw=10, delay='1.4018238197ms')
+ self.addLink( CHCG , CLEV, bw=10, delay='0.232315346482ms')
+ self.addLink( CHCG , PHLA, bw=10, delay='1.07297714274ms')
+ self.addLink( CHCG , STLS, bw=10, delay='1.12827896944ms')
+ self.addLink( CHCG , DNVR, bw=10, delay='1.35964770335ms')
+ self.addLink( CHCG , KSCY, bw=10, delay='1.5199778541ms')
+ self.addLink( CHCG , SNFN, bw=10, delay='0.620743405435ms')
+ self.addLink( CHCG , STTL, bw=10, delay='0.93027212534ms')
+ self.addLink( CHCG , SLKC, bw=10, delay='0.735621751348ms')
+ self.addLink( CLEV , NSVL, bw=10, delay='0.523419372248ms')
+ self.addLink( CLEV , STLS, bw=10, delay='1.00360290845ms')
+ self.addLink( CLEV , PHLA, bw=10, delay='0.882912133249ms')
+ self.addLink( RLGH , ATLN, bw=10, delay='1.1644489729ms')
+ self.addLink( RLGH , WASH, bw=10, delay='1.48176810502ms')
+ self.addLink( ATLN , WASH, bw=10, delay='0.557636936322ms')
+ self.addLink( ATLN , NSVL, bw=10, delay='1.32869749865ms')
+ self.addLink( ATLN , STLS, bw=10, delay='0.767705554748ms')
+ self.addLink( ATLN , DLLS, bw=10, delay='0.544782086448ms')
+ self.addLink( ATLN , ORLD, bw=10, delay='1.46119152532ms')
+ self.addLink( PHLA , WASH, bw=10, delay='0.372209320106ms')
+ self.addLink( NSVL , STLS, bw=10, delay='1.43250491305ms')
+ self.addLink( NSVL , DLLS, bw=10, delay='1.67698215288ms')
+ self.addLink( STLS , DLLS, bw=10, delay='0.256389964194ms')
+ self.addLink( STLS , KSCY, bw=10, delay='0.395511571791ms')
+ self.addLink( STLS , LA03, bw=10, delay='0.257085227363ms')
+ self.addLink( NWOR , HSTN, bw=10, delay='0.0952906633914ms')
+ self.addLink( NWOR , DLLS, bw=10, delay='1.60231329739ms')
+ self.addLink( NWOR , ORLD, bw=10, delay='0.692731063896ms')
+ self.addLink( HSTN , SNAN, bw=10, delay='0.284150653798ms')
+ self.addLink( HSTN , DLLS, bw=10, delay='1.65690128332ms')
+ self.addLink( HSTN , ORLD, bw=10, delay='0.731886304782ms')
+ self.addLink( SNAN , PHNX, bw=10, delay='1.34258627257ms')
+ self.addLink( SNAN , DLLS, bw=10, delay='1.50063532341ms')
+ self.addLink( DLLS , DNVR, bw=10, delay='0.251471593235ms')
+ self.addLink( DLLS , KSCY, bw=10, delay='0.18026026737ms')
+ self.addLink( DLLS , SNFN, bw=10, delay='0.74304274592ms')
+ self.addLink( DLLS , LA03, bw=10, delay='0.506439293357ms')
+ self.addLink( DNVR , KSCY, bw=10, delay='0.223328790403ms')
+ self.addLink( DNVR , SNFN, bw=10, delay='0.889017541903ms')
+ self.addLink( DNVR , SLKC, bw=10, delay='0.631898982721ms')
+ self.addLink( KSCY , SNFN, bw=10, delay='0.922778522233ms')
+ self.addLink( SNFN , SCRM, bw=10, delay='0.630352278097ms')
+ self.addLink( SNFN , PTLD, bw=10, delay='0.828572513655ms')
+ self.addLink( SNFN , STTL, bw=10, delay='1.54076081649ms')
+ self.addLink( SNFN , SLKC, bw=10, delay='0.621507502625ms')
+ self.addLink( SNFN , LA03, bw=10, delay='0.602936230151ms')
+ self.addLink( SCRM , SLKC, bw=10, delay='0.461350343644ms')
+ self.addLink( PTLD , STTL, bw=10, delay='1.17591515181ms')
+ self.addLink( SLKC , LA03, bw=10, delay='0.243225267023ms')
+ self.addLink( LA03 , SNDG, bw=10, delay='0.681264950821ms')
+ self.addLink( LA03 , PHNX, bw=10, delay='0.343709457969ms')
+ self.addLink( SNDG , PHNX, bw=10, delay='0.345064487693ms')
+
+topos = { 'att': ( lambda: attTopo() ) }
+
+# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
+
+def setupNetwork():
+ "Create network"
+ topo = attTopo()
+ #if controller_ip == '':
+ #controller_ip = '10.0.2.2';
+ # controller_ip = '127.0.0.1';
+ network = Mininet(topo=topo, link=TCLink, autoSetMacs=True, controller=None)
+ network.start()
+ CLI( network )
+ network.stop()
+
+if __name__ == '__main__':
+ setLogLevel('info')
+ #setLogLevel('debug')
+ setupNetwork()
diff --git a/TestON/tests/CHO/CHOtest/dependencies/topoChordal.py b/TestON/tests/CHO/CHOtest/dependencies/topoChordal.py
new file mode 100755
index 0000000..542c3ed
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/topoChordal.py
@@ -0,0 +1,422 @@
+#!/usr/bin/python
+"""
+"""
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import RemoteController
+from mininet.node import Node
+from mininet.node import CPULimitedHost
+from mininet.link import TCLink
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class chordalTopo( Topo ):
+
+ def __init__( self, **opts ):
+ "Create a topology."
+
+ # Initialize Topology
+ Topo.__init__( self, **opts )
+
+ # add nodes, switches first...
+ s1 = self.addSwitch( 's1' )
+ s2 = self.addSwitch( 's2' )
+ s3 = self.addSwitch( 's3' )
+ s4 = self.addSwitch( 's4' )
+ s5 = self.addSwitch( 's5' )
+ s6 = self.addSwitch( 's6' )
+ s7 = self.addSwitch( 's7' )
+ s8 = self.addSwitch( 's8' )
+ s9 = self.addSwitch( 's9' )
+ s10 = self.addSwitch( 's10' )
+ s11 = self.addSwitch( 's11' )
+ s12 = self.addSwitch( 's12' )
+ s13 = self.addSwitch( 's13' )
+ s14 = self.addSwitch( 's14' )
+ s15 = self.addSwitch( 's15' )
+ s16 = self.addSwitch( 's16' )
+ s17 = self.addSwitch( 's17' )
+ s18 = self.addSwitch( 's18' )
+ s19 = self.addSwitch( 's19' )
+ s20 = self.addSwitch( 's20' )
+ s21 = self.addSwitch( 's21' )
+ s22 = self.addSwitch( 's22' )
+ s23 = self.addSwitch( 's23' )
+ s24 = self.addSwitch( 's24' )
+ s25 = self.addSwitch( 's25' )
+
+ # ... and now hosts
+ s1_host = self.addHost( 'h1' )
+ s2_host = self.addHost( 'h2' )
+ s3_host = self.addHost( 'h3' )
+ s4_host = self.addHost( 'h4' )
+ s5_host = self.addHost( 'h5' )
+ s6_host = self.addHost( 'h6' )
+ s7_host = self.addHost( 'h7' )
+ s8_host = self.addHost( 'h8' )
+ s9_host = self.addHost( 'h9' )
+ s10_host = self.addHost( 'h10' )
+ s11_host = self.addHost( 'h11' )
+ s12_host = self.addHost( 'h12' )
+ s13_host = self.addHost( 'h13' )
+ s14_host = self.addHost( 'h14' )
+ s15_host = self.addHost( 'h15' )
+ s16_host = self.addHost( 'h16' )
+ s17_host = self.addHost( 'h17' )
+ s18_host = self.addHost( 'h18' )
+ s19_host = self.addHost( 'h19' )
+ s20_host = self.addHost( 'h20' )
+ s21_host = self.addHost( 'h21' )
+ s22_host = self.addHost( 'h22' )
+ s23_host = self.addHost( 'h23' )
+ s24_host = self.addHost( 'h24' )
+ s25_host = self.addHost( 'h25' )
+
+ # add edges between switch and corresponding host
+ self.addLink( s1 , s1_host )
+ self.addLink( s2 , s2_host )
+ self.addLink( s3 , s3_host )
+ self.addLink( s4 , s4_host )
+ self.addLink( s5 , s5_host )
+ self.addLink( s6 , s6_host )
+ self.addLink( s7 , s7_host )
+ self.addLink( s8 , s8_host )
+ self.addLink( s9 , s9_host )
+ self.addLink( s10 , s10_host )
+ self.addLink( s11 , s11_host )
+ self.addLink( s12 , s12_host )
+ self.addLink( s13 , s13_host )
+ self.addLink( s14 , s14_host )
+ self.addLink( s15 , s15_host )
+ self.addLink( s16 , s16_host )
+ self.addLink( s17 , s17_host )
+ self.addLink( s18 , s18_host )
+ self.addLink( s19 , s19_host )
+ self.addLink( s20 , s20_host )
+ self.addLink( s21 , s21_host )
+ self.addLink( s22 , s22_host )
+ self.addLink( s23 , s23_host )
+ self.addLink( s24 , s24_host )
+ self.addLink( s25 , s25_host )
+ self.addLink(s1, s2)
+ self.addLink(s1, s3)
+ self.addLink(s1, s4)
+ self.addLink(s1, s5)
+ self.addLink(s1, s6)
+ self.addLink(s1, s7)
+ self.addLink(s1, s8)
+ self.addLink(s1, s9)
+ self.addLink(s1, s10)
+ self.addLink(s1, s11)
+ self.addLink(s1, s12)
+ self.addLink(s1, s13)
+ self.addLink(s1, s14)
+ self.addLink(s1, s15)
+ self.addLink(s1, s16)
+ self.addLink(s1, s17)
+ self.addLink(s1, s18)
+ self.addLink(s1, s19)
+ self.addLink(s1, s20)
+ self.addLink(s1, s21)
+ self.addLink(s1, s22)
+ self.addLink(s1, s23)
+ self.addLink(s1, s24)
+ self.addLink(s1, s25)
+ self.addLink(s2, s3)
+ self.addLink(s2, s4)
+ self.addLink(s2, s5)
+ self.addLink(s2, s6)
+ self.addLink(s2, s7)
+ self.addLink(s2, s8)
+ self.addLink(s2, s9)
+ self.addLink(s2, s10)
+ self.addLink(s2, s11)
+ self.addLink(s2, s12)
+ self.addLink(s2, s13)
+ self.addLink(s2, s14)
+ self.addLink(s2, s15)
+ self.addLink(s2, s16)
+ self.addLink(s2, s17)
+ self.addLink(s2, s18)
+ self.addLink(s2, s19)
+ self.addLink(s2, s20)
+ self.addLink(s2, s21)
+ self.addLink(s2, s22)
+ self.addLink(s2, s23)
+ self.addLink(s2, s24)
+ self.addLink(s2, s25)
+ self.addLink(s3, s4)
+ self.addLink(s3, s5)
+ self.addLink(s3, s6)
+ self.addLink(s3, s7)
+ self.addLink(s3, s8)
+ self.addLink(s3, s9)
+ self.addLink(s3, s10)
+ self.addLink(s3, s11)
+ self.addLink(s3, s12)
+ self.addLink(s3, s13)
+ self.addLink(s3, s14)
+ self.addLink(s3, s15)
+ self.addLink(s3, s16)
+ self.addLink(s3, s17)
+ self.addLink(s3, s18)
+ self.addLink(s3, s19)
+ self.addLink(s3, s20)
+ self.addLink(s3, s21)
+ self.addLink(s3, s22)
+ self.addLink(s3, s23)
+ self.addLink(s3, s24)
+ self.addLink(s3, s25)
+ self.addLink(s4, s5)
+ self.addLink(s4, s6)
+ self.addLink(s4, s7)
+ self.addLink(s4, s8)
+ self.addLink(s4, s9)
+ self.addLink(s4, s10)
+ self.addLink(s4, s11)
+ self.addLink(s4, s12)
+ self.addLink(s4, s13)
+ self.addLink(s4, s14)
+ self.addLink(s4, s15)
+ self.addLink(s4, s16)
+ self.addLink(s4, s17)
+ self.addLink(s4, s18)
+ self.addLink(s4, s19)
+ self.addLink(s4, s20)
+ self.addLink(s4, s21)
+ self.addLink(s4, s22)
+ self.addLink(s4, s23)
+ self.addLink(s4, s24)
+ self.addLink(s4, s25)
+ self.addLink(s5, s6)
+ self.addLink(s5, s7)
+ self.addLink(s5, s8)
+ self.addLink(s5, s9)
+ self.addLink(s5, s10)
+ self.addLink(s5, s11)
+ self.addLink(s5, s12)
+ self.addLink(s5, s13)
+ self.addLink(s5, s14)
+ self.addLink(s5, s15)
+ self.addLink(s5, s16)
+ self.addLink(s5, s17)
+ self.addLink(s5, s18)
+ self.addLink(s5, s19)
+ self.addLink(s5, s20)
+ self.addLink(s5, s21)
+ self.addLink(s5, s22)
+ self.addLink(s5, s23)
+ self.addLink(s5, s24)
+ self.addLink(s5, s25)
+ self.addLink(s6, s7)
+ self.addLink(s6, s8)
+ self.addLink(s6, s9)
+ self.addLink(s6, s10)
+ self.addLink(s6, s11)
+ self.addLink(s6, s12)
+ self.addLink(s6, s13)
+ self.addLink(s6, s14)
+ self.addLink(s6, s15)
+ self.addLink(s6, s16)
+ self.addLink(s6, s17)
+ self.addLink(s6, s18)
+ self.addLink(s6, s19)
+ self.addLink(s6, s20)
+ self.addLink(s6, s21)
+ self.addLink(s6, s22)
+ self.addLink(s6, s23)
+ self.addLink(s6, s24)
+ self.addLink(s6, s25)
+ self.addLink(s7, s8)
+ self.addLink(s7, s9)
+ self.addLink(s7, s10)
+ self.addLink(s7, s11)
+ self.addLink(s7, s12)
+ self.addLink(s7, s13)
+ self.addLink(s7, s14)
+ self.addLink(s7, s15)
+ self.addLink(s7, s16)
+ self.addLink(s7, s17)
+ self.addLink(s7, s18)
+ self.addLink(s7, s19)
+ self.addLink(s7, s20)
+ self.addLink(s7, s21)
+ self.addLink(s7, s22)
+ self.addLink(s7, s23)
+ self.addLink(s7, s24)
+ self.addLink(s7, s25)
+ self.addLink(s8, s9)
+ self.addLink(s8, s10)
+ self.addLink(s8, s11)
+ self.addLink(s8, s12)
+ self.addLink(s8, s13)
+ self.addLink(s8, s14)
+ self.addLink(s8, s15)
+ self.addLink(s8, s16)
+ self.addLink(s8, s17)
+ self.addLink(s8, s18)
+ self.addLink(s8, s19)
+ self.addLink(s8, s20)
+ self.addLink(s8, s21)
+ self.addLink(s8, s22)
+ self.addLink(s8, s23)
+ self.addLink(s8, s24)
+ self.addLink(s8, s25)
+ self.addLink(s9, s10)
+ self.addLink(s9, s11)
+ self.addLink(s9, s12)
+ self.addLink(s9, s13)
+ self.addLink(s9, s14)
+ self.addLink(s9, s15)
+ self.addLink(s9, s16)
+ self.addLink(s9, s17)
+ self.addLink(s9, s18)
+ self.addLink(s9, s19)
+ self.addLink(s9, s20)
+ self.addLink(s9, s21)
+ self.addLink(s9, s22)
+ self.addLink(s9, s23)
+ self.addLink(s9, s24)
+ self.addLink(s9, s25)
+ self.addLink(s10, s11)
+ self.addLink(s10, s12)
+ self.addLink(s10, s13)
+ self.addLink(s10, s14)
+ self.addLink(s10, s15)
+ self.addLink(s10, s16)
+ self.addLink(s10, s17)
+ self.addLink(s10, s18)
+ self.addLink(s10, s19)
+ self.addLink(s10, s20)
+ self.addLink(s10, s21)
+ self.addLink(s10, s22)
+ self.addLink(s10, s23)
+ self.addLink(s10, s24)
+ self.addLink(s10, s25)
+ self.addLink(s11, s12)
+ self.addLink(s11, s13)
+ self.addLink(s11, s14)
+ self.addLink(s11, s15)
+ self.addLink(s11, s16)
+ self.addLink(s11, s17)
+ self.addLink(s11, s18)
+ self.addLink(s11, s19)
+ self.addLink(s11, s20)
+ self.addLink(s11, s21)
+ self.addLink(s11, s22)
+ self.addLink(s11, s23)
+ self.addLink(s11, s24)
+ self.addLink(s11, s25)
+ self.addLink(s12, s13)
+ self.addLink(s12, s14)
+ self.addLink(s12, s15)
+ self.addLink(s12, s16)
+ self.addLink(s12, s17)
+ self.addLink(s12, s18)
+ self.addLink(s12, s19)
+ self.addLink(s12, s20)
+ self.addLink(s12, s21)
+ self.addLink(s12, s22)
+ self.addLink(s12, s23)
+ self.addLink(s12, s24)
+ self.addLink(s12, s25)
+ self.addLink(s13, s14)
+ self.addLink(s13, s15)
+ self.addLink(s13, s16)
+ self.addLink(s13, s17)
+ self.addLink(s13, s18)
+ self.addLink(s13, s19)
+ self.addLink(s13, s20)
+ self.addLink(s13, s21)
+ self.addLink(s13, s22)
+ self.addLink(s13, s23)
+ self.addLink(s13, s24)
+ self.addLink(s13, s25)
+ self.addLink(s14, s15)
+ self.addLink(s14, s16)
+ self.addLink(s14, s17)
+ self.addLink(s14, s18)
+ self.addLink(s14, s19)
+ self.addLink(s14, s20)
+ self.addLink(s14, s21)
+ self.addLink(s14, s22)
+ self.addLink(s14, s23)
+ self.addLink(s14, s24)
+ self.addLink(s14, s25)
+ self.addLink(s15, s16)
+ self.addLink(s15, s17)
+ self.addLink(s15, s18)
+ self.addLink(s15, s19)
+ self.addLink(s15, s20)
+ self.addLink(s15, s21)
+ self.addLink(s15, s22)
+ self.addLink(s15, s23)
+ self.addLink(s15, s24)
+ self.addLink(s15, s25)
+ self.addLink(s16, s17)
+ self.addLink(s16, s18)
+ self.addLink(s16, s19)
+ self.addLink(s16, s20)
+ self.addLink(s16, s21)
+ self.addLink(s16, s22)
+ self.addLink(s16, s23)
+ self.addLink(s16, s24)
+ self.addLink(s16, s25)
+ self.addLink(s17, s18)
+ self.addLink(s17, s19)
+ self.addLink(s17, s20)
+ self.addLink(s17, s21)
+ self.addLink(s17, s22)
+ self.addLink(s17, s23)
+ self.addLink(s17, s24)
+ self.addLink(s17, s25)
+ self.addLink(s18, s19)
+ self.addLink(s18, s20)
+ self.addLink(s18, s21)
+ self.addLink(s18, s22)
+ self.addLink(s18, s23)
+ self.addLink(s18, s24)
+ self.addLink(s18, s25)
+ self.addLink(s19, s20)
+ self.addLink(s19, s21)
+ self.addLink(s19, s22)
+ self.addLink(s19, s23)
+ self.addLink(s19, s24)
+ self.addLink(s19, s25)
+ self.addLink(s20, s21)
+ self.addLink(s20, s22)
+ self.addLink(s20, s23)
+ self.addLink(s20, s24)
+ self.addLink(s20, s25)
+ self.addLink(s21, s22)
+ self.addLink(s21, s23)
+ self.addLink(s21, s24)
+ self.addLink(s21, s25)
+ self.addLink(s22, s23)
+ self.addLink(s22, s24)
+ self.addLink(s22, s25)
+ self.addLink(s23, s24)
+ self.addLink(s23, s25)
+ self.addLink(s24, s25)
+
+topos = { 'chordal': ( lambda: chordalTopo() ) }
+
+# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
+
+def setupNetwork():
+ "Create network"
+ topo = chordalTopo()
+ #if controller_ip == '':
+ #controller_ip = '10.0.2.2';
+ # controller_ip = '127.0.0.1';
+ network = Mininet(topo=topo, switch=OVSSwitch,autoSetMacs=True, controller=None)
+ network.start()
+ CLI( network )
+ network.stop()
+
+if __name__ == '__main__':
+ setLogLevel('info')
+ #setLogLevel('debug')
+ setupNetwork()
diff --git a/TestON/tests/CHO/CHOtest/dependencies/topoChordalIpv6.py b/TestON/tests/CHO/CHOtest/dependencies/topoChordalIpv6.py
new file mode 100755
index 0000000..cb065c2
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/topoChordalIpv6.py
@@ -0,0 +1,428 @@
+#!/usr/bin/python
+"""
+"""
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import Host, RemoteController
+from mininet.node import Node
+from mininet.node import CPULimitedHost
+from mininet.link import TCLink
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class dualStackHost( Host ):
+ def config( self, v6Addr='1000:1/64', **params ):
+ r = super( Host, self ).config( **params )
+ intf = self.defaultIntf()
+ self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
+ return r
+
+class chordalTopo( Topo ):
+
+ def __init__( self, **opts ):
+ "Create a topology."
+
+ # Initialize Topology
+ Topo.__init__( self, **opts )
+
+ s1 = self.addSwitch( 's1' )
+ s2 = self.addSwitch( 's2' )
+ s3 = self.addSwitch( 's3' )
+ s4 = self.addSwitch( 's4' )
+ s5 = self.addSwitch( 's5' )
+ s6 = self.addSwitch( 's6' )
+ s7 = self.addSwitch( 's7' )
+ s8 = self.addSwitch( 's8' )
+ s9 = self.addSwitch( 's9' )
+ s10 = self.addSwitch( 's10' )
+ s11 = self.addSwitch( 's11' )
+ s12 = self.addSwitch( 's12' )
+ s13 = self.addSwitch( 's13' )
+ s14 = self.addSwitch( 's14' )
+ s15 = self.addSwitch( 's15' )
+ s16 = self.addSwitch( 's16' )
+ s17 = self.addSwitch( 's17' )
+ s18 = self.addSwitch( 's18' )
+ s19 = self.addSwitch( 's19' )
+ s20 = self.addSwitch( 's20' )
+ s21 = self.addSwitch( 's21' )
+ s22 = self.addSwitch( 's22' )
+ s23 = self.addSwitch( 's23' )
+ s24 = self.addSwitch( 's24' )
+ s25 = self.addSwitch( 's25' )
+
+ # ... and now hosts
+ s1_host = self.addHost( 'h1', ip='10.1.0.1/24', cls=dualStackHost, v6Addr='1000::1/64' )
+ s2_host = self.addHost( 'h2', ip='10.1.0.2/24', cls=dualStackHost, v6Addr='1000::2/64' )
+ s3_host = self.addHost( 'h3', ip='10.1.0.3/24', cls=dualStackHost, v6Addr='1000::3/64' )
+ s4_host = self.addHost( 'h4', ip='10.1.0.4/24', cls=dualStackHost, v6Addr='1000::4/64' )
+ s5_host = self.addHost( 'h5', ip='10.1.0.5/24', cls=dualStackHost, v6Addr='1000::5/64' )
+ s6_host = self.addHost( 'h6', ip='10.1.0.6/24', cls=dualStackHost, v6Addr='1000::6/64' )
+ s7_host = self.addHost( 'h7', ip='10.1.0.7/24', cls=dualStackHost, v6Addr='1000::7/64' )
+ s8_host = self.addHost( 'h8', ip='10.1.0.8/24', cls=dualStackHost, v6Addr='1000::8/64' )
+ s9_host = self.addHost( 'h9', ip='10.1.0.9/24', cls=dualStackHost, v6Addr='1000::9/64' )
+ s10_host = self.addHost( 'h10', ip='10.1.0.10/24', cls=dualStackHost, v6Addr='1000::10/64' )
+ s11_host = self.addHost( 'h11', ip='10.1.0.11/24', cls=dualStackHost, v6Addr='1000::11/64' )
+ s12_host = self.addHost( 'h12', ip='10.1.0.12/24', cls=dualStackHost, v6Addr='1000::12/64' )
+ s13_host = self.addHost( 'h13', ip='10.1.0.13/24', cls=dualStackHost, v6Addr='1000::13/64' )
+ s14_host = self.addHost( 'h14', ip='10.1.0.14/24', cls=dualStackHost, v6Addr='1000::14/64' )
+ s15_host = self.addHost( 'h15', ip='10.1.0.15/24', cls=dualStackHost, v6Addr='1000::15/64' )
+ s16_host = self.addHost( 'h16', ip='10.1.0.16/24', cls=dualStackHost, v6Addr='1000::16/64' )
+ s17_host = self.addHost( 'h17', ip='10.1.0.17/24', cls=dualStackHost, v6Addr='1000::17/64' )
+ s18_host = self.addHost( 'h18', ip='10.1.0.18/24', cls=dualStackHost, v6Addr='1000::18/64' )
+ s19_host = self.addHost( 'h19', ip='10.1.0.19/24', cls=dualStackHost, v6Addr='1000::19/64' )
+ s20_host = self.addHost( 'h20', ip='10.1.0.20/24', cls=dualStackHost, v6Addr='1000::20/64' )
+ s21_host = self.addHost( 'h21', ip='10.1.0.21/24', cls=dualStackHost, v6Addr='1000::21/64' )
+ s22_host = self.addHost( 'h22', ip='10.1.0.22/24', cls=dualStackHost, v6Addr='1000::22/64' )
+ s23_host = self.addHost( 'h23', ip='10.1.0.23/24', cls=dualStackHost, v6Addr='1000::23/64' )
+ s24_host = self.addHost( 'h24', ip='10.1.0.24/24', cls=dualStackHost, v6Addr='1000::24/64' )
+ s25_host = self.addHost( 'h25', ip='10.1.0.25/24', cls=dualStackHost, v6Addr='1000::25/64' )
+
+ # add edges between switch and corresponding host
+ self.addLink( s1 , s1_host )
+ self.addLink( s2 , s2_host )
+ self.addLink( s3 , s3_host )
+ self.addLink( s4 , s4_host )
+ self.addLink( s5 , s5_host )
+ self.addLink( s6 , s6_host )
+ self.addLink( s7 , s7_host )
+ self.addLink( s8 , s8_host )
+ self.addLink( s9 , s9_host )
+ self.addLink( s10 , s10_host )
+ self.addLink( s11 , s11_host )
+ self.addLink( s12 , s12_host )
+ self.addLink( s13 , s13_host )
+ self.addLink( s14 , s14_host )
+ self.addLink( s15 , s15_host )
+ self.addLink( s16 , s16_host )
+ self.addLink( s17 , s17_host )
+ self.addLink( s18 , s18_host )
+ self.addLink( s19 , s19_host )
+ self.addLink( s20 , s20_host )
+ self.addLink( s21 , s21_host )
+ self.addLink( s22 , s22_host )
+ self.addLink( s23 , s23_host )
+ self.addLink( s24 , s24_host )
+ self.addLink( s25 , s25_host )
+ self.addLink(s1, s2)
+ self.addLink(s1, s3)
+ self.addLink(s1, s4)
+ self.addLink(s1, s5)
+ self.addLink(s1, s6)
+ self.addLink(s1, s7)
+ self.addLink(s1, s8)
+ self.addLink(s1, s9)
+ self.addLink(s1, s10)
+ self.addLink(s1, s11)
+ self.addLink(s1, s12)
+ self.addLink(s1, s13)
+ self.addLink(s1, s14)
+ self.addLink(s1, s15)
+ self.addLink(s1, s16)
+ self.addLink(s1, s17)
+ self.addLink(s1, s18)
+ self.addLink(s1, s19)
+ self.addLink(s1, s20)
+ self.addLink(s1, s21)
+ self.addLink(s1, s22)
+ self.addLink(s1, s23)
+ self.addLink(s1, s24)
+ self.addLink(s1, s25)
+ self.addLink(s2, s3)
+ self.addLink(s2, s4)
+ self.addLink(s2, s5)
+ self.addLink(s2, s6)
+ self.addLink(s2, s7)
+ self.addLink(s2, s8)
+ self.addLink(s2, s9)
+ self.addLink(s2, s10)
+ self.addLink(s2, s11)
+ self.addLink(s2, s12)
+ self.addLink(s2, s13)
+ self.addLink(s2, s14)
+ self.addLink(s2, s15)
+ self.addLink(s2, s16)
+ self.addLink(s2, s17)
+ self.addLink(s2, s18)
+ self.addLink(s2, s19)
+ self.addLink(s2, s20)
+ self.addLink(s2, s21)
+ self.addLink(s2, s22)
+ self.addLink(s2, s23)
+ self.addLink(s2, s24)
+ self.addLink(s2, s25)
+ self.addLink(s3, s4)
+ self.addLink(s3, s5)
+ self.addLink(s3, s6)
+ self.addLink(s3, s7)
+ self.addLink(s3, s8)
+ self.addLink(s3, s9)
+ self.addLink(s3, s10)
+ self.addLink(s3, s11)
+ self.addLink(s3, s12)
+ self.addLink(s3, s13)
+ self.addLink(s3, s14)
+ self.addLink(s3, s15)
+ self.addLink(s3, s16)
+ self.addLink(s3, s17)
+ self.addLink(s3, s18)
+ self.addLink(s3, s19)
+ self.addLink(s3, s20)
+ self.addLink(s3, s21)
+ self.addLink(s3, s22)
+ self.addLink(s3, s23)
+ self.addLink(s3, s24)
+ self.addLink(s3, s25)
+ self.addLink(s4, s5)
+ self.addLink(s4, s6)
+ self.addLink(s4, s7)
+ self.addLink(s4, s8)
+ self.addLink(s4, s9)
+ self.addLink(s4, s10)
+ self.addLink(s4, s11)
+ self.addLink(s4, s12)
+ self.addLink(s4, s13)
+ self.addLink(s4, s14)
+ self.addLink(s4, s15)
+ self.addLink(s4, s16)
+ self.addLink(s4, s17)
+ self.addLink(s4, s18)
+ self.addLink(s4, s19)
+ self.addLink(s4, s20)
+ self.addLink(s4, s21)
+ self.addLink(s4, s22)
+ self.addLink(s4, s23)
+ self.addLink(s4, s24)
+ self.addLink(s4, s25)
+ self.addLink(s5, s6)
+ self.addLink(s5, s7)
+ self.addLink(s5, s8)
+ self.addLink(s5, s9)
+ self.addLink(s5, s10)
+ self.addLink(s5, s11)
+ self.addLink(s5, s12)
+ self.addLink(s5, s13)
+ self.addLink(s5, s14)
+ self.addLink(s5, s15)
+ self.addLink(s5, s16)
+ self.addLink(s5, s17)
+ self.addLink(s5, s18)
+ self.addLink(s5, s19)
+ self.addLink(s5, s20)
+ self.addLink(s5, s21)
+ self.addLink(s5, s22)
+ self.addLink(s5, s23)
+ self.addLink(s5, s24)
+ self.addLink(s5, s25)
+ self.addLink(s6, s7)
+ self.addLink(s6, s8)
+ self.addLink(s6, s9)
+ self.addLink(s6, s10)
+ self.addLink(s6, s11)
+ self.addLink(s6, s12)
+ self.addLink(s6, s13)
+ self.addLink(s6, s14)
+ self.addLink(s6, s15)
+ self.addLink(s6, s16)
+ self.addLink(s6, s17)
+ self.addLink(s6, s18)
+ self.addLink(s6, s19)
+ self.addLink(s6, s20)
+ self.addLink(s6, s21)
+ self.addLink(s6, s22)
+ self.addLink(s6, s23)
+ self.addLink(s6, s24)
+ self.addLink(s6, s25)
+ self.addLink(s7, s8)
+ self.addLink(s7, s9)
+ self.addLink(s7, s10)
+ self.addLink(s7, s11)
+ self.addLink(s7, s12)
+ self.addLink(s7, s13)
+ self.addLink(s7, s14)
+ self.addLink(s7, s15)
+ self.addLink(s7, s16)
+ self.addLink(s7, s17)
+ self.addLink(s7, s18)
+ self.addLink(s7, s19)
+ self.addLink(s7, s20)
+ self.addLink(s7, s21)
+ self.addLink(s7, s22)
+ self.addLink(s7, s23)
+ self.addLink(s7, s24)
+ self.addLink(s7, s25)
+ self.addLink(s8, s9)
+ self.addLink(s8, s10)
+ self.addLink(s8, s11)
+ self.addLink(s8, s12)
+ self.addLink(s8, s13)
+ self.addLink(s8, s14)
+ self.addLink(s8, s15)
+ self.addLink(s8, s16)
+ self.addLink(s8, s17)
+ self.addLink(s8, s18)
+ self.addLink(s8, s19)
+ self.addLink(s8, s20)
+ self.addLink(s8, s21)
+ self.addLink(s8, s22)
+ self.addLink(s8, s23)
+ self.addLink(s8, s24)
+ self.addLink(s8, s25)
+ self.addLink(s9, s10)
+ self.addLink(s9, s11)
+ self.addLink(s9, s12)
+ self.addLink(s9, s13)
+ self.addLink(s9, s14)
+ self.addLink(s9, s15)
+ self.addLink(s9, s16)
+ self.addLink(s9, s17)
+ self.addLink(s9, s18)
+ self.addLink(s9, s19)
+ self.addLink(s9, s20)
+ self.addLink(s9, s21)
+ self.addLink(s9, s22)
+ self.addLink(s9, s23)
+ self.addLink(s9, s24)
+ self.addLink(s9, s25)
+ self.addLink(s10, s11)
+ self.addLink(s10, s12)
+ self.addLink(s10, s13)
+ self.addLink(s10, s14)
+ self.addLink(s10, s15)
+ self.addLink(s10, s16)
+ self.addLink(s10, s17)
+ self.addLink(s10, s18)
+ self.addLink(s10, s19)
+ self.addLink(s10, s20)
+ self.addLink(s10, s21)
+ self.addLink(s10, s22)
+ self.addLink(s10, s23)
+ self.addLink(s10, s24)
+ self.addLink(s10, s25)
+ self.addLink(s11, s12)
+ self.addLink(s11, s13)
+ self.addLink(s11, s14)
+ self.addLink(s11, s15)
+ self.addLink(s11, s16)
+ self.addLink(s11, s17)
+ self.addLink(s11, s18)
+ self.addLink(s11, s19)
+ self.addLink(s11, s20)
+ self.addLink(s11, s21)
+ self.addLink(s11, s22)
+ self.addLink(s11, s23)
+ self.addLink(s11, s24)
+ self.addLink(s11, s25)
+ self.addLink(s12, s13)
+ self.addLink(s12, s14)
+ self.addLink(s12, s15)
+ self.addLink(s12, s16)
+ self.addLink(s12, s17)
+ self.addLink(s12, s18)
+ self.addLink(s12, s19)
+ self.addLink(s12, s20)
+ self.addLink(s12, s21)
+ self.addLink(s12, s22)
+ self.addLink(s12, s23)
+ self.addLink(s12, s24)
+ self.addLink(s12, s25)
+ self.addLink(s13, s14)
+ self.addLink(s13, s15)
+ self.addLink(s13, s16)
+ self.addLink(s13, s17)
+ self.addLink(s13, s18)
+ self.addLink(s13, s19)
+ self.addLink(s13, s20)
+ self.addLink(s13, s21)
+ self.addLink(s13, s22)
+ self.addLink(s13, s23)
+ self.addLink(s13, s24)
+ self.addLink(s13, s25)
+ self.addLink(s14, s15)
+ self.addLink(s14, s16)
+ self.addLink(s14, s17)
+ self.addLink(s14, s18)
+ self.addLink(s14, s19)
+ self.addLink(s14, s20)
+ self.addLink(s14, s21)
+ self.addLink(s14, s22)
+ self.addLink(s14, s23)
+ self.addLink(s14, s24)
+ self.addLink(s14, s25)
+ self.addLink(s15, s16)
+ self.addLink(s15, s17)
+ self.addLink(s15, s18)
+ self.addLink(s15, s19)
+ self.addLink(s15, s20)
+ self.addLink(s15, s21)
+ self.addLink(s15, s22)
+ self.addLink(s15, s23)
+ self.addLink(s15, s24)
+ self.addLink(s15, s25)
+ self.addLink(s16, s17)
+ self.addLink(s16, s18)
+ self.addLink(s16, s19)
+ self.addLink(s16, s20)
+ self.addLink(s16, s21)
+ self.addLink(s16, s22)
+ self.addLink(s16, s23)
+ self.addLink(s16, s24)
+ self.addLink(s16, s25)
+ self.addLink(s17, s18)
+ self.addLink(s17, s19)
+ self.addLink(s17, s20)
+ self.addLink(s17, s21)
+ self.addLink(s17, s22)
+ self.addLink(s17, s23)
+ self.addLink(s17, s24)
+ self.addLink(s17, s25)
+ self.addLink(s18, s19)
+ self.addLink(s18, s20)
+ self.addLink(s18, s21)
+ self.addLink(s18, s22)
+ self.addLink(s18, s23)
+ self.addLink(s18, s24)
+ self.addLink(s18, s25)
+ self.addLink(s19, s20)
+ self.addLink(s19, s21)
+ self.addLink(s19, s22)
+ self.addLink(s19, s23)
+ self.addLink(s19, s24)
+ self.addLink(s19, s25)
+ self.addLink(s20, s21)
+ self.addLink(s20, s22)
+ self.addLink(s20, s23)
+ self.addLink(s20, s24)
+ self.addLink(s20, s25)
+ self.addLink(s21, s22)
+ self.addLink(s21, s23)
+ self.addLink(s21, s24)
+ self.addLink(s21, s25)
+ self.addLink(s22, s23)
+ self.addLink(s22, s24)
+ self.addLink(s22, s25)
+ self.addLink(s23, s24)
+ self.addLink(s23, s25)
+ self.addLink(s24, s25)
+
+topos = { 'chordal': ( lambda: chordalTopo() ) }
+
+# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
+
+def setupNetwork():
+ "Create network"
+ topo = chordalTopo()
+ #if controller_ip == '':
+ #controller_ip = '10.0.2.2';
+ # controller_ip = '127.0.0.1';
+ network = Mininet(topo=topo, switch=OVSSwitch,autoSetMacs=True, controller=None)
+ network.start()
+ CLI( network )
+ network.stop()
+
+if __name__ == '__main__':
+ setLogLevel('info')
+ #setLogLevel('debug')
+ setupNetwork()
diff --git a/TestON/tests/CHO/CHOtest/dependencies/topoSpine.py b/TestON/tests/CHO/CHOtest/dependencies/topoSpine.py
new file mode 100755
index 0000000..5787d93
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/topoSpine.py
@@ -0,0 +1,434 @@
+#!/usr/bin/python
+
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import Controller, RemoteController, OVSController
+from mininet.node import CPULimitedHost, Host, Node
+from mininet.cli import CLI
+from mininet.log import setLogLevel, info
+from mininet.link import TCLink, Intf
+from subprocess import call
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class spineTopo( Topo ):
+
+ def __init__( self, **opts ):
+ "Create a topology."
+
+ # Initialize Topology
+ Topo.__init__( self, **opts )
+
+ # add nodes, Leaf switches
+ s1 = self.addSwitch( 's1' )
+ s2 = self.addSwitch( 's2' )
+ s3 = self.addSwitch( 's3' )
+ s4 = self.addSwitch( 's4' )
+ s5 = self.addSwitch( 's5' )
+ s6 = self.addSwitch( 's6' )
+ s7 = self.addSwitch( 's7' )
+ s8 = self.addSwitch( 's8' )
+ s9 = self.addSwitch( 's9' )
+ s10 = self.addSwitch( 's10' )
+ s11 = self.addSwitch( 's11' )
+ s12 = self.addSwitch( 's12' )
+ s13 = self.addSwitch( 's13' )
+ s14 = self.addSwitch( 's14' )
+
+ # add nodes, Spine switches first...
+ s15 = self.addSwitch( 's15' )
+ s16 = self.addSwitch( 's16' )
+ s17 = self.addSwitch( 's17' )
+ s18 = self.addSwitch( 's18' )
+ s19 = self.addSwitch( 's19' )
+ s20 = self.addSwitch( 's20' )
+ s21 = self.addSwitch( 's21' )
+ s22 = self.addSwitch( 's22' )
+ s23 = self.addSwitch( 's23' )
+ s24 = self.addSwitch( 's24' )
+ s25 = self.addSwitch( 's25' )
+ s26 = self.addSwitch( 's26' )
+ s27 = self.addSwitch( 's27' )
+ s28 = self.addSwitch( 's28' )
+ s29 = self.addSwitch( 's29' )
+ s30 = self.addSwitch( 's30' )
+ s31 = self.addSwitch( 's31' )
+ s32 = self.addSwitch( 's32' )
+ s33 = self.addSwitch( 's33' )
+ s34 = self.addSwitch( 's34' )
+ s35 = self.addSwitch( 's35' )
+ s36 = self.addSwitch( 's36' )
+ s37 = self.addSwitch( 's37' )
+ s38 = self.addSwitch( 's38' )
+ s39 = self.addSwitch( 's39' )
+ s40 = self.addSwitch( 's40' )
+ s41 = self.addSwitch( 's41' )
+ s42 = self.addSwitch( 's42' )
+ s43 = self.addSwitch( 's43' )
+ s44 = self.addSwitch( 's44' )
+ s45 = self.addSwitch( 's45' )
+ s46 = self.addSwitch( 's46' )
+ s47 = self.addSwitch( 's47' )
+ s48 = self.addSwitch( 's48' )
+ s49 = self.addSwitch( 's49' )
+ s50 = self.addSwitch( 's50' )
+ s51 = self.addSwitch( 's51' )
+ s52 = self.addSwitch( 's52' )
+ s53 = self.addSwitch( 's53' )
+ s54 = self.addSwitch( 's54' )
+ s55 = self.addSwitch( 's55' )
+ s56 = self.addSwitch( 's56' )
+ s57 = self.addSwitch( 's57' )
+ s58 = self.addSwitch( 's58' )
+ s59 = self.addSwitch( 's59' )
+ s60 = self.addSwitch( 's60' )
+ s61 = self.addSwitch( 's61' )
+ s62 = self.addSwitch( 's62' )
+ s63 = self.addSwitch( 's63' )
+ s64 = self.addSwitch( 's64' )
+ s65 = self.addSwitch( 's65' )
+ s66 = self.addSwitch( 's66' )
+ s67 = self.addSwitch( 's67' )
+ s68 = self.addSwitch( 's68' )
+ s69 = self.addSwitch( 's69' )
+ s70 = self.addSwitch( 's70' )
+ s71 = self.addSwitch( 's71' )
+ s72 = self.addSwitch( 's72' )
+ s73 = self.addSwitch( 's73' )
+ s74 = self.addSwitch( 's74' )
+ s75 = self.addSwitch( 's75' )
+ s76 = self.addSwitch( 's76' )
+ s77 = self.addSwitch( 's77' )
+ s78 = self.addSwitch( 's78' )
+
+ # ... and now hosts
+ #s1_host = self.addHost( 'h1' )
+ #s2_host = self.addHost( 'h2' )
+ #s3_host = self.addHost( 'h3' )
+ #s4_host = self.addHost( 'h4' )
+ #s5_host = self.addHost( 'h5' )
+ #s6_host = self.addHost( 'h6' )
+ #s7_host = self.addHost( 'h7' )
+ #s8_host = self.addHost( 'h8' )
+ #s9_host = self.addHost( 'h9' )
+ #s10_host = self.addHost( 'h10' )
+ s11_host = self.addHost( 'h11' )
+ s12_host = self.addHost( 'h12' )
+ s13_host = self.addHost( 'h13' )
+ s14_host = self.addHost( 'h14' )
+ s15_host = self.addHost( 'h15' )
+ s16_host = self.addHost( 'h16' )
+ s17_host = self.addHost( 'h17' )
+ s18_host = self.addHost( 'h18' )
+ s19_host = self.addHost( 'h19' )
+ s20_host = self.addHost( 'h20' )
+ s21_host = self.addHost( 'h21' )
+ s22_host = self.addHost( 'h22' )
+ s23_host = self.addHost( 'h23' )
+ s24_host = self.addHost( 'h24' )
+ s25_host = self.addHost( 'h25' )
+ s26_host = self.addHost( 'h26' )
+ s27_host = self.addHost( 'h27' )
+ s28_host = self.addHost( 'h28' )
+ s29_host = self.addHost( 'h29' )
+ s30_host = self.addHost( 'h30' )
+ s31_host = self.addHost( 'h31' )
+ s32_host = self.addHost( 'h32' )
+ s33_host = self.addHost( 'h33' )
+ s34_host = self.addHost( 'h34' )
+ s35_host = self.addHost( 'h35' )
+ s36_host = self.addHost( 'h36' )
+ s37_host = self.addHost( 'h37' )
+ s38_host = self.addHost( 'h38' )
+ s39_host = self.addHost( 'h39' )
+ s40_host = self.addHost( 'h40' )
+ s41_host = self.addHost( 'h41' )
+ s42_host = self.addHost( 'h42' )
+ s43_host = self.addHost( 'h43' )
+ s44_host = self.addHost( 'h44' )
+ s45_host = self.addHost( 'h45' )
+ s46_host = self.addHost( 'h46' )
+ s47_host = self.addHost( 'h47' )
+ s48_host = self.addHost( 'h48' )
+ s49_host = self.addHost( 'h49' )
+ s50_host = self.addHost( 'h50' )
+ s51_host = self.addHost( 'h51' )
+ s52_host = self.addHost( 'h52' )
+ s53_host = self.addHost( 'h53' )
+ s54_host = self.addHost( 'h54' )
+ s55_host = self.addHost( 'h55' )
+ s56_host = self.addHost( 'h56' )
+ s57_host = self.addHost( 'h57' )
+ s58_host = self.addHost( 'h58' )
+ s59_host = self.addHost( 'h59' )
+ s60_host = self.addHost( 'h60' )
+ s61_host = self.addHost( 'h61' )
+ s62_host = self.addHost( 'h62' )
+ s63_host = self.addHost( 'h63' )
+ s64_host = self.addHost( 'h64' )
+ s65_host = self.addHost( 'h65' )
+ s66_host = self.addHost( 'h66' )
+ s67_host = self.addHost( 'h67' )
+ s68_host = self.addHost( 'h68' )
+ s69_host = self.addHost( 'h69' )
+ s70_host = self.addHost( 'h70' )
+ s71_host = self.addHost( 'h71' )
+ s72_host = self.addHost( 'h72' )
+ s73_host = self.addHost( 'h73' )
+ s74_host = self.addHost( 'h74' )
+ s75_host = self.addHost( 'h75' )
+ s76_host = self.addHost( 'h76' )
+ s77_host = self.addHost( 'h77' )
+ s78_host = self.addHost( 'h78' )
+
+ # add edges between switch and corresponding host
+ #self.addLink( s1 , s1_host )
+ #self.addLink( s2 , s2_host )
+ #self.addLink( s3 , s3_host )
+ #self.addLink( s4 , s4_host )
+ #self.addLink( s5 , s5_host )
+ #self.addLink( s6 , s6_host )
+ #self.addLink( s7 , s7_host )
+ #self.addLink( s8 , s8_host )
+ #self.addLink( s9 , s9_host )
+ #self.addLink( s10 , s10_host )
+ self.addLink( s11 , s11_host )
+ self.addLink( s12 , s12_host )
+ self.addLink( s13 , s13_host )
+ self.addLink( s14 , s14_host )
+ self.addLink( s15 , s15_host )
+ self.addLink( s16 , s16_host )
+ self.addLink( s17 , s17_host )
+ self.addLink( s18 , s18_host )
+ self.addLink( s19 , s19_host )
+ self.addLink( s20 , s20_host )
+ self.addLink( s21 , s21_host )
+ self.addLink( s22 , s22_host )
+ self.addLink( s23 , s23_host )
+ self.addLink( s24 , s24_host )
+ self.addLink( s25 , s25_host )
+ self.addLink( s26 , s26_host )
+ self.addLink( s27 , s27_host )
+ self.addLink( s28 , s28_host )
+ self.addLink( s29 , s29_host )
+ self.addLink( s30 , s30_host )
+ self.addLink( s31 , s31_host )
+ self.addLink( s32 , s32_host )
+ self.addLink( s33 , s33_host )
+ self.addLink( s34 , s34_host )
+ self.addLink( s35 , s35_host )
+ self.addLink( s36 , s36_host )
+ self.addLink( s37 , s37_host )
+ self.addLink( s38 , s38_host )
+ self.addLink( s39 , s39_host )
+ self.addLink( s40 , s40_host )
+ self.addLink( s41 , s41_host )
+ self.addLink( s42 , s42_host )
+ self.addLink( s43 , s43_host )
+ self.addLink( s44 , s44_host )
+ self.addLink( s45 , s45_host )
+ self.addLink( s46 , s46_host )
+ self.addLink( s47 , s47_host )
+ self.addLink( s48 , s48_host )
+ self.addLink( s49 , s49_host )
+ self.addLink( s50 , s50_host )
+ self.addLink( s51 , s51_host )
+ self.addLink( s52 , s52_host )
+ self.addLink( s53 , s53_host )
+ self.addLink( s54 , s54_host )
+ self.addLink( s55 , s55_host )
+ self.addLink( s56 , s56_host )
+ self.addLink( s57 , s57_host )
+ self.addLink( s58 , s58_host )
+ self.addLink( s59 , s59_host )
+ self.addLink( s60 , s60_host )
+ self.addLink( s61 , s61_host )
+ self.addLink( s62 , s62_host )
+ self.addLink( s63 , s63_host )
+ self.addLink( s64 , s64_host )
+ self.addLink( s65 , s65_host )
+ self.addLink( s66 , s66_host )
+ self.addLink( s67 , s67_host )
+ self.addLink( s68 , s68_host )
+ self.addLink( s69 , s69_host )
+ self.addLink( s70 , s70_host )
+ self.addLink( s71 , s71_host )
+ self.addLink( s72 , s72_host )
+ self.addLink( s73 , s73_host )
+ self.addLink( s74 , s74_host )
+ self.addLink( s75 , s75_host )
+ self.addLink( s76 , s76_host )
+ self.addLink( s77 , s77_host )
+ self.addLink( s78 , s78_host )
+
+ #info( '*** Add Leaf links\n')
+ self.addLink(s1, s9)
+ self.addLink(s2, s10)
+ self.addLink(s3, s9)
+ self.addLink(s4, s10)
+ self.addLink(s5, s9)
+ self.addLink(s6, s10)
+ self.addLink(s7, s9)
+ self.addLink(s8, s10)
+ self.addLink(s9, s11)
+ self.addLink(s9, s12)
+ self.addLink(s10, s13)
+ self.addLink(s10, s14)
+ self.addLink(s11, s12)
+ self.addLink(s13, s14)
+
+ #info( '*** Add Spine-1 links\n')
+ self.addLink(s15, s1)
+ self.addLink(s15, s2)
+ self.addLink(s16, s1)
+ self.addLink(s16, s2)
+ self.addLink(s17, s1)
+ self.addLink(s17, s2)
+ self.addLink(s18, s1)
+ self.addLink(s18, s2)
+ self.addLink(s19, s1)
+ self.addLink(s19, s2)
+ self.addLink(s20, s1)
+ self.addLink(s20, s2)
+ self.addLink(s21, s1)
+ self.addLink(s21, s2)
+ self.addLink(s22, s1)
+ self.addLink(s22, s2)
+ self.addLink(s23, s1)
+ self.addLink(s23, s2)
+ self.addLink(s24, s1)
+ self.addLink(s24, s2)
+ self.addLink(s25, s1)
+ self.addLink(s25, s2)
+ self.addLink(s26, s1)
+ self.addLink(s26, s2)
+ self.addLink(s27, s1)
+ self.addLink(s27, s2)
+ self.addLink(s28, s1)
+ self.addLink(s28, s2)
+ self.addLink(s29, s1)
+ self.addLink(s29, s2)
+ self.addLink(s30, s1)
+ self.addLink(s30, s2)
+
+ #info( '*** Add Spine-2 links\n')
+ self.addLink(s31, s3)
+ self.addLink(s31, s4)
+ self.addLink(s32, s3)
+ self.addLink(s32, s4)
+ self.addLink(s33, s3)
+ self.addLink(s33, s4)
+ self.addLink(s34, s3)
+ self.addLink(s34, s4)
+ self.addLink(s35, s3)
+ self.addLink(s35, s4)
+ self.addLink(s36, s3)
+ self.addLink(s36, s4)
+ self.addLink(s37, s3)
+ self.addLink(s37, s4)
+ self.addLink(s38, s3)
+ self.addLink(s38, s4)
+ self.addLink(s39, s3)
+ self.addLink(s39, s4)
+ self.addLink(s40, s3)
+ self.addLink(s40, s4)
+ self.addLink(s41, s3)
+ self.addLink(s41, s4)
+ self.addLink(s42, s3)
+ self.addLink(s42, s4)
+ self.addLink(s43, s3)
+ self.addLink(s43, s4)
+ self.addLink(s44, s3)
+ self.addLink(s44, s4)
+ self.addLink(s45, s3)
+ self.addLink(s45, s4)
+ self.addLink(s46, s3)
+ self.addLink(s46, s4)
+
+ #info( '*** Add Spine-3 links\n')
+ self.addLink(s47, s5)
+ self.addLink(s47, s6)
+ self.addLink(s48, s5)
+ self.addLink(s48, s6)
+ self.addLink(s49, s5)
+ self.addLink(s49, s6)
+ self.addLink(s50, s5)
+ self.addLink(s50, s6)
+ self.addLink(s51, s5)
+ self.addLink(s51, s6)
+ self.addLink(s52, s5)
+ self.addLink(s52, s6)
+ self.addLink(s53, s5)
+ self.addLink(s53, s6)
+ self.addLink(s54, s5)
+ self.addLink(s54, s6)
+ self.addLink(s55, s5)
+ self.addLink(s55, s6)
+ self.addLink(s56, s5)
+ self.addLink(s56, s6)
+ self.addLink(s57, s5)
+ self.addLink(s57, s6)
+ self.addLink(s58, s5)
+ self.addLink(s58, s6)
+ self.addLink(s59, s5)
+ self.addLink(s59, s6)
+ self.addLink(s60, s5)
+ self.addLink(s60, s6)
+ self.addLink(s61, s5)
+ self.addLink(s61, s6)
+ self.addLink(s62, s5)
+ self.addLink(s62, s6)
+
+ #info( '*** Add Spine-4 links\n')
+ self.addLink(s63, s7)
+ self.addLink(s63, s8)
+ self.addLink(s64, s7)
+ self.addLink(s64, s8)
+ self.addLink(s65, s7)
+ self.addLink(s65, s8)
+ self.addLink(s66, s7)
+ self.addLink(s66, s8)
+ self.addLink(s67, s7)
+ self.addLink(s67, s8)
+ self.addLink(s68, s7)
+ self.addLink(s68, s8)
+ self.addLink(s69, s7)
+ self.addLink(s69, s8)
+ self.addLink(s70, s7)
+ self.addLink(s70, s8)
+ self.addLink(s71, s7)
+ self.addLink(s71, s8)
+ self.addLink(s72, s7)
+ self.addLink(s72, s8)
+ self.addLink(s73, s7)
+ self.addLink(s73, s8)
+ self.addLink(s74, s7)
+ self.addLink(s74, s8)
+ self.addLink(s75, s7)
+ self.addLink(s75, s8)
+ self.addLink(s76, s7)
+ self.addLink(s76, s8)
+ self.addLink(s77, s7)
+ self.addLink(s77, s8)
+ self.addLink(s78, s7)
+ self.addLink(s78, s8)
+
+topos = { 'spine': ( lambda: spineTopo() ) }
+
+# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
+
+def setupNetwork():
+ "Create network"
+ topo = spineTopo()
+ #if controller_ip == '':
+ #controller_ip = '10.0.2.2';
+ # controller_ip = '127.0.0.1';
+ network = Mininet(topo=topo, switch=OVSSwitch, link=TCLink, autoSetMacs = True, controller=None)
+ network.start()
+ CLI( network )
+ network.stop()
+
+if __name__ == '__main__':
+ setLogLevel('info')
+ #setLogLevel('debug')
+ setupNetwork()
diff --git a/TestON/tests/CHO/CHOtest/dependencies/topoSpineIpv6.py b/TestON/tests/CHO/CHOtest/dependencies/topoSpineIpv6.py
new file mode 100755
index 0000000..7db4fa1
--- /dev/null
+++ b/TestON/tests/CHO/CHOtest/dependencies/topoSpineIpv6.py
@@ -0,0 +1,441 @@
+#!/usr/bin/python
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import Host, RemoteController
+from mininet.node import Node
+from mininet.node import CPULimitedHost
+from mininet.link import TCLink
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class dualStackHost( Host ):
+ def config( self, v6Addr='1000:1/64', **params ):
+ r = super( Host, self ).config( **params )
+ intf = self.defaultIntf()
+ self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
+ return r
+
+class spineTopo( Topo ):
+
+ def __init__( self, **opts ):
+ "Create a topology."
+
+ # Initialize Topology
+ Topo.__init__( self, **opts )
+
+ # add nodes, Leaf switches
+ s1 = self.addSwitch( 's1' )
+ s2 = self.addSwitch( 's2' )
+ s3 = self.addSwitch( 's3' )
+ s4 = self.addSwitch( 's4' )
+ s5 = self.addSwitch( 's5' )
+ s6 = self.addSwitch( 's6' )
+ s7 = self.addSwitch( 's7' )
+ s8 = self.addSwitch( 's8' )
+ s9 = self.addSwitch( 's9' )
+ s10 = self.addSwitch( 's10' )
+ s11 = self.addSwitch( 's11' )
+ s12 = self.addSwitch( 's12' )
+ s13 = self.addSwitch( 's13' )
+ s14 = self.addSwitch( 's14' )
+
+ # add nodes, Spine switches first...
+ s15 = self.addSwitch( 's15' )
+ s16 = self.addSwitch( 's16' )
+ s17 = self.addSwitch( 's17' )
+ s18 = self.addSwitch( 's18' )
+ s19 = self.addSwitch( 's19' )
+ s20 = self.addSwitch( 's20' )
+ s21 = self.addSwitch( 's21' )
+ s22 = self.addSwitch( 's22' )
+ s23 = self.addSwitch( 's23' )
+ s24 = self.addSwitch( 's24' )
+ s25 = self.addSwitch( 's25' )
+ s26 = self.addSwitch( 's26' )
+ s27 = self.addSwitch( 's27' )
+ s28 = self.addSwitch( 's28' )
+ s29 = self.addSwitch( 's29' )
+ s30 = self.addSwitch( 's30' )
+ s31 = self.addSwitch( 's31' )
+ s32 = self.addSwitch( 's32' )
+ s33 = self.addSwitch( 's33' )
+ s34 = self.addSwitch( 's34' )
+ s35 = self.addSwitch( 's35' )
+ s36 = self.addSwitch( 's36' )
+ s37 = self.addSwitch( 's37' )
+ s38 = self.addSwitch( 's38' )
+ s39 = self.addSwitch( 's39' )
+ s40 = self.addSwitch( 's40' )
+ s41 = self.addSwitch( 's41' )
+ s42 = self.addSwitch( 's42' )
+ s43 = self.addSwitch( 's43' )
+ s44 = self.addSwitch( 's44' )
+ s45 = self.addSwitch( 's45' )
+ s46 = self.addSwitch( 's46' )
+ s47 = self.addSwitch( 's47' )
+ s48 = self.addSwitch( 's48' )
+ s49 = self.addSwitch( 's49' )
+ s50 = self.addSwitch( 's50' )
+ s51 = self.addSwitch( 's51' )
+ s52 = self.addSwitch( 's52' )
+ s53 = self.addSwitch( 's53' )
+ s54 = self.addSwitch( 's54' )
+ s55 = self.addSwitch( 's55' )
+ s56 = self.addSwitch( 's56' )
+ s57 = self.addSwitch( 's57' )
+ s58 = self.addSwitch( 's58' )
+ s59 = self.addSwitch( 's59' )
+ s60 = self.addSwitch( 's60' )
+ s61 = self.addSwitch( 's61' )
+ s62 = self.addSwitch( 's62' )
+ s63 = self.addSwitch( 's63' )
+ s64 = self.addSwitch( 's64' )
+ s65 = self.addSwitch( 's65' )
+ s66 = self.addSwitch( 's66' )
+ s67 = self.addSwitch( 's67' )
+ s68 = self.addSwitch( 's68' )
+ s69 = self.addSwitch( 's69' )
+ s70 = self.addSwitch( 's70' )
+ s71 = self.addSwitch( 's71' )
+ s72 = self.addSwitch( 's72' )
+ s73 = self.addSwitch( 's73' )
+ s74 = self.addSwitch( 's74' )
+ s75 = self.addSwitch( 's75' )
+ s76 = self.addSwitch( 's76' )
+ s77 = self.addSwitch( 's77' )
+ s78 = self.addSwitch( 's78' )
+
+
+ # ... and now hosts
+ # s1_host = self.addHost( 'h1', ip='10.1.0.1/24', cls=dualStackHost, v6Addr='1000::1/64' )
+ # s2_host = self.addHost( 'h2', ip='10.1.0.2/24', cls=dualStackHost, v6Addr='1000::2/64' )
+ # s3_host = self.addHost( 'h3', ip='10.1.0.3/24', cls=dualStackHost, v6Addr='1000::3/64' )
+ # s4_host = self.addHost( 'h4', ip='10.1.0.4/24', cls=dualStackHost, v6Addr='1000::4/64' )
+ # s5_host = self.addHost( 'h5', ip='10.1.0.5/24', cls=dualStackHost, v6Addr='1000::5/64' )
+ # s6_host = self.addHost( 'h6', ip='10.1.0.6/24', cls=dualStackHost, v6Addr='1000::6/64' )
+ # s7_host = self.addHost( 'h7', ip='10.1.0.7/24', cls=dualStackHost, v6Addr='1000::7/64' )
+ # s8_host = self.addHost( 'h8', ip='10.1.0.8/24', cls=dualStackHost, v6Addr='1000::8/64' )
+ # s9_host = self.addHost( 'h9', ip='10.1.0.9/24', cls=dualStackHost, v6Addr='1000::9/64' )
+ # s10_host = self.addHost( 'h10', ip='10.1.0.10/24', cls=dualStackHost, v6Addr='1000::10/64' )
+ s11_host = self.addHost( 'h11', ip='10.1.0.11/24', cls=dualStackHost, v6Addr='1000::11/64' )
+ s12_host = self.addHost( 'h12', ip='10.1.0.12/24', cls=dualStackHost, v6Addr='1000::12/64' )
+ s13_host = self.addHost( 'h13', ip='10.1.0.13/24', cls=dualStackHost, v6Addr='1000::13/64' )
+ s14_host = self.addHost( 'h14', ip='10.1.0.14/24', cls=dualStackHost, v6Addr='1000::14/64' )
+ s15_host = self.addHost( 'h15', ip='10.1.0.15/24', cls=dualStackHost, v6Addr='1000::15/64' )
+ s16_host = self.addHost( 'h16', ip='10.1.0.16/24', cls=dualStackHost, v6Addr='1000::16/64' )
+ s17_host = self.addHost( 'h17', ip='10.1.0.17/24', cls=dualStackHost, v6Addr='1000::17/64' )
+ s18_host = self.addHost( 'h18', ip='10.1.0.18/24', cls=dualStackHost, v6Addr='1000::18/64' )
+ s19_host = self.addHost( 'h19', ip='10.1.0.19/24', cls=dualStackHost, v6Addr='1000::19/64' )
+ s20_host = self.addHost( 'h20', ip='10.1.0.20/24', cls=dualStackHost, v6Addr='1000::20/64' )
+ s21_host = self.addHost( 'h21', ip='10.1.0.21/24', cls=dualStackHost, v6Addr='1000::21/64' )
+ s22_host = self.addHost( 'h22', ip='10.1.0.22/24', cls=dualStackHost, v6Addr='1000::22/64' )
+ s23_host = self.addHost( 'h23', ip='10.1.0.23/24', cls=dualStackHost, v6Addr='1000::23/64' )
+ s24_host = self.addHost( 'h24', ip='10.1.0.24/24', cls=dualStackHost, v6Addr='1000::24/64' )
+ s25_host = self.addHost( 'h25', ip='10.1.0.25/24', cls=dualStackHost, v6Addr='1000::25/64' )
+ s26_host = self.addHost( 'h26', ip='10.1.0.26/24', cls=dualStackHost, v6Addr='1000::26/64' )
+ s27_host = self.addHost( 'h27', ip='10.1.0.27/24', cls=dualStackHost, v6Addr='1000::27/64' )
+ s28_host = self.addHost( 'h28', ip='10.1.0.28/24', cls=dualStackHost, v6Addr='1000::28/64' )
+ s29_host = self.addHost( 'h29', ip='10.1.0.29/24', cls=dualStackHost, v6Addr='1000::29/64' )
+ s30_host = self.addHost( 'h30', ip='10.1.0.30/24', cls=dualStackHost, v6Addr='1000::30/64' )
+ s31_host = self.addHost( 'h31', ip='10.1.0.31/24', cls=dualStackHost, v6Addr='1000::31/64' )
+ s32_host = self.addHost( 'h32', ip='10.1.0.32/24', cls=dualStackHost, v6Addr='1000::32/64' )
+ s33_host = self.addHost( 'h33', ip='10.1.0.33/24', cls=dualStackHost, v6Addr='1000::33/64' )
+ s34_host = self.addHost( 'h34', ip='10.1.0.34/24', cls=dualStackHost, v6Addr='1000::34/64' )
+ s35_host = self.addHost( 'h35', ip='10.1.0.35/24', cls=dualStackHost, v6Addr='1000::35/64' )
+ s36_host = self.addHost( 'h36', ip='10.1.0.36/24', cls=dualStackHost, v6Addr='1000::36/64' )
+ s37_host = self.addHost( 'h37', ip='10.1.0.37/24', cls=dualStackHost, v6Addr='1000::37/64' )
+ s38_host = self.addHost( 'h38', ip='10.1.0.38/24', cls=dualStackHost, v6Addr='1000::38/64' )
+ s39_host = self.addHost( 'h39', ip='10.1.0.39/24', cls=dualStackHost, v6Addr='1000::39/64' )
+ s40_host = self.addHost( 'h40', ip='10.1.0.40/24', cls=dualStackHost, v6Addr='1000::40/64' )
+ s41_host = self.addHost( 'h41', ip='10.1.0.41/24', cls=dualStackHost, v6Addr='1000::41/64' )
+ s42_host = self.addHost( 'h42', ip='10.1.0.42/24', cls=dualStackHost, v6Addr='1000::42/64' )
+ s43_host = self.addHost( 'h43', ip='10.1.0.43/24', cls=dualStackHost, v6Addr='1000::43/64' )
+ s44_host = self.addHost( 'h44', ip='10.1.0.44/24', cls=dualStackHost, v6Addr='1000::44/64' )
+ s45_host = self.addHost( 'h45', ip='10.1.0.45/24', cls=dualStackHost, v6Addr='1000::45/64' )
+ s46_host = self.addHost( 'h46', ip='10.1.0.46/24', cls=dualStackHost, v6Addr='1000::46/64' )
+ s47_host = self.addHost( 'h47', ip='10.1.0.47/24', cls=dualStackHost, v6Addr='1000::47/64' )
+ s48_host = self.addHost( 'h48', ip='10.1.0.48/24', cls=dualStackHost, v6Addr='1000::48/64' )
+ s49_host = self.addHost( 'h49', ip='10.1.0.49/24', cls=dualStackHost, v6Addr='1000::49/64' )
+ s50_host = self.addHost( 'h50', ip='10.1.0.50/24', cls=dualStackHost, v6Addr='1000::50/64' )
+ s51_host = self.addHost( 'h51', ip='10.1.0.51/24', cls=dualStackHost, v6Addr='1000::51/64' )
+ s52_host = self.addHost( 'h52', ip='10.1.0.52/24', cls=dualStackHost, v6Addr='1000::52/64' )
+ s53_host = self.addHost( 'h53', ip='10.1.0.53/24', cls=dualStackHost, v6Addr='1000::53/64' )
+ s54_host = self.addHost( 'h54', ip='10.1.0.54/24', cls=dualStackHost, v6Addr='1000::54/64' )
+ s55_host = self.addHost( 'h55', ip='10.1.0.55/24', cls=dualStackHost, v6Addr='1000::55/64' )
+ s56_host = self.addHost( 'h56', ip='10.1.0.56/24', cls=dualStackHost, v6Addr='1000::56/64' )
+ s57_host = self.addHost( 'h57', ip='10.1.0.57/24', cls=dualStackHost, v6Addr='1000::57/64' )
+ s58_host = self.addHost( 'h58', ip='10.1.0.58/24', cls=dualStackHost, v6Addr='1000::58/64' )
+ s59_host = self.addHost( 'h59', ip='10.1.0.59/24', cls=dualStackHost, v6Addr='1000::59/64' )
+ s60_host = self.addHost( 'h60', ip='10.1.0.60/24', cls=dualStackHost, v6Addr='1000::60/64' )
+ s61_host = self.addHost( 'h61', ip='10.1.0.61/24', cls=dualStackHost, v6Addr='1000::61/64' )
+ s62_host = self.addHost( 'h62', ip='10.1.0.62/24', cls=dualStackHost, v6Addr='1000::62/64' )
+ s63_host = self.addHost( 'h63', ip='10.1.0.63/24', cls=dualStackHost, v6Addr='1000::63/64' )
+ s64_host = self.addHost( 'h64', ip='10.1.0.64/24', cls=dualStackHost, v6Addr='1000::64/64' )
+ s65_host = self.addHost( 'h65', ip='10.1.0.65/24', cls=dualStackHost, v6Addr='1000::65/64' )
+ s66_host = self.addHost( 'h66', ip='10.1.0.66/24', cls=dualStackHost, v6Addr='1000::66/64' )
+ s67_host = self.addHost( 'h67', ip='10.1.0.67/24', cls=dualStackHost, v6Addr='1000::67/64' )
+ s68_host = self.addHost( 'h68', ip='10.1.0.68/24', cls=dualStackHost, v6Addr='1000::68/64' )
+ s69_host = self.addHost( 'h69', ip='10.1.0.69/24', cls=dualStackHost, v6Addr='1000::69/64' )
+ s70_host = self.addHost( 'h70', ip='10.1.0.70/24', cls=dualStackHost, v6Addr='1000::70/64' )
+ s71_host = self.addHost( 'h71', ip='10.1.0.71/24', cls=dualStackHost, v6Addr='1000::71/64' )
+ s72_host = self.addHost( 'h72', ip='10.1.0.72/24', cls=dualStackHost, v6Addr='1000::72/64' )
+ s73_host = self.addHost( 'h73', ip='10.1.0.73/24', cls=dualStackHost, v6Addr='1000::73/64' )
+ s74_host = self.addHost( 'h74', ip='10.1.0.74/24', cls=dualStackHost, v6Addr='1000::74/64' )
+ s75_host = self.addHost( 'h75', ip='10.1.0.75/24', cls=dualStackHost, v6Addr='1000::75/64' )
+ s76_host = self.addHost( 'h76', ip='10.1.0.76/24', cls=dualStackHost, v6Addr='1000::76/64' )
+ s77_host = self.addHost( 'h77', ip='10.1.0.77/24', cls=dualStackHost, v6Addr='1000::77/64' )
+ s78_host = self.addHost( 'h78', ip='10.1.0.78/24', cls=dualStackHost, v6Addr='1000::78/64' )
+
+ # add edges between switch and corresponding host
+ #self.addLink( s1 , s1_host )
+ #self.addLink( s2 , s2_host )
+ #self.addLink( s3 , s3_host )
+ #self.addLink( s4 , s4_host )
+ #self.addLink( s5 , s5_host )
+ #self.addLink( s6 , s6_host )
+ #self.addLink( s7 , s7_host )
+ #self.addLink( s8 , s8_host )
+ #self.addLink( s9 , s9_host )
+ #self.addLink( s10 , s10_host )
+ self.addLink( s11 , s11_host )
+ self.addLink( s12 , s12_host )
+ self.addLink( s13 , s13_host )
+ self.addLink( s14 , s14_host )
+ self.addLink( s15 , s15_host )
+ self.addLink( s16 , s16_host )
+ self.addLink( s17 , s17_host )
+ self.addLink( s18 , s18_host )
+ self.addLink( s19 , s19_host )
+ self.addLink( s20 , s20_host )
+ self.addLink( s21 , s21_host )
+ self.addLink( s22 , s22_host )
+ self.addLink( s23 , s23_host )
+ self.addLink( s24 , s24_host )
+ self.addLink( s25 , s25_host )
+ self.addLink( s26 , s26_host )
+ self.addLink( s27 , s27_host )
+ self.addLink( s28 , s28_host )
+ self.addLink( s29 , s29_host )
+ self.addLink( s30 , s30_host )
+ self.addLink( s31 , s31_host )
+ self.addLink( s32 , s32_host )
+ self.addLink( s33 , s33_host )
+ self.addLink( s34 , s34_host )
+ self.addLink( s35 , s35_host )
+ self.addLink( s36 , s36_host )
+ self.addLink( s37 , s37_host )
+ self.addLink( s38 , s38_host )
+ self.addLink( s39 , s39_host )
+ self.addLink( s40 , s40_host )
+ self.addLink( s41 , s41_host )
+ self.addLink( s42 , s42_host )
+ self.addLink( s43 , s43_host )
+ self.addLink( s44 , s44_host )
+ self.addLink( s45 , s45_host )
+ self.addLink( s46 , s46_host )
+ self.addLink( s47 , s47_host )
+ self.addLink( s48 , s48_host )
+ self.addLink( s49 , s49_host )
+ self.addLink( s50 , s50_host )
+ self.addLink( s51 , s51_host )
+ self.addLink( s52 , s52_host )
+ self.addLink( s53 , s53_host )
+ self.addLink( s54 , s54_host )
+ self.addLink( s55 , s55_host )
+ self.addLink( s56 , s56_host )
+ self.addLink( s57 , s57_host )
+ self.addLink( s58 , s58_host )
+ self.addLink( s59 , s59_host )
+ self.addLink( s60 , s60_host )
+ self.addLink( s61 , s61_host )
+ self.addLink( s62 , s62_host )
+ self.addLink( s63 , s63_host )
+ self.addLink( s64 , s64_host )
+ self.addLink( s65 , s65_host )
+ self.addLink( s66 , s66_host )
+ self.addLink( s67 , s67_host )
+ self.addLink( s68 , s68_host )
+ self.addLink( s69 , s69_host )
+ self.addLink( s70 , s70_host )
+ self.addLink( s71 , s71_host )
+ self.addLink( s72 , s72_host )
+ self.addLink( s73 , s73_host )
+ self.addLink( s74 , s74_host )
+ self.addLink( s75 , s75_host )
+ self.addLink( s76 , s76_host )
+ self.addLink( s77 , s77_host )
+ self.addLink( s78 , s78_host )
+
+ #info( '*** Add Leaf links\n')
+ self.addLink(s1, s9)
+ self.addLink(s2, s10)
+ self.addLink(s3, s9)
+ self.addLink(s4, s10)
+ self.addLink(s5, s9)
+ self.addLink(s6, s10)
+ self.addLink(s7, s9)
+ self.addLink(s8, s10)
+ self.addLink(s9, s11)
+ self.addLink(s9, s12)
+ self.addLink(s10, s13)
+ self.addLink(s10, s14)
+ self.addLink(s11, s12)
+ self.addLink(s13, s14)
+
+ #info( '*** Add Spine-1 links\n')
+ self.addLink(s15, s1)
+ self.addLink(s15, s2)
+ self.addLink(s16, s1)
+ self.addLink(s16, s2)
+ self.addLink(s17, s1)
+ self.addLink(s17, s2)
+ self.addLink(s18, s1)
+ self.addLink(s18, s2)
+ self.addLink(s19, s1)
+ self.addLink(s19, s2)
+ self.addLink(s20, s1)
+ self.addLink(s20, s2)
+ self.addLink(s21, s1)
+ self.addLink(s21, s2)
+ self.addLink(s22, s1)
+ self.addLink(s22, s2)
+ self.addLink(s23, s1)
+ self.addLink(s23, s2)
+ self.addLink(s24, s1)
+ self.addLink(s24, s2)
+ self.addLink(s25, s1)
+ self.addLink(s25, s2)
+ self.addLink(s26, s1)
+ self.addLink(s26, s2)
+ self.addLink(s27, s1)
+ self.addLink(s27, s2)
+ self.addLink(s28, s1)
+ self.addLink(s28, s2)
+ self.addLink(s29, s1)
+ self.addLink(s29, s2)
+ self.addLink(s30, s1)
+ self.addLink(s30, s2)
+
+ #info( '*** Add Spine-2 links\n')
+ self.addLink(s31, s3)
+ self.addLink(s31, s4)
+ self.addLink(s32, s3)
+ self.addLink(s32, s4)
+ self.addLink(s33, s3)
+ self.addLink(s33, s4)
+ self.addLink(s34, s3)
+ self.addLink(s34, s4)
+ self.addLink(s35, s3)
+ self.addLink(s35, s4)
+ self.addLink(s36, s3)
+ self.addLink(s36, s4)
+ self.addLink(s37, s3)
+ self.addLink(s37, s4)
+ self.addLink(s38, s3)
+ self.addLink(s38, s4)
+ self.addLink(s39, s3)
+ self.addLink(s39, s4)
+ self.addLink(s40, s3)
+ self.addLink(s40, s4)
+ self.addLink(s41, s3)
+ self.addLink(s41, s4)
+ self.addLink(s42, s3)
+ self.addLink(s42, s4)
+ self.addLink(s43, s3)
+ self.addLink(s43, s4)
+ self.addLink(s44, s3)
+ self.addLink(s44, s4)
+ self.addLink(s45, s3)
+ self.addLink(s45, s4)
+ self.addLink(s46, s3)
+ self.addLink(s46, s4)
+
+ #info( '*** Add Spine-3 links\n')
+ self.addLink(s47, s5)
+ self.addLink(s47, s6)
+ self.addLink(s48, s5)
+ self.addLink(s48, s6)
+ self.addLink(s49, s5)
+ self.addLink(s49, s6)
+ self.addLink(s50, s5)
+ self.addLink(s50, s6)
+ self.addLink(s51, s5)
+ self.addLink(s51, s6)
+ self.addLink(s52, s5)
+ self.addLink(s52, s6)
+ self.addLink(s53, s5)
+ self.addLink(s53, s6)
+ self.addLink(s54, s5)
+ self.addLink(s54, s6)
+ self.addLink(s55, s5)
+ self.addLink(s55, s6)
+ self.addLink(s56, s5)
+ self.addLink(s56, s6)
+ self.addLink(s57, s5)
+ self.addLink(s57, s6)
+ self.addLink(s58, s5)
+ self.addLink(s58, s6)
+ self.addLink(s59, s5)
+ self.addLink(s59, s6)
+ self.addLink(s60, s5)
+ self.addLink(s60, s6)
+ self.addLink(s61, s5)
+ self.addLink(s61, s6)
+ self.addLink(s62, s5)
+ self.addLink(s62, s6)
+
+ #info( '*** Add Spine-4 links\n')
+ self.addLink(s63, s7)
+ self.addLink(s63, s8)
+ self.addLink(s64, s7)
+ self.addLink(s64, s8)
+ self.addLink(s65, s7)
+ self.addLink(s65, s8)
+ self.addLink(s66, s7)
+ self.addLink(s66, s8)
+ self.addLink(s67, s7)
+ self.addLink(s67, s8)
+ self.addLink(s68, s7)
+ self.addLink(s68, s8)
+ self.addLink(s69, s7)
+ self.addLink(s69, s8)
+ self.addLink(s70, s7)
+ self.addLink(s70, s8)
+ self.addLink(s71, s7)
+ self.addLink(s71, s8)
+ self.addLink(s72, s7)
+ self.addLink(s72, s8)
+ self.addLink(s73, s7)
+ self.addLink(s73, s8)
+ self.addLink(s74, s7)
+ self.addLink(s74, s8)
+ self.addLink(s75, s7)
+ self.addLink(s75, s8)
+ self.addLink(s76, s7)
+ self.addLink(s76, s8)
+ self.addLink(s77, s7)
+ self.addLink(s77, s8)
+ self.addLink(s78, s7)
+ self.addLink(s78, s8)
+
+topos = { 'spine': ( lambda: spineTopo() ) }
+
+# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
+
+def setupNetwork():
+ "Create network"
+ topo = spineTopo()
+ #if controller_ip == '':
+ #controller_ip = '10.0.2.2';
+ # controller_ip = '127.0.0.1';
+ network = Mininet(topo=topo, switch=OVSSwitch, link=TCLink, autoSetMacs = True, controller=None)
+ network.start()
+ CLI( network )
+ network.stop()
+
+if __name__ == '__main__':
+ setLogLevel('info')
+ #setLogLevel('debug')
+ setupNetwork()
diff --git a/TestON/tests/CHO/__init__.py b/TestON/tests/CHO/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/CHO/__init__.py
diff --git a/TestON/tests/CHO/dependencies/__init__.py b/TestON/tests/CHO/dependencies/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/CHO/dependencies/__init__.py