Merging conflicts
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 90255f8..27c2d92 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -725,7 +725,6 @@
main.cleanup()
main.exit()
-
def onosCli( self, ONOSIp, cmdstr ):
"""
Uses 'onos' command to send various ONOS CLI arguments.
@@ -1850,7 +1849,7 @@
else:
time.sleep(1)
- assert ("value=" + str(numPorts)) in verification and (" value=" + fileName) in verification
+ assert ("value=" + str(numPorts)) in verification and (" value=" + devicesString) in verification
except AssertionError:
main.log.error("Incorrect Config settings: " + verification)
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.params b/TestON/tests/IntentEventTP/IntentEventTP.params
index ec869bf..6ea5285 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.params
+++ b/TestON/tests/IntentEventTP/IntentEventTP.params
@@ -1,15 +1,15 @@
<PARAMS>
- <testcases>1,2,3</testcases>
+ <testcases>1,2</testcases>
<debugMode></debugMode> #nothing means false
<ENV>
<cellName>intentTP</cellName>
- <cellFeatures>"webconsole,onos-core,onos-api,onos-cli,onos-null,onos-gui,onos-rest,onos-app-metrics,onos-app-metrics-intent,onos-app-metrics-topology"</cellFeatures>
+ <cellApps>null,intentperf</cellApps>
</ENV>
- <SCALE>6</SCALE>
+ <SCALE>1,3,5,7</SCALE>
<availableNodes>7</availableNodes>
<GIT>
@@ -20,41 +20,44 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>10.128.5.51</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>10.128.5.52</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>10.128.5.53</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>10.128.5.54</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>10.128.5.65</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>10.128.5.66</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>10.128.5.67</ip7>
<port7>6633</port7>
</CTRL>
- <MN><ip1>10.254.1.200</ip1></MN>
+ <MN><ip1>10.128.5.55</ip1></MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>10.128.5.55</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>600</duration>
- <log_interval>20</log_interval>
+ <duration>15</duration>
+ <log_interval>20</log_interval>
+ <numKeys>5000</numKeys>
+ <cyclePeriod>1000</cyclePeriod>
+ <neighbors>0,a</neighbors> #a == all nodes (-1)
</TEST>
<METRICS>
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.py b/TestON/tests/IntentEventTP/IntentEventTP.py
index 30c44f6..9a6f938 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.py
+++ b/TestON/tests/IntentEventTP/IntentEventTP.py
@@ -1,12 +1,11 @@
-# ScaleOutTemplate --> IntentEventTP
+# ScaleOutTemplate
#
# CASE1 starts number of nodes specified in param file
#
# cameron@onlab.us
import sys
-import os
-import time
+import os.path
class IntentEventTP:
@@ -14,210 +13,112 @@
def __init__( self ):
self.default = ''
- def CASE1( self, main ): #This is the initialization case
- import os.path #this case will clean up all nodes
- import time #but only node 1 is started in this case
-
- global clusterCount #number of nodes running
- global ONOSIp #list of ONOS IP addresses
- clusterCount = 1
- ONOSIp = [ 0 ]
-
+ 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' ]
- Features= main.params[ 'ENV' ][ 'cellFeatures' ]
+ 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' ])
- MNip = main.params[ 'MN' ][ 'ip1' ]
skipMvn = main.params[ 'TEST' ][ 'skipCleanInstall' ]
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
numSwitches = (main.params[ 'TEST' ][ 'numSwitches' ]).split(",")
- homeDir = os.path.expanduser('~')
-
- main.ONOSbench.handle.sendline("export TERM=vt100")
- dump = main.ONOSbench.handle.expect(":~")
- #Populate ONOSIp with ips from params
- for i in range(1, maxNodes + 1):
- ipString = 'ip' + str(i)
- ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
+ # ?? homeDir = os.path.expanduser('~')
+ # ?? main.ONOSbench.handle.sendline("export TERM=vt100")
+ # ?^ dump = main.ONOSbench.handle.expect(":~")
+
+
+ # -- 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
+
+ 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" )
- #kill off all onos processes
+ # -- END OF INIT SECTION --#
+
+ clusterCount = int(scale[0])
+ scale.remove(scale[0])
+
+ #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.log.info("killing node " + str(node))
main.ONOSbench.onosDie(ONOSIp[node])
-
- #construct the cell file
- main.log.info("Creating cell file")
- exec "a = main.ONOSbench.createCellFile"
- cellIp = []
- for node in range (1, clusterCount + 1):
- cellIp.append(ONOSIp[node])
- a(BENCHIp,cellName,MNip,str(Features), *cellIp)
-
- main.step( "Set Cell" )
- main.ONOSbench.setCell(cellName)
-
+
#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])
- #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" )
-
- #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
- if skipMvn != "yes":
- mvnResult = main.ONOSbench.cleanInstall()
-
- #null link
- #null provider
- #linkgraph
- #intentPerf
+ main.ONOSbench.createCellFile(BENCHIp,cellName,MN1Ip,str(Apps), *cellIp)
+
+ main.step( "Set Cell" )
+ main.ONOSbench.setCell(cellName)
myDistribution = []
for node in range (1, clusterCount + 1):
myDistribution.append(numSwitches[node-1])
main.ONOSbench.createLinkGraphFile( BENCHIp,cellIp,myDistribution)
- main.ONOSbench.createNullDevProviderFile( BENCHIp, cellIp, myDistribution)
- main.ONOSbench.createNullLinkProviderFile(BENCHIp)
-
- main.log.step("Writing IntentPerf config file")
- intentPerfConfig = open( homeDir + "/onos/tools/package/etc/org.onosproject.intentperf.IntentPerfInstaller.cfg", "w+")
- intentPerfConfig.write("numKeys = 40000\n")
- intentPerfConfig.write("cyclePeriod = 1000\n")
- intentPerfConfig.write("numNeighors = 0\n")
- intentPerfConfig.close()
-
+
main.step( "Creating ONOS package" )
packageResult = main.ONOSbench.onosPackage()
- main.step( "Installing ONOS package" )
- install1Result = main.ONOSbench.onosInstall( node=ONOSIp[1] )
-
main.step( "verify cells" )
verifyCellResult = main.ONOSbench.verifyCell()
-
- main.step( "Checking if ONOS is up yet" )
- for i in range( 2 ):
- isup = main.ONOSbench.isup( ONOSIp[1] )
- if isup:
- break
- if not isup:
- main.log.report( "ONOS1 didn't start!" )
-
- lastOutput = "--"
- origin = time.time()
- clockStarted = False
- while True:
- main.ONOSbench.handle.sendline("onos $OC1 summary")
- main.ONOSbench.handle.expect(":~")
- clusterCheck = ((main.ONOSbench.handle.before).splitlines())[3]
- print("\nBefore: " + str(clusterCheck))
- if "SCC(s)=1," in clusterCheck:
- break
- if clusterCheck != lastOutput:
- sameOutput = False
- elif clusterCheck == lastOutput:
- if clockStarted == False:
- start = time.time()
- clockStarted = True
- if time.time() > (start + 30):
- main.log.error("TIMEOUT EXCEEDED: Clusters have not converged, continuing anyway...")
- break
- lastOutput = clusterCheck
- time.sleep(5)
-
-
-
- def CASE2( self, main ):
- # This case increases the cluster size by whatever scale is
- # Note: 'scale' is the size of the step
- # if scaling is not a part of your test, simply run this case
- # once after CASE1 to set up your enviornment for your desired
- # cluster size. If scaling is a part of you test call this case each time
- # you want to increase cluster size
-
- ''
- 'Increase number of nodes and initiate CLI'
- ''
- import time
- import os.path
- global clusterCount
-
- Features= main.params[ 'ENV' ][ 'cellFeatures' ]
- cellName = main.params[ 'ENV' ][ 'cellName' ]
- MNip = main.params[ 'MN' ][ 'ip1' ]
- BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
- numSwitches = (main.params[ 'TEST' ][ 'numSwitches' ]).split(",")
- scale = int( main.params[ 'SCALE' ] )
- maxNodes = int(main.params[ 'availableNodes' ])
- clusterCount += scale
- homeDir = os.path.expanduser('~')
-
- #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")
- exec "a = main.ONOSbench.createCellFile"
- cellIp = []
- for node in range (1, clusterCount + 1):
- cellIp.append(ONOSIp[node])
- a(BENCHIp,cellName,MNip,str(Features), *cellIp)
-
- main.step( "Set Cell" )
- main.ONOSbench.setCell(cellName)
-
- myDistribution = []
- for node in range (1, clusterCount + 1):
- myDistribution.append(numSwitches[node-1])
-
- main.ONOSbench.createLinkGraphFile( BENCHIp, cellIp, myDistribution)
- main.ONOSbench.createNullDevProviderFile( BENCHIp, cellIp, myDistribution)
- main.ONOSbench.createNullLinkProviderFile( BENCHIp )
-
- #neighbors = max(1, clusterCount-1)
- neighbors = 0
-
- main.log.step("Writing IntentPerf config file")
- intentPerfConfig = open( homeDir + "/onos/tools/package/etc/org.onosproject.intentperf.IntentPerfInstaller.cfg", "w+")
- intentPerfConfig.write("numKeys = 40000\n")
- intentPerfConfig.write("cyclePeriod = 1000\n")
- intentPerfConfig.write("numNeighors = " + str(neighbors) + "\n")
- intentPerfConfig.close()
-
- main.step( "Creating ONOS package, preparing to reinstall" )
- packageResult = main.ONOSbench.onosPackage()
-
- main.log.report( "Reinstalling on all nodes and increasing cluster size to " + str( clusterCount ) )
+
+ 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.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] )
@@ -226,7 +127,8 @@
break
if not isup:
main.log.report( "ONOS " + str(node) + " didn't start!" )
-
+ main.log.info("Startup sequence complete")
+
lastOutput = "--"
origin = time.time()
clockStarted = False
@@ -235,7 +137,7 @@
main.ONOSbench.handle.expect(":~")
clusterCheck = ((main.ONOSbench.handle.before).splitlines())[3]
print("\nBefore: " + str(clusterCheck))
- if ("SCC(s)=1,") in clusterCheck:
+ if ("SCC(s)=1,") in clusterCheck:
break
if clusterCheck != lastOutput:
sameOutput = False
@@ -243,17 +145,18 @@
if clockStarted == False:
start = time.time()
clockStarted = True
- if time.time() > (start + 60):
+ if time.time() > (start + 10):
main.log.error("TIMEOUT EXCEEDED: Clusters have not converged, continuing anyway...")
break
lastOutput = clusterCheck
time.sleep(5)
-
-
- def CASE3( self, main ):
+
+ main.ONOSbench.configNullDev(cellIp, myDistribution)
+
+ def CASE2( self, main ):
import time
import json
- import string
+ import string
import csv
import numpy
@@ -265,75 +168,81 @@
testDuration = main.params[ 'TEST' ][ 'duration' ]
logInterval = main.params[ 'TEST' ][ 'log_interval' ]
debug = main.params[ 'debugMode' ]
-
+ numKeys = main.params[ 'TEST' ][ 'numKeys' ]
+ cyclePeriod = main.params[ 'TEST' ][ 'cyclePeriod' ]
+ neighbors = (main.params[ 'TEST' ][ 'neighbors' ]).split(",")
metricList = [intentsRate, intentsWithdrawn, intentsFailed]
-
- tempsleep =20
- main.log.info("sleeping " + str(tempsleep))
- time.sleep(tempsleep)
-
- loadFrom = ['0']
- loadFrom.extend((main.params[ 'TEST' ][ 'loadFrom' ]).split(","))
-
- for node in range(1, clusterCount+1):
- if loadFrom[node] == "1":
- cmd = "onos $OC" + str(node) + " feature:install onos-app-intent-perf"
- main.ONOSbench.handle.sendline(cmd)
- main.ONOSbench.handle.expect(":~")
- main.log.info( "intent-perf feature installed on: ONOS" + str(node) )
-
- time.sleep(5)
- actcmd = "onos $OC1" + " intent-perf-start"
- main.ONOSbench.handle.sendline(actcmd)
- main.ONOSbench.handle.expect(":~")
- main.log.info("Starting ONOS (all nodes) intent-perf from $OC1" )
- main.log.info( "Starting test loop for " + str(testDuration) + " seconds...\n" )
- stop = time.time() + float( testDuration )
-
- while time.time() < stop:
- time.sleep( float( logInterval ) )
- groupResult = []
- for node in range (1, clusterCount + 1):
- if loadFrom[node] == "0": continue
- groupResult.append(0)
-
- cmd = " onos-ssh $OC" + str(node) + """ cat /opt/onos/log/karaf.log | grep "SNAPSHOT | Throughput" | tail -1 """
- main.log.info("COMMAND: " + str(cmd))
-
- x = 0
- while True:
- main.ONOSbench.handle.sendline(cmd)
- main.ONOSbench.handle.expect(":~")
- raw = main.ONOSbench.handle.before
- if "OVERALL=" in raw:
- break
- x += 1
- if x > 10:
- main.log.error("Expected output not being recieved... continuing")
- break
- time.sleep(2)
+ for n in range(0, len(neighbors)):
+ if neighbors[n] == 'a':
+ neighbors[n] = str(clusterCount -1)
+ print str(neighbors)
- raw = raw.splitlines()
- splitResults = []
- for line in raw:
- splitResults.extend(line.split(" "))
+ 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 " + numKeys )
+ main.ONOSbench.handle.expect(":~")
+ main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller numNeighbors " + n )
+ main.ONOSbench.handle.expect(":~")
+ main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller cyclePeriod " + cyclePeriod )
+ main.ONOSbench.handle.expect(":~")
- myResult = "--"
- for field in splitResults:
- if "OVERALL" in field:
- myResult = field
-
- if myResult == "--":
- main.log.error("Parsing/Pexpect error\n" + str(splitResults))
+ cmd = "onos $OC1 intent-perf-start"
+ main.ONOSbench.handle.sendline(cmd)
+ main.ONOSbench.handle.expect(":~")
+ main.log.info("Starting ONOS (all nodes) intent-perf from $OC1" )
- myResult = myResult.replace(";", "")
- myResult = myResult.replace("OVERALL=","")
- myResult = float(myResult)
- groupResult[len(groupResult) -1] = myResult
+ main.log.info( "Starting test loop for " + str(testDuration) + " seconds...\n" )
+ stop = time.time() + float( testDuration )
- main.log.info("Node " + str(node) + " overall rate: " + str(myResult))
+ while time.time() < stop:
+ time.sleep( float( logInterval ) )
+ groupResult = []
+ for node in range (1, clusterCount + 1):
+ groupResult.append(0)
- main.log.report("Results from this round of polling: " + str(groupResult))
- main.log.report("Cluster Total: " + str(numpy.sum(groupResult)) + "\n")
-
+ cmd = " onos-ssh $OC" + str(node) + """ cat /opt/onos/log/karaf.log | grep "SNAPSHOT | Throughput" | tail -1 """
+ main.log.info("COMMAND: " + str(cmd))
+
+ x = 0
+ while True:
+ main.ONOSbench.handle.sendline(cmd)
+ main.ONOSbench.handle.expect(":~")
+ raw = main.ONOSbench.handle.before
+ if "OVERALL=" in raw:
+ break
+ x += 1
+ if x > 10:
+ main.log.error("Expected output not being recieved... continuing")
+ break
+ time.sleep(2)
+
+ raw = raw.splitlines()
+ splitResults = []
+ for line in raw:
+ splitResults.extend(line.split(" "))
+
+ myResult = "--"
+ for field in splitResults:
+ if "OVERALL" in field:
+ myResult = field
+
+ if myResult == "--":
+ main.log.error("Parsing/Pexpect error\n" + str(splitResults))
+
+ myResult = myResult.replace(";", "")
+ myResult = myResult.replace("OVERALL=","")
+ myResult = float(myResult)
+ groupResult[len(groupResult) -1] = myResult
+
+ main.log.info("Node " + str(node) + " overall rate: " + str(myResult))
+
+ main.log.report("Results from this round of polling: " + str(groupResult))
+ main.log.report("Cluster Total: " + str(numpy.sum(groupResult)) + "\n")
+
+ cmd = "onos $OC1 intent-perf-stop"
+ main.ONOSbench.handle.sendline(cmd)
+ main.ONOSbench.handle.expect(":~")
+ main.log.info("Stopping intentperf" )
+
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.topo b/TestON/tests/IntentEventTP/IntentEventTP.topo
index 0e45e0f..30a1467 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.topo
+++ b/TestON/tests/IntentEventTP/IntentEventTP.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>10.128.5.51</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>10.128.5.52</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>10.128.5.53</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>10.128.5.54</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>10.128.5.65</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>10.128.5.66</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>10.128.5.67</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 067ff8e..3185cc2 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
@@ -1,13 +1,13 @@
<PARAMS>
- <testcases>1,3,2,3,2,3,2,3</testcases>
+ <testcases>1,2</testcases>
- <SCALE>2</SCALE>
+ <SCALE>3,5,7</SCALE>
<availableNodes>7</availableNodes>
<ENV>
- <cellName>defaultCell</cellName>
- <cellFeatures>webconsole,onos-core,onos-api,onos-cli,onos-null,onos-gui,onos-rest,onos-app-metrics,onos-app-metrics-intent,onos-app-metrics-topology </cellFeatures>
+ <cellName>IntentInstallWithdrawCell</cellName>
+ <cellApps>null</cellApps>
</ENV>
<TEST>
@@ -17,7 +17,7 @@
<sampleSize>10</sampleSize>
<wait></wait>
<intents>1000</intents> #list format, will be split on ','
- <debug>False</debug> #"True" for true
+ <debug>True</debug> #"True" for true
</TEST>
<GIT>
@@ -28,36 +28,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>10.128.5.51</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>10.128.5.52</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>10.128.5.53</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>10.128.5.54</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>10.128.5.65</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>10.128.5.66</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>10.128.5.67</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.254.1.200</ip1>
+ <ip1>10.128.5.55</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>10.128.5.55</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
index 29ecd06..6d0e2b3 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
@@ -13,65 +13,50 @@
def __init__( self ):
self.default = ''
- def CASE1( self, main ): #This is the initialization case
- #this case will clean up all nodes
- import time #but only node 1 is started in this case
-
- global clusterCount #number of nodes running
- global ONOSIp #list of ONOS IP addresses
- clusterCount = 1
- ONOSIp = [ 0 ]
-
-
+ 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' ]
- Features= main.params[ 'ENV' ][ 'cellFeatures' ]
+ 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' ])
- Features = main.params[ 'ENV' ][ 'cellFeatures' ]
skipMvn = main.params[ 'TEST' ][ 'skipCleanInstall' ]
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
switchCount = main.params[ 'TEST' ][ 'switchCount' ]
- #Populate ONOSIp with ips from params
- for i in range(1, maxNodes + 1):
- ipString = 'ip' + str(i)
- ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
-
- tempIp = []
- for node in range( 1, clusterCount + 1):
- tempIp.append(ONOSIp[node])
+ # -- 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
+
+ clusterCount = 0
+ ONOSIp = [ 0 ]
+ scale = (main.params[ 'SCALE' ]).split(",")
+ clusterCount = int(scale[0])
- #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])
+ #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()
- #construct the cell file
- main.log.info("Creating cell file")
- exec "a = main.ONOSbench.createCellFile"
- cellIp = []
- for node in range (1, clusterCount + 1):
- cellIp.append(ONOSIp[node])
- a(BENCHIp,cellName,MN1Ip,str(Features), *cellIp)
-
- main.step( "Applying cell file to environment" )
- cellApplyResult = main.ONOSbench.setCell( cellName )
-
- #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] )
-
- #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':
@@ -82,142 +67,117 @@
checkoutResult = main.TRUE
pullResult = main.TRUE
main.log.info( "Skipped git checkout and pull" )
-
- main.ONOSbench.createLinkGraphFile(BENCHIp, tempIp, switchCount)
- main.ONOSbench.createNullDevProviderFile(BENCHIp, tempIp, switchCount)
- main.ONOSbench.createNullLinkProviderFile(BENCHIp)
-
- main.step( "Creating ONOS package" )
- packageResult = main.ONOSbench.onosPackage()
-
- main.step( "Installing ONOS package" )
- install1Result = main.ONOSbench.onosInstall( node=ONOSIp[1] )
-
- main.step( "verify cells" )
- verifyCellResult = main.ONOSbench.verifyCell()
-
- main.step( "Set cell for ONOS cli env" )
- cli1 = main.ONOS1cli.startOnosCli( ONOSIp[1] )
-
- def CASE2( self, main ):
- # This case increases the cluster size by whatever scale is
- # Note: 'scale' is the size of the step
- # if scaling is not a part of your test, simply run this case
- # once after CASE1 to set up your enviornment for your desired
- # cluster size. If scaling is a part of you test call this case each time
- # you want to increase cluster size
-
- ''
- 'Increase number of nodes and initiate CLI'
- ''
- import time
- global clusterCount
+ # -- END OF INIT SECTION --#
+
+ clusterCount = int(scale[0])
+ scale.remove(scale[0])
- BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
- scale = int( main.params[ 'SCALE' ] )
- clusterCount += scale
- switchCount = main.params[ 'TEST' ][ 'switchCount' ]
-
+ #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")
- exec "a = main.ONOSbench.createCellFile"
cellIp = []
for node in range (1, clusterCount + 1):
cellIp.append(ONOSIp[node])
- a(BENCHIp,cellName,MN1Ip,str(Features), *cellIp)
-
- main.step( "Applying cell file to environment" )
- cellApplyResult = main.ONOSbench.setCell( cellName )
- #Uninstall everywhere
- main.log.step( "Cleaning Enviornment..." )
- for node in range(1, maxNodes + 1):
- main.ONOSbench.onosDie(ONOSIp[node])
- main.log.info(" Uninstalling ONOS " + str(node) )
- main.ONOSbench.onosUninstall( ONOSIp[node] )
+ main.ONOSbench.createCellFile(BENCHIp,cellName,MN1Ip,str(Apps), *cellIp)
- tempIp = []
- for node in range( 1, clusterCount + 1):
- tempIp.append(ONOSIp[node])
+ main.step( "Set Cell" )
+ main.ONOSbench.setCell(cellName)
+
+ main.ONOSbench.createLinkGraphFile(BENCHIp, cellIp, switchCount)
- main.ONOSbench.createLinkGraphFile(BENCHIp, tempIp, switchCount)
- main.ONOSbench.createNullDevProviderFile(BENCHIp, tempIp, switchCount)
- main.ONOSbench.createNullLinkProviderFile(BENCHIp)
+ main.step( "Creating ONOS package" )
+ packageResult = main.ONOSbench.onosPackage()
- main.ONOSbench.onosPackage()
-
- main.log.report( "Increasing cluster size to " + str( clusterCount ) )
+ 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( node=ONOSIp[node])
- if node == 1:
- main.ONOS1cli.startOnosCli( ONOSIp[1] )
-
- 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!" )
-
- def CASE3( self, main ):
+ main.log.report( "ONOS " + str(node) + " didn't start!" )
- import time
- import numpy
-
+ main.ONOS1cli.startOnosCli( ONOSIp[1] )
+ main.log.info("Startup sequence complete")
- sampleSize = int(main.params[ 'TEST' ][ 'sampleSize' ])
+ main.ONOSbench.configNullDev(cellIp, switchCount)
+
+ def CASE2( self, main ):
+
+ import time
+ import numpy
+
+ sampleSize = int(main.params[ 'TEST' ][ 'sampleSize' ])
warmUp = int(main.params[ 'TEST' ][ 'warmUp' ])
intentsList = (main.params[ 'TEST' ][ 'intents' ]).split(",")
switchCount = int(main.params[ 'TEST' ][ 'switchCount' ])
debug = main.params[ 'TEST' ][ 'switchCount' ]
for i in range(0,len(intentsList)):
- intentsList[i] = int(intentsList[i])
-
- if debug == "True":
+ intentsList[i] = int(intentsList[i])
+
+ if debug == "True":
debug = True
- else:
+ else:
debug = False
-
+
linkCount = 0
for i in range(0,10):
main.ONOSbench.handle.sendline("onos $OC1 links|wc -l")
main.ONOSbench.handle.expect(":~")
- linkCount = main.ONOSbench.handle.before
- if debug: main.log.info("Link Count check: " + linkCount)
- if str((switchCount*2)-2) in linkCount:
- break
+ linkCount = main.ONOSbench.handle.before
+ if debug: main.log.info("Link Count check: " + linkCount)
+ if str((switchCount*2)-2) in linkCount:
+ break
time.sleep(2)
-
- links = "--"
+
+ links = "--"
while "=null:" not in links:
if debug: main.log.info("top of loop")
- main.ONOSbench.handle.sendline("onos $OC1 links")
+ 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)
+ if debug: main.log.info(str(links))
+ time.sleep(1)
links = links.splitlines()
- templinks = links
-
+ templinks = links
+
tempDevices = []
- for line in links:
- temp = line.split(" ")
+ for line in links:
+ temp = line.split(" ")
temp[0].replace("src=","")
temp[0] = (temp[0].split("/"))[0]
- tempDevices.append(temp[0])
+ tempDevices.append(temp[0])
tempDevices.sort()
devices = []
- for i in tempDevices:
+ for i in tempDevices:
if "src=null" in i:
- devices.append(i.replace("src=", ""))
+ devices.append(i.replace("src=", ""))
if debug: main.log.info(str(devices))
ingress = devices[0]
- egress = devices.pop()
+ egress = devices.pop()
if debug: main.log.info(ingress)
if debug: main.log.info(egress)
@@ -230,9 +190,9 @@
withdrawn = []
for run in range(0, (warmUp + sampleSize)):
- if run > warmUp:
+ if run > warmUp:
time.sleep(5)
-
+
myRawResult = "--"
while "ms" not in myRawResult:
main.ONOSbench.handle.sendline(cmd)
@@ -240,23 +200,24 @@
myRawResult = main.ONOSbench.handle.before
if debug: main.log.info(myRawResult)
- if debug: main.log.info(myRawResult)
+ if debug: main.log.info(myRawResult)
- if run >= warmUp:
+ if run >= warmUp:
myRawResult = myRawResult.splitlines()
for line in myRawResult:
if "install" in line:
- installed.append(int(line.split(" ")[5]))
-
+ installed.append(int(line.split(" ")[5]))
+
for line in myRawResult:
- if "withdraw" in line:
+ if "withdraw" in line:
withdrawn.append(int(line.split(" ")[5]))
print("installed: " + str(installed))
print("withraw: " + str(withdrawn) + "\n")
-
+
main.log.report("----------------------------------------------------")
- main.log.report("Scale: " + str(clusterCount) + "\tIntent batch size: " + str(intentSize))
+ main.log.report("Scale: " + str(clusterCount) + "\tIntent batch size: " + str(intentSize))
+ main.log.report("Data samples: " + str(sampleSize) + "\tWarm up tests: " + str(warmUp))
main.log.report("Installed average: " + str(numpy.mean(installed)))
main.log.report("Installed standard deviation: " + str(numpy.std(installed)))
main.log.report("Withdraw average: " + str(numpy.mean(withdrawn)))
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
index 0e45e0f..30a1467 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>10.128.5.55</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>10.128.5.51</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>10.128.5.52</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>10.128.5.53</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>10.128.5.54</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>10.128.5.65</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>10.128.5.66</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>10.128.5.67</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
diff --git a/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.py b/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.py
index 6c07d6b..de0ad05 100644
--- a/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.py
+++ b/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.py
@@ -119,6 +119,7 @@
CLIs[0].activateApp( 'org.onosproject.openflow' )
main.step( 'Configuring application parameters' )
+<<<<<<< HEAD
configName = 'org.onosproject.net.topology.impl.DefaultTopologyProvider'
configParam = 'maxEvents 1'
main.ONOSbench.onosCfgSet( nodeIpList[0], configName, configParam )
@@ -127,6 +128,28 @@
configParam = 'maxIdleMs 0'
main.ONOSbench.onosCfgSet( nodeIpList[0], configName, configParam )
+=======
+ # TODO: Check driver for this functionality
+ main.ONOSbench.handle.sendline(
+ 'onos '+nodeIpList[0]+
+ ' cfg set org.onosproject.net.'+
+ 'topology.impl.DefaultTopologyProvider'+
+ ' maxEvents 1')
+ main.ONOSbench.handle.expect(":~")
+ main.ONOSbench.handle.sendline(
+ 'onos '+nodeIpList[0]+
+ ' cfg set org.onosproject.net.'+
+ 'topology.impl.DefaultTopologyProvider'+
+ ' maxBatchMs 0')
+ main.ONOSbench.handle.expect(":~")
+ main.ONOSbench.handle.sendline(
+ 'onos '+nodeIpList[0]+
+ ' cfg set org.onosproject.net.'+
+ 'topology.impl.DefaultTopologyProvider'+
+ ' maxIdleMs 0')
+ main.ONOSbench.handle.expect(":~")
+
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
utilities.assert_equals(expect=main.TRUE,
actual=cellFileResult and cellApplyResult and\
verifyCellResult and checkoutResult and\
@@ -217,6 +240,22 @@
deviceToGraphDiscLatNodeIter = numpy.zeros((clusterCount,
int(numIter)))
+ # TCP Syn/Ack -> Feature Reply latency collection for each node
+ tcpToFeatureLatNodeIter = numpy.zeros((clusterCount, int(numIter)))
+ # Feature Reply -> Role Request latency collection for each node
+ featureToRoleRequestLatNodeIter = numpy.zeros((clusterCount,
+ int(numIter)))
+ # Role Request -> Role Reply latency collection for each node
+ roleRequestToRoleReplyLatNodeIter = numpy.zeros((clusterCount,
+ int(numIter)))
+ # Role Reply -> Device Update latency collection for each node
+ roleReplyToDeviceLatNodeIter = numpy.zeros((clusterCount,
+ int(numIter)))
+ # Device Update -> Graph Update latency collection for each node
+ deviceToGraphLatNodeIter = numpy.zeros((clusterCount,
+ int(numIter)))
+
+
endToEndLatNodeIter = numpy.zeros((clusterCount, int(numIter)))
ofpToGraphLatNodeIter = numpy.zeros((clusterCount, int(numIter)))
ofpToDeviceLatNodeIter = numpy.zeros((clusterCount, int(numIter)))
@@ -349,6 +388,7 @@
if jsonObj:
graphTimestamp = jsonObj[graphTimestampKey]['value']
deviceTimestamp = jsonObj[deviceTimestampKey]['value']
+<<<<<<< HEAD
else:
main.log.error( "Unexpected JSON object" )
# If we could not obtain the JSON object,
@@ -374,6 +414,33 @@
main.log.info("ONOS "+str(nodeNum)+ " end-to-end: "+
str(endToEnd) + " ms")
else:
+=======
+ else:
+ main.log.error( "Unexpected JSON object" )
+ # If we could not obtain the JSON object,
+ # set the timestamps to 0, which will be
+ # excluded from the measurement later on
+ # (realized as invalid)
+ graphTimestamp = 0
+ deviceTimestamp = 0
+
+ endToEnd = int(graphTimestamp) - int(t0Tcp)
+
+ # Below are measurement breakdowns of the end-to-end
+ # measurement.
+ tcpToFeature = int(featureTimestamp) - int(t0Tcp)
+ featureToRole = int(roleTimestamp) - int(featureTimestamp)
+ roleToOfp = int(t0Ofp) - int(roleTimestamp)
+ ofpToDevice = int(deviceTimestamp) - int(t0Ofp)
+ deviceToGraph = float(graphTimestamp) - float(deviceTimestamp)
+
+ if endToEnd > thresholdMin and\
+ endToEnd < thresholdMax and i >= iterIgnore:
+ endToEndLatNodeIter[node][i] = endToEnd
+ main.log.info("ONOS "+str(nodeNum)+ " end-to-end: "+
+ str(endToEnd) + " ms")
+ else:
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
main.log.info("ONOS "+str(nodeNum)+ " end-to-end "+
"measurement ignored due to excess in "+
"threshold or premature iteration")
@@ -445,6 +512,7 @@
# TCP FIN/ACK -> TCP FIN
# TCP FIN -> Device Event
# Device Event -> Graph Event
+<<<<<<< HEAD
# Capture switch down FIN / ACK packets
@@ -452,6 +520,8 @@
grepOptions = '-A 1' )
time.sleep( 5 )
+=======
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
main.step('Remove switch from controller')
main.Mininet1.deleteSwController('s3')
@@ -571,19 +641,28 @@
roleToOfpList = []
ofpToDeviceList = []
deviceToGraphList = []
+<<<<<<< HEAD
finAckTransactionList = []
ackToDeviceList = []
deviceToGraphDiscList = []
+=======
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
# LatNodeIter 2d arrays contain all iteration latency
# for each node of the current scale cluster size
+<<<<<<< HEAD
# Switch connection measurements
+=======
+ # TODO: Use the new breakdown latency lists
+
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
for item in endToEndLatNodeIter[node]:
if item > 0.0:
endToEndList.append(item)
for item in tcpToFeatureLatNodeIter[node]:
+<<<<<<< HEAD
if item > 0.0:
tcpToFeatureList.append(item)
@@ -596,9 +675,16 @@
roleToOfpList.append(item)
for item in roleReplyToDeviceLatNodeIter[node]:
+=======
if item > 0.0:
- ofpToDeviceList.append(item)
+ tcpToFeatureList.append(item)
+ for item in featureToRoleRequestLatNodeIter[node]:
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
+ if item > 0.0:
+ featureToRoleList.append(item)
+
+<<<<<<< HEAD
for item in deviceToGraphLatNodeIter[node]:
if item > 0.0:
deviceToGraphList.append(item)
@@ -615,6 +701,19 @@
for item in deviceToGraphDiscLatNodeIter[node]:
if item > 0.0:
deviceToGraphDiscList.append(item)
+=======
+ for item in roleRequestToRoleReplyLatNodeIter[node]:
+ if item > 0.0:
+ roleToOfpList.append(item)
+
+ for item in roleReplyToDeviceLatNodeIter[node]:
+ if item > 0.0:
+ ofpToDeviceList.append(item)
+
+ for item in deviceToGraphLatNodeIter[node]:
+ if item > 0.0:
+ deviceToGraphList.append(item)
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
endToEndAvg = round(numpy.mean(endToEndList), 2)
endToEndStdDev = round(numpy.std(endToEndList), 2)
@@ -634,6 +733,7 @@
deviceToGraphAvg = round(numpy.mean(deviceToGraphList), 2)
deviceToGraphStdDev = round(numpy.std(deviceToGraphList), 2)
+<<<<<<< HEAD
finAckAvg = round(numpy.mean(finAckTransactionList), 2)
finAckStdDev = round(numpy.std(finAckTransactionList), 2)
@@ -643,6 +743,8 @@
deviceToGraphDiscAvg = round(numpy.mean(deviceToGraphDiscList), 2)
deviceToGraphDiscStdDev = round(numpy.std(deviceToGraphDiscList), 2)
+=======
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
main.log.report(' - Node ' + str(node + 1) + ' Summary - ')
main.log.report(' - Switch Connection Statistics - ')
@@ -675,6 +777,7 @@
main.log.report( 'Device-to-graph Std dev: ' +
str(deviceToGraphStdDev) + ' ms')
+<<<<<<< HEAD
main.log.report(' - Switch Disconnection Statistics - ')
main.log.report(' Fin/Ack-to-Ack Avg: ' + str(finAckAvg) + ' ms')
main.log.report(' Fin/Ack-to-Ack Std dev: ' +
@@ -690,6 +793,8 @@
main.log.report(' Device-to-graph (disconnect) Std dev: ' +
str(deviceToGraphDiscStdDev) + ' ms')
+=======
+>>>>>>> c16e983dcc6a370bcdebdf4168770cee5c619a7d
dbCmdList.append(
"INSERT INTO switch_latency_tests VALUES('" +
timeToPost + "','switch_latency_results'," +
diff --git a/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.topo b/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.topo
index a92e391..6a70f60 100644
--- a/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.topo
+++ b/TestON/tests/TopoPerfNextBM/TopoPerfNextBM.topo
@@ -2,7 +2,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -11,7 +11,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -20,7 +20,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -29,7 +29,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -38,7 +38,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -47,7 +47,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -56,7 +56,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -65,7 +65,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>10.128.174.10</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -74,7 +74,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>10.128.174.1</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>