Merge branch 'master' of https://github.com/opennetworkinglab/ONLabTest
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 271c0dd..2661715 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -163,12 +163,20 @@
driverClass = getattr(driverModule, driverName)
driverObject = driverClass()
- try:
- self.componentDictionary[component]['host'] = os.environ[str( self.componentDictionary[component]['host'])]
- except KeyError:
- self.log.info("Missing OC environment variable! Using stored IPs")
- except Exception as inst:
- self.log.error("Uncaught exception: " + str(inst))
+ if "OC" in self.componentDictionary[component]['host']:
+ try:
+ self.componentDictionary[component]['host'] = os.environ[str( self.componentDictionary[component]['host'])]
+ except KeyError:
+ self.log.info("Missing OC environment variable! Using stored IPs")
+ f = open("myIps","r")
+ ips = f.readlines()
+ for line in ips:
+ if self.componentDictionary[component]['host'] in line:
+ line = line.split("=")
+ myIp = line[1]
+ self.componentDictionary[component]['host'] = myIp
+ except Exception as inst:
+ self.log.error("Uncaught exception: " + str(inst))
connect_result = driverObject.connect(user_name = self.componentDictionary[component]['user'] if ('user' in self.componentDictionary[component].keys()) else getpass.getuser(),
ip_address= self.componentDictionary[component]['host'] if ('host' in self.componentDictionary[component].keys()) else 'localhost',
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.params b/TestON/tests/IntentEventTP/IntentEventTP.params
index c58ec6c..0e6bbfb 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.params
+++ b/TestON/tests/IntentEventTP/IntentEventTP.params
@@ -21,33 +21,33 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>OC1</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>OC2</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>OC3</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>OC4</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>OC5</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>OC6</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>OC7</ip7>
<port7>6633</port7>
</CTRL>
- <MN><ip1>10.254.1.200</ip1></MN>
+ <MN><ip1>OCN</ip1></MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</BENCH>
<TEST>
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.py b/TestON/tests/IntentEventTP/IntentEventTP.py
index dbafb9a..6134ed3 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.py
+++ b/TestON/tests/IntentEventTP/IntentEventTP.py
@@ -59,10 +59,11 @@
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 ])
-
+ ONOSIp = [0]
+ ONOSIp.extend(main.ONOSbench.getOnosIps())
+ MN1Ip = ONOSIp[len(ONOSIp) -1]
+ BENCHIp = ONOSIp[len(ONOSIp) -2]
+
#mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
if skipMvn != "yes":
mvnResult = main.ONOSbench.cleanInstall()
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.topo b/TestON/tests/IntentEventTP/IntentEventTP.topo
index 7b39c4e..d82f3fd 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>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>OC1</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>OC2</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>OC3</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>OC4</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>OC5</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>OC6</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>OC7</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 dc3dec9..8aad63b 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
@@ -28,36 +28,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>OC1</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>OC2</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>OC3</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>OC4</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>OC5</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>OC6</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>OC7</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
index 762b617..a3833d4 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
@@ -50,10 +50,11 @@
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 ])
-
+ ONOSIp = [0]
+ ONOSIp.extend(main.ONOSbench.getOnosIps())
+ MN1Ip = ONOSIps[len(ONOSIp)-1]
+ BENCHIp = ONOSIps[len(ONOSIp)-2]
+
#mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
if skipMvn != "yes":
mvnResult = main.ONOSbench.cleanInstall()
diff --git a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.topo
index 0e45e0f..d82f3fd 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>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>OC1</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>OC2</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>OC3</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>OC4</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>OC5</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>OC6</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>OC7</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -141,6 +141,4 @@
</COMPONENT>
</TOPOLOGY>
-
-
-
+
diff --git a/TestON/tests/IntentRerouteLat/IntentRerouteLat.params b/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
index 7379a08..2e43679 100644
--- a/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
+++ b/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
@@ -41,36 +41,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>OC1</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>OC2</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>OC3</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>OC4</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>OC5</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>OC6</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>OC7</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/IntentRerouteLat/IntentRerouteLat.py b/TestON/tests/IntentRerouteLat/IntentRerouteLat.py
index b8ba79b..97ac978 100644
--- a/TestON/tests/IntentRerouteLat/IntentRerouteLat.py
+++ b/TestON/tests/IntentRerouteLat/IntentRerouteLat.py
@@ -28,9 +28,7 @@
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' ]
@@ -49,10 +47,12 @@
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 ])
-
+ ONOSIp = [0]
+ ONOSIp.extend(main.ONOSbench.getOnosIps())
+ MN1Ip = ONOSIp[len(ONOSIp)-1]
+ BENCHIp = ONOSIp[len(ONOSIp)-2]
+
+ print("-----------------" + str(ONOSIp))
#mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
if skipMvn != "yes":
mvnResult = main.ONOSbench.cleanInstall()
@@ -96,6 +96,12 @@
cellIp = []
for node in range (1, clusterCount + 1):
cellIp.append(ONOSIp[node])
+
+ print "Cell ip" + str(cellIp)
+ print cellName
+ print MN1Ip
+ print Apps
+
main.ONOSbench.createCellFile(BENCHIp,cellName,MN1Ip,str(Apps), *cellIp)
diff --git a/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo b/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo
index 0e45e0f..d82f3fd 100644
--- a/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo
+++ b/TestON/tests/IntentRerouteLat/IntentRerouteLat.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>OC1</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>OC2</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>OC3</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>OC4</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>OC5</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>OC6</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>OC7</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -141,6 +141,4 @@
</COMPONENT>
</TOPOLOGY>
-
-
-
+
diff --git a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.py b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.py
new file mode 100644
index 0000000..a8d21d2
--- /dev/null
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.py
@@ -0,0 +1,121 @@
+# ScaleOutTemplate
+#
+# CASE1 starts number of nodes specified in param file
+#
+# cameron@onlab.us
+
+import sys
+import os.path
+
+
+class ScaleOutTemplate:
+
+ 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' ]
+ BENCHUser = main.params[ 'BENCH' ][ 'user' ]
+ 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
+
+ clusterCount = 0
+ ONOSIp = [ 0 ]
+ scale = (main.params[ 'SCALE' ]).split(",")
+ clusterCount = int(scale[0])
+
+ #Populate ONOSIp with ips from params
+ ONOSIp = [0]
+ ONOSIp.extend(main.ONOSbench.getOnosIps())
+ MN1Ip = ONOSIp[len(ONOSIp) -1]
+ BENCHIp = ONOSIp[len(ONOSIp) -2]
+
+ #git
+ main.step( "Git checkout and pull " + checkoutBranch )
+ if gitPull == 'on':
+ checkoutResult = main.ONOSbench.gitCheckout( checkoutBranch )
+ pullResult = main.ONOSbench.gitPull()
+ else:
+ main.log.info( "Skipped git checkout and pull" )
+
+ if skipMvn != "yes":
+ mvnResult = main.ONOSbench.cleanInstall()
+
+ # -- 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.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.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!" )
+ main.log.info("Startup sequence complete")
+
+ def CASE2( self, main ):
+
+ print ("clusterCount: " + str(clusterCount))
+ print ("scale: " + str(scale))
+ print ("ONOSIp: " + str(ONOSIp))
+ print ("INIT: " + str(init))
+
diff --git a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
index f3f3cb9..d82f3fd 100644
--- a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
@@ -8,7 +8,7 @@
<password>onos_test</password>
<type>OnosDriver</type>
<connect_order>1</connect_order>
- <COMPONENTS> </COMPONENTS>
+ <COMPONENTS><home>~/onos</home></COMPONENTS>
</ONOSbench>
<ONOS1cli>
@@ -19,7 +19,7 @@
<connect_order>2</connect_order>
<COMPONENTS> </COMPONENTS>
</ONOS1cli>
-
+
<ONOS2cli>
<host>OCN</host>
<user>admin</user>
@@ -37,7 +37,43 @@
<connect_order>4</connect_order>
<COMPONENTS> </COMPONENTS>
</ONOS3cli>
-
+
+ <ONOS4cli>
+ <host>OCN</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>5</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS4cli>
+
+ <ONOS5cli>
+ <host>OCN</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>6</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS5cli>
+
+ <ONOS6cli>
+ <host>OCN</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>7</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS6cli>
+
+ <ONOS7cli>
+ <host>OCN</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>OnosCliDriver</type>
+ <connect_order>8</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS7cli>
+
<ONOS1>
<host>OC1</host>
<user>sdn</user>
@@ -65,21 +101,44 @@
<COMPONENTS> </COMPONENTS>
</ONOS3>
- <Mininet1>
- <host>OCN</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>MininetCliDriver</type>
- <connect_order>16</connect_order>
- <COMPONENTS>
- <arg1> --custom ~/mininet/custom/topo-2sw-2host.py </arg1>
- <arg2> --arp --mac --topo mytopo</arg2>
- <arg3> </arg3>
- <controller> remote </controller>
- </COMPONENTS>
- </Mininet1>
+ <ONOS4>
+ <host>OC4</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosDriver</type>
+ <connect_order>12</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS4>
+
+
+ <ONOS5>
+ <host>OC5</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosDriver</type>
+ <connect_order>13</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS5>
+
+ <ONOS6>
+ <host>OC6</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosDriver</type>
+ <connect_order>14</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS6>
+
+ <ONOS7>
+ <host>OC7</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosDriver</type>
+ <connect_order>15</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </ONOS7>
</COMPONENT>
</TOPOLOGY>
-
+
diff --git a/TestON/tests/flowTP1g/flowTP1g.params b/TestON/tests/flowTP1g/flowTP1g.params
index da7397f..a3b104f 100644
--- a/TestON/tests/flowTP1g/flowTP1g.params
+++ b/TestON/tests/flowTP1g/flowTP1g.params
@@ -35,36 +35,36 @@
<CTRL>
<USER>admin</USER>
- <ip1>10.254.1.201</ip1>
+ <ip1>OC1</ip1>
<port1>6633</port1>
- <ip2>10.254.1.202</ip2>
+ <ip2>OC2</ip2>
<port2>6633</port2>
- <ip3>10.254.1.203</ip3>
+ <ip3>OC3</ip3>
<port3>6633</port3>
- <ip4>10.254.1.204</ip4>
+ <ip4>OC4</ip4>
<port4>6633</port4>
- <ip5>10.254.1.205</ip5>
+ <ip5>OC5</ip5>
<port5>6633</port5>
- <ip6>10.254.1.206</ip6>
+ <ip6>OC6</ip6>
<port6>6633</port6>
- <ip7>10.254.1.207</ip7>
+ <ip7>OC7</ip7>
<port7>6633</port7>
</CTRL>
<MN>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</MN>
<BENCH>
<user>admin</user>
- <ip1>10.254.1.200</ip1>
+ <ip1>OCN</ip1>
</BENCH>
<JSON>
diff --git a/TestON/tests/flowTP1g/flowTP1g.py b/TestON/tests/flowTP1g/flowTP1g.py
index cb0cac6..22bc737 100644
--- a/TestON/tests/flowTP1g/flowTP1g.py
+++ b/TestON/tests/flowTP1g/flowTP1g.py
@@ -28,9 +28,7 @@
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' ]
@@ -59,6 +57,11 @@
ipString = 'ip' + str(i)
ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
+ ONOSIp = [0]
+ ONOSIp.extend(main.ONOSbench.getOnosIps())
+ MN1Ip = ONOSIp[len(ONOSIp)-1]
+ BENCHIp = ONOSIp[len(ONOSIp)-2]
+
#mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
if skipMvn != "yes":
mvnResult = main.ONOSbench.cleanInstall()
diff --git a/TestON/tests/flowTP1g/flowTP1g.topo b/TestON/tests/flowTP1g/flowTP1g.topo
index 7b39c4e..d82f3fd 100644
--- a/TestON/tests/flowTP1g/flowTP1g.topo
+++ b/TestON/tests/flowTP1g/flowTP1g.topo
@@ -3,7 +3,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
@@ -12,7 +12,7 @@
</ONOSbench>
<ONOS1cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
</ONOS1cli>
<ONOS2cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
</ONOS2cli>
<ONOS3cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
</ONOS3cli>
<ONOS4cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
</ONOS4cli>
<ONOS5cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
</ONOS5cli>
<ONOS6cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
</ONOS6cli>
<ONOS7cli>
- <host>10.254.1.200</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
</ONOS7cli>
<ONOS1>
- <host>10.254.1.201</host>
+ <host>OC1</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -84,7 +84,7 @@
</ONOS1>
<ONOS2>
- <host>10.254.1.202</host>
+ <host>OC2</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -93,7 +93,7 @@
</ONOS2>
<ONOS3>
- <host>10.254.1.203</host>
+ <host>OC3</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -102,7 +102,7 @@
</ONOS3>
<ONOS4>
- <host>10.254.1.204</host>
+ <host>OC4</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -112,7 +112,7 @@
<ONOS5>
- <host>10.254.1.205</host>
+ <host>OC5</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -121,7 +121,7 @@
</ONOS5>
<ONOS6>
- <host>10.254.1.206</host>
+ <host>OC6</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>
@@ -130,7 +130,7 @@
</ONOS6>
<ONOS7>
- <host>10.254.1.207</host>
+ <host>OC7</host>
<user>sdn</user>
<password>rocks</password>
<type>OnosDriver</type>