Merge pull request #136 from opennetworkinglab/devl/deprecate_sts

Deprecate STS usage
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 271c0dd..7e99ffd 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -32,7 +32,7 @@
 import new
 import xmldict
 import importlib
-import os
+import threading
 module = new.module("test")
 import openspeak
 global path, drivers_path, core_path, tests_path,logs_path
@@ -91,6 +91,8 @@
         self.logs_path = logs_path
         self.driver = ''
         self.Thread = Thread
+        self.cleanupFlag = False
+        self.cleanupLock = threading.Lock()
 
         self.configparser()
         verifyOptions(options)
@@ -163,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',
@@ -290,7 +300,7 @@
                     else:
                         self.stepCache += "No Result\n"
                     self.stepResults.append(self.STEPRESULT)
-            except StandardError as e:
+            except StandardError:
                 self.log.exception( "\nException in the following section of" +
                                     " code: " + str(testCaseNumber) + "." +
                                     str(step) + ": " + self.stepName )
@@ -343,33 +353,51 @@
 
     def cleanup(self):
         '''
-           Release all the component handles and the close opened file handles.
-           This will return TRUE if all the component handles and log handles closed properly,
-           else return FALSE
+        Print a summary of the current test's results then attempt to release
+        all the component handles and the close opened file handles.
 
+        This function shouldbe threadsafe such that cleanup will only be
+        executed once per test.
+
+        This will return TRUE if all the component handles and log handles
+        closed properly, else return FALSE.
         '''
         result = self.TRUE
-        self.logger.testSummary(self)
-
-        #self.reportFile.close()
-
-        #utilities.send_mail()
-        for component in self.componentDictionary.keys():
-            try :
-                tempObject  = vars(self)[component]
-                print "Disconnecting from " + str(tempObject.name) + ": " + \
-                      str(tempObject)
-                tempObject.disconnect()
-            #tempObject.execute(cmd="exit",prompt="(.*)",timeout=120)
-
-            except (Exception):
-                self.log.exception( "Exception while disconnecting from " +
-                                     str( component ) )
-                result = self.FALSE
-        # Closing all the driver's session files
-        for driver in self.componentDictionary.keys():
-           vars(self)[driver].close_log_handles()
-
+        lock = self.cleanupLock
+        if lock.acquire( False ):
+            try:
+                if self.cleanupFlag is False:  # First thread to run this
+                    self.cleanupFlag = True
+                    self.logger.testSummary(self)
+                    for component in self.componentDictionary.keys():
+                        try :
+                            tempObject  = vars(self)[component]
+                            print "Disconnecting from " + str(tempObject.name) + ": " + \
+                                  str(tempObject)
+                            tempObject.disconnect()
+                        except Exception:
+                            self.log.exception( "Exception while disconnecting from " +
+                                                 str( component ) )
+                            result = self.FALSE
+                    # Closing all the driver's session files
+                    for driver in self.componentDictionary.keys():
+                        try:
+                            vars(self)[driver].close_log_handles()
+                        except Exception:
+                            self.log.exception( "Exception while closing log files for " +
+                                                 str( driver ) )
+                            result = self.FALSE
+                else:
+                    pass  # Someone else already ran through this function
+            finally:
+                lock.release()
+        else:  # Someone already has a lock
+            # NOTE: This could cause problems if we don't release the lock
+            #       correctly
+            lock.acquire()  # Wait for the other thread to finish
+            # NOTE: If we don't wait, exit could be called while the thread
+            #       with the lock is still cleaning up
+            lock.release()
         return result
 
     def pause(self):
@@ -577,6 +605,12 @@
 
     def exit(self):
         __builtin__.testthread = None
+        for thread in threading.enumerate():
+            if thread.isAlive():
+                try:
+                    thread._Thread__stop()
+                except:
+                    print(str(thread.getName()) + ' could not be terminated' )
         sys.exit()
 
 def verifyOptions(options):
@@ -606,7 +640,7 @@
         main.classPath = "examples."+main.TEST+"."+main.TEST
     else :
         print "Test or Example not specified please specify the --test <test name > or --example <example name>"
-        self.exit()
+        main.exit()
 
 def verifyExample(options):
     if options.example:
@@ -798,21 +832,5 @@
         print sys.exc_info()[1]
         main.exit()
 
-def load_defaultlogger():
-    '''
-    It will load the default parser which is xml parser to parse the params and topology file.
-    '''
-    moduleList = main.loggerPath.split("/")
-    newModule = ".".join([moduleList[len(moduleList) - 2],moduleList[len(moduleList) - 1]])
-    try :
-        loggerClass = main.loggerClass
-        loggerModule = __import__(newModule, globals(), locals(), [loggerClass], -1)
-        loggerClass = getattr(loggerModule, loggerClass)
-        main.logger = loggerClass()
-
-    except ImportError:
-        print sys.exc_info()[1]
-        main.exit()
-
 def _echo(self):
     print "THIS IS ECHO"
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index ae12139..158fcd8 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -1,3 +1,4 @@
+
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
@@ -34,6 +35,7 @@
 import pexpect
 import re
 import sys
+import types
 sys.path.append( "../" )
 from math import pow
 from drivers.common.cli.emulatordriver import Emulator
@@ -91,12 +93,20 @@
             main.cleanup()
             main.exit()
 
-    def startNet( self, topoFile='', args='', timeout=120 ):
+    def startNet( self, topoFile='', args='', mnCmd='', timeout=120 ):
         """
-        Starts Mininet accepts a topology(.py) file and/or an optional
-        argument ,to start the mininet, as a parameter.
-        Returns main.TRUE if the mininet starts successfully and
-                main.FALSE otherwise
+        Description:
+            Starts Mininet accepts a topology(.py) file and/or an optional
+            argument, to start the mininet, as a parameter.
+            Can also send regular mininet command to load up desired topology.
+            Eg. Pass in a string 'sudo mn --topo=tree,3,3' to mnCmd
+        Options:
+            topoFile = file path for topology file (.py)
+            args = extra option added when starting the topology from the file
+            mnCmd = Mininet command use to start topology
+        Returns:
+                main.TRUE if the mininet starts successfully, main.FALSE
+                otherwise
         """
         if self.handle:
             # make sure old networks are cleaned up
@@ -126,26 +136,31 @@
                                 "Mininet took too long... " )
             # Craft the string to start mininet
             cmdString = "sudo "
-            if topoFile is None or topoFile == '':  # If no file is given
-                main.log.info( self.name + ": building fresh Mininet" )
-                cmdString += "mn "
-                if args is None or args == '':
-                    # If no args given, use args from .topo file
-                    args = self.options[ 'arg1' ] +\
-                                 " " + self.options[ 'arg2' ] +\
-                                 " --mac --controller " +\
-                                 self.options[ 'controller' ] + " " +\
-                                 self.options[ 'arg3' ]
-                else:  # else only use given args
-                    pass
-                    # TODO: allow use of topo args and method args?
-            else:  # Use given topology file
-                main.log.info( "Starting Mininet from topo file " + topoFile )
-                cmdString += topoFile + " "
-                if args is None:
-                    args = ''
-                    # TODO: allow use of args from .topo file?
-            cmdString += args
+            if not mnCmd:
+                if topoFile is None or topoFile == '':  # If no file is given
+                    main.log.info( self.name + ": building fresh Mininet" )
+                    cmdString += "mn "
+                    if args is None or args == '':
+                        # If no args given, use args from .topo file
+                        args = self.options[ 'arg1' ] +\
+                                     " " + self.options[ 'arg2' ] +\
+                                     " --mac --controller " +\
+                                     self.options[ 'controller' ] + " " +\
+                                     self.options[ 'arg3' ]
+                    else:  # else only use given args
+                        pass
+                        # TODO: allow use of topo args and method args?
+                else:  # Use given topology file
+                    main.log.info( "Starting Mininet from topo file " + topoFile )
+                    cmdString += topoFile + " "
+                    if args is None:
+                        args = ''
+                        # TODO: allow use of args from .topo file?
+                cmdString += args
+            else:
+                main.log.info( "Starting Mininet topology using '" + mnCmd +
+                               "' command" )
+                cmdString += mnCmd
             # Send the command and check if network started
             self.handle.sendline( "" )
             self.handle.expect( '\$' )
@@ -1100,49 +1115,133 @@
             main.cleanup()
             main.exit()
 
-    def assignSwController( self, **kwargs ):
+    def assignSwController( self, sw, ip, port="6633", ptcp="" ):
         """
-           count is only needed if there is more than 1 controller"""
-        args = utilities.parse_args( [ "COUNT" ], **kwargs )
-        count = args[ "COUNT" ] if args != {} else 1
+        Description:
+            Assign switches to the controllers ( for ovs use only )
+        Required:
+            sw - Name of the switch. This can be a list or a string.
+            ip - Ip addresses of controllers. This can be a list or a string.
+        Optional:
+            port - ONOS use port 6633, if no list of ports is passed, then
+                   the all the controller will use 6633 as their port number
+            ptcp - ptcp number, This can be a string or a list that has
+                   the same length as switch. This is optional and not required
+                   when using ovs switches.
+        NOTE: If switches and ptcp are given in a list type they should have the
+              same length and should be in the same order, Eg. sw=[ 's1' ... n ]
+              ptcp=[ '6637' ... n ], s1 has ptcp number 6637 and so on.
 
-        argstring = "SW"
-        for j in range( count ):
-            argstring = argstring + ",IP" + \
-                str( j + 1 ) + ",PORT" + str( j + 1 )
-        args = utilities.parse_args( argstring.split( "," ), **kwargs )
-
-        sw = args[ "SW" ] if args[ "SW" ] is not None else ""
-        ptcpA = int( args[ "PORT1" ] ) + \
-            int( sw ) if args[ "PORT1" ] is not None else ""
-        ptcpB = "ptcp:" + str( ptcpA ) if ptcpA != "" else ""
-
-        command = "sh ovs-vsctl set-controller s" + \
-            str( sw ) + " " + ptcpB + " "
-        for j in range( count ):
-            i = j + 1
-            args = utilities.parse_args(
-                [ "IP" + str( i ), "PORT" + str( i ) ], **kwargs )
-            ip = args[
-                "IP" +
-                str( i ) ] if args[
-                "IP" +
-                str( i ) ] is not None else ""
-            port = args[
-                "PORT" +
-                str( i ) ] if args[
-                "PORT" +
-                str( i ) ] is not None else ""
-            tcp = "tcp:" + str( ip ) + ":" + str( port ) + \
-                " " if ip != "" else ""
-            command = command + tcp
+        Return:
+            Returns main.TRUE if mininet correctly assigned switches to
+            controllers, otherwise it will return main.FALSE or an appropriate
+            exception(s)
+        """
+        assignResult = main.TRUE
+        # Initial ovs command
+        commandList = []
+        command = "sh ovs-vsctl set-controller "
+        onosIp = ""
         try:
-            self.execute( cmd=command, prompt="mininet>", timeout=5 )
-        except pexpect.EOF:
-            main.log.error( self.name + ": EOF exception found" )
-            main.log.error( self.name + ":     " + self.handle.before )
-            main.cleanup()
-            main.exit()
+            if isinstance( ip, types.StringType ):
+                onosIp = "tcp:" + str( ip ) + ":"
+                if isinstance( port, types.StringType ) or \
+                   isinstance( port, types.IntType ):
+                    onosIp += str( port )
+                elif isinstance( port, types.ListType ):
+                    main.log.error( self.name + ": Only one controller " +
+                                    "assigned and a list of ports has" +
+                                    " been passed" )
+                    return main.FALSE
+                else:
+                    main.log.error( self.name + ": Invalid controller port " +
+                                    "number. Please specify correct " +
+                                    "controller port" )
+                    return main.FALSE
+
+            elif isinstance( ip, types.ListType ):
+                if isinstance( port, types.StringType ) or \
+                   isinstance( port, types.IntType ):
+                    for ipAddress in ip:
+                        onosIp += "tcp:" + str( ipAddress ) + ":" + \
+                                  str( port ) + " "
+                elif isinstance( port, types.ListType ):
+                    if ( len( ip ) != len( port ) ):
+                        main.log.error( self.name + ": Port list = " +
+                                        str( len( port ) ) +
+                                        "should be the same as controller" +
+                                        " ip list = " + str( len( ip ) ) )
+                        return main.FALSE
+                    else:
+                        onosIp = ""
+                        for ipAddress, portNum in zip( ip, port ):
+                            onosIp += "tcp:" + str( ipAddress ) + ":" + \
+                                      str( portNum ) + " "
+                else:
+                    main.log.error( self.name + ": Invalid controller port " +
+                                    "number. Please specify correct " +
+                                    "controller port" )
+                    return main.FALSE
+            else:
+                main.log.error( self.name + ": Invalid ip address" )
+                return main.FALSE
+
+            if isinstance( sw, types.StringType ):
+                command += sw + " "
+                if ptcp:
+                    if isinstance( ptcp, types.StringType ):
+                        command += "ptcp:" + str( ptcp ) + " "
+                    elif isinstance( ptcp, types.ListType ):
+                        main.log.error( self.name + ": Only one switch is " +
+                                        "being set and multiple PTCP is " +
+                                        "being passed " )
+                    else:
+                        main.log.error( self.name + ": Invalid PTCP" )
+                        ptcp = ""
+                command += onosIp
+                commandList.append( command )
+
+            elif isinstance( sw, types.ListType ):
+                if ptcp:
+                    if isinstance( ptcp, types.ListType ):
+                        if len( ptcp ) != len( sw ):
+                            main.log.error( self.name + ": PTCP length = " +
+                                            str( len( ptcp ) ) +
+                                            " is not the same as switch" +
+                                            " length = " +
+                                            str( len( sw ) ) )
+                            return main.FALSE
+                        else:
+                            for switch, ptcpNum in zip( sw, ptcp ):
+                                tempCmd = "sh ovs-vsctl set-controller "
+                                tempCmd += switch + " ptcp:" + \
+                                           str( ptcpNum ) + " "
+                                tempCmd += onosIp
+                                commandList.append( tempCmd )
+                    else:
+                        main.log.error( self.name + ": Invalid PTCP" )
+                        return main.FALSE
+                else:
+                    for switch in sw:
+                        tempCmd = "sh ovs-vsctl set-controller "
+                        tempCmd += switch + " " + onosIp
+                        commandList.append( tempCmd )
+            else:
+                main.log.error( self.name + ": Invalid switch type " )
+                return main.FALSE
+
+            for cmd in commandList:
+                try:
+                    self.execute( cmd=cmd, prompt="mininet>", timeout=5 )
+                except pexpect.TIMEOUT:
+                    main.log.error( self.name + ": pexpect.TIMEOUT found" )
+                    return main.FALSE
+                except pexpect.EOF:
+                    main.log.error( self.name + ": EOF exception found" )
+                    main.log.error( self.name + ":     " + self.handle.before )
+                    main.cleanup()
+                    main.exit()
+            return main.TRUE
         except Exception:
             main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
@@ -1197,7 +1296,7 @@
                 return main.TRUE
         except pexpect.EOF:
             main.log.error( self.name + ": EOF exception found" )
-            main.log.error( self.name + ":     " + self.handle.before )
+            main.log.error(self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
 
@@ -2055,6 +2154,72 @@
 
         return hostList
 
+    def getHosts( self ):
+        """
+           Returns a list of all hosts
+           Don't ask questions just use it"""
+        self.handle.sendline( "" )
+        self.handle.expect( "mininet>" )
+
+        self.handle.sendline( "py [ host.name for host in net.hosts ]" )
+        self.handle.expect( "mininet>" )
+
+        handlePy = self.handle.before
+        handlePy = handlePy.split( "]\r\n", 1 )[ 1 ]
+        handlePy = handlePy.rstrip()
+
+        self.handle.sendline( "" )
+        self.handle.expect( "mininet>" )
+
+        hostStr = handlePy.replace( "]", "" )
+        hostStr = hostStr.replace( "'", "" )
+        hostStr = hostStr.replace( "[", "" )
+        hostStr = hostStr.replace( " ", "" )
+        hostList = hostStr.split( "," )
+
+        return hostList
+
+    def getSwitch( self ):
+        """
+            Returns a list of all switches
+            Again, don't ask question just use it...
+        """
+        # get host list...
+        hostList = self.getHosts()
+        # Make host set
+        hostSet = set( hostList )
+
+        # Getting all the nodes in mininet
+        self.handle.sendline( "" )
+        self.handle.expect( "mininet>" )
+
+        self.handle.sendline( "py [ node.name for node in net.values() ]" )
+        self.handle.expect( "mininet>" )
+
+        handlePy = self.handle.before
+        handlePy = handlePy.split( "]\r\n", 1 )[ 1 ]
+        handlePy = handlePy.rstrip()
+
+        self.handle.sendline( "" )
+        self.handle.expect( "mininet>" )
+
+        nodesStr = handlePy.replace( "]", "" )
+        nodesStr = nodesStr.replace( "'", "" )
+        nodesStr = nodesStr.replace( "[", "" )
+        nodesStr = nodesStr.replace( " ", "" )
+        nodesList = nodesStr.split( "," )
+
+        nodesSet = set( nodesList )
+        # discarding default controller(s) node
+        nodesSet.discard( 'c0' )
+        nodesSet.discard( 'c1' )
+        nodesSet.discard( 'c2' )
+
+        switchSet = nodesSet - hostSet
+        switchList = list( switchSet )
+
+        return switchList
+
     def update( self ):
         """
            updates the port address and status information for
@@ -2079,6 +2244,64 @@
             main.cleanup()
             main.exit()
 
+    def assignVLAN( self, host, intf, vlan):
+        """
+           Add vlan tag to a host.
+           Dependencies:
+               This class depends on the "vlan" package
+               $ sudo apt-get install vlan
+           Configuration:
+               Load the 8021q module into the kernel
+               $sudo modprobe 8021q
+
+               To make this setup permanent:
+               $ sudo su -c 'echo "8021q" >> /etc/modules'
+           """
+        if self.handle:
+            try:
+		# get the ip address of the host
+		main.log.info("Get the ip address of the host")
+		ipaddr = self.getIPAddress(host)
+		print repr(ipaddr)
+	
+		# remove IP from interface intf
+		# Ex: h1 ifconfig h1-eth0 inet 0
+		main.log.info("Remove IP from interface ")
+		cmd2 = host + " ifconfig " + intf + " " + " inet 0 "
+		self.handle.sendline( cmd2 )
+		self.handle.expect( "mininet>" ) 
+		response = self.handle.before
+		main.log.info ( "====> %s ", response)
+
+		
+		# create VLAN interface
+		# Ex: h1 vconfig add h1-eth0 100
+		main.log.info("Create Vlan")
+		cmd3 = host + " vconfig add " + intf + " " + vlan
+		self.handle.sendline( cmd3 )
+		self.handle.expect( "mininet>" ) 
+		response = self.handle.before
+		main.log.info( "====> %s ", response )
+
+		# assign the host's IP to the VLAN interface
+		# Ex: h1 ifconfig h1-eth0.100 inet 10.0.0.1
+		main.log.info("Assign the host IP to the vlan interface")
+		vintf = intf + "." + vlan
+		cmd4 = host + " ifconfig " + vintf + " " + " inet " + ipaddr
+		self.handle.sendline( cmd4 )
+		self.handle.expect( "mininet>" ) 
+		response = self.handle.before
+		main.log.info ( "====> %s ", response)
+
+
+                return main.TRUE
+            except pexpect.EOF:
+                main.log.error( self.name + ": EOF exception found" )
+                main.log.error( self.name + ":     " + self.handle.before )
+                return main.FALSE
+
 if __name__ != "__main__":
     import sys
     sys.modules[ __name__ ] = MininetCliDriver()
+
+
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index d4900ad..7256294 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:
@@ -1737,39 +1762,60 @@
             main.cleanup()
             main.exit()
 
-    def checkIntentState( self, intentsId, expectedState = 'INSTALLED' ):
+    def checkIntentState( self, intentsId, expectedState='INSTALLED' ):
         """
         Description:
             Check intents state
         Required:
             intentsId - List of intents ID to be checked
         Optional:
-            expectedState - Check this expected state of each intents state
-                            in the list. Defaults to INSTALLED
+            expectedState - Check the expected state(s) of each intents
+                            state in the list.
+                            *NOTE: You can pass in a list of expected state,
+                            Eg: expectedState = [ 'INSTALLED' , 'INSTALLING' ]
         Return:
-            Returns main.TRUE only if all intent are the same as expectedState,
-            , otherwise,returns main.FALSE.
+            Returns main.TRUE only if all intent are the same as expected states
+            , otherwise, returns main.FALSE.
         """
         try:
             # Generating a dictionary: intent id as a key and state as value
+            returnValue = main.TRUE
             intentsDict = self.getIntentState( intentsId )
+
             #print "len of intentsDict ", str( len( intentsDict ) )
             if len( intentsId ) != len( intentsDict ):
                 main.log.info( self.name + "There is something wrong " +
                                "getting intents state" )
                 return main.FALSE
-            returnValue = main.TRUE
-            for intents in intentsDict:
-                if intents.get( 'state' ) != expectedState:
-                    main.log.info( self.name + " : " + intents.get( 'id' ) +
-                                   " actual state = " + intents.get( 'state' )
-                                   + " does not equal expected state = "
-                                   + expectedState )
-                    returnValue = main.FALSE
+
+            if isinstance( expectedState, types.StringType ):
+                for intents in intentsDict:
+                    if intents.get( 'state' ) != expectedState:
+                        main.log.debug( self.name + " : Intent ID - " +
+                                        intents.get( 'id' ) +
+                                        " actual state = " +
+                                        intents.get( 'state' )
+                                        + " does not equal expected state = "
+                                        + expectedState )
+                        returnValue = main.FALSE
+
+            elif isinstance( expectedState, types.ListType ):
+                for intents in intentsDict:
+                    if not any( state == intents.get( 'state' ) for state in
+                                expectedState ):
+                        main.log.debug( self.name + " : Intent ID - " +
+                                        intents.get( 'id' ) +
+                                        " actual state = " +
+                                        intents.get( 'state' ) +
+                                        " does not equal expected states = "
+                                        + str( expectedState ) )
+                        returnValue = main.FALSE
+
             if returnValue == main.TRUE:
                 main.log.info( self.name + ": All " +
                                str( len( intentsDict ) ) +
-                               " intents are in " + expectedState + " state")
+                               " intents are in " + str( expectedState ) +
+                               " state" )
             return returnValue
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
@@ -1797,7 +1843,7 @@
                 cmdStr += " -j"
             handle = self.sendline( cmdStr )
             if re.search( "Error:", handle ):
-                main.log.error( self.name + ".flows() response: " +
+                main.log.error( self.name + ": flows() response: " +
                                 str( handle ) )
             return handle
         except TypeError:
@@ -1832,9 +1878,11 @@
                 for flow in device.get( 'flows' ):
                     if flow.get( 'state' ) != 'ADDED' and flow.get( 'state' ) != \
                             'PENDING_ADD':
+
                         main.log.info( self.name + ": flow Id: " +
-                                       flow.get( 'groupId' ) +
-                                       " | state:" + flow.get( 'state' ) )
+                                       str( flow.get( 'groupId' ) ) +
+                                       " | state:" +
+                                       str( flow.get( 'state' ) ) )
                         returnValue = main.FALSE
 
             return returnValue
@@ -3551,3 +3599,36 @@
             main.cleanup()
             main.exit()
 
+    def summary( self, jsonFormat=True ):
+        """
+        Description: Execute summary command in onos
+        Returns: json object ( summary -j ), returns main.FALSE if there is
+        no output
+
+        """
+        try:
+            cmdStr = "summary"
+            if jsonFormat:
+                cmdStr += " -j"
+            handle = self.sendline( cmdStr )
+
+            if re.search( "Error:", handle ):
+                main.log.error( self.name + ": summary() response: " +
+                                str( handle ) )
+            if not handle:
+                main.log.error( self.name + ": There is no output in " +
+                                "summary command" )
+                return main.FALSE
+            return handle
+        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()
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index 3b94ef7..f75df5f 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -80,7 +80,7 @@
         i = 5
         while i == 5:
             i = self.handle.expect( [
-				    ssh_newkey,
+                                    ssh_newkey,
                                     'password:|Password:',
                                     pexpect.EOF,
                                     pexpect.TIMEOUT,
@@ -88,11 +88,11 @@
                                     'teston>',
                                     '>|#|\$' ],
                 		    120 )
-            if i == 0:
+            if i == 0:  # Accept key, then expect either a password prompt or access
                 main.log.info( "ssh key confirmation received, send yes" )
                 self.handle.sendline( 'yes' )
-                i = self.handle.expect(
-                    [ ssh_newkey, 'password:', pexpect.EOF ] )
+                i = 5  # Run the loop again
+                continue 
             if i == 1:
                 if self.pwd:
                     main.log.info(
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/PingallExample/__init__.py b/TestON/tests/CbenchBM/__init__.py
similarity index 100%
rename from TestON/tests/PingallExample/__init__.py
rename to TestON/tests/CbenchBM/__init__.py
diff --git a/TestON/tests/FuncIntent/Dependency/FuncIntentFunction.py b/TestON/tests/FuncIntent/Dependency/FuncIntentFunction.py
index 690d926..b8598e4 100644
--- a/TestON/tests/FuncIntent/Dependency/FuncIntentFunction.py
+++ b/TestON/tests/FuncIntent/Dependency/FuncIntentFunction.py
@@ -10,6 +10,7 @@
                 name,
                 host1,
                 host2,
+                onosNode=0,
                 host1Id="",
                 host2Id="",
                 mac1="",
@@ -80,6 +81,7 @@
     topoResult = main.TRUE
     linkDownResult = main.TRUE
     linkUpResult = main.TRUE
+    onosNode = int( onosNode )
 
     if main.hostsData:
         if not h1Mac:
@@ -101,15 +103,29 @@
         return main.FALSE
 
     # Discover hosts using arping
-    main.log.info( itemName + ": Discover host using arping" )
-    main.Mininet1.arping( host=host1 )
-    main.Mininet1.arping( host=host2 )
-    host1 = main.CLIs[ 0 ].getHost( mac=h1Mac )
-    host2 = main.CLIs[ 0 ].getHost( mac=h2Mac )
+    if not main.hostsData:
+        main.log.info( itemName + ": Discover host using arping" )
+        main.Mininet1.arping( host=host1 )
+        main.Mininet1.arping( host=host2 )
+        host1 = main.CLIs[ 0 ].getHost( mac=h1Mac )
+        host2 = main.CLIs[ 0 ].getHost( mac=h2Mac )
+
+    # Check flows count in each node
+    checkFlowsCount( main )
+
+    # Checking connectivity before installing intents
+    main.log.info( itemName + ": Check hosts connection before adding intents" )
+    checkPing = pingallHosts( main, hostNames )
+    if not checkPing:
+        main.log.info( itemName + ": Ping did not go through " +
+                       "before adding intents" )
+    else:
+        main.log.debug( itemName + ": Pinged successful before adding " +
+                        "intents,please check fwd app if it is activated" )
 
     # Adding host intents
     main.log.info( itemName + ": Adding host intents" )
-    intent1 = main.CLIs[ 0 ].addHostIntent( hostIdOne=h1Id,
+    intent1 = main.CLIs[ onosNode ].addHostIntent( hostIdOne=h1Id,
                                            hostIdTwo=h2Id )
     intentsId.append( intent1 )
     time.sleep( 5 )
@@ -117,11 +133,14 @@
     # Check intents state
     time.sleep( 30 )
     intentResult = checkIntentState( main, intentsId )
+    checkFlowsCount( main )
 
     # Check intents state again if first check fails...
     if not intentResult:
         intentResult = checkIntentState( main, intentsId )
 
+    # Check flows count in each node
+    checkFlowsCount( main )
     # Verify flows
     checkFlowsState( main )
 
@@ -141,6 +160,8 @@
         linkDownResult = link( main, sw1, sw2, "down" )
         intentResult = intentResult and checkIntentState( main, intentsId )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -162,6 +183,8 @@
         linkUpResult = link( main, sw1, sw2, "up" )
         time.sleep( 5 )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -191,6 +214,7 @@
                  name,
                  host1,
                  host2,
+                 onosNode=0,
                  deviceId1="",
                  deviceId2="",
                  port1="",
@@ -275,10 +299,21 @@
     topoResult = main.TRUE
     linkDownResult = main.TRUE
     linkUpResult = main.TRUE
+    onosNode = int( onosNode )
+
+    # Checking connectivity before installing intents
+    main.log.info( itemName + ": Check hosts connection before adding intents" )
+    checkPing = pingallHosts( main, hostNames )
+    if not checkPing:
+        main.log.info( itemName + ": Ping did not go through " +
+                       "before adding intents" )
+    else:
+        main.log.debug( itemName + ": Pinged successful before adding " +
+                        "intents,please check fwd app if it is activated" )
 
     # Adding bidirectional point  intents
     main.log.info( itemName + ": Adding point intents" )
-    intent1 = main.CLIs[ 0 ].addPointIntent( ingressDevice=deviceId1,
+    intent1 = main.CLIs[ onosNode ].addPointIntent( ingressDevice=deviceId1,
                                              egressDevice=deviceId2,
                                              portIngress=port1,
                                              portEgress=port2,
@@ -295,7 +330,7 @@
 
     intentsId.append( intent1 )
     time.sleep( 5 )
-    intent2 = main.CLIs[ 0 ].addPointIntent( ingressDevice=deviceId2,
+    intent2 = main.CLIs[ onosNode ].addPointIntent( ingressDevice=deviceId2,
                                              egressDevice=deviceId1,
                                              portIngress=port2,
                                              portEgress=port1,
@@ -314,11 +349,15 @@
     # Check intents state
     time.sleep( 30 )
     intentResult = checkIntentState( main, intentsId )
+    # Check flows count in each node
+    checkFlowsCount( main )
 
     # Check intents state again if first check fails...
     if not intentResult:
         intentResult = checkIntentState( main, intentsId )
 
+    # Check flows count in each node
+    checkFlowsCount( main )
     # Verify flows
     checkFlowsState( main )
 
@@ -338,6 +377,8 @@
         linkDownResult = link( main, sw1, sw2, "down" )
         intentResult = intentResult and checkIntentState( main, intentsId )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -359,6 +400,8 @@
         linkUpResult = link( main, sw1, sw2, "up" )
         time.sleep( 5 )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -387,6 +430,7 @@
 def singleToMultiIntent( main,
                          name,
                          hostNames,
+                         onosNode=0,
                          devices="",
                          ports=None,
                          ethType="",
@@ -461,6 +505,7 @@
     itemName = name
     tempHostsData = {}
     intentsId = []
+    onosNode = int( onosNode )
 
     macsDict = {}
     ipDict = {}
@@ -477,10 +522,12 @@
                 #print "len devices = ", len( devices )
                 #print "len ports = ", len( ports )
                 return main.FALSE
-        for i in range( len( devices ) ):
-            macsDict[ devices[ i ] ] = macs[ i ]
         else:
             main.log.info( "Device Ports are not specified" )
+        if macs:
+            for i in range( len( devices ) ):
+                macsDict[ devices[ i ] ] = macs[ i ]
+
     elif hostNames and not devices and main.hostsData:
         devices = []
         main.log.info( "singleToMultiIntent function is using main.hostsData" ) 
@@ -508,6 +555,20 @@
     if ports:
         portsCopy = copy.copy( ports )
     main.log.info( itemName + ": Adding single point to multi point intents" )
+
+    # Check flows count in each node
+    checkFlowsCount( main )
+
+    # Checking connectivity before installing intents
+    main.log.info( itemName + ": Check hosts connection before adding intents" )
+    checkPing = pingallHosts( main, hostNames )
+    if not checkPing:
+        main.log.info( itemName + ": Ping did not go through " +
+                       "before adding intents" )
+    else:
+        main.log.debug( itemName + ": Pinged successful before adding " +
+                        "intents,please check fwd app if it is activated" )
+
     # Adding bidirectional point  intents
     for i in range( len( devices ) ):
         ingressDevice = devicesCopy[ i ]
@@ -528,7 +589,8 @@
                 main.log.debug( "There is no MAC in device - " + ingressDevice )
                 srcMac = ""
 
-        intentsId.append( main.CLIs[ 0 ].addSinglepointToMultipointIntent(
+        intentsId.append(
+                        main.CLIs[ onosNode ].addSinglepointToMultipointIntent(
                                             ingressDevice=ingressDevice,
                                             egressDeviceList=egressDeviceList,
                                             portIngress=portIngress,
@@ -543,6 +605,8 @@
                                             tcpSrc="",
                                             tcpDst="" ) )
 
+    # Wait some time for the flow to go through when using multi instance
+    time.sleep( 10 )
     pingResult = pingallHosts( main, hostNames )
 
     # Check intents state
@@ -553,6 +617,8 @@
     if not intentResult:
         intentResult = checkIntentState( main, intentsId )
 
+    # Check flows count in each node
+    checkFlowsCount( main )
     # Verify flows
     checkFlowsState( main )
 
@@ -568,6 +634,8 @@
         linkDownResult = link( main, sw1, sw2, "down" )
         intentResult = intentResult and checkIntentState( main, intentsId )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -589,6 +657,8 @@
         linkUpResult = link( main, sw1, sw2, "up" )
         time.sleep( 5 )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -617,6 +687,7 @@
 def multiToSingleIntent( main,
                          name,
                          hostNames,
+                         onosNode=0,
                          devices="",
                          ports=None,
                          ethType="",
@@ -642,7 +713,7 @@
             Verify add-multi-to-single-intent
         Steps:
             - Get device ids | ports
-            - Add single to multi point intents
+            - Add multi to single point intents
             - Check intents
             - Verify flows
             - Ping hosts
@@ -690,6 +761,7 @@
     itemName = name
     tempHostsData = {}
     intentsId = []
+    onosNode = int( onosNode )
 
     macsDict = {}
     ipDict = {}
@@ -706,13 +778,14 @@
                 #print "len devices = ", len( devices )
                 #print "len ports = ", len( ports )
                 return main.FALSE
-        for i in range( len( devices ) ):
-            macsDict[ devices[ i ] ] = macs[ i ]
         else:
             main.log.info( "Device Ports are not specified" )
+        if macs:
+            for i in range( len( devices ) ):
+                macsDict[ devices[ i ] ] = macs[ i ]
     elif hostNames and not devices and main.hostsData:
         devices = []
-        main.log.info( "singleToMultiIntent function is using main.hostsData" ) 
+        main.log.info( "multiToSingleIntent function is using main.hostsData" ) 
         for host in hostNames:
                devices.append( main.hostsData.get( host ).get( 'location' ) )
                macsDict[ main.hostsData.get( host ).get( 'location' ) ] = \
@@ -736,7 +809,21 @@
     devicesCopy = copy.copy( devices )
     if ports:
         portsCopy = copy.copy( ports )
-    main.log.info( itemName + ": Adding single point to multi point intents" )
+    main.log.info( itemName + ": Adding multi point to single point intents" )
+
+    # Check flows count in each node
+    checkFlowsCount( main )
+
+    # Checking connectivity before installing intents
+    main.log.info( itemName + ": Check hosts connection before adding intents" )
+    checkPing = pingallHosts( main, hostNames )
+    if not checkPing:
+        main.log.info( itemName + ": Ping did not go through " +
+                       "before adding intents" )
+    else:
+        main.log.debug( itemName + ": Pinged successful before adding " +
+                        "intents,please check fwd app if it is activated" )
+
     # Adding bidirectional point  intents
     for i in range( len( devices ) ):
         egressDevice = devicesCopy[ i ]
@@ -757,7 +844,8 @@
                 main.log.debug( "There is no MAC in device - " + egressDevice )
                 dstMac = ""
 
-        intentsId.append( main.CLIs[ 0 ].addMultipointToSinglepointIntent(
+        intentsId.append(
+                        main.CLIs[ onosNode ].addMultipointToSinglepointIntent(
                                             ingressDeviceList=ingressDeviceList,
                                             egressDevice=egressDevice,
                                             portIngressList=portIngressList,
@@ -782,6 +870,8 @@
     if not intentResult:
         intentResult = checkIntentState( main, intentsId )
 
+    # Check flows count in each node
+    checkFlowsCount( main )
     # Verify flows
     checkFlowsState( main )
 
@@ -797,6 +887,8 @@
         linkDownResult = link( main, sw1, sw2, "down" )
         intentResult = intentResult and checkIntentState( main, intentsId )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -818,6 +910,8 @@
         linkUpResult = link( main, sw1, sw2, "up" )
         time.sleep( 5 )
 
+        # Check flows count in each node
+        checkFlowsCount( main )
         # Verify flows
         checkFlowsState( main )
 
@@ -915,13 +1009,39 @@
     return statusResult
 
 def checkIntentState( main, intentsId ):
+    """
+        This function will check intent state to make sure all the intents
+        are in INSTALLED state
+    """
 
     intentResult = main.TRUE
+    results = []
 
     main.log.info( itemName + ": Checking intents state" )
+    # First check of intents
     for i in range( main.numCtrls ):
-        intentResult = intentResult and \
-                main.CLIs[ i ].checkIntentState( intentsId=intentsId )
+        tempResult = main.CLIs[ i ].checkIntentState( intentsId=intentsId )
+        results.append( tempResult )
+
+    expectedState = [ 'INSTALLED', 'INSTALLING' ]
+
+    if all( result == main.TRUE for result in results ):
+        main.log.info( itemName + ": Intents are installed correctly" )
+    else:
+        # Wait for at least 5 second before checking the intents again
+        time.sleep( 5 )
+        results = []
+        # Second check of intents since some of the intents may be in
+        # INSTALLING state, they should be in INSTALLED at this time
+        for i in range( main.numCtrls ):
+            tempResult = main.CLIs[ i ].checkIntentState(
+                                                        intentsId=intentsId )
+            results.append( tempResult )
+        if all( result == main.TRUE for result in results ):
+            main.log.info( itemName + ": Intents are installed correctly" )
+        else:
+            main.log.error( itemName + ": Intents are NOT installed correctly" )
+            intentResult = main.FALSE
 
     return intentResult
 
@@ -966,3 +1086,36 @@
                        "successfully removed all the intents." )
         removeIntentResult = main.TRUE
     return removeIntentResult
+
+def checkFlowsCount( main ):
+    """
+        Check flows count in each node
+    """
+    import json
+
+    flowsCount = []
+    main.log.info( itemName + ": Checking flows count in each ONOS node" )
+    for i in range( main.numCtrls ):
+        summaryResult = main.CLIs[ i ].summary()
+        if not summaryResult:
+            main.log.error( itemName + ": There is something wrong with " +
+                            "summary command" )
+            return main.FALSE
+        else:
+            summaryJson = json.loads( summaryResult )
+            flowsCount.append( summaryJson.get( 'flows' ) )
+
+    if flowsCount:
+        if all( flows==flowsCount[ 0 ] for flows in flowsCount ):
+            main.log.info( itemName + ": There are " + str( flowsCount[ 0 ] ) +
+                           " flows in all ONOS node" )
+        else:
+            for i in range( main.numCtrls ):
+                main.log.debug( itemName + ": ONOS node " + str( i ) + " has " +
+                                flowsCount[ i ] + " flows" )
+    else:
+        main.log.error( "Checking flows count failed, check summary command" )
+        return main.FALSE
+
+    return main.TRUE
+
diff --git a/TestON/tests/FuncIntent/FuncIntent.params b/TestON/tests/FuncIntent/FuncIntent.params
new file mode 100644
index 0000000..e7c8b40
--- /dev/null
+++ b/TestON/tests/FuncIntent/FuncIntent.params
@@ -0,0 +1,34 @@
+<PARAMS>
+
+    <testcases>10,11,12,13,1003</testcases>
+
+    <SCALE>1,3</SCALE>
+    <availableNodes>3</availableNodes>
+    <ENV>
+        <cellName>functionality</cellName>
+        <cellApps>drivers,openflow,proxyarp,mobility</cellApps>
+    </ENV>
+    <GIT>
+        <pull>False</pull>
+        <branch>master</branch>
+    </GIT>
+    <CTRL>
+        <num>3</num>
+        <ip1>OC1</ip1>
+        <port1>6633</port1>
+        <ip2>OC2</ip2>
+        <port2>6633</port2>
+        <ip3>OC3</ip3>
+        <port3>6633</port3>
+    </CTRL>
+    <BENCH>
+        <user>admin</user>
+        <ip1>OCN</ip1>
+    </BENCH>
+    <MININET>
+        <switch>7</switch>
+        <links>20</links>
+        <topo>~/mininet/custom/newFuncTopo.py</topo>
+    </MININET>
+
+</PARAMS>
diff --git a/TestON/tests/FuncIntent/FuncIntent.py b/TestON/tests/FuncIntent/FuncIntent.py
index d5dc2a7..3a716ee 100644
--- a/TestON/tests/FuncIntent/FuncIntent.py
+++ b/TestON/tests/FuncIntent/FuncIntent.py
@@ -223,11 +223,19 @@
         main.case( "Assign switches to controllers" )
         main.step( "Assigning switches to controllers" )
         assignResult = main.TRUE
+        switchList = []
+
+        # Creates a list switch name, use getSwitch() function later...
         for i in range( 1, ( main.numSwitch + 1 ) ):
-            main.Mininet1.assignSwController( sw=str( i ),
-                                              count=1,
-                                              ip1=main.ONOSip[ 0 ],
-                                              port1=main.ONOSport[ 0 ] )
+            switchList.append( 's' + str( i ) )
+
+        assignResult = main.Mininet1.assignSwController( sw=switchList,
+                                                         ip=main.ONOSip,
+                                                         port=main.ONOSport )
+        if not assignResult:
+            main.cleanup()
+            main.exit()
+
         for i in range( 1, ( main.numSwitch + 1 ) ):
             response = main.Mininet1.getSwController( "s" + str( i ) )
             print( "Response is " + str( response ) )
@@ -256,6 +264,25 @@
                                  onpass="Successfully discovered hosts",
                                  onfail="Failed to discover hosts" )
 
+    def CASE14( self, main ):
+        """
+            Stop mininet
+        """
+        main.log.report( "Stop Mininet topology" )
+        main.log.case( "Stop Mininet topology" )
+
+        main.step( "Stopping Mininet Topology" )
+        topoResult = main.Mininet1.stopNet( )
+        stepResult = topoResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully stop mininet",
+                                 onfail="Failed to stop mininet" )
+        # Exit if topology did not load properly
+        if not topoResult:
+            main.cleanup()
+            main.exit()
+
     def CASE1001( self, main ):
         """
             Add host intents between 2 host:
@@ -292,6 +319,7 @@
         stepResult = main.TRUE
         main.step( "IPV4: Add host intents between h1 and h9" )
         stepResult = main.wrapper.hostIntent( main,
+                                              onosNode='0',
                                               name='IPV4',
                                               host1='h1',
                                               host2='h9',
@@ -305,8 +333,8 @@
                                  actual=stepResult,
                                  onpass="IPV4: Add host intent successful",
                                  onfail="IPV4: Add host intent failed" )
-        stepResult = main.TRUE
 
+        stepResult = main.TRUE
         main.step( "DUALSTACK1: Add host intents between h3 and h11" )
         stepResult = main.wrapper.hostIntent( main,
                                               name='DUALSTACK',
@@ -325,7 +353,7 @@
                                  onfail="DUALSTACK1: Add host intent failed" )
 
         stepResult = main.TRUE
-        main.step( "DUALSTACK2: Add host intents between h1 and h9" )
+        main.step( "DUALSTACK2: Add host intents between h1 and h11" )
         stepResult = main.wrapper.hostIntent( main,
                                               name='DUALSTACK2',
                                               host1='h1',
@@ -340,6 +368,51 @@
                                         " successful",
                                  onfail="DUALSTACK2: Add host intent failed" )
 
+        stepResult = main.TRUE
+        main.step( "1HOP: Add host intents between h1 and h3" )
+        stepResult = main.wrapper.hostIntent( main,
+                                              name='1HOP',
+                                              host1='h1',
+                                              host2='h3' )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="1HOP: Add host intent" +
+                                        " successful",
+                                 onfail="1HOP: Add host intent failed" )
+
+        stepResult = main.TRUE
+        main.step( "VLAN1: Add vlan host intents between h4 and h12" )
+        stepResult = main.wrapper.hostIntent( main,
+                                              name='VLAN1',
+                                              host1='h4',
+                                              host2='h12',
+                                              host1Id='00:00:00:00:00:04/100',
+                                              host2Id='00:00:00:00:00:0C/100',
+                                              sw1='s5',
+                                              sw2='s2',
+                                              expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="VLAN1: Add vlan host" +
+                                        " intent successful",
+                                 onfail="VLAN1: Add vlan host intent failed" )
+
+        stepResult = main.TRUE
+        main.step( "VLAN2: Add inter vlan host intents between h13 and h20" )
+        stepResult = main.wrapper.hostIntent( main,
+                                              name='VLAN2',
+                                              host1='h13',
+                                              host2='h20' )
+
+        utilities.assert_equals( expect=main.FALSE,
+                                 actual=stepResult,
+                                 onpass="VLAN2: Add inter vlan host" +
+                                        " intent successful",
+                                 onfail="VLAN2: Add inter vlan host" +
+                                        " intent failed" )
+
     def CASE1002( self, main ):
         """
             Add point intents between 2 hosts:
@@ -374,7 +447,26 @@
         main.case( "Add point intents between 2 devices" )
 
         stepResult = main.TRUE
-        main.step( "IPV4: Add point intents between h1 and h9" )
+        # No option point intents
+        main.step( "NOOPTION: Add point intents between h1 and h9" )
+        stepResult = main.wrapper.pointIntent(
+                                       main,
+                                       name="NOOPTION",
+                                       host1="h1",
+                                       host2="h9",
+                                       deviceId1="of:0000000000000005/1",
+                                       deviceId2="of:0000000000000006/1",
+                                       sw1="s5",
+                                       sw2="s2",
+                                       expectedLink=18 )
+
+        stepResult = main.TRUE
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="NOOPTION: Add point intent successful",
+                                 onfail="NOOPTION: Add point intent failed" )
+
+        stepResult = main.TRUE
         stepResult = main.wrapper.pointIntent(
                                        main,
                                        name="IPV4",
@@ -404,6 +496,28 @@
                                  onfail="IPV4: Add point intent failed" )
 
         stepResult = main.TRUE
+        stepResult = main.wrapper.pointIntent(
+                                       main,
+                                       name="IPV4_2",
+                                       host1="h1",
+                                       host2="h9",
+                                       deviceId1="of:0000000000000005/1",
+                                       deviceId2="of:0000000000000006/1",
+                                       ipProto=1,
+                                       ip1="",
+                                       ip2="",
+                                       tcp1="",
+                                       tcp2="",
+                                       sw1="s5",
+                                       sw2="s2",
+                                       expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="IPV4_2: Add point intent successful",
+                                 onfail="IPV4_2: Add point intent failed" )
+
+        stepResult = main.TRUE
         main.step( "DUALSTACK1: Add point intents between h1 and h9" )
         stepResult = main.wrapper.pointIntent(
                                        main,
@@ -432,7 +546,49 @@
                                  actual=stepResult,
                                  onpass="DUALSTACK1: Add point intent" +
                                         " successful",
-                                 onfail="DUALSTACK1: Add point intent failed" )
+                                 onfail="DUALSTACK1: Add point intent failed" ) 
+        stepResult = main.TRUE
+        main.step( "VLAN: Add point intents between h5 and h21" )
+        stepResult = main.wrapper.pointIntent(
+                                       main,
+                                       name="VLAN",
+                                       host1="h5",
+                                       host2="h21",
+                                       deviceId1="of:0000000000000005/5",
+                                       deviceId2="of:0000000000000007/5",
+                                       port1="",
+                                       port2="",
+                                       ethType="IPV4",
+                                       mac1="00:00:00:00:00:05",
+                                       mac2="00:00:00:00:00:15",
+                                       bandwidth="",
+                                       lambdaAlloc=False,
+                                       ipProto="",
+                                       ip1="",
+                                       ip2="",
+                                       tcp1="",
+                                       tcp2="",
+                                       sw1="s5",
+                                       sw2="s2",
+                                       expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="VLAN: Add point intent successful",
+                                 onfail="VLAN: Add point intent failed" )
+
+        stepResult = main.TRUE
+        main.step( "1HOP: Add point intents between h1 and h3" )
+        stepResult = main.wrapper.hostIntent( main,
+                                              name='1HOP',
+                                              host1='h1',
+                                              host2='h3' )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="1HOP: Add point intent" +
+                                        " successful",
+                                 onfail="1HOP: Add point intent failed" )
 
     def CASE1003( self, main ):
         """
@@ -462,11 +618,30 @@
         main.case( "Add single point to multi point intents between devices" )
 
         stepResult = main.TRUE
-        main.step( "IPV4: Add single point to multi point intents" )
         hostNames = [ 'h8', 'h16', 'h24' ]
         devices = [ 'of:0000000000000005/8', 'of:0000000000000006/8', \
                     'of:0000000000000007/8' ]
         macs = [ '00:00:00:00:00:08', '00:00:00:00:00:10', '00:00:00:00:00:18' ]
+
+        main.step( "NOOPTION: Add single point to multi point intents" )
+        stepResult = main.wrapper.singleToMultiIntent(
+                                         main,
+                                         name="NOOPTION",
+                                         hostNames=hostNames,
+                                         devices=devices,
+                                         sw1="s5",
+                                         sw2="s2",
+                                         expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="NOOPTION: Successfully added single "
+                                        + " point to multi point intents",
+                                 onfail="NOOPTION: Failed to add single point" +
+                                        " to multi point intents" )
+
+        stepResult = main.TRUE
+        main.step( "IPV4: Add single point to multi point intents" )
         stepResult = main.wrapper.singleToMultiIntent(
                                          main,
                                          name="IPV4",
@@ -491,6 +666,7 @@
                                  onfail="IPV4: Failed to add single point" +
                                         " to multi point intents" )
 
+        stepResult = main.TRUE
         main.step( "IPV4_2: Add single point to multi point intents" )
         hostNames = [ 'h8', 'h16', 'h24' ]
         stepResult = main.wrapper.singleToMultiIntent(
@@ -502,10 +678,40 @@
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
-                                 onpass="IPV4_2: Successfully added single point"
-                                        + " to multi point intents",
+                                 onpass="IPV4_2: Successfully added single "
+                                        + " point to multi point intents",
                                  onfail="IPV4_2: Failed to add single point" +
                                         " to multi point intents" )
+        stepResult = main.TRUE
+        main.step( "VLAN: Add single point to multi point intents" )
+        hostNames = [ 'h4', 'h12', 'h20' ]
+        devices = [ 'of:0000000000000005/4', 'of:0000000000000006/4', \
+                    'of:0000000000000007/4' ]
+        macs = [ '00:00:00:00:00:04', '00:00:00:00:00:0C', '00:00:00:00:00:14' ]
+        stepResult = main.wrapper.singleToMultiIntent(
+                                         main,
+                                         name="VLAN",
+                                         hostNames=hostNames,
+                                         devices=devices,
+                                         ports=None,
+                                         ethType="IPV4",
+                                         macs=macs,
+                                         bandwidth="",
+                                         lambdaAlloc=False,
+                                         ipProto="",
+                                         ipAddresses="",
+                                         tcp="",
+                                         sw1="s5",
+                                         sw2="s2",
+                                         expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="VLAN: Successfully added single point"
+                                        + " to multi point intents",
+                                 onfail="VLAN: Failed to add single point" +
+                                        " to multi point intents" ) 
+
     def CASE1004( self, main ):
         """
             Add multi point to single point intents
@@ -523,7 +729,7 @@
                     - Verify flows
                     - Check topology
                     - Ping hosts
-                - Remove intents
+             - Remove intents
         """
         assert main, "There is no main"
         assert main.CLIs, "There is no main.CLIs"
@@ -534,11 +740,30 @@
         main.case( "Add multi point to single point intents between devices" )
 
         stepResult = main.TRUE
-        main.step( "IPV4: Add multi point to single point intents" )
         hostNames = [ 'h8', 'h16', 'h24' ]
         devices = [ 'of:0000000000000005/8', 'of:0000000000000006/8', \
                     'of:0000000000000007/8' ]
         macs = [ '00:00:00:00:00:08', '00:00:00:00:00:10', '00:00:00:00:00:18' ]
+
+        main.step( "NOOPTION: Add multi point to single point intents" )
+        stepResult = main.wrapper.multiToSingleIntent(
+                                         main,
+                                         name="NOOPTION",
+                                         hostNames=hostNames,
+                                         devices=devices,
+                                         sw1="s5",
+                                         sw2="s2",
+                                         expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="NOOPTION: Successfully added multi "
+                                        + " point to single point intents",
+                                 onfail="NOOPTION: Failed to add multi point" +
+                                        " to single point intents" )
+
+        stepResult = main.TRUE
+        main.step( "IPV4: Add multi point to single point intents" )
         stepResult = main.wrapper.multiToSingleIntent(
                                          main,
                                          name="IPV4",
@@ -563,6 +788,7 @@
                                  onfail="IPV4: Failed to add multi point" +
                                         " to single point intents" )
 
+        stepResult = main.TRUE
         main.step( "IPV4_2: Add multi point to single point intents" )
         hostNames = [ 'h8', 'h16', 'h24' ]
         stepResult = main.wrapper.multiToSingleIntent(
@@ -578,3 +804,33 @@
                                         + " to single point intents",
                                  onfail="IPV4_2: Failed to add multi point" +
                                         " to single point intents" )
+
+        stepResult = main.TRUE
+        main.step( "VLAN: Add multi point to single point intents" )
+        hostNames = [ 'h5', 'h13', 'h21' ]
+        devices = [ 'of:0000000000000005/5', 'of:0000000000000006/5', \
+                    'of:0000000000000007/5' ]
+        macs = [ '00:00:00:00:00:05', '00:00:00:00:00:0D', '00:00:00:00:00:15' ]
+        stepResult = main.wrapper.multiToSingleIntent(
+                                         main,
+                                         name="VLAN",
+                                         hostNames=hostNames,
+                                         devices=devices,
+                                         ports=None,
+                                         ethType="IPV4",
+                                         macs=macs,
+                                         bandwidth="",
+                                         lambdaAlloc=False,
+                                         ipProto="",
+                                         ipAddresses="",
+                                         tcp="",
+                                         sw1="s5",
+                                         sw2="s2",
+                                         expectedLink=18 )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="VLAN: Successfully added multi point"
+                                        + " to single point intents",
+                                 onfail="VLAN: Failed to add multi point" +
+                                        " to single point intents" )
diff --git a/TestON/tests/FuncStartTemplate/FuncStartTemplate.params b/TestON/tests/FuncStartTemplate/FuncStartTemplate.params
index 310e5f8..04f6110 100755
--- a/TestON/tests/FuncStartTemplate/FuncStartTemplate.params
+++ b/TestON/tests/FuncStartTemplate/FuncStartTemplate.params
@@ -1,11 +1,10 @@
 <PARAMS>
-
     <testcases>10,9,10,9</testcases>
 
-    <SCALE>3,1</SCALE>
+    <SCALE>1,3</SCALE>
     <availableNodes>3</availableNodes>
     <ENV>
-        <cellName>single_func</cellName>
+        <cellName>functionality</cellName>
         <cellApps>drivers,openflow,proxyarp,mobility</cellApps>
     </ENV>
     <GIT>
diff --git a/TestON/tests/FuncStartTemplate/FuncStartTemplate.py b/TestON/tests/FuncStartTemplate/FuncStartTemplate.py
index 4beefae..59c242c 100644
--- a/TestON/tests/FuncStartTemplate/FuncStartTemplate.py
+++ b/TestON/tests/FuncStartTemplate/FuncStartTemplate.py
@@ -15,12 +15,13 @@
     def CASE10( self, main ):
         import time
         import os
+        import imp
         """
         Startup sequence:
+        git pull
         cell <name>
         onos-verify-cell
         onos-remove-raft-log
-        git pull
         mvn clean install
         onos-package
         onos-install -f
@@ -44,6 +45,8 @@
         main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
         main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
         main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
+        main.ONOSport = []
+        main.hostsData = {}
         PULLCODE = False
         if main.params[ 'GIT' ][ 'pull' ] == 'True':
             PULLCODE = True
@@ -51,12 +54,12 @@
         main.CLIs = []
         for i in range( 1, int( main.numCtrls ) + 1 ):
             main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+            main.ONOSport.append( main.params[ 'CTRL' ][ 'port' + str( i ) ] )
 
         # -- INIT SECTION, ONLY RUNS ONCE -- #
         if init == False:
             init = True
 
-            main.ONOSport = []
             main.scale = ( main.params[ 'SCALE' ] ).split( "," )
             main.numCtrls = int( main.scale[ 0 ] )
 
@@ -80,43 +83,21 @@
                                "clean install" )
 
             globalONOSip = main.ONOSbench.getOnosIps()
-        
-        maxNodes = ( len(globalONOSip) - 2 )
+
+        maxNodes = ( len( globalONOSip ) - 2 )
 
         main.numCtrls = int( main.scale[ 0 ] )
         main.scale.remove( main.scale[ 0 ] )
 
         main.ONOSip = []
-        for i in range( maxNodes ): 
-            main.ONOSip.append( globalONOSip[i] )
+        for i in range( maxNodes ):
+            main.ONOSip.append( globalONOSip[ i ] )
 
-
-        
         #kill off all onos processes
         main.log.info( "Safety check, killing all ONOS processes" +
                        " before initiating enviornment setup" )
-        for i in range(maxNodes):
+        for i in range( maxNodes ):
             main.ONOSbench.onosDie( globalONOSip[ i ] )
-        
-        """
-        main.step( "Apply cell to environment" )
-        cellResult = main.ONOSbench.setCell( cellName )
-        verifyResult = main.ONOSbench.verifyCell()
-        stepResult = cellResult and verifyResult
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=stepResult,
-                                 onpass="Successfully applied cell to " + \
-                                        "environment",
-                                 onfail="Failed to apply cell to environment " )
-        """
-        """main.step( "Removing raft logs" )
-        removeRaftResult = main.ONOSbench.onosRemoveRaftLogs()
-        stepResult = removeRaftResult
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=stepResult,
-                                 onpass="Successfully removed raft logs",
-                                 onfail="Failed to remove raft logs" )
-        """
 
         print "NODE COUNT = ", main.numCtrls
         main.log.info( "Creating cell file" )
@@ -190,24 +171,31 @@
                                  actual=stepResult,
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
-        
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
             cliResult = cliResult and \
-                        main.CLIs[i].startOnosCli( main.ONOSip[ i ] )
+                        main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
         stepResult = cliResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
                                  onpass="Successfully start ONOS cli",
                                  onfail="Failed to start ONOS cli" )
-    
-    def CASE9( self, main ): 
+
+    def CASE9( self, main ):
         '''
-            Report errors/warnings/exceptions 
+            Report errors/warnings/exceptions
         '''
-        main.log.info("Error report: \n") 
-        main.ONOSbench.logReport( globalONOSip[0], [ "INFO","FOLLOWER","WARN","flow","ERROR","Except" ], "s" )  
+        main.log.info("Error report: \n" )
+        main.ONOSbench.logReport( globalONOSip[ 0 ],
+                                  [ "INFO",
+                                    "FOLLOWER",
+                                    "WARN",
+                                    "flow",
+                                    "ERROR",
+                                    "Except" ],
+                                  "s" )
         #main.ONOSbench.logReport( globalONOSip[1], [ "INFO" ], "d" )
 
     def CASE11( self, main ):
diff --git a/TestON/tests/FuncStartTemplate/FuncStartTemplate.topo b/TestON/tests/FuncStartTemplate/FuncStartTemplate.topo
index 2321da0..e6613de 100755
--- a/TestON/tests/FuncStartTemplate/FuncStartTemplate.topo
+++ b/TestON/tests/FuncStartTemplate/FuncStartTemplate.topo
@@ -8,7 +8,7 @@
             <type>OnosDriver</type>
             <connect_order>1</connect_order>
             <COMPONENTS>
-                <home>~/onos</home>
+                <home>~/ONOS</home>
             </COMPONENTS>
         </ONOSbench>
 
diff --git a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
new file mode 100644
index 0000000..41b3258
--- /dev/null
+++ b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
@@ -0,0 +1,344 @@
+"""
+    Wrapper function for FuncTopo
+    Includes onosclidriver and mininetclidriver functions
+"""
+import time
+import json
+import re
+
+def __init__( self ):
+    self.default = ''
+
+def testTopology( main, topoFile='', args='', mnCmd='', clean=True ):
+    """
+    Description:
+        This function combines different wrapper functions in this module
+        to simulate a topology test
+    Test Steps:
+        - Load topology
+        - Discover topology
+        - Compare topology
+        - pingall
+        - Bring links down
+        - Compare topology
+        - pingall
+        - Bring links up
+        - Compare topology
+        - pingall
+    Options:
+        clean: Does sudo mn -c to clean mininet residue
+        Please read mininetclidriver.py >> startNet( .. ) function for details
+    Returns:
+        Returns main.TRUE if the test is successful, main.FALSE otherwise
+    """
+    testTopoResult = main.TRUE
+    compareTopoResult = main.TRUE
+    topoObjectResult = main.TRUE
+    stopResult = main.TRUE
+
+    if clean:
+        # Cleans minient
+        stopResult = stopMininet( main )
+
+    # Restart ONOS to clear hosts test new mininet topology
+    restartONOSResult = restartONOS( main )
+
+    # Starts topology
+    startResult = startNewTopology( main, topoFile, args, mnCmd )
+
+    # Gets list of switches in mininet
+    assignSwitch( main )
+
+    # This function activates fwd app then does pingall as well as store
+    # hosts data in a variable main.hostsData
+    getHostsResult = getHostsData( main )
+
+    # Create topology object using sts
+    topoObjectResult = createTopoObject( main )
+
+    # Compare Topology
+    compareTopoResult = compareTopo( main )
+
+    testTopoResult = startResult and topoObjectResult and \
+                     compareTopoResult and getHostsResult
+
+
+    return testTopoResult
+
+def startNewTopology( main, topoFile='', args='', mnCmd='' ):
+    """
+    Description:
+        This wrapper function starts new topology
+    Options:
+        Please read mininetclidriver.py >> startNet( .. ) function for details
+    Return:
+        Returns main.TRUE if topology is successfully created by mininet,
+        main.FALSE otherwise
+    NOTE:
+        Assumes Mininet1 is the name of the handler
+    """
+    assert main, "There is no main variable"
+    assert main.Mininet1, "Mininet 1 is not created"
+    result = main.TRUE
+
+    main.log.info( main.topoName + ": Starting new Mininet topology" )
+
+    # log which method is being used
+    if topoFile:
+        main.log.info( main.topoName + ": Starting topology with " +
+                       topoFile + "topology file" )
+    elif not topoFile and not mnCmd:
+        main.log.info( main.topoName + ": Starting topology using" +
+                       " the topo file" )
+    elif topoFile and mnCmd:
+        main.log.error( main.topoName + ": You can only use one " +
+                        "method to start a topology" )
+    elif mnCmd:
+        main.log.info( main.topoName + ": Starting topology with '" +
+                       mnCmd + "' Mininet command" )
+
+
+    result = main.Mininet1.startNet( topoFile=topoFile,
+                                     args=args,
+                                     mnCmd=mnCmd )
+
+    return result
+
+def stopMininet( main ):
+    """
+        Stops current topology and execute mn -c basically triggers
+        stopNet in mininetclidrivers
+
+        NOTE: Mininet should be running when issuing this command other wise
+        the this function will cause the test to stop
+    """
+    stopResult = main.TRUE
+    stopResult = main.Mininet1.stopNet()
+    time.sleep( 30 )
+    if not stopResult:
+        main.log.info(  main.topoName + ": Did not stop Mininet topology" )
+    return stopResult
+
+def createTopoObject( main ):
+    """
+        Creates topology object using sts module
+    """
+    from sts.topology.teston_topology import TestONTopology
+    global MNTopo
+    try:
+        ctrls = []
+        main.log.info(  main.topoName + ": Creating topology object" +
+                        " from mininet" )
+        for node in main.nodes:
+            temp = ( node, node.name, node.ip_address, 6633 )
+            ctrls.append( temp )
+        MNTopo = TestONTopology( main.Mininet1, ctrls )
+    except Exception:
+        objResult = main.FALSE
+    else:
+        objResult = main.TRUE
+
+    return objResult
+
+def compareTopo( main ):
+    """
+        Compare topology( devices, links, ports, hosts ) between ONOS and
+        mininet using sts
+    """
+    assert MNTopo, "There is no MNTopo object"
+    devices = []
+    links = []
+    ports = []
+    hosts = []
+    switchResult = []
+    linksResult = []
+    portsResult = []
+    hostsResult = []
+    compareTopoResult = main.TRUE
+
+    for i in range( main.numCtrls ):
+        devices.append( json.loads( main.CLIs[ i ].devices() ) )
+        links.append( json.loads( main.CLIs[ i ].links() ) )
+        ports.append( json.loads(  main.CLIs[ i ].ports() ) )
+        hosts.append( json.loads( main.CLIs[ i ].hosts() ) )
+
+    # Comparing switches
+    main.log.info( main.topoName + ": Comparing switches in each ONOS nodes" +
+                   " with Mininet" )
+    for i in range( main.numCtrls ):
+        tempResult = main.Mininet1.compareSwitches( MNTopo, devices[ i ] )
+        switchResult.append( tempResult )
+        if tempResult == main.FALSE:
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
+                            " switch view is incorrect " )
+
+    if all( result == main.TRUE for result in switchResult ):
+        main.log.info( main.topoName + ": Switch view in all ONOS nodes "+
+                       "are correct " )
+    else:
+        compareTopoResult = main.FALSE
+
+    # Comparing ports
+    main.log.info( main.topoName + ": Comparing ports in each ONOS nodes" +
+                   " with Mininet" )
+    for i in range( main.numCtrls ):
+        tempResult = main.Mininet1.comparePorts( MNTopo, ports[ i ] )
+        portsResult.append( tempResult )
+        if tempResult == main.FALSE:
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
+                            " ports view are incorrect " )
+
+    if all( result == main.TRUE for result in portsResult ):
+        main.log.info( main.topoName + ": Ports view in all ONOS nodes "+
+                       "are correct " )
+    else:
+        compareTopoResult = main.FALSE
+
+    # Comparing links
+    main.log.info( main.topoName + ": Comparing links in each ONOS nodes" +
+                   " with Mininet" )
+    for i in range( main.numCtrls ):
+        tempResult = main.Mininet1.compareLinks( MNTopo, links[ i ] )
+        linksResult.append( tempResult )
+        if tempResult == main.FALSE:
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
+                            " links view are incorrect " )
+
+    if all( result == main.TRUE for result in linksResult ):
+        main.log.info( main.topoName + ": Links view in all ONOS nodes "+
+                       "are correct " )
+    else:
+        compareTopoResult = main.FALSE
+
+    # Comparing hosts
+    main.log.info( main.topoName + ": Comparing hosts in each ONOS nodes" +
+                   " with Mininet" )
+    for i in range( main.numCtrls ):
+        tempResult = main.Mininet1.compareHosts( MNTopo, hosts[ i ] )
+        hostsResult.append( tempResult )
+        if tempResult == main.FALSE:
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
+                            " hosts view are incorrect " )
+
+    if all( result == main.TRUE for result in hostsResult ):
+        main.log.info( main.topoName + ": Hosts view in all ONOS nodes "+
+                       "are correct " )
+    else:
+        compareTopoResult = main.FALSE
+
+    return compareTopoResult
+
+def assignSwitch( main ):
+    """
+        Returns switch list using getSwitch in Mininet driver
+    """
+    switchList = []
+    assignResult = main.TRUE
+    switchList =  main.Mininet1.getSwitch()
+    assignResult = main.Mininet1.assignSwController( sw=switchList,
+                                                     ip=main.ONOSip[ 0 ],
+                                                     port=6633 )
+
+    for sw in switchList:
+        response = main.Mininet1.getSwController( sw )
+        if re.search( "tcp:" + main.ONOSip[ 0 ], response ):
+            assignResult = assignResult and main.TRUE
+        else:
+            assignResult = main.FALSE
+
+    return switchList
+
+def getHostsData( main ):
+    """
+        Use fwd app and pingall to discover all the hosts
+    """
+    activateResult = main.TRUE
+    appCheck = main.TRUE
+    getDataResult = main.TRUE
+    main.log.info( main.topoName + ": Activating reactive forwarding app " )
+    activateResult = main.CLIs[ 0 ].activateApp( "org.onosproject.fwd" )
+    if main.hostsData:
+        main.hostsData = {}
+    for i in range( main.numCtrls ):
+        appCheck = appCheck and main.CLIs[ i ].appToIDCheck()
+        if appCheck != main.TRUE:
+            main.log.warn( main.CLIs[ i ].apps() )
+            main.log.warn( main.CLIs[ i ].appIDs() )
+
+    pingResult = main.Mininet1.pingall( timeout=900 )
+    hostsJson = json.loads( main.CLIs[ 0 ].hosts() )
+    hosts = main.Mininet1.getHosts()
+    for host in hosts:
+        main.hostsData[ host ] = {}
+        main.hostsData[ host ][ 'mac' ] =  \
+            main.Mininet1.getMacAddress( host ).upper()
+        for hostj in hostsJson:
+            if main.hostsData[ host ][ 'mac' ] == hostj[ 'mac' ]:
+                main.hostsData[ host ][ 'id' ] = hostj[ 'id' ]
+                main.hostsData[ host ][ 'vlan' ] = hostj[ 'vlan' ]
+                main.hostsData[ host ][ 'location' ] = \
+                            hostj[ 'location' ][ 'elementId' ] + '/' + \
+                            hostj[ 'location' ][ 'port' ]
+                main.hostsData[ host ][ 'ipAddresses' ] = hostj[ 'ipAddresses' ]
+
+    if activateResult and main.hostsData:
+        main.log.info( main.topoName + ": Successfully used fwd app" +
+                       " to discover hosts " )
+        getDataResult = main.TRUE
+    else:
+        main.log.info( main.topoName + ": Failed to use fwd app" +
+                       " to discover hosts " )
+        getDataResult = main.FALSE
+
+    # This data can be use later for intents
+    print main.hostsData
+
+    return getDataResult
+
+def restartONOS( main ):
+    """
+    Description:
+        Stop and start ONOS that clears hosts,devices etc. in order to test
+        new mininet topology
+    Return:
+        Retruns main.TRUE for a successful restart, main.FALSE otherwise.
+    """
+    stopResult = []
+    startResult = []
+    restartResult = main.TRUE
+
+    main.log.info( main.topoName + ": Stopping ONOS cluster" )
+    for node in main.nodes:
+        startResult.append( main.ONOSbench.onosStop( nodeIp=node.ip_address ) )
+
+    if all( result == main.TRUE for result in stopResult ):
+        main.log.info( main.topoName + ": Successfully stopped ONOS cluster" )
+    else:
+        restartResult = main.FALSE
+        main.log.error( main.topoName + ": Failed to stop ONOS cluster" )
+
+    time.sleep( 15 )
+
+    main.log.info( main.topoName + ": Starting ONOS cluster" )
+    for node in main.nodes:
+        startResult.append( main.ONOSbench.onosStart( nodeIp=node.ip_address ) )
+
+    if all( result == main.TRUE for result in startResult ):
+        main.log.info( main.topoName + ": Successfully start ONOS cluster" )
+    else:
+        restartResult = main.FALSE
+        main.log.error( main.topoName + ": Failed to start ONOS cluster" )
+
+    # Start ONOS CLIs again
+    main.log.info( main.topoName + ": Starting ONOS CLI" )
+    cliResult = main.TRUE
+    for i in range( main.numCtrls ):
+        cliResult = cliResult and \
+                    main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
+
+    time.sleep( 15 )
+
+    return restartResult
+
+
+
diff --git a/TestON/tests/FuncTopo/FuncTopo.py b/TestON/tests/FuncTopo/FuncTopo.py
new file mode 100644
index 0000000..b2e2a6a
--- /dev/null
+++ b/TestON/tests/FuncTopo/FuncTopo.py
@@ -0,0 +1,218 @@
+
+# Testing the basic functionality of ONOS Next
+# For sanity and driver functionality excercises only.
+
+import time
+import json
+
+class FuncTopo:
+
+    def __init__( self ):
+        self.default = ''
+
+    def CASE10( self, main ):
+        import time
+        import os
+        import imp
+        """
+        Startup sequence:
+        cell <name>
+        onos-verify-cell
+        onos-remove-raft-log
+        git pull
+        mvn clean install
+        onos-package
+        onos-install -f
+        onos-wait-for-start
+        """
+        global init
+        global globalONOSip
+        try:
+            if type(init) is not bool:
+                init = False
+        except NameError:
+            init = False
+
+        main.wrapper = imp.load_source( 'FuncTopoFunction', '/home/admin/' +
+                                        'TestON/tests/FuncTopo/Dependency/' +
+                                        'FuncTopoFunction.py')
+
+        #Local variables
+        cellName = main.params[ 'ENV' ][ 'cellName' ]
+        apps = main.params[ 'ENV' ][ 'cellApps' ]
+        gitBranch = main.params[ 'GIT' ][ 'branch' ]
+        benchIp = os.environ[ 'OCN' ]
+        benchUser = main.params[ 'BENCH' ][ 'user' ]
+        topology = main.params[ 'MININET' ][ 'topo' ]
+        main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
+        main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
+        main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
+        main.ONOSport = []
+        main.hostsData = {}
+        main.topoName = " "
+        PULLCODE = False
+        if main.params[ 'GIT' ][ 'pull' ] == 'True':
+            PULLCODE = True
+        main.case( "Setting up test environment" )
+        main.CLIs = []
+        main.nodes = []
+        for i in range( 1, int( main.numCtrls ) + 1 ):
+            main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+            main.nodes.append( getattr( main, 'ONOS' + str( i ) ) )
+            main.ONOSport.append( main.params[ 'CTRL' ][ 'port' + str( i ) ] )
+
+        # -- INIT SECTION, ONLY RUNS ONCE -- #
+        if init == False:
+            init = True
+
+            main.scale = ( main.params[ 'SCALE' ] ).split( "," )
+            main.numCtrls = int( main.scale[ 0 ] )
+
+            if PULLCODE:
+                main.step( "Git checkout and pull " + gitBranch )
+                main.ONOSbench.gitCheckout( gitBranch )
+                gitPullResult = main.ONOSbench.gitPull()
+                if gitPullResult == main.ERROR:
+                    main.log.error( "Error pulling git branch" )
+                main.step( "Using mvn clean & install" )
+                cleanInstallResult = main.ONOSbench.cleanInstall()
+                stepResult = cleanInstallResult
+                utilities.assert_equals( expect=main.TRUE,
+                                         actual=stepResult,
+                                         onpass="Successfully compiled " +
+                                                "latest ONOS",
+                                         onfail="Failed to compile " +
+                                                "latest ONOS" )
+            else:
+                main.log.warn( "Did not pull new code so skipping mvn " +
+                               "clean install" )
+
+            globalONOSip = main.ONOSbench.getOnosIps()
+        maxNodes = ( len(globalONOSip) - 2 )
+
+        main.numCtrls = int( main.scale[ 0 ] )
+        main.scale.remove( main.scale[ 0 ] )
+
+        main.ONOSip = []
+        for i in range( maxNodes ):
+            main.ONOSip.append( globalONOSip[i] )
+
+        #kill off all onos processes
+        main.log.info( "Safety check, killing all ONOS processes" +
+                       " before initiating enviornment setup" )
+        for i in range(maxNodes):
+            main.ONOSbench.onosDie( globalONOSip[ i ] )
+
+        print "NODE COUNT = ", main.numCtrls
+        main.log.info( "Creating cell file" )
+        cellIp = []
+        for i in range( main.numCtrls ):
+            cellIp.append( str( main.ONOSip[ i ] ) )
+        print cellIp
+        main.ONOSbench.createCellFile( benchIp, cellName, "",
+                                       str( apps ), *cellIp )
+
+        main.step( "Apply cell to environment" )
+        cellResult = main.ONOSbench.setCell( cellName )
+        verifyResult = main.ONOSbench.verifyCell()
+        stepResult = cellResult and verifyResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully applied cell to " + \
+                                        "environment",
+                                 onfail="Failed to apply cell to environment " )
+
+        main.step( "Creating ONOS package" )
+        packageResult = main.ONOSbench.onosPackage()
+        stepResult = packageResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully created ONOS package",
+                                 onfail="Failed to create ONOS package" )
+
+        main.step( "Uninstalling ONOS package" )
+        onosUninstallResult = main.TRUE
+        for i in range( main.numCtrls ):
+            onosUninstallResult = onosUninstallResult and \
+                    main.ONOSbench.onosUninstall( nodeIp=main.ONOSip[ i ] )
+        stepResult = onosUninstallResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully uninstalled ONOS package",
+                                 onfail="Failed to uninstall ONOS package" )
+        time.sleep( 5 )
+        main.step( "Installing ONOS package" )
+        onosInstallResult = main.TRUE
+        for i in range( main.numCtrls ):
+            onosInstallResult = onosInstallResult and \
+                    main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
+        stepResult = onosInstallResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully installed ONOS package",
+                                 onfail="Failed to install ONOS package" )
+
+        time.sleep( 10 )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
+    def CASE9( self, main ):
+        '''
+            Report errors/warnings/exceptions
+        '''
+        main.log.info("Error report: \n")
+        main.ONOSbench.logReport( globalONOSip[0],
+                                  [ "INFO","FOLLOWER","WARN",
+                                    "flow","ERROR","Except" ],
+                                  "s" )
+        #main.ONOSbench.logReport( globalONOSip[1], [ "INFO" ], "d" )
+
+    def CASE1001( self, main ):
+        """
+            Test topology discovery
+        """
+        main.case( "Topology discovery test" )
+
+
+        main.step( "Torus 5-5 topology" )
+        main.topoName = "TORUS5-5"
+        mnCmd = "mn --topo=torus,5,5 --mac"
+        stepResult = main.wrapper.testTopology( main,
+                                                mnCmd=mnCmd,
+                                                clean=False )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Torus 5-5 topology successful",
+                                 onfail="Torus 5-5 topology failed" )
+
+        main.topoName = "TREE3-3"
+        stepResult = main.TRUE
+        main.step( "Tree 3-3 topology" )
+        mnCmd = "mn --topo=tree,3,3 --mac"
+        stepResult = main.wrapper.testTopology( main,
+                                                mnCmd=mnCmd,
+                                                clean=True )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Tree 3-3 topology successful",
+                                 onfail="Tree 3-3 topology failed" )
diff --git a/TestON/tests/PingallExample/__init__.py b/TestON/tests/FuncTopo/__init__.py
similarity index 100%
copy from TestON/tests/PingallExample/__init__.py
copy to TestON/tests/FuncTopo/__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..44178b2 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()
@@ -88,13 +87,19 @@
          
         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")
         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):
@@ -106,7 +111,7 @@
         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" )
@@ -159,7 +164,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 +177,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 +227,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 +304,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 +358,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>