Merge pull request #135 from opennetworkinglab/devl/locks

Fix multiple cleanup bug caused by threading
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 657e659..7e99ffd 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -165,12 +165,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/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index d4900ad..5da4a71 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1624,6 +1624,31 @@
             main.cleanup()
             main.exit()
 
+    def purgeIntents( self ):
+        """
+        Purges all WITHDRAWN Intents
+        """
+        try:
+            cmdStr = "purge-intents"
+            handle = self.sendline( cmdStr )
+            if re.search( "Error", handle ):
+                main.log.error( "Error in purging intents" )
+                return main.FALSE
+            else:
+                return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
     def routes( self, jsonFormat=False ):
         """
         NOTE: This method should be used after installing application:
diff --git a/TestON/tests/CbenchBM/CbenchBM.params b/TestON/tests/CbenchBM/CbenchBM.params
new file mode 100644
index 0000000..33dc069
--- /dev/null
+++ b/TestON/tests/CbenchBM/CbenchBM.params
@@ -0,0 +1,60 @@
+<PARAMS>
+
+    <testcases>1,2</testcases>
+
+    <SCALE>1</SCALE>
+    <availableNodes>7</availableNodes>
+
+    <ENV>
+    <cellName>CbenchBMcell</cellName>
+    </ENV>
+
+    <TEST>
+        <skipCleanInstall>yes</skipCleanInstall>
+        <mode>t</mode>                     #t throughput
+    </TEST>
+
+    <GIT>
+        <autopull>off</autopull>
+        <checkout>master</checkout>
+    </GIT>
+
+    <CTRL>
+        <USER>admin</USER>
+        
+        <ip1>10.254.1.207</ip1>
+        <port1>6633</port1>
+        
+        <ip2>10.254.1.202</ip2>
+        <port2>6633</port2>
+        
+        <ip3>10.254.1.203</ip3>
+        <port3>6633</port3>
+        
+        <ip4>10.254.1.204</ip4>
+        <port4>6633</port4>
+        
+        <ip5>10.128.5.205</ip5>
+        <port5>6633</port5>
+        
+        <ip6>10.128.5.206</ip6>
+        <port6>6633</port6> 
+       
+        <ip7>10.128.5.201</ip7>
+        <port7>6633</port7>
+
+    </CTRL>
+
+    <MN>
+        <ip1>10.254.1.200</ip1>
+    </MN>
+
+    <BENCH>
+        <user>admin</user>
+        <ip1>10.254.1.200</ip1>
+    </BENCH>
+
+    <JSON>
+    </JSON>
+
+</PARAMS>
diff --git a/TestON/tests/CbenchBM/CbenchBM.py b/TestON/tests/CbenchBM/CbenchBM.py
new file mode 100644
index 0000000..d042f45
--- /dev/null
+++ b/TestON/tests/CbenchBM/CbenchBM.py
@@ -0,0 +1,184 @@
+# ScaleOutTemplate --> CbenchBM
+#
+# CASE1 starts number of nodes specified in param file
+#
+# cameron@onlab.us
+
+import sys
+import os.path
+
+
+class CbenchBM:
+
+    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' ]
+        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 
+            
+            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" )
+        
+        # -- 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] )
+       
+        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")
+
+        for i in range(5): 
+            main.ONOSbench.onosCfgSet(ONOSIp[1], "org.onosproject.fwd.ReactiveForwarding","packetOutOnly true")
+            time.sleep(5)
+            main.ONOSbench.handle.sendline("onos $OC1 cfg get|grep packetOutOnly") 
+            main.ONOSbench.handle.expect(":~") 
+            check = main.ONOSbench.handle.before
+            if "value=true" in check:
+                main.log.info("cfg set successful") 
+                break 
+            if i == 4: 
+                main.log.info("Cfg set failed") 
+            else: 
+                time.sleep(5)
+                
+            
+
+        
+ 
+    def CASE2( self, main ):
+         
+        mode = main.params[ 'TEST' ][ 'mode' ]
+        if mode != "t":
+            mode = " " 
+
+        runCbench = ( "ssh admin@" + ONOSIp[1] + " cbench -c localhost -p 6633 -m 1000 -l 25 -s 16 -M 100000 -w 15 -D 10000 -" + mode )
+        main.ONOSbench.handle.sendline(runCbench)
+        time.sleep(30)
+        main.ONOSbench.handle.expect(":~") 
+        output = main.ONOSbench.handle.before
+        main.log.info(output)
+
+        output = output.splitlines()
+        for line in output: 
+            if "RESULT: " in line: 
+                print line
+                break 
+        
+        resultLine = line.split(" ") 
+        for word in resultLine:
+            if word == "min/max/avg/stdev": 
+                resultsIndex = resultLine.index(word)
+                print resultsIndex
+                break
+
+        finalDataString = resultLine[resultsIndex + 2]
+        print finalDataString
+        finalDataList = finalDataString.split("/")
+        avg = finalDataList[2]
+        stdev = finalDataList[3]
+                                                     
+        main.log.info("Average: \t\t\t" + avg) 
+        main.log.info("Standard Deviation: \t" + stdev) 
+
+        if mode == " ": 
+            mode = "l"
+
+        commit = main.ONOSbench.getVersion()
+        commit = (commit.split(" "))[1]
+
+        dbfile = open("CbenchBMDB", "w+") 
+        temp = "'" + commit + "'," 
+        temp += "'" + mode + "'," 
+        temp += "'" + avg + "',"
+        temp += "'" + stdev + "'\n" 
+        dbfile.write(temp)
+        dbfile.close()
+        main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"], outputMode="d") 
+
+
+
+
+
+
+
+
+
diff --git a/TestON/tests/CbenchBM/CbenchBM.topo b/TestON/tests/CbenchBM/CbenchBM.topo
new file mode 100644
index 0000000..7b39c4e
--- /dev/null
+++ b/TestON/tests/CbenchBM/CbenchBM.topo
@@ -0,0 +1,144 @@
+<TOPOLOGY>
+
+    <COMPONENT>
+
+        <ONOSbench>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS><home>~/onos</home></COMPONENTS>
+        </ONOSbench>
+
+        <ONOS1cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS1cli>
+
+        <ONOS2cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS2cli>
+
+        <ONOS3cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS3cli>
+
+        <ONOS4cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS4cli>
+
+        <ONOS5cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS5cli>
+
+        <ONOS6cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS6cli>
+
+        <ONOS7cli>
+            <host>10.254.1.200</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>8</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS7cli>
+
+        <ONOS1>
+            <host>10.254.1.201</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>9</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS1>
+
+        <ONOS2>
+            <host>10.254.1.202</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>10</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS2>
+
+        <ONOS3>
+            <host>10.254.1.203</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>11</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS3>
+
+        <ONOS4>
+            <host>10.254.1.204</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>12</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS4>
+
+    
+        <ONOS5>
+            <host>10.254.1.205</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>13</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS5>
+
+        <ONOS6>
+            <host>10.254.1.206</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>14</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS6>
+
+        <ONOS7>
+            <host>10.254.1.207</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/CbenchBM/__init__.py b/TestON/tests/CbenchBM/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/CbenchBM/__init__.py
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.params b/TestON/tests/IntentEventTP/IntentEventTP.params
index ddda23e..0e6bbfb 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.params
+++ b/TestON/tests/IntentEventTP/IntentEventTP.params
@@ -14,40 +14,40 @@
     <availableNodes>7</availableNodes>
 
     <GIT>
-        <autopull>on</autopull>
+        <autopull>off</autopull>
         <checkout>master</checkout>
     </GIT>
 
     <CTRL> 
         <USER>admin</USER>
 
-        <ip1>10.128.5.51</ip1>
+        <ip1>OC1</ip1>
         <port1>6633</port1>
 
-        <ip2>10.128.5.52</ip2>
+        <ip2>OC2</ip2>
         <port2>6633</port2>
 
-        <ip3>10.128.5.53</ip3>
+        <ip3>OC3</ip3>
         <port3>6633</port3>
 
-        <ip4>10.128.5.54</ip4>
+        <ip4>OC4</ip4>
         <port4>6633</port4>
 
-        <ip5>10.128.5.55</ip5>
+        <ip5>OC5</ip5>
         <port5>6633</port5>
 
-        <ip6>10.128.5.56</ip6>
+        <ip6>OC6</ip6>
         <port6>6633</port6>
 
-         <ip7>10.128.5.57</ip7>
+         <ip7>OC7</ip7>
         <port7>6633</port7> 
     </CTRL>
 
-    <MN><ip1>10.128.5.50</ip1></MN>
+    <MN><ip1>OCN</ip1></MN>
 
     <BENCH>
         <user>admin</user>
-        <ip1>10.128.5.50</ip1>
+        <ip1>OCN</ip1>
     </BENCH>
 
     <TEST> 
@@ -59,7 +59,7 @@
         <numKeys>40000</numKeys>
         <cyclePeriod>1000</cyclePeriod>
         <neighbors>0,a</neighbors>           #a == all nodes (-1)
-        <flowRuleBUEnabled>false</flowRuleBUEnabled>
+        <flowRuleBUEnabled>true</flowRuleBUEnabled>
     </TEST>
 
     <METRICS>
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.py b/TestON/tests/IntentEventTP/IntentEventTP.py
index 99332f7..9682507 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.py
+++ b/TestON/tests/IntentEventTP/IntentEventTP.py
@@ -59,10 +59,9 @@
             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())
+
             #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
             if skipMvn != "yes":
                 mvnResult = main.ONOSbench.cleanInstall()
@@ -94,7 +93,10 @@
         main.log.step("before initiating enviornment setup")
         for node in range(1, maxNodes + 1):
             main.ONOSbench.onosDie(ONOSIp[node])
-        
+       
+        MN1Ip = ONOSIp[len(ONOSIp) -1]
+        BENCHIp = ONOSIp[len(ONOSIp) -2]
+
         #Uninstall everywhere
         main.log.step( "Cleaning Enviornment..." )
         for i in range(1, maxNodes + 1):
@@ -159,7 +161,7 @@
         time.sleep(20)
 
 
-        while True: 
+        for i in range(5): 
             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" """)
@@ -172,7 +174,7 @@
             main.log.info("cfg set failure, retrying")
             main.log.info("before" + main.ONOSbench.handle.before)
         
-        while True:
+        for i in range(5): 
             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" """)
@@ -222,8 +224,7 @@
                     break
             lastOutput = clusterCheck
             time.sleep(5)
-        main.ONOSbench.onosErrorLog(ONOSIp[1])
-
+        main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
     def CASE2( self, main ): 
         import time
         import json
@@ -300,6 +301,7 @@
                     x = 0
                     while True:
                         main.ONOSbench.handle.sendline(cmd)
+                        time.sleep(6)
                         main.ONOSbench.handle.expect(":~")
                         raw = main.ONOSbench.handle.before
                         if "OVERALL=" in raw:
@@ -353,6 +355,5 @@
             
             resultsDB.close() 
             
-            main.ONOSbench.onosErrorLog(ONOSIp[1])
-                        
+            main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])            
 
diff --git a/TestON/tests/IntentEventTP/IntentEventTP.topo b/TestON/tests/IntentEventTP/IntentEventTP.topo
index 763a4d6..d82f3fd 100644
--- a/TestON/tests/IntentEventTP/IntentEventTP.topo
+++ b/TestON/tests/IntentEventTP/IntentEventTP.topo
@@ -3,7 +3,7 @@
     <COMPONENT>
 
         <ONOSbench>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosDriver</type>
@@ -12,7 +12,7 @@
         </ONOSbench>
 
         <ONOS1cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
         </ONOS1cli>
 
         <ONOS2cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
         </ONOS2cli>
 
         <ONOS3cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
         </ONOS3cli>
 
         <ONOS4cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
         </ONOS4cli>
 
         <ONOS5cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
         </ONOS5cli>
 
         <ONOS6cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
         </ONOS6cli>
 
         <ONOS7cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
         </ONOS7cli>
 
         <ONOS1>
-            <host>10.128.5.51</host>
+            <host>OC1</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -84,7 +84,7 @@
         </ONOS1>
 
         <ONOS2>
-            <host>10.128.5.52</host>
+            <host>OC2</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -93,7 +93,7 @@
         </ONOS2>
 
         <ONOS3>
-            <host>10.128.5.53</host>
+            <host>OC3</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -102,7 +102,7 @@
         </ONOS3>
 
         <ONOS4>
-            <host>10.128.5.54</host>
+            <host>OC4</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -112,7 +112,7 @@
 
     
         <ONOS5>
-            <host>10.128.5.55</host>
+            <host>OC5</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -121,7 +121,7 @@
         </ONOS5>
 
         <ONOS6>
-            <host>10.128.5.56</host>
+            <host>OC6</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -130,7 +130,7 @@
         </ONOS6>
 
         <ONOS7>
-            <host>10.128.5.57</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 2b76662..8aad63b 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.params
@@ -21,43 +21,43 @@
     </TEST>
 
     <GIT>
-        <autopull>on</autopull>
+        <autopull>off</autopull>
         <checkout>master</checkout>
     </GIT>
 
     <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 83dac2a..e96307d 100644
--- a/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
+++ b/TestON/tests/IntentInstallWithdrawLat/IntentInstallWithdrawLat.py
@@ -50,10 +50,9 @@
             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())
+
             #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
             if skipMvn != "yes":
                 mvnResult = main.ONOSbench.cleanInstall()
@@ -79,7 +78,10 @@
          
         clusterCount = int(scale[0])
         scale.remove(scale[0])       
-        
+
+        MN1Ip = ONOSIps[len(ONOSIp)-1]
+        BENCHIp = ONOSIps[len(ONOSIp)-2]
+
         #kill off all onos processes 
         main.log.step("Safety check, killing all ONOS processes")
         main.log.step("before initiating enviornment setup")
@@ -128,27 +130,40 @@
         
         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
-        main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
-        main.ONOSbench.handle.expect(":~")
-        print main.ONOSbench.handle.before
-        main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
-        main.ONOSbench.handle.expect(":~")
-        print main.ONOSbench.handle.before
-        main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
-        main.ONOSbench.handle.expect(":~")
-        print main.ONOSbench.handle.before
+        for i in range(5):
+            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
+            main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
+            main.ONOSbench.handle.expect(":~")
+            print main.ONOSbench.handle.before
+            main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
+            main.ONOSbench.handle.expect(":~")
+            print main.ONOSbench.handle.before
+            main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
+            main.ONOSbench.handle.expect(":~")
+            print main.ONOSbench.handle.before
+            
+            main.ONOSbench.handle.sendline("onos $OC1 summary")
+            main.ONOSbench.handle.expect(":~")
+            check = main.ONOSbench.handle.before
+            main.log.info(check)
+            if "SSC(s)=1," in check: 
+                break 
+
+
+
+        main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
 
     def CASE2( self, main ):
          
         import time
         import numpy
 
+        testStatus = "pass"
         sampleSize = int(main.params[ 'TEST' ][ 'sampleSize' ])
         warmUp = int(main.params[ 'TEST' ][ 'warmUp' ])
         intentsList = (main.params[ 'TEST' ][ 'intents' ]).split(",")
@@ -157,10 +172,9 @@
         for i in range(0,len(intentsList)):
             intentsList[i] = int(intentsList[i])
 
-        if debug == "True":
-            debug = True
-        else:
-            debug = False
+        ######################
+        debug = True
+        ######################
 
         linkCount = 0
         for i in range(0,10):
@@ -173,13 +187,20 @@
             time.sleep(2)
 
         links = "--"
-        while "=null:" not in links:
+        for i in range(8): 
             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 "=null:" in links:
+                break 
             if debug: main.log.info(str(links))
-            time.sleep(1)
+            if i > 3: 
+                main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"], "d")  
+            if i == 7: 
+                main.log.error("link data missing") 
+            time.sleep(3)
+
         links = links.splitlines()
         templinks = links
 
@@ -233,9 +254,21 @@
                         if "withdraw" in line:
                             withdrawn.append(int(line.split(" ")[5]))
 
+                    for line in myRawResult: 
+                        if "Failure:" in line: 
+                            main.log.error("INTENT TEST FAILURE, ABORTING TESTCASE")
+                            testStatus = "fail"
+                if testStatus == "fail": 
+                    break 
+                            
                     print("installed: " + str(installed))
                     print("withraw: " + str(withdrawn) + "\n")
+                    if withdrawn[len(withdrawn) -1] > 1000 or installed[len(installed) -1] > 1000: 
+                        main.log.info("ABNORMAL VALUE, CHECKING LOG")
+                        main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"], outputMode="d")
 
+            if testStatus == "fail": 
+                break 
             main.log.report("----------------------------------------------------")
             main.log.report("Scale: " + str(clusterCount) + "\tIntent batch size: " + str(intentSize))
             main.log.report("Data samples: " + str(sampleSize) + "\tWarm up tests: " + str(warmUp))
@@ -255,3 +288,6 @@
             resultsDB = open("IntentInstallWithdrawLatDB", "a")
             resultsDB.write(resultString)
             resultsDB.close()
+
+            main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
+            time.sleep(20)
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 8e7a6a4..2e43679 100644
--- a/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
+++ b/TestON/tests/IntentRerouteLat/IntentRerouteLat.params
@@ -13,7 +13,7 @@
     <TEST>
         <skipCleanInstall>yes</skipCleanInstall>
         <warmUp>5</warmUp>
-        <sampleSize>10</sampleSize>                     
+        <sampleSize>20</sampleSize>                     
         <wait></wait>
         <intents>1,100,1000</intents>                       #list format, will be split on ','
         <debug>True</debug>     
@@ -34,43 +34,43 @@
     </METRICS>
 
     <GIT>
-        <autopull>on</autopull>
+        <autopull>off</autopull>
         <checkout>master</checkout>
     </GIT>
 
     <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 f824a5c..9127690 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,10 @@
             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())
+
+            print("-----------------" + str(ONOSIp))
             #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
             if skipMvn != "yes":
                 mvnResult = main.ONOSbench.cleanInstall()
@@ -78,7 +76,10 @@
          
         clusterCount = int(scale[0])
         scale.remove(scale[0])       
-       
+      
+        MN1Ip = ONOSIp[len(ONOSIp)-1]
+        BENCHIp = ONOSIp[len(ONOSIp)-2]
+
         #kill off all onos processes 
         main.log.step("Safety check, killing all ONOS processes")
         main.log.step("before initiating enviornment setup")
@@ -96,6 +97,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)
 
@@ -176,6 +183,7 @@
                     break
             index += 1
 
+            main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
 
     def CASE2( self, main ):
          
@@ -250,6 +258,7 @@
                 cmd = """onos $OC1 null-link "null:0000000000000004/1 null:0000000000000003/2 down" """
                 if debug: main.log.info("COMMAND: " + str(cmd))
                 main.ONOSbench.handle.sendline(cmd)
+                main.ONOSbench.handle.expect(":~")
 
                 cmd = "onos-ssh $OC1 cat /opt/onos/log/karaf.log | grep TopologyManager| tail -1"
                 for i in range(0,10):
@@ -344,11 +353,17 @@
                             if debug: main.log.info("last node: " + str(myResult[run-warmUp][1]))
 
                 cmd = """ onos $OC1 null-link "null:0000000000000004/1 null:0000000000000003/2 up" """
-
-                #wait for intent withdraw
                 if debug: main.log.info(cmd)
                 main.ONOSbench.handle.sendline(cmd)
                 main.ONOSbench.handle.expect(":~")
+                
+                
+                
+                #wait for intent withdraw
+                main.ONOSbench.handle.sendline(withdrawCmd)
+                main.log.info(withdrawCmd) 
+                main.ONOSbench.handle.expect(":~")
+                if debug: main.log.info(main.ONOSbench.handle.before) 
                 main.ONOSbench.handle.sendline("onos $OC1 intents|grep WITHDRAWN|wc -l")
                 main.ONOSbench.handle.expect(":~")
                 intentWithdrawCheck = main.ONOSbench.handle.before
@@ -408,3 +423,5 @@
             resultsDB.write(str(stdDev) + "\n")
             resultsDB.close()
 
+            main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
+
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/OnosCHO/OnosCHO.params b/TestON/tests/OnosCHO/OnosCHO.params
index a91e17c..398ee96 100644
--- a/TestON/tests/OnosCHO/OnosCHO.params
+++ b/TestON/tests/OnosCHO/OnosCHO.params
@@ -1,25 +1,26 @@
 <PARAMS>
-    # 1,20,3,[40,5,60,70,80,10,90,71,81,10,93,10]*50,22,3,[41,5,61,72,82,10,91,73,83,10,94,10]*50,22,3,[42,5,62,10,92,10]*50
-    # 1. ONOS brinup Test case
-    # 2. Assign and Balance all Mininet switches across controllers
-    # 3. Collect reference toplogy for topo compare
-    # 4. Enable Reactive forwarding, Verify ping all and disable onos-app-fwd
-    # 5. Compare curent topoology with reference
-    # 6. Install 300 host intents and verify ping all
-    # 7. Randomly bring some core links down and verify pingall
-    # 8. Bring core links Up that were down and verify pingall
-    # 9. Install 300 point intents and verify ping all
-    # 10. Remove all intents on ONOS
+    # 1,20,3,[40,5,60,70,80,10,90,71,81,10,93,10]*50,21,3,[41,5,61,72,82,10,91,73,83,10,94,10]*50,22,3,[42,5,62,10,92,10,95,10,98,10]*50
+    # 1. Starts ONOS cluster with 5 nodes
+    # 20. Starts Att Topology
+    # 21. Starts Chordal Topology
+    # 22. Starts Spine-Leaf Topology
+    # 3. Checks the consistency of ONOS and Mininet's topologies
+    # 4X. Reactive forwarding | host discovery
+    # 5. ONOS Topology verification
+    # 6X. host intents
+    # 7X. Bring random links down( Unique for each topology)
+    # 8X. Bring random links back up
+    # 9X Point,Multi-single,Single-Multi Intents
 
-    <testcases>1,20,3,[40,5,60,70,80,10,90,71,81,10,93,10]*50,22,3,[41,5,61,72,82,10,91,73,83,10,94,10]*50,22,3,[42,5,62,10,92,10]*50</testcases>
+    <testcases>1,20,3,[40,5,60,70,80,10,90,71,81,10]*50,21,3,[41,5,61,72,82,10,91,73,83,10]*50,22,3,[42,5,62,74,84,10,92,10]*50</testcases>
     <ENV>
-        <cellName>choTest5</cellName>
+        <cellName>choTest3</cellName>
     </ENV>
-    <GIT>
+    <GIT>         
         #autoPull 'on' or 'off'
         <autoPull>off</autoPull>
         <branch>master</branch>
-    </GIT>-t
+    </GIT>
     <TOPO1>
 	<topo>~/mininet/custom/topoAtt.py</topo>
 	<numSwitches>25</numSwitches>
@@ -42,24 +43,20 @@
 	<numPaths>1</numPaths>
     </TOPO3>
     <CTRL>
-	<numCtrl>5</numCtrl>
-        <ip1>10.128.10.21</ip1>
-	<port1>6633</port1>
-	<ip2>10.128.10.22</ip2>
-	<port2>6633</port2>
-	<ip3>10.128.10.23</ip3>
-	<port3>6633</port3>
-        <ip4>10.128.10.24</ip4>
-	<port4>6633</port4>
-	<ip5>10.128.10.25</ip5>
-	<port5>6633</port5>
+    <numCtrl>3</numCtrl>
+    <ip1>10.128.40.41</ip1>
+    <port1>6633</port1>
+    <ip2>10.128.40.42</ip2>
+    <port2>6633</port2>
+    <ip3>10.128.40.43</ip3>
+    <port3>6633</port3>
     </CTRL>
     <HOSTS>
 	<startMAC>00:00:00:00:00:01</startMAC>
 	<endMAC>00:00:00:00:00:19</endMAC>
     </HOSTS>
     <ATTCORELINKS>
-        <toggleLinks>3</toggleLinks>
+        <toggleLinks>1</toggleLinks>
 	
 	<linkS3a>s3</linkS3a>
 	<linkS3b>s1,s4,s7,s10,s16,s17,s18,s21,s22</linkS3b>
@@ -84,8 +81,8 @@
     </SPINECORELINKS>
 
     <timers>
-        <LinkDiscovery>1</LinkDiscovery>
-        <SwitchDiscovery>1</SwitchDiscovery>
+        <LinkDiscovery>10</LinkDiscovery>
+        <SwitchDiscovery>10</SwitchDiscovery>
     </timers>
 
 </PARAMS>
diff --git a/TestON/tests/OnosCHO/OnosCHO.py b/TestON/tests/OnosCHO/OnosCHO.py
index d5b9400..1bd0696 100644
--- a/TestON/tests/OnosCHO/OnosCHO.py
+++ b/TestON/tests/OnosCHO/OnosCHO.py
@@ -32,13 +32,13 @@
         main.ONOS1_ip = main.params[ 'CTRL' ][ 'ip1' ]
         main.ONOS2_ip = main.params[ 'CTRL' ][ 'ip2' ]
         main.ONOS3_ip = main.params[ 'CTRL' ][ 'ip3' ]
-        main.ONOS4_ip = main.params[ 'CTRL' ][ 'ip4' ]
-        main.ONOS5_ip = main.params[ 'CTRL' ][ 'ip5' ]
+        #main.ONOS4_ip = main.params[ 'CTRL' ][ 'ip4' ]
+        #main.ONOS5_ip = main.params[ 'CTRL' ][ 'ip5' ]
         main.ONOS1_port = main.params[ 'CTRL' ][ 'port1' ]
         main.ONOS2_port = main.params[ 'CTRL' ][ 'port2' ]
         main.ONOS3_port = main.params[ 'CTRL' ][ 'port3' ]
-        main.ONOS4_port = main.params[ 'CTRL' ][ 'port4' ]
-        main.ONOS5_port = main.params[ 'CTRL' ][ 'port5' ]
+        #main.ONOS4_port = main.params[ 'CTRL' ][ 'port4' ]
+        #main.ONOS5_port = main.params[ 'CTRL' ][ 'port5' ]
         cell_name = main.params[ 'ENV' ][ 'cellName' ]
         git_pull = main.params[ 'GIT' ][ 'autoPull' ]
         git_branch = main.params[ 'GIT' ][ 'branch' ]
@@ -158,7 +158,7 @@
             main.log.info("Successful CLI startup")
             startCliResult = main.TRUE
         case1Result = installResult and uninstallResult and statusResult and startCliResult
-        
+        time.sleep(30)
         main.log.info("Time for connecting to CLI: %2f seconds" %(time2-time1))
         utilities.assert_equals( expect=main.TRUE, actual=case1Result,
                                  onpass="Set up test environment PASS",
@@ -175,7 +175,7 @@
         main.numMNswitches = int ( main.params[ 'TOPO1' ][ 'numSwitches' ] )
         main.numMNlinks = int ( main.params[ 'TOPO1' ][ 'numLinks' ] )
         main.numMNhosts = int ( main.params[ 'TOPO1' ][ 'numHosts' ] )
-        main.pingTimeout = 60 
+        main.pingTimeout = 300
         main.log.report(
             "Load Att topology and Balance all Mininet switches across controllers" )
         main.log.report(
@@ -190,23 +190,19 @@
         main.step( "Start Mininet with Att topology" )
         main.newTopo = main.params['TOPO1']['topo']
         startStatus = main.Mininet1.startNet(topoFile = main.newTopo)
-
+        time.sleep(45)
         main.step( "Assign switches to controllers" )
         for i in range( 1, ( main.numMNswitches + 1 ) ):  # 1 to ( num of switches +1 )
             main.Mininet1.assignSwController(
                 sw=str( i ),
-                count= 1 ,
+                count=int( main.numCtrls ),
                 ip1=main.ONOS1_ip,
                 port1=main.ONOS1_port,
                 ip2=main.ONOS2_ip,
                 port2=main.ONOS2_port,
                 ip3=main.ONOS3_ip,
-                port3=main.ONOS3_port,
-                ip4=main.ONOS4_ip,
-                port4=main.ONOS4_port,
-                ip5=main.ONOS5_ip,
-                port5=main.ONOS5_port )
-            time.sleep(2)
+                port3=main.ONOS3_port )
+
         switch_mastership = main.TRUE
         for i in range( 1, ( main.numMNswitches + 1 ) ):
             response = main.Mininet1.getSwController( "s" + str( i ) )
@@ -240,16 +236,15 @@
         if topoFailed:
             main.log.info("Att topology failed to start correctly")
         """
-        time.sleep(15)
+        time.sleep(45)
         #Don't balance master for now..
-        """main.step( "Balance devices across controllers" )
+        main.step( "Balance devices across controllers" )
         for i in range( int( main.numCtrls ) ):
             balanceResult = main.ONOScli1.balanceMasters()
             # giving some breathing time for ONOS to complete re-balance
-            time.sleep( 3 )
+            time.sleep( 5 )
         topology_output = main.ONOScli1.topology()
         topology_result = main.ONOSbench.getTopology( topology_output )
-        """
         case2Result = ( switch_mastership and startStatus )
         utilities.assert_equals(
             expect=main.TRUE,
@@ -269,7 +264,7 @@
         main.numMNswitches = int ( main.params[ 'TOPO2' ][ 'numSwitches' ] )
         main.numMNlinks = int ( main.params[ 'TOPO2' ][ 'numLinks' ] )
         main.numMNhosts = int ( main.params[ 'TOPO2' ][ 'numHosts' ] )
-        main.pingTimeout = 120
+        main.pingTimeout = 300
         main.log.report(
             "Load Chordal topology and Balance all Mininet switches across controllers" )
         main.log.report(
@@ -277,8 +272,8 @@
         main.case(
             "Assign and Balance all Mininet switches across controllers" )
         main.step( "Stop any previous Mininet network topology" )
-        stopStatus = main.Mininet1.stopNet(fileName = "topoChordal" )
-        #time.sleep(10)
+        stopStatus = main.Mininet1.stopNet(fileName = "topoAtt" )
+        time.sleep(10)
         main.step( "Start Mininet with Chordal topology" )
         startStatus = main.Mininet1.startNet(topoFile = main.newTopo)
         time.sleep(15)
@@ -292,11 +287,7 @@
                 ip2=main.ONOS2_ip,
                 port2=main.ONOS2_port,
                 ip3=main.ONOS3_ip,
-                port3=main.ONOS3_port,
-                ip4=main.ONOS4_ip,
-                port4=main.ONOS4_port,
-                ip5=main.ONOS5_ip,
-                port5=main.ONOS5_port )
+                port3=main.ONOS3_port )
 
         switch_mastership = main.TRUE
         for i in range( 1, ( main.numMNswitches + 1 ) ):
@@ -313,14 +304,12 @@
             main.log.report( "Controller assignment failed" )
         time.sleep( 5 )
         
-        #Don't balance master for now..
-        """
         main.step( "Balance devices across controllers" )
         for i in range( int( main.numCtrls ) ):
             balanceResult = main.ONOScli1.balanceMasters()
             # giving some breathing time for ONOS to complete re-balance
             time.sleep( 3 )
-        """
+
         case21Result = switch_mastership
         time.sleep(30)
         utilities.assert_equals(
@@ -341,7 +330,7 @@
         main.numMNswitches = int ( main.params[ 'TOPO3' ][ 'numSwitches' ] )
         main.numMNlinks = int ( main.params[ 'TOPO3' ][ 'numLinks' ] )
         main.numMNhosts = int ( main.params[ 'TOPO3' ][ 'numHosts' ] )
-        main.pingTimeout = 400
+        main.pingTimeout = 600
         
         main.log.report(
             "Load Spine and Leaf topology and Balance all Mininet switches across controllers" )
@@ -351,25 +340,21 @@
         main.case(
             "Assign and Balance all Mininet switches across controllers" )
         main.step( "Stop any previous Mininet network topology" )
-        #stopStatus = main.Mininet1.stopNet(fileName = "topoSpine" )
+        stopStatus = main.Mininet1.stopNet(fileName = "topoChordal" )
         main.step( "Start Mininet with Spine topology" )
         startStatus = main.Mininet1.startNet(topoFile = main.newTopo)
-        time.sleep(20)
+        time.sleep(60)
         main.step( "Assign switches to controllers" )
         for i in range( 1, ( main.numMNswitches + 1 ) ):  # 1 to ( num of switches +1 )
             main.Mininet1.assignSwController(
                 sw=str( i ),
-                count= 1,
+                count=int( main.numCtrls ), 
                 ip1=main.ONOS1_ip,
                 port1=main.ONOS1_port,
                 ip2=main.ONOS2_ip,
                 port2=main.ONOS2_port,
                 ip3=main.ONOS3_ip,
-                port3=main.ONOS3_port,
-                ip4=main.ONOS4_ip,
-                port4=main.ONOS4_port,
-                ip5=main.ONOS5_ip,
-                port5=main.ONOS5_port )
+                port3=main.ONOS3_port )
 
         switch_mastership = main.TRUE
         for i in range( 1, ( main.numMNswitches + 1 ) ):
@@ -385,22 +370,15 @@
         else:
             main.log.report( "Controller assignment failed" )
         time.sleep( 5 )
-        """
-        main.step( "Balance devices across controllers" )
-        
-        for i in range( int( main.numCtrls ) ):
-            balanceResult = main.ONOScli1.balanceMasters()
-            # giving some breathing time for ONOS to complete re-balance
-            time.sleep( 3 )
 
         main.step( "Balance devices across controllers" )
         for i in range( int( main.numCtrls ) ):
             balanceResult = main.ONOScli1.balanceMasters()
             # giving some breathing time for ONOS to complete re-balance
             time.sleep( 3 )
-        """
+
         case22Result = switch_mastership
-        time.sleep(30)
+        time.sleep(60)
         utilities.assert_equals(
             expect=main.TRUE,
             actual=case22Result,
@@ -428,8 +406,8 @@
         main.step( "Collect and store current number of switches and links" )
         topology_output = main.ONOScli1.topology()
         topology_result = main.ONOSbench.getTopology( topology_output )
-        numOnosDevices = topology_result[ 'deviceCount' ]
-        numOnosLinks = topology_result[ 'linkCount' ]
+        numOnosDevices = topology_result[ 'devices' ]
+        numOnosLinks = topology_result[ 'links' ]
         topoResult = main.TRUE
 
         if ( ( main.numMNswitches == int(numOnosDevices) ) and ( main.numMNlinks >= int(numOnosLinks) ) ):
@@ -453,7 +431,6 @@
             linksResult = ansi_escape.sub( '', linksResult )
             linksResult = linksResult.replace( " links", "" ).replace( "\r\r", "" )
             linksResult = linksResult.splitlines()
-            linksResult = linksResult[ 1: ]
             main.deviceLinks = copy.copy( linksResult )
             print "Device Links Stored: \n", str( main.deviceLinks )
             # this will be asserted to check with the params provided count of
@@ -476,9 +453,9 @@
                 for thread in pool:
                     thread.join()
                     portResult = thread.result
-                    portTemp = re.split( r'\t+', portResult )
-                    portCount = portTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
-                    main.devicePortsEnabledCount.append( portCount )
+                    #portCount = re.split( r'\t+', portResult )
+                    #portCount = portTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
+                    main.devicePortsEnabledCount.append( portResult )
             print "Device Enabled Port Counts Stored: \n", str( main.devicePortsEnabledCount )
             time2 = time.time()
             main.log.info("Time for counting enabled ports of the switches: %2f seconds" %(time2-time1))
@@ -503,9 +480,9 @@
                 for thread in pool:
                     thread.join()
                     linkCountResult = thread.result
-                    linkCountTemp = re.split( r'\t+', linkCountResult )
-                    linkCount = linkCountTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
-                    main.deviceActiveLinksCount.append( linkCount )
+                    #linkCount = re.split( r'\t+', linkCountResult )
+                    #linkCount = linkCountTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
+                    main.deviceActiveLinksCount.append( linkCountResult )
             print "Device Active Links Count Stored: \n", str( main.deviceActiveLinksCount )
             time2 = time.time()
             main.log.info("Time for counting all enabled links of the switches: %2f seconds" %(time2-time1))
@@ -601,7 +578,7 @@
             main.log.warn( main.CLIs[0].appIDs() )
 
         # Waiting for reative flows to be cleared.
-        time.sleep( 10 )
+        time.sleep( 30 )
         case40Result =  installResult and uninstallResult and ping_result
         utilities.assert_equals( expect=main.TRUE, actual=case40Result,
                                  onpass="Reactive Mode Pingall test PASS",
@@ -681,7 +658,7 @@
             main.log.warn( main.CLIs[0].appIDs() )
 
         # Waiting for reative flows to be cleared.
-        time.sleep( 10 )
+        time.sleep( 30 )
         case41Result =  installResult and uninstallResult and ping_result
         utilities.assert_equals( expect=main.TRUE, actual=case41Result,
                                  onpass="Reactive Mode Pingall test PASS",
@@ -761,7 +738,7 @@
             main.log.warn( main.CLIs[0].appIDs() )
 
         # Waiting for reative flows to be cleared.
-        time.sleep( 10 )
+        time.sleep( 30 )
         case42Result =  installResult and uninstallResult and ping_result
         utilities.assert_equals( expect=main.TRUE, actual=case42Result,
                                  onpass="Reactive Mode Pingall test PASS",
@@ -803,10 +780,10 @@
             for thread in pool:
                 thread.join()
                 portResult = thread.result
-                portTemp = re.split( r'\t+', portResult )
-                portCount = portTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
-                devicePortsEnabledCountTemp.append( portCount )
-        print "Device Enabled Port Counts Stored: \n", str( main.devicePortsEnabledCount )
+                #portTemp = re.split( r'\t+', portResult )
+                #portCount = portTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
+                devicePortsEnabledCountTemp.append( portResult )
+
         time2 = time.time()
         main.log.info("Time for counting enabled ports of the switches: %2f seconds" %(time2-time1))
         main.log.info (
@@ -827,10 +804,12 @@
         for i in xrange( 1, ( main.numMNswitches + 1) , int( main.numCtrls ) ):
             pool = []
             for cli in main.CLIs:
+                if i >=  main.numMNswitches + 1:
+                    break
                 dpid = "of:00000000000000" + format( i,'02x' )
                 t = main.Thread(target = cli.getDeviceLinksActiveCount,
                         threadID = main.threadID,
-                        name = "getDevicePortsEnabledCount",
+                        name = "getDeviceLinksActiveCount",
                         args = [dpid])
                 t.start()
                 pool.append(t)
@@ -839,10 +818,10 @@
             for thread in pool:
                 thread.join()
                 linkCountResult = thread.result
-                linkCountTemp = re.split( r'\t+', linkCountResult )
-                linkCount = linkCountTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
-                deviceActiveLinksCountTemp.append( linkCount )
-            print "Device Active Links Count Stored: \n", str( main.deviceActiveLinksCount )
+                #linkCountTemp = re.split( r'\t+', linkCountResult )
+                #linkCount = linkCountTemp[ 1 ].replace( "\r\r\n\x1b[32m", "" )
+                deviceActiveLinksCountTemp.append( linkCountResult )
+
         time2 = time.time()
         main.log.info("Time for counting all enabled links of the switches: %2f seconds" %(time2-time1))
         main.log.info (
@@ -906,7 +885,7 @@
         print "len of intent state results", str(len(getIntentStateResult))
         print getIntentStateResult
         # Takes awhile for all the onos to get the intents
-        time.sleep( 15 )
+        time.sleep( 30 )
         """intentState = main.TRUE
         for i in getIntentStateResult:
             if getIntentStateResult.get( 'state' ) != 'INSTALLED':
@@ -916,7 +895,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -978,7 +957,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1039,7 +1018,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1096,15 +1075,17 @@
                 END1=link1End1,
                 END2=main.randomLink1[ i ],
                 OPTION="down" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link2End1,
                 END2=main.randomLink2[ i ],
                 OPTION="down" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link3End1,
                 END2=main.randomLink3[ i ],
                 OPTION="down" )
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkDown = main.ONOSbench.checkStatus(
@@ -1160,15 +1141,17 @@
                 END1=link1End1,
                 END2=main.randomLink1[ i ],
                 OPTION="up" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link2End1,
                 END2=main.randomLink2[ i ],
                 OPTION="up" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link3End1,
                 END2=main.randomLink3[ i ],
                 OPTION="up" )
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkUp = main.ONOSbench.checkStatus(
@@ -1240,15 +1223,17 @@
                 END1=link1End1,
                 END2=main.randomLink1[ i ],
                 OPTION="down" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link2End1,
                 END2=main.randomLink2[ i ],
                 OPTION="down" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link3End1,
                 END2=main.randomLink3[ i ],
                 OPTION="down" )
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkDown = main.ONOSbench.checkStatus(
@@ -1304,15 +1289,17 @@
                 END1=link1End1,
                 END2=main.randomLink1[ i ],
                 OPTION="up" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link2End1,
                 END2=main.randomLink2[ i ],
                 OPTION="up" )
+            time.sleep( link_sleep )
             main.Mininet1.link(
                 END1=link3End1,
                 END2=main.randomLink3[ i ],
                 OPTION="up" )
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkUp = main.ONOSbench.checkStatus(
@@ -1371,7 +1358,7 @@
                 END1=switch[0],
                 END2=switch[1],
                 OPTION="down")
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkDown = main.ONOSbench.checkStatus(
@@ -1388,7 +1375,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResultLinkDown = main.FALSE
         time1 = time.time()
-        pingResultLinkDown = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResultLinkDown = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1424,8 +1411,7 @@
                 END1=switch[0],
                 END2=switch[1],
                 OPTION="up")
-
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkUp = main.ONOSbench.checkStatus(
@@ -1443,7 +1429,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResultLinkUp = main.FALSE
         time1 = time.time()
-        pingResultLinkUp = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResultLinkUp = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1484,7 +1470,7 @@
                 END1=switch[0],
                 END2=switch[1],
                 OPTION="down")
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkDown = main.ONOSbench.checkStatus(
@@ -1501,7 +1487,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResultLinkDown = main.FALSE
         time1 = time.time()
-        pingResultLinkDown = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResultLinkDown = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1537,8 +1523,7 @@
                 END1=switch[0],
                 END2=switch[1],
                 OPTION="up")
-
-        time.sleep( link_sleep )
+            time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
         linkUp = main.ONOSbench.checkStatus(
@@ -1556,7 +1541,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResultLinkUp = main.FALSE
         time1 = time.time()
-        pingResultLinkUp = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResultLinkUp = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1604,8 +1589,8 @@
         # main.Mininet1.link( END1=link1End1, END2=main.randomLink1, OPTION="down" )
         # main.Mininet1.link( END1=link2End1, END2=main.randomLink2, OPTION="down" )
         main.Mininet1.link( END1=link1End1, END2=main.randomLink3, OPTION="down" )
+        time.sleep( link_sleep )
         main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="down" )
-        
         time.sleep( link_sleep )
 
         topology_output = main.ONOScli2.topology()
@@ -1623,7 +1608,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResultLinkDown = main.FALSE
         time1 = time.time()
-        pingResultLinkDown = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResultLinkDown = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1657,9 +1642,10 @@
         #main.Mininet1.link( END1=link1End1, END2=main.randomLink1, OPTION="up" )
         #main.Mininet1.link( END1=link2End1, END2=main.randomLink2, OPTION="up" )
         main.Mininet1.link( END1=link1End1, END2=main.randomLink3, OPTION="up" )
-        main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="up" )
-       
         time.sleep( link_sleep )
+        main.Mininet1.link( END1=link2End1, END2=main.randomLink4, OPTION="up" )
+        time.sleep( link_sleep )
+
         topology_output = main.ONOScli2.topology()
         linkUp = main.ONOSbench.checkStatus(
             topology_output,
@@ -1676,7 +1662,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResultLinkUp = main.FALSE
         time1 = time.time()
-        pingResultLinkUp = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResultLinkUp = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1715,6 +1701,69 @@
                 t = main.Thread( target=cli.addPointIntent,
                         threadID=main.threadID,
                         name="addPointIntent",
+                        args=[deviceCombos[i][0],deviceCombos[i][1],1,1,"IPV4",main.MACsDict.get(deviceCombos[i][0]),main.MACsDict.get(deviceCombos[i][1])])
+                pool.append(t)
+                #time.sleep(1)
+                t.start()
+                i = i + 1
+                main.threadID = main.threadID + 1
+            for thread in pool:
+                thread.join()
+                intentIdList.append(thread.result)
+        time2 = time.time()
+        main.log.info("Time for adding point intents: %2f seconds" %(time2-time1)) 
+        intentResult = main.TRUE
+        intentsJson = main.ONOScli2.intents()
+        getIntentStateResult = main.ONOScli1.getIntentState(intentsId = intentIdList,
+                intentsJson = intentsJson)
+        print getIntentStateResult
+        # Takes awhile for all the onos to get the intents
+        time.sleep(60)
+        main.step( "Verify Ping across all hosts" )
+        pingResult = main.FALSE
+        time1 = time.time()
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
+        time2 = time.time()
+        timeDiff = round( ( time2 - time1 ), 2 )
+        main.log.report(
+            "Time taken for Ping All: " +
+            str( timeDiff ) +
+            " seconds" )
+        utilities.assert_equals( expect=main.TRUE, actual=pingResult,
+                                 onpass="PING tALL PASS",
+                                 onfail="PING ALL FAIL" )
+
+        case90Result = ( intentResult and pingResult )
+        
+        utilities.assert_equals(
+            expect=main.TRUE,
+            actual=case90Result,
+            onpass="Install 600 point Intents and Ping All test PASS",
+            onfail="Install 600 point Intents and Ping All test FAIL" )
+
+    def CASE91( self ):
+        """
+        Install 600 point intents and verify ping all (Chordal Topology)
+        """
+        main.log.report( "Add 600 point intents and verify pingall (Chordal Topology)" )
+        main.log.report( "_______________________________________" )
+        import itertools
+        import time
+        main.case( "Install 600 point intents" )
+        main.step( "Add point Intents" )
+        intentResult = main.TRUE
+        deviceCombos = list( itertools.permutations( main.deviceDPIDs, 2 ) ) 
+        
+        intentIdList = []
+        time1 = time.time()
+        for i in xrange( 0, len( deviceCombos ), int(main.numCtrls) ):
+            pool = []
+            for cli in main.CLIs:
+                if i >= len( deviceCombos ):
+                    break
+                t = main.Thread( target=cli.addPointIntent,
+                        threadID=main.threadID,
+                        name="addPointIntent",
                         args=[deviceCombos[i][0],deviceCombos[i][1],1,1,"IPV4","",main.MACsDict.get(deviceCombos[i][1])])
                 pool.append(t)
                 #time.sleep(1)
@@ -1736,70 +1785,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
-        time2 = time.time()
-        timeDiff = round( ( time2 - time1 ), 2 )
-        main.log.report(
-            "Time taken for Ping All: " +
-            str( timeDiff ) +
-            " seconds" )
-        utilities.assert_equals( expect=main.TRUE, actual=pingResult,
-                                 onpass="PING ALL PASS",
-                                 onfail="PING ALL FAIL" )
-
-        case90Result = ( intentResult and pingResult )
-        
-        utilities.assert_equals(
-            expect=main.TRUE,
-            actual=case90Result,
-            onpass="Install 600 point Intents and Ping All test PASS",
-            onfail="Install 600 point Intents and Ping All test FAIL" )
-
-    def CASE91( self ):
-        """
-        Install ###$$$ point intents and verify ping all (Chordal Topology)
-        """
-        main.log.report( "Add ###$$$ point intents and verify pingall (Chordal Topology)" )
-        main.log.report( "_______________________________________" )
-        import itertools
-        import time
-        main.case( "Install ###$$$ point intents" )
-        main.step( "Add point Intents" )
-        intentResult = main.TRUE
-        deviceCombos = list( itertools.permutations( main.deviceDPIDs, 2 ) ) 
-        
-        intentIdList = []
-        time1 = time.time()
-        for i in xrange( 0, len( deviceCombos ), int(main.numCtrls) ):
-            pool = []
-            for cli in main.CLIs:
-                if i >= len( deviceCombos ):
-                    break
-                t = main.Thread( target=cli.addPointIntent,
-                        threadID=main.threadID,
-                        name="addPointIntent",
-                        args=[deviceCombos[i][0],deviceCombos[i][1],1,1,"IPV4","",main.MACsDict.get(deviceCombos[i][1])])
-                pool.append(t)
-                #time.sleep(1)
-                t.start()
-                i = i + 1
-                main.threadID = main.threadID + 1
-            for thread in pool:
-                thread.join()
-                intentIdList.append(thread.result)
-        time2 = time.time()
-        main.log.info("Time for adding point intents: %2f seconds" %(time2-time1)) 
-        intentResult = main.TRUE
-        intentsJson = main.ONOScli2.intents()
-        getIntentStateResult = main.ONOScli1.getIntentState(intentsId = intentIdList,
-                intentsJson = intentsJson)
-        print getIntentStateResult
-        # Takes awhile for all the onos to get the intents
-        time.sleep(30)
-        main.step( "Verify Ping across all hosts" )
-        pingResult = main.FALSE
-        time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1815,8 +1801,8 @@
         utilities.assert_equals(
             expect=main.TRUE,
             actual=case91Result,
-            onpass="Install ###$$$ point Intents and Ping All test PASS",
-            onfail="Install ###$$$ point Intents and Ping All test FAIL" )
+            onpass="Install 600 point Intents and Ping All test PASS",
+            onfail="Install 600 point Intents and Ping All test FAIL" )
     
     def CASE92( self ):
         """
@@ -1865,7 +1851,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -1944,7 +1930,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -2000,7 +1986,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -2057,7 +2043,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -2112,7 +2098,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -2174,7 +2160,7 @@
         main.step( "Verify Ping across all hosts" )
         pingResult = main.FALSE
         time1 = time.time()
-        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=True,acceptableFailed=5)
+        pingResult = main.Mininet1.pingall(timeout=main.pingTimeout,shortCircuit=False,acceptableFailed=5)
         time2 = time.time()
         timeDiff = round( ( time2 - time1 ), 2 )
         main.log.report(
@@ -2210,17 +2196,18 @@
             "\r\r",
              "" )
         intentsList = intentsList.splitlines()
-        intentsList = intentsList[ 1: ]
+        #intentsList = intentsList[ 1: ]
         intentIdList = []
         step1Result = main.TRUE
         moreIntents = main.TRUE
         removeIntentCount = 0
         intentsCount = len(intentsList)
-        print "Current number of intents" , len(intentsList)
+        main.log.info ( "Current number of intents:  " + str(intentsCount) )
         if ( len( intentsList ) > 1 ):
             results = main.TRUE
             main.log.info("Removing intent...")
             while moreIntents:
+			#This is a work around for a major issue. We cycle through intents removal for up to 5 times.
                 if removeIntentCount == 5:
                     break
                 removeIntentCount = removeIntentCount + 1
@@ -2237,8 +2224,8 @@
                     "\r\r",
                     "" )
                 intentsList1 = intentsList1.splitlines()
-                intentsList1 = intentsList1[ 1: ]
-                print "Round %d intents to remove: " %(removeIntentCount)
+                #intentsList1 = intentsList1[ 1: ]
+                main.log.info ( "Round %d intents to remove: " %(removeIntentCount) )
                 print intentsList1
                 intentIdList1 = []
                 if ( len( intentsList1 ) > 0 ):
@@ -2246,8 +2233,8 @@
                     for i in range( len( intentsList1 ) ):
                         intentsTemp1 = intentsList1[ i ].split( ',' )
                         intentIdList1.append( intentsTemp1[ 0 ].split('=')[1] )
-                    print "Leftover Intent IDs: ", intentIdList1
-                    print len(intentIdList1)
+                    main.log.info ( "Leftover Intent IDs: " + str(intentIdList1) )
+                    main.log.info ( "Length of Leftover Intents list: " + str(len(intentIdList1)) )
                     time1 = time.time()
                     for i in xrange( 0, len( intentIdList1 ), int(main.numCtrls) ):
                         pool = []
@@ -2257,7 +2244,7 @@
                             t = main.Thread( target=cli.removeIntent,
                                     threadID=main.threadID,
                                     name="removeIntent",
-                                    args=[intentIdList1[i],'org.onosproject.cli',True,False])
+                                    args=[intentIdList1[i],'org.onosproject.cli',False,False])
                             pool.append(t)
                             t.start()
                             i = i + 1
@@ -2265,15 +2252,29 @@
                         for thread in pool:
                             thread.join()
                             intentIdList.append(thread.result)
+                        #time.sleep(2)
                     time2 = time.time()
                     main.log.info("Time for removing host intents: %2f seconds" %(time2-time1))
                     time.sleep(10)
+                    main.log.info("Purging WITHDRAWN Intents")
+                    purgeResult  = main.TRUE
+                    for i in range( int( main.numCtrls) ):
+                        t = main.Thread( target=main.CLIs[i].purgeIntents,
+                             threadID=main.threadID,
+                             name="purgeIntents",
+                             args=[ ] )
+                        pool.append(t)
+                        t.start()
+                        main.threadID = main.threadID + 1
+                    for t in pool:
+                        t.join()
+                        purgeResult = purgeResult and t.result        
                 else:
-                    time.sleep(15)
+                    time.sleep(10)
                     if len( main.ONOScli1.intents()):
                         continue
                     break
-
+                time.sleep(10)
             else:
                 print "Removed %d intents" %(intentsCount)
                 step1Result = main.TRUE
diff --git a/TestON/tests/OnosCHO/OnosCHO.topo b/TestON/tests/OnosCHO/OnosCHO.topo
index 9b0c3e7..8205d2f 100644
--- a/TestON/tests/OnosCHO/OnosCHO.topo
+++ b/TestON/tests/OnosCHO/OnosCHO.topo
@@ -2,18 +2,18 @@
     <COMPONENT>
 
         <ONOSbench>
-            <host>10.128.10.20</host>
+            <host>10.128.40.40</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosDriver</type>
             <connect_order>1</connect_order>
             <COMPONENTS>
-                <home> ~/ONOS</home>
+                <home>~/ONOS</home>
             </COMPONENTS>
         </ONOSbench>
 
         <ONOScli1>
-            <host>10.128.10.20</host>
+            <host>10.128.40.40</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -22,7 +22,7 @@
         </ONOScli1>
 
 	 <ONOScli2>
-            <host>10.128.10.20</host>
+            <host>10.128.40.40</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -31,34 +31,16 @@
         </ONOScli2>
 
 	 <ONOScli3>
-            <host>10.128.10.20</host>
+            <host>10.128.40.40</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
             <connect_order>4</connect_order>
             <COMPONENTS> </COMPONENTS>
         </ONOScli3>
-
-        <ONOScli4>
-            <host>10.128.10.20</host>
-            <user>admin</user>
-            <password>onos_test</password>
-            <type>OnosCliDriver</type>
-            <connect_order>5</connect_order>
-            <COMPONENTS> </COMPONENTS>
-        </ONOScli4>
-
-	 <ONOScli5>
-            <host>10.128.10.20</host>
-            <user>admin</user>
-            <password>onos_test</password>
-            <type>OnosCliDriver</type>
-            <connect_order>6</connect_order>
-            <COMPONENTS> </COMPONENTS>
-        </ONOScli5>
 	
         <ONOS1>
-            <host>10.128.10.21</host>
+            <host>10.128.40.41</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -67,7 +49,7 @@
         </ONOS1>
 
 	<ONOS2>
-            <host>10.128.10.22</host>
+            <host>10.128.40.42</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -76,31 +58,13 @@
         </ONOS2>
 	
 	<ONOS3>
-            <host>10.128.10.23</host>
+            <host>10.128.40.43</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
             <connect_order>9</connect_order>
             <COMPONENTS> </COMPONENTS>
         </ONOS3>
-
-        <ONOS4>
-            <host>10.128.10.24</host>
-            <user>admin</user>
-            <password>onos_test</password>
-            <type>OnosCliDriver</type>
-            <connect_order>10</connect_order>
-            <COMPONENTS> </COMPONENTS>
-        </ONOS4>
-
-	<ONOS5>
-            <host>10.128.10.25</host>
-            <user>admin</user>
-            <password>onos_test</password>
-            <type>OnosCliDriver</type>
-            <connect_order>11</connect_order>
-            <COMPONENTS> </COMPONENTS>
-        </ONOS5>
 	
         <Mininet1>
             <host>10.128.40.50</host>
@@ -116,6 +80,20 @@
                 <controller> remote </controller>
             </COMPONENTS>
         </Mininet1>
-    </COMPONENT>
 
+        <Mininet2>
+            <host>10.128.40.50</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>RemoteMininetDriver</type>
+            <connect_order>13</connect_order>
+            <COMPONENTS>
+                #Specify the Option for mininet
+                <arg1> --custom ~/mininet/custom/att-mpls-topo.py </arg1>
+                <arg2> --topo att </arg2>
+                <arg3> --link tc --switch ovs,protocols=OpenFlow13 </arg3>
+                <controller> remote </controller>
+            </COMPONENTS>
+        </Mininet2>
+    </COMPONENT>
 </TOPOLOGY>
diff --git a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params
index d4fa651..4e3ffdb 100644
--- a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params
@@ -15,43 +15,43 @@
     </TEST>
 
     <GIT>
-        <autopull>on</autopull>
+        <autopull>off</autopull>
         <checkout>master</checkout>
     </GIT>
 
     <CTRL>
         <USER>admin</USER>
         
-        <ip1>10.128.5.51</ip1>
+        <ip1>OC1</ip1>
         <port1>6633</port1>
         
-        <ip2>10.128.5.52</ip2>
+        <ip2>OC2</ip2>
         <port2>6633</port2>
         
-        <ip3>10.128.5.53</ip3>
+        <ip3>OC3</ip3>
         <port3>6633</port3>
         
-        <ip4>10.128.5.54</ip4>
+        <ip4>OC4</ip4>
         <port4>6633</port4>
         
-        <ip5>10.128.5.65</ip5>
+        <ip5>OC5</ip5>
         <port5>6633</port5>
         
-        <ip6>10.128.5.66</ip6>
+        <ip6>OC6</ip6>
         <port6>6633</port6> 
        
-         <ip7>10.128.5.67</ip7>
+         <ip7>OC7</ip7>
         <port7>6633</port7>
 
     </CTRL>
 
     <MN>
-        <ip1>10.128.5.55</ip1>
+        <ip1>OCN</ip1>
     </MN>
 
     <BENCH>
         <user>admin</user>
-        <ip1>10.128.5.55</ip1>
+        <ip1>OCN</ip1>
     </BENCH>
 
     <JSON>
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 0802eca..d82f3fd 100644
--- a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
@@ -3,25 +3,25 @@
     <COMPONENT>
 
         <ONOSbench>
-            <host>10.128.5.55</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosDriver</type>
             <connect_order>1</connect_order>
-            <COMPONENTS> </COMPONENTS>
+            <COMPONENTS><home>~/onos</home></COMPONENTS>
         </ONOSbench>
 
         <ONOS1cli>
-            <host>10.128.5.55</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
             <connect_order>2</connect_order>
             <COMPONENTS> </COMPONENTS>
         </ONOS1cli>
-        
+
         <ONOS2cli>
-            <host>10.128.5.55</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -30,16 +30,52 @@
         </ONOS2cli>
 
         <ONOS3cli>
-            <host>10.128.5.55</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
             <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>10.128.5.51</host>
+            <host>OC1</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -48,7 +84,7 @@
         </ONOS1>
 
         <ONOS2>
-            <host>10.128.5.52</host>
+            <host>OC2</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -57,7 +93,7 @@
         </ONOS2>
 
         <ONOS3>
-            <host>10.128.5.53</host>
+            <host>OC3</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -65,21 +101,44 @@
             <COMPONENTS> </COMPONENTS>
         </ONOS3>
 
-        <Mininet1>
-            <host>10.128.5.55</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 54320a7..a3b104f 100644
--- a/TestON/tests/flowTP1g/flowTP1g.params
+++ b/TestON/tests/flowTP1g/flowTP1g.params
@@ -1,8 +1,8 @@
 <PARAMS>
 
-    <testcases>1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
+    <testcases>1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
     
-    <isOnBaremetal>False</isOnBaremetal>
+    <isOnBaremetal>True</isOnBaremetal>
     <SCALE>1,3,3,5,5,7,7</SCALE>
     <availableNodes>7</availableNodes>
     
@@ -28,43 +28,43 @@
     </TEST>
 
     <GIT>
-        <autopull>on</autopull>
+        <autopull>off</autopull>
         <checkout>master</checkout>
     </GIT>
 
     <CTRL>
         <USER>admin</USER>
         
-        <ip1>10.128.5.51</ip1>
+        <ip1>OC1</ip1>
         <port1>6633</port1>
         
-        <ip2>10.128.5.52</ip2>
+        <ip2>OC2</ip2>
         <port2>6633</port2>
         
-        <ip3>10.128.5.53</ip3>
+        <ip3>OC3</ip3>
         <port3>6633</port3>
         
-        <ip4>10.128.5.54</ip4>
+        <ip4>OC4</ip4>
         <port4>6633</port4>
         
-        <ip5>10.128.5.55</ip5>
+        <ip5>OC5</ip5>
         <port5>6633</port5>
         
-        <ip6>10.128.5.56</ip6>
+        <ip6>OC6</ip6>
         <port6>6633</port6> 
        
-        <ip7>10.128.5.57</ip7>
+        <ip7>OC7</ip7>
         <port7>6633</port7>
 
     </CTRL>
 
     <MN>
-        <ip1>10.128.5.59</ip1>
+        <ip1>OCN</ip1>
     </MN>
 
     <BENCH>
         <user>admin</user>
-        <ip1>10.128.5.50</ip1>
+        <ip1>OCN</ip1>
     </BENCH>
 
     <JSON>
diff --git a/TestON/tests/flowTP1g/flowTP1g.py b/TestON/tests/flowTP1g/flowTP1g.py
index cbea039..1f6ecbf 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,9 @@
                 ipString = 'ip' + str(i)
                 ONOSIp.append(main.params[ 'CTRL' ][ ipString ])
 
+            ONOSIp = [0]
+            ONOSIp.extend(main.ONOSbench.getOnosIps())
+
             #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
             if skipMvn != "yes":
                 mvnResult = main.ONOSbench.cleanInstall()
@@ -86,6 +87,9 @@
         scale.remove(scale[0])
         main.log.info("CLUSTER COUNT: " + str(clusterCount))
 
+        MN1Ip = ONOSIp[len(ONOSIp)-1]
+        BENCHIp = ONOSIp[len(ONOSIp)-2]
+
         #kill off all onos processes 
         main.log.step("Safety check, killing all ONOS processes")
         main.log.step("before initiating enviornment setup")
@@ -152,7 +156,7 @@
         try:
             currentNeighbors
         except:
-            currentNeighbors = "0"
+            currentNeighbors = (main.params[ 'TEST' ][ 'neighbors' ]).split(",")[0]
         else:
             if currentNeighbors == "r":      #reset
                 currentNeighbors = "0"
@@ -189,7 +193,7 @@
                 currentNeighbors = "r"
             else:
                 neighborList = ['0'] 
-        
+
         main.log.info("neightborlist: " + str(neighborList))
 
         ts = time.time()
@@ -226,31 +230,35 @@
                 if i < int(maxNodes):
                     ipCSV +=","
            
+            for i in range(5): 
+                main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders deviceCount 35" """)
+                main.ONOSbench.handle.expect(":~")
+                time.sleep(3)
+                main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
+                main.ONOSbench.handle.expect(":~")
+                time.sleep(3)
+                main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
+                main.ONOSbench.handle.expect(":~")
+                time.sleep(3)
+                main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
+                main.ONOSbench.handle.expect(":~")
+                time.sleep(3)
+                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 "cfg set org.onosproject.provider.nil.NullProviders deviceCount 35" """)
-            main.ONOSbench.handle.expect(":~")
-            time.sleep(3)
-            main.ONOSbench.handle.sendline("""onos $OC1 "cfg set org.onosproject.provider.nil.NullProviders topoShape linear" """)
-            main.ONOSbench.handle.expect(":~")
-            time.sleep(3)
-            main.ONOSbench.handle.sendline("""onos $OC1 "null-simulation start" """)
-            main.ONOSbench.handle.expect(":~")
-            time.sleep(3)
-            main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
-            main.ONOSbench.handle.expect(":~")
-            time.sleep(3)
-            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(":~")
+                main.log.info(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") 
+                time.sleep(3)
+                main.ONOSbench.handle.sendline("onos $OC1 summary")
+                main.ONOSbench.handle.expect(":~")
+                check = main.ONOSbench.handle.before
+                main.log.info("\nStart up check: \n" + check + "\n") 
+                if "SCC(s)=1," in check: 
+                    break 
+                time.sleep(5)
 
             #devide flows
             flows = int(main.params[ 'TEST' ][ 'flows' ])
@@ -288,7 +296,15 @@
 
                 if "failed" in rawResult: 
                     main.log.report("FLOW_TESTER.PY FAILURE")
-                    main.log.report( " \n" + rawResult + " \n") 
+                    main.log.report( " \n" + rawResult + " \n")
+                    for i in range(clusterCount):
+                        main.log.report("=======================================================")
+                        main.log.report(" ONOS " + str(i) + "LOG REPORT") 
+                        main.ONOSbench.logReport(ONOSIp[i], ["ERROR", "WARNING", "EXCEPT"], outputMode="d")
+                    main.ONOSbench.handle.sendline("onos $OC1 flows") 
+                    main.ONOSbench.handle.expect(":~") 
+                    main.log.info(main.ONOSbench.handle.before)
+
                     break
             
             ########################################################################################
@@ -303,10 +319,7 @@
                             for word in temp:
                                 #print ("word: " + word) 
                                 if "elapsed" in repr(word): 
-                                    #print("in elapsed ==========")
                                     index = temp.index(word) + 1
-                                    #print ("index: " + str(index)) 
-                                    #print ("temp[index]: " + temp[index])
                                     myParsed = (temp[index]).replace(",","")
                                     myParsed = myParsed.replace("}","")
                                     myParsed = int(myParsed)
@@ -400,4 +413,4 @@
             
             main.log.report("Result line to file: " + resultString)
            
-        main.ONOSbench.onosErrorLog(ONOSIp[1]) 
+        main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"], outputMode="d") 
diff --git a/TestON/tests/flowTP1g/flowTP1g.topo b/TestON/tests/flowTP1g/flowTP1g.topo
index 763a4d6..d82f3fd 100644
--- a/TestON/tests/flowTP1g/flowTP1g.topo
+++ b/TestON/tests/flowTP1g/flowTP1g.topo
@@ -3,7 +3,7 @@
     <COMPONENT>
 
         <ONOSbench>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosDriver</type>
@@ -12,7 +12,7 @@
         </ONOSbench>
 
         <ONOS1cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -21,7 +21,7 @@
         </ONOS1cli>
 
         <ONOS2cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -30,7 +30,7 @@
         </ONOS2cli>
 
         <ONOS3cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -39,7 +39,7 @@
         </ONOS3cli>
 
         <ONOS4cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -48,7 +48,7 @@
         </ONOS4cli>
 
         <ONOS5cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -57,7 +57,7 @@
         </ONOS5cli>
 
         <ONOS6cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -66,7 +66,7 @@
         </ONOS6cli>
 
         <ONOS7cli>
-            <host>10.128.5.50</host>
+            <host>OCN</host>
             <user>admin</user>
             <password>onos_test</password>
             <type>OnosCliDriver</type>
@@ -75,7 +75,7 @@
         </ONOS7cli>
 
         <ONOS1>
-            <host>10.128.5.51</host>
+            <host>OC1</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -84,7 +84,7 @@
         </ONOS1>
 
         <ONOS2>
-            <host>10.128.5.52</host>
+            <host>OC2</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -93,7 +93,7 @@
         </ONOS2>
 
         <ONOS3>
-            <host>10.128.5.53</host>
+            <host>OC3</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -102,7 +102,7 @@
         </ONOS3>
 
         <ONOS4>
-            <host>10.128.5.54</host>
+            <host>OC4</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -112,7 +112,7 @@
 
     
         <ONOS5>
-            <host>10.128.5.55</host>
+            <host>OC5</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -121,7 +121,7 @@
         </ONOS5>
 
         <ONOS6>
-            <host>10.128.5.56</host>
+            <host>OC6</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>
@@ -130,7 +130,7 @@
         </ONOS6>
 
         <ONOS7>
-            <host>10.128.5.57</host>
+            <host>OC7</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosDriver</type>