Tests- stable versions
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 1f153ee..4a91f6e 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1901,3 +1901,68 @@
main.cleanup()
main.exit()
+
+ def getOnosIpFromEnv(self):
+
+ import string
+
+ # returns a list of ip addresses for the onos nodes, will work with up to 7 nodes + OCN and OCI
+ # returns in format [ 'x', OC1 ip, OC2 i... ect. ... , ONN ip ]
+
+ self.handle.sendline("env| grep OC")
+ self.handle.expect(":~")
+ rawOutput = self.handle.before
+ print rawOutput
+ print "-----------------------------"
+ print repr(rawOutput)
+ mpa = dict.fromkeys(range(32))
+ translated = rawOutput.translate(mpa)
+ print translated
+
+
+ # create list with only the lines that have the needed IPs
+ unparsedIps = []
+
+ # remove preceeding or trailing lines
+ for line in rawOutput:
+ if "OC" in line and "=" in line:
+ unparsedIps.append(str(line))
+
+ # determine cluster size
+ clusterCount = 0
+ for line in unparsedIps:
+ line = str(line)
+ print line
+ temp = line.replace("OC","")
+ print("line index " + str(line.index("=")))
+ OCindex = temp[0]
+ for i in range(0, 7):
+ if OCindex == str(i) and i > clusterCount:
+ clusterCount == i
+ print(clusterCount)
+ # create list to hold ips such that OC1 is at list[1] and OCN and OCI are at the end (in that order)
+ ONOSIps = ["x"] * (clusterCount + 3)
+
+ # populate list
+ for line in unparsedIps:
+ main.log.info(line)##########
+ temp = str(line.replace("OC",""))
+ main.log.info(str(list(temp)))
+ OCindex = temp[0]
+ main.log.info(OCindex)############
+ if OCindex == "N":
+ ONOSIps[ clusterCount + 1 ] = temp.replace("N=","")
+
+ if OCindex == "I":
+ ONOSIps[ clusterCount + 2 ] = temp.replace("I=","")
+
+ else:
+ ONOSIps[ int(OCindex) ] = temp.replace((OCindex + "=") ,"")
+
+ # validate
+ for x in ONOSIps:
+ if ONOSIps.index(x) != 0 and x == "x":
+ main.log.error("ENV READ FAILURE, MISSING DATA: \n\n" + str(ONOSIps) + "\n\n")
+
+ return ONOSIps
+
diff --git a/TestON/tests/FuncIntent/FuncIntent.params b/TestON/tests/FuncIntent/FuncIntent.params
new file mode 100755
index 0000000..3d2ef8a
--- /dev/null
+++ b/TestON/tests/FuncIntent/FuncIntent.params
@@ -0,0 +1,34 @@
+<PARAMS>
+
+ <testcases>10,11,12,1001,10,12,1001</testcases>
+
+ <SCALE>1,3</SCALE>
+ <availableNodes>3</availableNodes>
+ <ENV>
+ <cellName>single_func</cellName>
+ <cellApps>drivers,openflow,proxyarp,mobility</cellApps>
+ </ENV>
+ <GIT>
+ <pull>False</pull>
+ <branch>master</branch>
+ </GIT>
+ <CTRL>
+ <num>3</num>
+ <ip1>OC1</ip1>
+ <port1>6633</port1>
+ <ip2>OC2</ip2>
+ <port2>6633</port2>
+ <ip3>OC3</ip3>
+ <port3>6633</port3>
+ </CTRL>
+ <BENCH>
+ <user>admin</user>
+ <ip1>10.128.10.20</ip1>
+ </BENCH>
+ <MININET>
+ <switch>7</switch>
+ <links>20</links>
+ <topo>~/mininet/custom/newFuncTopo.py</topo>
+ </MININET>
+
+</PARAMS>
diff --git a/TestON/tests/FuncIntent/FuncIntent.py b/TestON/tests/FuncIntent/FuncIntent.py
new file mode 100644
index 0000000..1db5752
--- /dev/null
+++ b/TestON/tests/FuncIntent/FuncIntent.py
@@ -0,0 +1,501 @@
+
+# Testing the basic functionality of ONOS Next
+# For sanity and driver functionality excercises only.
+
+import time
+import json
+
+time.sleep( 1 )
+
+class FuncIntent:
+
+ def __init__( self ):
+ self.default = ''
+
+ def CASE10( self, main ):
+ import time
+ import os
+ """
+ Startup sequence:
+ cell <name>
+ onos-verify-cell
+ onos-remove-raft-log
+ git pull
+ mvn clean install
+ onos-package
+ onos-install -f
+ onos-wait-for-start
+ """
+ global init
+ try:
+ if type(init) is not bool:
+ init = False
+ except NameError:
+ init = False
+ #Local variables
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+ apps = main.params[ 'ENV' ][ 'cellApps' ]
+ gitBranch = main.params[ 'GIT' ][ 'branch' ]
+ #benchIp = main.params[ 'BENCH' ][ 'ip1' ]
+ benchUser = main.params[ 'BENCH' ][ 'user' ]
+ topology = main.params[ 'MININET' ][ 'topo' ]
+ #maxNodes = int( main.params[ 'availableNodes' ] )
+ main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
+ main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
+ main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
+ PULLCODE = False
+ if main.params[ 'GIT' ][ 'pull' ] == 'True':
+ PULLCODE = True
+ main.case( "Setting up test environment" )
+ main.CLIs = []
+ for i in range( 1, int( main.numCtrls ) + 1 ):
+ main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+
+ # -- INIT SECTION, ONLY RUNS ONCE -- #
+ if init == False:
+ init = True
+
+ #main.ONOSip = []
+ main.ONOSport = []
+ main.scale = ( main.params[ 'SCALE' ] ).split( "," )
+ main.numCtrls = int( main.scale[ 0 ] )
+
+ if PULLCODE:
+ main.step( "Git checkout and pull " + gitBranch )
+ main.ONOSbench.gitCheckout( gitBranch )
+ gitPullResult = main.ONOSbench.gitPull()
+ if gitPullResult == main.ERROR:
+ main.log.error( "Error pulling git branch" )
+ main.step( "Using mvn clean & install" )
+ cleanInstallResult = main.ONOSbench.cleanInstall()
+ stepResult = cleanInstallResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully compiled " +
+ "latest ONOS",
+ onfail="Failed to compile " +
+ "latest ONOS" )
+ else:
+ main.log.warn( "Did not pull new code so skipping mvn " +
+ "clean install" )
+ # Populate main.ONOSip with ips from params
+ #for i in range( 1, maxNodes + 1):
+ # main.ONOSip.append( main.params[ 'CTRL' ][ 'ip' + str( i ) ] )
+ # main.ONOSport.append( main.params[ 'CTRL' ][ 'port' +
+ # str( i ) ])
+
+ ONOSip = main.ONOSbench.getOnosIpFromEnv()
+ main.log.info("\t\t CLUSTER IPs: \n\n" + str(ONOSip) + "\n\n")
+
+ main.numCtrls = int( main.scale[ 0 ] )
+ main.scale.remove( main.scale[ 0 ] )
+
+ #kill off all onos processes
+ main.log.info( "Safety check, killing all ONOS processes" +
+ " before initiating enviornment setup" )
+ for i in range( maxNodes ):
+ main.ONOSbench.onosDie( main.ONOSip[ i ] )
+ """
+ main.step( "Apply cell to environment" )
+ cellResult = main.ONOSbench.setCell( cellName )
+ verifyResult = main.ONOSbench.verifyCell()
+ stepResult = cellResult and verifyResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully applied cell to " + \
+ "environment",
+ onfail="Failed to apply cell to environment " )
+ """
+ """main.step( "Removing raft logs" )
+ removeRaftResult = main.ONOSbench.onosRemoveRaftLogs()
+ stepResult = removeRaftResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully removed raft logs",
+ onfail="Failed to remove raft logs" )
+ """
+ print "NODE COUNT = ", main.numCtrls
+ main.log.info( "Creating cell file" )
+ cellIp = []
+ for i in range( main.numCtrls ):
+ cellIp.append( str( main.ONOSip[ i ] ) )
+ print cellIp
+ main.ONOSbench.createCellFile( benchIp, cellName, "",
+ str( apps ), *cellIp )
+
+ main.step( "Apply cell to environment" )
+ cellResult = main.ONOSbench.setCell( cellName )
+ verifyResult = main.ONOSbench.verifyCell()
+ stepResult = cellResult and verifyResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully applied cell to " + \
+ "environment",
+ onfail="Failed to apply cell to environment " )
+
+ main.step( "Creating ONOS package" )
+ packageResult = main.ONOSbench.onosPackage()
+ stepResult = packageResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully created ONOS package",
+ onfail="Failed to create ONOS package" )
+
+ main.step( "Uninstalling ONOS package" )
+ onosUninstallResult = main.TRUE
+ for i in range( main.numCtrls):
+ onosUninstallResult = onosUninstallResult and \
+ main.ONOSbench.onosUninstall( nodeIp=main.ONOSip[ i ] )
+ stepResult = onosUninstallResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully uninstalled ONOS package",
+ onfail="Failed to uninstall ONOS package" )
+ time.sleep( 5 )
+ main.step( "Installing ONOS package" )
+ onosInstallResult = main.TRUE
+ for i in range( main.numCtrls):
+ onosInstallResult = onosInstallResult and \
+ main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
+ stepResult = onosInstallResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully installed ONOS package",
+ onfail="Failed to install ONOS package" )
+
+ time.sleep( 5 )
+ main.step( "Starting ONOS service" )
+ stopResult = main.TRUE
+ startResult = main.TRUE
+ onosIsUp = main.TRUE
+ for i in range( main.numCtrls ):
+ onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+ if onosIsUp == main.TRUE:
+ main.log.report( "ONOS instance is up and ready" )
+ else:
+ main.log.report( "ONOS instance may not be up, stop and " +
+ "start ONOS again " )
+ for i in range( main.numCtrls ):
+ stopResult = stopResult and \
+ main.ONOSbench.onosStop( main.ONOSip[ i ] )
+ for i in range( main.numCtrls ):
+ startResult = startResult and \
+ main.ONOSbench.onosStart( main.ONOSip[ i ] )
+ stepResult = onosIsUp and stopResult and startResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="ONOS service is ready",
+ onfail="ONOS service did not start properly" )
+
+ main.step( "Start ONOS cli" )
+ cliResult = main.TRUE
+ for i in range( main.numCtrls ):
+ cliResult = cliResult and \
+ main.CLIs[i].startOnosCli( main.ONOSip[ i ] )
+ stepResult = cliResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully start ONOS cli",
+ onfail="Failed to start ONOS cli" )
+
+ def CASE11( self, main ):
+ """
+ Start mininet
+ """
+ main.log.report( "Start Mininet topology" )
+ main.log.case( "Start Mininet topology" )
+
+ main.step( "Starting Mininet Topology" )
+ topoResult = main.Mininet1.startNet( topoFile=topology )
+ stepResult = topoResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully loaded topology",
+ onfail="Failed to load topology" )
+ # Exit if topology did not load properly
+ if not topoResult:
+ main.cleanup()
+ main.exit()
+
+ def CASE12( self, main ):
+ """
+ Assign mastership to controllers
+ """
+ import re
+
+ main.step( "Assigning switches to controllers" )
+ assignResult = main.TRUE
+ for i in range( 1, ( main.numSwitch + 1 ) ):
+ main.Mininet1.assignSwController( sw=str( i ),
+ count=1,
+ ip1=main.ONOSip[ 0 ],
+ port1=main.ONOSport[ 0 ] )
+ for i in range( 1, ( main.numSwitch + 1 ) ):
+ response = main.Mininet1.getSwController( "s" + str( i ) )
+ print( "Response is " + str( response ) )
+ if re.search( "tcp:" + main.ONOSip[ 0 ], response ):
+ assignResult = assignResult and main.TRUE
+ else:
+ assignResult = main.FALSE
+ stepResult = assignResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully assigned switches" +
+ "to controller",
+ onfail="Failed to assign switches to " +
+ "controller" )
+
+ def CASE1001( self, main ):
+ """
+ Add host intents between 2 host:
+ - Discover hosts
+ - Add host intents
+ - Check intents
+ - Check flows
+ - Ping hosts
+ - Reroute
+ - Link down
+ - Ping hosts
+ - Link up
+ - Ping hosts
+ - Remove intents
+ """
+ import time
+ import json
+ import re
+ """
+ Create your item(s) here
+ item = { 'name': '', 'host1':
+ { 'name': '', 'MAC': '00:00:00:00:00:0X',
+ 'id':'00:00:00:00:00:0X/-X' } , 'host2':
+ { 'name': '', 'MAC': '00:00:00:00:00:0X',
+ 'id':'00:00:00:00:00:0X/-X'}, 'link': { 'switch1': '',
+ 'switch2': '', 'num':'' } }
+ """
+ # Local variables
+ items = []
+ ipv4 = { 'name': 'IPV4', 'host1':
+ { 'name': 'h1', 'MAC': '00:00:00:00:00:01',
+ 'id':'00:00:00:00:00:01/-1' } , 'host2':
+ { 'name': 'h9', 'MAC': '00:00:00:00:00:09',
+ 'id':'00:00:00:00:00:09/-1'}, 'link': { 'switch1': 's5',
+ 'switch2': 's2', 'num':'18' } }
+ dualStack1 = { 'name': 'DUALSTACK1', 'host1':
+ { 'name': 'h3', 'MAC': '00:00:00:00:00:03',
+ 'id':'00:00:00:00:00:03/-1' } , 'host2':
+ { 'name': 'h11', 'MAC': '00:00:00:00:00:0B',
+ 'id':'00:00:00:00:00:0B/-1'}, 'link': { 'switch1': 's5',
+ 'switch2': 's2', 'num':'18' } }
+ items.append( ipv4 )
+ items.append( dualStack1 )
+ # Global variables
+
+ main.log.case( "Add host intents between 2 host" )
+
+ for item in items:
+ stepResult = main.TRUE
+ itemName = item[ 'name' ]
+ h1Name = item[ 'host1' ][ 'name' ]
+ h2Name = item[ 'host2' ][ 'name' ]
+ h1Mac = item[ 'host1' ][ 'MAC' ]
+ h2Mac = item[ 'host2' ][ 'MAC' ]
+ h1Id = item[ 'host1' ][ 'id']
+ h2Id = item[ 'host2' ][ 'id']
+ # Link down/up for rerouting
+ sw1 = item[ 'link' ][ 'switch1' ]
+ sw2 = item[ 'link' ][ 'switch2' ]
+ remLink = item[ 'link' ][ 'num' ]
+ pingResult = main.TRUE
+ statusResult = main.TRUE
+ linkDownResult = main.TRUE
+ linkUpResult = main.TRUE
+ intentsId = []
+ main.step( itemName + ": Add host intents between " + h1Name
+ + " and " + h2Name )
+ main.log.info( itemName + ": Discover host using arping" )
+ main.Mininet1.arping( host=h1Name )
+ main.Mininet1.arping( host=h2Name )
+ host1 = main.CLIs[ 0 ].getHost( mac=h1Mac )
+ host2 = main.CLIs[ 0 ].getHost( mac=h2Mac )
+ print host1
+ print host2
+ # Adding intents
+ main.log.info( itemName + ": Adding host intents" )
+ intent1 = main.CLIs[ 0 ].addHostIntent( hostIdOne=h1Id,
+ hostIdTwo=h2Id )
+ intentsId.append( intent1 )
+ time.sleep( 5 )
+ intent2 = main.CLIs[ 0 ].addHostIntent( hostIdOne=h2Id,
+ hostIdTwo=h1Id )
+ intentsId.append( intent2 )
+ # Checking intents
+ main.log.info( itemName + ": Check host intents state" )
+ time.sleep( 30 )
+ for i in range( main.numCtrls ):
+ intentResult = main.CLIs[ i ].checkIntentState(
+ intentsId=intentsId )
+ if not intentResult:
+ main.log.info( itemName + ": Check host intents state" +
+ " again")
+ for i in range( main.numCtrls ):
+ intentResult = main.CLIs[ i ].checkIntentState(
+ intentsId=intentsId )
+ # Ping hosts
+ time.sleep( 10 )
+ main.log.info( itemName + ": Ping " + h1Name + " and " +
+ h2Name )
+ pingResult1 = main.Mininet1.pingHost( src=h1Name , target=h2Name )
+ if not pingResult1:
+ main.log.info( itemName + ": " + h1Name + " cannot ping "
+ + h2Name )
+ pingResult2 = main.Mininet1.pingHost( src=h2Name , target=h1Name )
+ if not pingResult2:
+ main.log.info( itemName + ": " + h2Name + " cannot ping "
+ + h1Name )
+ pingResult = pingResult1 and pingResult2
+ if pingResult:
+ main.log.info( itemName + ": Successfully pinged " +
+ "both hosts" )
+ else:
+ main.log.info( itemName + ": Failed to ping " +
+ "both hosts" )
+ # Rerouting ( link down )
+ main.log.info( itemName + ": Bring link down between " +
+ sw1 + " and " + sw2 )
+ main.Mininet1.link( end1=sw1,
+ end2=sw2,
+ option="down" )
+ time.sleep( 5 )
+
+ # Check onos topology
+ main.log.info( itemName + ": Checking ONOS topology " )
+
+ for i in range( main.numCtrls ):
+ topologyResult = main.CLIs[ i ].topology()
+ linkDownResult = main.ONOSbench.checkStatus( topologyResult,
+ main.numSwitch,
+ remLink )\
+ and linkDownResult
+ if not linkDownResult:
+ main.log.info( itemName + ": Topology mismatch" )
+ else:
+ main.log.info( itemName + ": Topology match" )
+
+ # Ping hosts
+ main.log.info( itemName + ": Ping " + h1Name + " and " +
+ h2Name )
+ pingResult1 = main.Mininet1.pingHost( src=h1Name , target=h2Name )
+ if not pingResult1:
+ main.log.info( itemName + ": " + h1Name + " cannot ping "
+ + h2Name )
+ pingResult2 = main.Mininet1.pingHost( src=h2Name , target=h1Name )
+ if not pingResult2:
+ main.log.info( itemName + ": " + h2Name + " cannot ping "
+ + h1Name )
+ pingResult = pingResult1 and pingResult2
+ if pingResult:
+ main.log.info( itemName + ": Successfully pinged " +
+ "both hosts" )
+ else:
+ main.log.info( itemName + ": Failed to ping " +
+ "both hosts" )
+ # link up
+ main.log.info( itemName + ": Bring link up between " +
+ sw1 + " and " + sw2 )
+ main.Mininet1.link( end1=sw1,
+ end2=sw2,
+ option="up" )
+ time.sleep( 5 )
+
+ # Check onos topology
+ main.log.info( itemName + ": Checking ONOS topology " )
+ for i in range( main.numCtrls ):
+ topologyResult = main.CLIs[ i ].topology()
+ linkUpResult = main.ONOSbench.checkStatus( topologyResult,
+ main.numSwitch,
+ main.numLinks )\
+ and linkUpResult
+ if not linkUpResult:
+ main.log.info( itemName + ": Topology mismatch" )
+ else:
+ main.log.info( itemName + ": Topology match" )
+
+ # Ping hosts
+ main.log.info( itemName + ": Ping " + h1Name + " and " +
+ h2Name )
+ pingResult1 = main.Mininet1.pingHost( src=h1Name , target=h2Name )
+ if not pingResult1:
+ main.log.info( itemName + ": " + h1Name + " cannot ping "
+ + h2Name )
+ pingResult2 = main.Mininet1.pingHost( src=h2Name , target=h1Name )
+ if not pingResult2:
+ main.log.info( itemName + ": " + h2Name + " cannot ping "
+ + h1Name )
+ pingResult = pingResult1 and pingResult2
+ if pingResult:
+ main.log.info( itemName + ": Successfully pinged " +
+ "both hosts" )
+ else:
+ main.log.info( itemName + ": Failed to ping " +
+ "both hosts" )
+
+ # Remove intents
+ for intent in intentsId:
+ main.CLIs[ 0 ].removeIntent( intentId=intent, purge=True )
+
+ print main.CLIs[ 0 ].intents()
+ stepResult = pingResult and linkDownResult and linkUpResult \
+ and intentResult
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass=itemName +
+ ": host intent successful",
+ onfail=itemName +
+ ": Add host intent failed" )
+ def CASE1002( self, main ):
+ """
+ Add point intents between 2 hosts:
+ - Get device ids
+ - Add point intents
+ - Check intents
+ - Check flows
+ - Ping hosts
+ - Reroute
+ - Link down
+ - Ping hosts
+ - Link up
+ - Ping hosts
+ - Remove intents
+ """
+
+ def CASE1003( self, main ):
+ """
+ Add single point to multi point intents
+ - Get device ids
+ - Add single point to multi point intents
+ - Check intents
+ - Check flows
+ - Ping hosts
+ - Reroute
+ - Link down
+ - Ping hosts
+ - Link up
+ - Ping hosts
+ - Remove intents
+ """
+
+ def CASE1004( self, main ):
+ """
+ Add multi point to single point intents
+ - Get device ids
+ - Add multi point to single point intents
+ - Check intents
+ - Check flows
+ - Ping hosts
+ - Reroute
+ - Link down
+ - Ping hosts
+ - Link up
+ - Ping hosts
+ - Remove intents
+ """
diff --git a/TestON/tests/FuncIntent/FuncIntent.topo b/TestON/tests/FuncIntent/FuncIntent.topo
new file mode 100755
index 0000000..e85b397
--- /dev/null
+++ b/TestON/tests/FuncIntent/FuncIntent.topo
@@ -0,0 +1,52 @@
+<TOPOLOGY>
+ <COMPONENT>
+
+ <ONOSbench>
+ <host>10.128.5.55</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosDriver</type>
+ <connect_order>1</connect_order>
+ <COMPONENTS>
+ <home>~/ONOS</home>
+ </COMPONENTS>
+ </ONOSbench>
+
+ <ONOScli1>
+ <host>10.128.5.55</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>2</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOScli1>
+
+ <ONOScli2>
+ <host>10.128.5.55</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>3</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOScli2>
+
+ <ONOScli3>
+ <host>10.128.5.55</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>4</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOScli3>
+
+ <Mininet1>
+ <host>10.128.10.20</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>MininetCliDriver</type>
+ <connect_order>5</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </Mininet1>
+
+ </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.params b/TestON/tests/IntentEventTP/IntentEventTP.params
index 9cfae7f..8c65377 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.params
+++ b/TestON/tests/IntentEventTP/IntentEventTP.params
@@ -1,6 +1,6 @@
<PARAMS>
- <testcases>1,2,1,2</testcases>
+ <testcases>1,2,1,2,1,2,1,2</testcases>
<debugMode></debugMode> #nothing means false
@@ -9,55 +9,56 @@
<cellApps>drivers,null,intentperf</cellApps>
</ENV>
- <SCALE>5,7</SCALE>
+ <SCALE>1,3,5,7</SCALE>
<availableNodes>7</availableNodes>
<GIT>
- <autopull>off</autopull>
+ <autopull>on</autopull>
<checkout>master</checkout>
</GIT>
<CTRL>
<USER>admin</USER>
- <ip1>10.128.5.51</ip1>
+ <ip1>10.254.1.201</ip1>
<port1>6633</port1>
- <ip2>10.128.5.52</ip2>
+ <ip2>10.254.1.202</ip2>
<port2>6633</port2>
- <ip3>10.128.5.53</ip3>
+ <ip3>10.254.1.203</ip3>
<port3>6633</port3>
- <ip4>10.128.5.54</ip4>
+ <ip4>10.254.1.204</ip4>
<port4>6633</port4>
- <ip5>10.128.5.65</ip5>
+ <ip5>10.254.1.205</ip5>
<port5>6633</port5>
- <ip6>10.128.5.66</ip6>
+ <ip6>10.254.1.206</ip6>
<port6>6633</port6>
- <ip7>10.128.5.67</ip7>
+ <ip7>10.254.1.207</ip7>
<port7>6633</port7>
</CTRL>
- <MN><ip1>10.128.5.55</ip1></MN>
+ <MN><ip1>10.254.1.200</ip1></MN>
<BENCH>
<user>admin</user>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</BENCH>
<TEST>
<loadFrom>1,1,1,1,1,1,1</loadFrom> #generate load on server, 1 = generator on
<numSwitches>10,10,10,10,10,10,10</numSwitches>
<skipCleanInstall>yes</skipCleanInstall>
- <duration>900</duration>
+ <duration>400</duration>
<log_interval>20</log_interval>
- <numKeys>5000</numKeys>
+ <numKeys>40000</numKeys>
<cyclePeriod>1000</cyclePeriod>
- <neighbors>a</neighbors> #a == all nodes (-1)
+ <neighbors>0,a</neighbors> #a == all nodes (-1)
+ <flowRuleBUEnabled>false</flowRuleBUEnabled>
</TEST>
<METRICS>
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.py b/TestON/tests/IntentEventTP/IntentEventTP.py
index 6aea7b0..ba63f4c 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.py
+++ b/TestON/tests/IntentEventTP/IntentEventTP.py
@@ -35,6 +35,7 @@
skipMvn = main.params[ 'TEST' ][ 'skipCleanInstall' ]
cellName = main.params[ 'ENV' ][ 'cellName' ]
numSwitches = (main.params[ 'TEST' ][ 'numSwitches' ]).split(",")
+ flowRuleBU = main.params[ 'TEST' ][ 'flowRuleBUEnabled' ]
# -- INIT SECTION, ONLY RUNS ONCE -- #
@@ -134,7 +135,7 @@
time.sleep(20)
- for i in range (0,5):
+ while True:
main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders deviceCount """ + str(clusterCount*10) + """ " """)
main.ONOSbench.handle.expect(":~")
main.ONOSbench.handle.sendline("""onos $OC1 "cfg get org.onosproject.provider.nil.NullProviders" """)
@@ -147,11 +148,7 @@
main.log.info("cfg set failure, retrying")
main.log.info("before" + main.ONOSbench.handle.before)
- x = 1
while True:
- if x >= 6:
- main.log.error("Null provider start failure, TEST INVALID")
- break
main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
main.ONOSbench.handle.expect(":~")
main.ONOSbench.handle.sendline("""onos $OC1 "cfg get org.onosproject.provider.nil.NullProviders" """)
@@ -163,7 +160,12 @@
time.sleep(10)
main.log.info("cfg set failure, retrying")
main.log.info("before" + main.ONOSbench.handle.before)
- x += 1
+
+ main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.store.flow.impl.NewDistributedFlowRuleStore backupEnabled """ + flowRuleBU + """" """)
+ main.ONOSbench.handle.expect(":~")
+ main.ONOSbench.handle.sendline("""onos $OC1 "cfg get" """)
+ main.ONOSbench.handle.expect(":~")
+ main.log.info(main.ONOSbench.handle.before)
time.sleep(10)
main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
@@ -177,7 +179,7 @@
lastOutput = "--"
origin = time.time()
clockStarted = False
- for i in range (0,8):
+ while True:
main.ONOSbench.handle.sendline("onos $OC1 summary")
main.ONOSbench.handle.expect(":~")
main.log.info("before" + main.ONOSbench.handle.before)
@@ -227,7 +229,7 @@
for n in neighbors:
main.log.info("Run with " + n + " neighbors")
time.sleep(5)
- main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller numKeys " + numKeysn)
+ main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller numKeys " + numKeys )
main.ONOSbench.handle.expect(":~")
main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller numNeighbors " + n )
main.ONOSbench.handle.expect(":~")
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.topo b/TestON/tests/IntentEventTP/IntentEventTP.topo
index 30a1467..0e45e0f 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.topo
+++ b/TestON/tests/IntentEventTP/IntentEventTP.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.128.5.51</host>
+ <host>10.254.1.201</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.128.5.52</host>
+ <host>10.254.1.202</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.128.5.53</host>
+ <host>10.254.1.203</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.128.5.54</host>
+ <host>10.254.1.204</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.128.5.65</host>
+ <host>10.254.1.205</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.128.5.66</host>
+ <host>10.254.1.206</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.128.5.67</host>
+ <host>10.254.1.207</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
index a3e39fa..2b76662 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
@@ -1,8 +1,8 @@
<PARAMS>
- <testcases>1,2,1,2,1,2</testcases>
+ <testcases>1,2,1,2,1,2,1,2</testcases>
- <SCALE>3,5,7</SCALE>
+ <SCALE>1,3,5,7</SCALE>
<availableNodes>7</availableNodes>
<ENV>
@@ -13,8 +13,8 @@
<TEST>
<skipCleanInstall>yes</skipCleanInstall>
<switchCount>7</switchCount>
- <warmUp>4</warmUp>
- <sampleSize>2</sampleSize>
+ <warmUp>10</warmUp>
+ <sampleSize>20</sampleSize>
<wait></wait>
<intents>1,100,1000</intents> #list format, will be split on ','
<debug>True</debug> #"True" for true
@@ -28,36 +28,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.128.5.51</ip1>
+ <ip1>10.254.1.201</ip1>
<port1>6633</port1>
- <ip2>10.128.5.52</ip2>
+ <ip2>10.254.1.202</ip2>
<port2>6633</port2>
- <ip3>10.128.5.53</ip3>
+ <ip3>10.254.1.203</ip3>
<port3>6633</port3>
- <ip4>10.128.5.54</ip4>
+ <ip4>10.254.1.204</ip4>
<port4>6633</port4>
- <ip5>10.128.5.65</ip5>
+ <ip5>10.254.1.205</ip5>
<port5>6633</port5>
- <ip6>10.128.5.66</ip6>
+ <ip6>10.254.1.206</ip6>
<port6>6633</port6>
- <ip7>10.128.5.67</ip7>
+ <ip7>10.254.1.207</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
index 8092185..83dac2a 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
@@ -128,38 +128,21 @@
time.sleep(30)
+ main.ONOSbench.handle.sendline("""onos $OC1 "cfg setorg.onosproject.provider.nil.NullProviders enabled true" """)
+ main.ONOSbench.handle.expect(":~")
+ print main.ONOSbench.handle.before
main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders deviceCount """ + str(switchCount) + """ " """)
main.ONOSbench.handle.expect(":~")
print main.ONOSbench.handle.before
- time.sleep(3)
main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
main.ONOSbench.handle.expect(":~")
print main.ONOSbench.handle.before
- time.sleep(3)
main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
main.ONOSbench.handle.expect(":~")
print main.ONOSbench.handle.before
- time.sleep(3)
main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
main.ONOSbench.handle.expect(":~")
print main.ONOSbench.handle.before
- time.sleep(3)
-
- for i in range(0,5):
- main.ONOSbench.handle.sendline("onos $OC1 summary")
- main.ONOSbench.handle.expect(":~")
- check = main.ONOSbench.handle.before
- if "devices=7," in check:
- main.log.info("startup successful")
- break
- else:
- main.log.error(check)
- main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation stop" """)
- main.ONOSbench.handle.expect(":~")
- time.sleep(6)
- main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
- main.ONOSbench.handle.expect(":~")
- time.sleep(2)
def CASE2( self, main ):
@@ -171,18 +154,14 @@
intentsList = (main.params[ 'TEST' ][ 'intents' ]).split(",")
switchCount = int(main.params[ 'TEST' ][ 'switchCount' ])
debug = main.params[ 'TEST' ][ 'switchCount' ]
- print("0")
-
for i in range(0,len(intentsList)):
intentsList[i] = int(intentsList[i])
- main.log.info("Intents list: " + str(intentsList))
- print("1")
if debug == "True":
debug = True
else:
debug = False
-
+
linkCount = 0
for i in range(0,10):
main.ONOSbench.handle.sendline("onos $OC1 links|wc -l")
@@ -192,22 +171,18 @@
if str((switchCount*2)-2) in linkCount:
break
time.sleep(2)
+
links = "--"
- x = 0
- print("2")
while "=null:" not in links:
- if x >= 20:
- main.log.error("link check failure")
- break
if debug: main.log.info("top of loop")
main.ONOSbench.handle.sendline("onos $OC1 links")
main.ONOSbench.handle.expect(":~")
links = main.ONOSbench.handle.before
if debug: main.log.info(str(links))
time.sleep(1)
- x += 1
links = links.splitlines()
templinks = links
+
tempDevices = []
for line in links:
temp = line.split(" ")
@@ -215,8 +190,6 @@
temp[0] = (temp[0].split("/"))[0]
tempDevices.append(temp[0])
- print("3")
-
tempDevices.sort()
devices = []
for i in tempDevices:
@@ -224,44 +197,42 @@
devices.append(i.replace("src=", ""))
if debug: main.log.info(str(devices))
- print("4")
-
ingress = devices[0]
egress = devices.pop()
if debug: main.log.info(ingress)
if debug: main.log.info(egress)
- print("5")
-
for intentSize in intentsList:
cmd = "onos $OC1 push-test-intents "
cmd += ingress + "/6 "
cmd += egress + "/5 "
cmd += str(intentSize) + " 1"
- main.log.info("COMMAND: " + cmd)
installed = []
withdrawn = []
+
for run in range(0, (warmUp + sampleSize)):
if run > warmUp:
time.sleep(5)
+
myRawResult = "--"
while "ms" not in myRawResult:
main.ONOSbench.handle.sendline(cmd)
main.ONOSbench.handle.expect(":~")
myRawResult = main.ONOSbench.handle.before
- main.log.info(myRawResult)
+ if debug: main.log.info(myRawResult)
if debug: main.log.info(myRawResult)
+
if run >= warmUp:
myRawResult = myRawResult.splitlines()
for line in myRawResult:
if "install" in line:
- print(line)
installed.append(int(line.split(" ")[5]))
for line in myRawResult:
if "withdraw" in line:
withdrawn.append(int(line.split(" ")[5]))
+
print("installed: " + str(installed))
print("withraw: " + str(withdrawn) + "\n")
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
index 30a1467..0e45e0f 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.128.5.51</host>
+ <host>10.254.1.201</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.128.5.52</host>
+ <host>10.254.1.202</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.128.5.53</host>
+ <host>10.254.1.203</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.128.5.54</host>
+ <host>10.254.1.204</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.128.5.65</host>
+ <host>10.254.1.205</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.128.5.66</host>
+ <host>10.254.1.206</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.128.5.67</host>
+ <host>10.254.1.207</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
diff --git a/TestON/tests/IntentRerouteLat/IntentRerouteLat.params b/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
index 99a03c0..8e7a6a4 100644
--- a/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
+++ b/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
@@ -12,10 +12,10 @@
<TEST>
<skipCleanInstall>yes</skipCleanInstall>
- <warmUp>2</warmUp>
- <sampleSize>2</sampleSize>
+ <warmUp>5</warmUp>
+ <sampleSize>10</sampleSize>
<wait></wait>
- <intents>1000</intents> #list format, will be split on ','
+ <intents>1,100,1000</intents> #list format, will be split on ','
<debug>True</debug>
<s1>1,1,1,1,1,1,1,1</s1>
@@ -41,36 +41,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.128.5.51</ip1>
+ <ip1>10.254.1.201</ip1>
<port1>6633</port1>
- <ip2>10.128.5.52</ip2>
+ <ip2>10.254.1.202</ip2>
<port2>6633</port2>
- <ip3>10.128.5.53</ip3>
+ <ip3>10.254.1.203</ip3>
<port3>6633</port3>
- <ip4>10.128.5.54</ip4>
+ <ip4>10.254.1.204</ip4>
<port4>6633</port4>
- <ip5>10.128.5.65</ip5>
+ <ip5>10.254.1.205</ip5>
<port5>6633</port5>
- <ip6>10.128.5.66</ip6>
+ <ip6>10.254.1.206</ip6>
<port6>6633</port6>
- <ip7>10.128.5.67</ip7>
+ <ip7>10.254.1.207</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo b/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo
index 30a1467..0e45e0f 100644
--- a/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo
+++ b/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.128.5.51</host>
+ <host>10.254.1.201</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.128.5.52</host>
+ <host>10.254.1.202</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.128.5.53</host>
+ <host>10.254.1.203</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.128.5.54</host>
+ <host>10.254.1.204</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.128.5.65</host>
+ <host>10.254.1.205</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.128.5.66</host>
+ <host>10.254.1.206</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.128.5.67</host>
+ <host>10.254.1.207</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
diff --git a/TestON/tests/flowTP1g/flowTP1g.params b/TestON/tests/flowTP1g/flowTP1g.params
index d3273ef..cbe2da5 100644
--- a/TestON/tests/flowTP1g/flowTP1g.params
+++ b/TestON/tests/flowTP1g/flowTP1g.params
@@ -1,9 +1,9 @@
<PARAMS>
- <testcases>1,2,1,2</testcases>
+ <testcases>1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
<isOnBaremetal>False</isOnBaremetal>
- <SCALE>3,3</SCALE>
+ <SCALE>1,3,3,5,5,7,7</SCALE>
<availableNodes>7</availableNodes>
@@ -14,12 +14,12 @@
</ENV>
<TEST>
- <enableFlowRuleStoreBackup>false</enableFlowRuleStoreBackup>
+ <enableFlowRuleStoreBackup>true</enableFlowRuleStoreBackup>
<skipCleanInstall>yes</skipCleanInstall>
- <warmUp>1</warmUp> #number of runs to warm up the system
- <sampleSize>1</sampleSize> #number of runs to take data from
+ <warmUp>5</warmUp> #number of runs to warm up the system
+ <sampleSize>20</sampleSize> #number of runs to take data from
<neighbors>0,a</neighbors> #list of number of neighbors, a = all
- <flows>3500</flows>
+ <flows>122500</flows>
<switches>35</switches>
<cooldown>10</cooldown>
<testCMD0>flow-tester.py -f</testCMD0> #base command
@@ -28,43 +28,43 @@
</TEST>
<GIT>
- <autopull>off</autopull>
+ <autopull>on</autopull>
<checkout>master</checkout>
</GIT>
<CTRL>
<USER>admin</USER>
- <ip1>10.128.5.51</ip1>
+ <ip1>10.254.1.201</ip1>
<port1>6633</port1>
- <ip2>10.128.5.52</ip2>
+ <ip2>10.254.1.202</ip2>
<port2>6633</port2>
- <ip3>10.128.5.53</ip3>
+ <ip3>10.254.1.203</ip3>
<port3>6633</port3>
- <ip4>10.128.5.54</ip4>
+ <ip4>10.254.1.204</ip4>
<port4>6633</port4>
- <ip5>10.128.5.65</ip5>
+ <ip5>10.254.1.205</ip5>
<port5>6633</port5>
- <ip6>10.128.5.66</ip6>
+ <ip6>10.254.1.206</ip6>
<port6>6633</port6>
- <ip7>10.128.5.67</ip7>
+ <ip7>10.254.1.207</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.128.5.55</ip1>
+ <ip1>10.254.1.200</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/flowTP1g/flowTP1g.py b/TestON/tests/flowTP1g/flowTP1g.py
index 24fa8d6..3c92d7b 100644
--- a/TestON/tests/flowTP1g/flowTP1g.py
+++ b/TestON/tests/flowTP1g/flowTP1g.py
@@ -144,15 +144,15 @@
import datetime
import traceback
- global currentNeighbors
- try:
+ global currentNeighbors
+ try:
currentNeighbors
- except:
+ except:
currentNeighbors = "0"
- else:
+ else:
if currentNeighbors == "r": #reset
currentNeighbors = "0"
- else:
+ else:
currentNeighbors = "a"
testCMD = [ 0,0,0,0 ]
@@ -172,25 +172,21 @@
maxNodes = int(main.params[ 'availableNodes' ])
homeDir = os.path.expanduser('~')
flowRuleBackup = str(main.params[ 'TEST' ][ 'enableFlowRuleStoreBackup' ])
- print flowRuleBackup
-
+ main.log.info("Flow Rule Backup is set to:" + flowRuleBackup)
servers = str(clusterCount)
- #for i in range(0, len(neighborList)):
- # if neighborList[i] == 'a':
- # neighborList[i] = str(clusterCount - 1)
if clusterCount == 1:
neighborList = ['0']
currentNeighbors = "r"
- else:
- if currentNeighbors == "a":
+ else:
+ if currentNeighbors == "a":
neighborList = [str(clusterCount-1)]
- currentNeughbors = "r"
+ currentNeighbors = "r"
else:
- neighborList = ['0']
+ neighborList = ['0']
- #main.log.info("neightborlist: " + str(neighborList))
+ main.log.info("neightborlist: " + str(neighborList))
ts = time.time()
st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
@@ -239,12 +235,17 @@
main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
main.ONOSbench.handle.expect(":~")
time.sleep(3)
- main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.store.flow.impl.DistributedFlowRuleStore backupEnabled """ + str(flowRuleBackup) + """ " """)
+ main.log.info("""onos $OC1 "cfg set org.onosproject.store.flow.impl.NewDistributedFlowRuleStore backupEnabled """ + flowRuleBackup + """" """)
+ main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.store.flow.impl.NewDistributedFlowRuleStore backupEnabled """ + flowRuleBackup + """" """)
main.ONOSbench.handle.expect(":~")
main.ONOSbench.handle.sendline("onos $OC1 summary")
main.ONOSbench.handle.expect(":~")
check = main.ONOSbench.handle.before
+
+ main.ONOSbench.handle.sendline("""onos $OC1 "cfg get" """)
+ main.ONOSbench.handle.expect(":~")
+ check = main.ONOSbench.handle.before
main.log.info("\nStart up check: \n" + check + "\n")
#devide flows
@@ -322,8 +323,8 @@
data[test-warmUp] = result
# wait for flows = 0
- for checkCount in range(0,3):
- time.sleep(6)
+ for checkCount in range(0,5):
+ time.sleep(10)
main.ONOSbench.handle.sendline("onos $OC1 summary")
main.ONOSbench.handle.expect(":~")
flowCheck = main.ONOSbench.handle.before
diff --git a/TestON/tests/flowTP1g/flowTP1g.topo b/TestON/tests/flowTP1g/flowTP1g.topo
index 30a1467..0e45e0f 100644
--- a/TestON/tests/flowTP1g/flowTP1g.topo
+++ b/TestON/tests/flowTP1g/flowTP1g.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.128.5.55</host>
+ <host>10.254.1.200</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.128.5.51</host>
+ <host>10.254.1.201</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.128.5.52</host>
+ <host>10.254.1.202</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.128.5.53</host>
+ <host>10.254.1.203</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.128.5.54</host>
+ <host>10.254.1.204</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.128.5.65</host>
+ <host>10.254.1.205</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.128.5.66</host>
+ <host>10.254.1.206</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.128.5.67</host>
+ <host>10.254.1.207</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
diff --git a/TestON/tests/flowTP1g/flowTP1gbackup b/TestON/tests/flowTP1g/flowTP1gbackup
deleted file mode 100644
index 4d319fb..0000000
--- a/TestON/tests/flowTP1g/flowTP1gbackup
+++ /dev/null
@@ -1,359 +0,0 @@
-# ScaleOutTemplate -> flowTP
-#
-# CASE1 starts number of nodes specified in param file
-#
-# cameron@onlab.us
-
-import sys
-import os.path
-
-
-class flowTP1g:
-
- def __init__( self ):
- self.default = ''
-
- def CASE1( self, main ):
-
- import time
- global init
- try:
- if type(init) is not bool:
- init = False
- except NameError:
- init = False
-
- #Load values from params file
- checkoutBranch = main.params[ 'GIT' ][ 'checkout' ]
- gitPull = main.params[ 'GIT' ][ 'autopull' ]
- cellName = main.params[ 'ENV' ][ 'cellName' ]
- Apps = main.params[ 'ENV' ][ 'cellApps' ]
- BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
- BENCHUser = main.params[ 'BENCH' ][ 'user' ]
- MN1Ip = main.params[ 'MN' ][ 'ip1' ]
- maxNodes = int(main.params[ 'availableNodes' ])
- skipMvn = main.params[ 'TEST' ][ 'skipCleanInstall' ]
- cellName = main.params[ 'ENV' ][ 'cellName' ]
-
- # -- INIT SECTION, ONLY RUNS ONCE -- #
- if init == False:
- init = True
- global clusterCount #number of nodes running
- global ONOSIp #list of ONOS IP addresses
- global scale
- global commit
-
- clusterCount = 0
- ONOSIp = [ 0 ]
- scale = (main.params[ 'SCALE' ]).split(",")
- clusterCount = int(scale[0])
-
- #Populate ONOSIp with ips from params
- for i in range(1, maxNodes + 1):
- ipString = 'ip' + str(i)
- ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
-
- #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
- if skipMvn != "yes":
- mvnResult = main.ONOSbench.cleanInstall()
-
- #git
- main.step( "Git checkout and pull " + checkoutBranch )
- if gitPull == 'on':
- checkoutResult = main.ONOSbench.gitCheckout( checkoutBranch )
- pullResult = main.ONOSbench.gitPull()
-
- else:
- checkoutResult = main.TRUE
- pullResult = main.TRUE
- main.log.info( "Skipped git checkout and pull" )
-
- commit = main.ONOSbench.getVersion()
- commit = (commit.split(" "))[1]
-
- resultsDB = open("flowTP1gDB", "w+")
- resultsDB.close()
-
- # -- END OF INIT SECTION --#
-
- clusterCount = int(scale[0])
- scale.remove(scale[0])
- main.log.info("CLUSTER COUNT: " + str(clusterCount))
-
- #kill off all onos processes
- main.log.step("Safety check, killing all ONOS processes")
- main.log.step("before initiating enviornment setup")
- for node in range(1, maxNodes + 1):
- main.ONOSbench.onosDie(ONOSIp[node])
-
- #Uninstall everywhere
- main.log.step( "Cleaning Enviornment..." )
- for i in range(1, maxNodes + 1):
- main.log.info(" Uninstalling ONOS " + str(i) )
- main.ONOSbench.onosUninstall( ONOSIp[i] )
-
- #construct the cell file
- main.log.info("Creating cell file")
- cellIp = []
- for node in range (1, clusterCount + 1):
- cellIp.append(ONOSIp[node])
-
- main.ONOSbench.createCellFile(BENCHIp,cellName,MN1Ip,str(Apps), *cellIp)
- main.log.info("Cell Ip list: " + str(cellIp))
-
- main.step( "Set Cell" )
- main.ONOSbench.setCell(cellName)
-
- main.step( "Creating ONOS package" )
- packageResult = main.ONOSbench.onosPackage()
-
- main.step( "verify cells" )
- verifyCellResult = main.ONOSbench.verifyCell()
-
- main.log.report( "Initializeing " + str( clusterCount ) + " node cluster." )
- for node in range(1, clusterCount + 1):
- main.log.info("Starting ONOS " + str(node) + " at IP: " + ONOSIp[node])
- main.ONOSbench.onosInstall( ONOSIp[node])
-
- for node in range(1, clusterCount + 1):
- for i in range( 2 ):
- isup = main.ONOSbench.isup( ONOSIp[node] )
- if isup:
- main.log.info("ONOS " + str(node) + " is up\n")
- break
- if not isup:
- main.log.report( "ONOS " + str(node) + " didn't start!" )
-
- for node in range(1, clusterCount + 1):
- exec "a = main.ONOS%scli.startOnosCli" %str(node)
- a(ONOSIp[node])
-
- main.log.info("Startup sequence complete")
-
-
- def CASE2( self, main ):
- #
- # This is the flow TP test
- #
- import os.path
- import numpy
- import math
- import time
- import datetime
- import traceback
-
- testCMD = [ 0,0,0,0 ]
- warmUp = int(main.params[ 'TEST' ][ 'warmUp' ])
- sampleSize = int(main.params[ 'TEST' ][ 'sampleSize' ])
- switches = int(main.params[ 'TEST' ][ 'switches' ])
- neighborList = (main.params[ 'TEST' ][ 'neighbors' ]).split(",")
- testCMD[0] = main.params[ 'TEST' ][ 'testCMD0' ]
- testCMD[1] = main.params[ 'TEST' ][ 'testCMD1' ]
- maxNodes = main.params[ 'availableNodes' ]
- onBaremetal = main.params['isOnBaremetal']
- cooldown = main.params[ 'TEST' ][ 'cooldown' ]
- cellName = main.params[ 'ENV' ][ 'cellName' ]
- BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
- BENCHUser = main.params[ 'BENCH' ][ 'user' ]
- MN1Ip = main.params[ 'MN' ][ 'ip1' ]
- maxNodes = int(main.params[ 'availableNodes' ])
- homeDir = os.path.expanduser('~')
-
- servers = str(clusterCount)
- for i in range(0, len(neighborList)):
- if neighborList[i] == 'a':
- neighborList[i] = str(clusterCount - 1)
-
- if clusterCount == 1:
- neighborList = ['0']
- main.log.info("neightborlist: " + str(neighborList))
-
- ts = time.time()
- st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
-
- #write file to change mem limit to 32 gigs (BAREMETAL ONLY!)
- if onBaremetal == "true":
- filename = "/onos/tools/package/bin/onos-service"
- serviceConfig = open(homeDir + filename, 'w+')
- serviceConfig.write("#!/bin/bash\n ")
- serviceConfig.write("#------------------------------------- \n ")
- serviceConfig.write("# Starts ONOS Apache Karaf container\n ")
- serviceConfig.write("#------------------------------------- \n ")
- serviceConfig.write("#export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/}\n ")
- serviceConfig.write("""export JAVA_OPTS="${JAVA_OPTS:--Xms8G -Xmx8G}" \n """)
- serviceConfig.write("")
- serviceConfig.write("ONOS_HOME=/opt/onos \n ")
- serviceConfig.write("")
- serviceConfig.write("[ -d $ONOS_HOME ] && cd $ONOS_HOME || ONOS_HOME=$(dirname $0)/..\n")
- serviceConfig.write("""${ONOS_HOME}/apache-karaf-$KARAF_VERSION/bin/karaf "$@" \n """)
- serviceConfig.close()
-
- for n in neighborList:
- main.log.step("\tSTARTING TEST")
- main.log.step("\tLOADING FROM SERVERS: \t" + str(clusterCount) )
- main.log.step("\tNEIGHBORS:\t" + n )
- main.log.info("=============================================================")
- main.log.info("=============================================================")
- #write file to configure nil link
- ipCSV = ""
- for i in range (1, int(maxNodes) + 1):
- tempstr = "ip" + str(i)
- ipCSV += main.params[ 'CTRL' ][ tempstr ]
- if i < int(maxNodes):
- ipCSV +=","
-
- main.ONOSbench.handle.sendline("""onos $OC1 "cfg setorg.onosproject.provider.nil.NullProviders enabled true" """)
- main.ONOSbench.handle.expect(":~")
- main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders deviceCount 35" """)
- main.ONOSbench.handle.expect(":~")
- main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
- main.ONOSbench.handle.expect(":~")
- main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
- main.ONOSbench.handle.expect(":~")
- main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
- main.ONOSbench.handle.expect(":~")
-
- #devide flows
- flows = int(main.params[ 'TEST' ][ 'flows' ])
- main.log.info("Flow Target = " + str(flows))
-
- flows = (flows *max(int(n)+1,int(servers)))/((int(n) + 1)*int(servers)*(switches))
-
- main.log.info("Flows per switch = " + str(flows))
-
- #build list of servers in "$OC1, $OC2...." format
- serverEnvVars = ""
- for i in range (1,int(servers)+1):
- serverEnvVars += ("-s " + ONOSIp[i] + " ")
-
- data = [[""]*int(servers)]*int(sampleSize)
- maxes = [""]*int(sampleSize)
-
- for test in range(0, (warmUp + sampleSize)):
- flowCMD = "python3 " + homeDir + "/onos/tools/test/bin/"
- flowCMD += testCMD[0] + " " + str(flows) + " " + testCMD[1]
- flowCMD += " " + str(n) + " " + str(serverEnvVars)
- print("\n")
- main.log.info("COMMAND: " + flowCMD)
- main.log.info("Executing command")
-
- for i in range(0,15):
- main.ONOSbench.handle.sendline(flowCMD)
- time.sleep(5)
- main.ONOSbench.handle.expect(":~")
- rawResult = main.ONOSbench.handle.before
- if " -> " in rawResult:
- break
-
- result = [""]*(clusterCount)
- rawResult = rawResult.splitlines()
- print(rawResult)
- for node in range(1, clusterCount + 1):
- for line in rawResult:
- if ONOSIp[node] in line and " -> " in line:
- myLine = line.split(" ")
- for word in myLine:
- if "ms" in word:
- result[node-1] = int(word.replace("ms",""))
- main.log.info("Parsed result: " + str(result[node-1]))
- break
- break
-
- if test >= warmUp:
- for i in result:
- if i == "":
- main.log.error("Missing data point, critical failure incoming")
-
- print result
- maxes[test-warmUp] = max(result)
- main.log.info("Data collection iteration: " + str(test-warmUp) + " of " + str(sampleSize))
- main.log.info("Throughput time: " + str(maxes[test-warmUp]) + "(ms)")
-
- if test >= warmUp:
- data[test-warmUp] = result
-
- # wait for flows = 0
- removedFlows = False
- repeat = 0
- time.sleep(3)
- while ( removedFlows == False and repeat <= 10 ):
- main.ONOSbench.handle.sendline("onos $OC1 summary| cut -d ' ' -f6")
- main.ONOSbench.handle.expect("~")
- before = main.ONOSbench.handle.before
- parseTest = before.splitlines()
- flowsummary = ""
- for line in parseTest:
- if "flow" in str(line):
- flowsummary = line
- break
- currentflow = ""
- for word in flowsummary.split(" "):
- if "flow" in str(word):
- currentflow = str(word)
- currentflow = currentflow.replace(",","")
- currentflow = currentflow.replace("\n","")
- #main.log.info(currentflow)
-
- zeroFlow = "flows=0"
- if zeroFlow in before:
- removedFlows = True
- main.log.info("\t Wait " + cooldown + " sec of cool down...")
- time.sleep(int(cooldown))
-
- time.sleep(5)
- repeat +=1
-
- main.log.info("raw data: " + str(data))
- main.log.info("maxes:" + str(maxes))
-
-
- # report data
- print("")
- main.log.info("\t Results (measurments are in milliseconds)")
- print("")
-
- nodeString = ""
- for i in range(1, int(servers) + 1):
- nodeString += ("\tNode " + str(i))
-
- for test in range(0, sampleSize ):
- main.log.info("\t Test iteration " + str(test + 1) )
- main.log.info("\t------------------")
- main.log.info(nodeString)
- resultString = ""
-
- for i in range(0, int(servers) ):
- resultString += ("\t" + str(data[test][i]) )
- main.log.info(resultString)
-
- print("\n")
-
- avgOfMaxes = numpy.mean(maxes)
- main.log.info("Average of max value from each test iteration: " + str(avgOfMaxes))
-
- stdOfMaxes = numpy.std(maxes)
- main.log.info("Standard Deviation of max values: " + str(stdOfMaxes))
- print("\n\n")
-
- avgTP = int(main.params[ 'TEST' ][ 'flows' ]) / avgOfMaxes #result in kflows/second
-
- tp = []
- for i in maxes:
- tp.append((int(main.params[ 'TEST' ][ 'flows' ]) / i ))
-
- stdTP = numpy.std(tp)
-
- main.log.info("Average thoughput: " + str(avgTP) + " Kflows/second" )
- main.log.info("Standard deviation of throughput: " + str(stdTP) + " Kflows/second")
-
- resultsLog = open("flowTP1gDB","a")
- resultString = ("'" + commit + "',")
- resultString += ("'1gig',")
- resultString += ((main.params[ 'TEST' ][ 'flows' ]) + ",")
- resultString += (str(clusterCount) + ",")
- resultString += (str(n) + ",")
- resultString += (str(avgTP) + "," + str(stdTP) + "\n")
- resultsLog.write(resultString)
- resultsLog.close()
-
- main.log.report("Result line to file: " + resultString)