diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 4502971..2645514 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1898,3 +1898,37 @@
             main.cleanup()
             main.exit()
 
+
+    def getOnosIpFromEnv(self):
+
+        import os
+
+        # returns a list of ip addresses for the onos nodes, will work with up to 7 nodes + OCN and OCI
+        # returns in format [ 'x', OC1 ip, OC2 i... ect. ... , ONN ip ]
+
+        ONOSIps = ['x']
+
+        x = 1
+        while True:
+            try:
+                temp = os.environ[ 'OC' + str(x) ]
+            except: 
+                break
+            ONOSIps.append(temp) 
+            x += 1 
+
+        try: 
+            temp = os.environ[ 'OCN' ] 
+        except: 
+            main.log.error("MISSING OCN ENVIRONMENT VARIABLE")
+
+        ONOSIps.append(temp)
+        
+        try:
+            temp = os.environ[ 'OCI' ]
+        except:
+            main.log.error("MISSING OCN ENVIRONMENT VARIABLE")
+
+        ONOSIps.append(temp)
+        return ONOSIps
+
diff --git a/TestON/tests/FuncIntent/FuncIntent.params b/TestON/tests/FuncIntent/FuncIntent.params
index 125122e..7e5d8ce 100755
--- a/TestON/tests/FuncIntent/FuncIntent.params
+++ b/TestON/tests/FuncIntent/FuncIntent.params
@@ -14,16 +14,16 @@
     </GIT>
     <CTRL>
         <num>3</num>
-        <ip1>10.128.10.21</ip1>
+        <ip1>OC1</ip1>
         <port1>6633</port1>
-        <ip2>10.128.10.22</ip2>
+        <ip2>OC2</ip2>
         <port2>6633</port2>
-        <ip3>10.128.10.23</ip3>
+        <ip3>OC3</ip3>
         <port3>6633</port3>
     </CTRL>
     <BENCH>
         <user>admin</user>
-        <ip1>10.128.10.20</ip1>
+        <ip1>10.128.5.55</ip1>
     </BENCH>
     <MININET>
         <switch>7</switch>
diff --git a/TestON/tests/FuncIntent/FuncIntent.py b/TestON/tests/FuncIntent/FuncIntent.py
index 3adb025..758becb 100644
--- a/TestON/tests/FuncIntent/FuncIntent.py
+++ b/TestON/tests/FuncIntent/FuncIntent.py
@@ -27,19 +27,20 @@
         onos-wait-for-start
         """
         global init
+        global globalONOSip
         try:
             if type(init) is not bool:
                 init = False
         except NameError:
             init = False
+
         #Local variables
         cellName = main.params[ 'ENV' ][ 'cellName' ]
         apps = main.params[ 'ENV' ][ 'cellApps' ]
         gitBranch = main.params[ 'GIT' ][ 'branch' ]
-        benchIp = main.params[ 'BENCH' ][ 'ip1' ]
+        benchIp = os.environ[ 'OCN' ]
         benchUser = main.params[ 'BENCH' ][ 'user' ]
         topology = main.params[ 'MININET' ][ 'topo' ]
-        maxNodes = int( main.params[ 'availableNodes' ] )
         main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
         main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
         main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
@@ -55,7 +56,6 @@
         if init == False:
             init = True
 
-            main.ONOSip = []
             main.ONOSport = []
             main.scale = ( main.params[ 'SCALE' ] ).split( "," )
             main.numCtrls = int( main.scale[ 0 ] )
@@ -78,19 +78,26 @@
             else:
                 main.log.warn( "Did not pull new code so skipping mvn " +
                                "clean install" )
-            # Populate main.ONOSip with ips from params
-            for i in range( 1, maxNodes + 1):
-                main.ONOSip.append( main.params[ 'CTRL' ][ 'ip' + str( i ) ] )
-                main.ONOSport.append( main.params[ 'CTRL' ][ 'port' +
-                                      str( i ) ])
+
+            globalONOSip = main.ONOSbench.getOnosIpFromEnv()
+        
+        maxNodes = ( len(globalONOSip) - 3 )
 
         main.numCtrls = int( main.scale[ 0 ] )
         main.scale.remove( main.scale[ 0 ] )
+
+        main.ONOSip = [0]
+        for i in range( 1, maxNodes + 1 ): 
+            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( main.ONOSip[ i ] )
+        for i in range(1, maxNodes+1):
+            main.ONOSbench.onosDie( globalONOSip[ i ] )
+        
         """
         main.step( "Apply cell to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
@@ -110,6 +117,7 @@
                                  onpass="Successfully removed raft logs",
                                  onfail="Failed to remove raft logs" )
         """
+
         print "NODE COUNT = ", main.numCtrls
         main.log.info( "Creating cell file" )
         cellIp = []
@@ -139,7 +147,7 @@
 
         main.step( "Uninstalling ONOS package" )
         onosUninstallResult = main.TRUE
-        for i in range( main.numCtrls):
+        for i in range( 1, main.numCtrls + 1):
             onosUninstallResult = onosUninstallResult and \
                     main.ONOSbench.onosUninstall( nodeIp=main.ONOSip[ i ] )
         stepResult = onosUninstallResult
@@ -150,7 +158,7 @@
         time.sleep( 5 )
         main.step( "Installing ONOS package" )
         onosInstallResult = main.TRUE
-        for i in range( main.numCtrls):
+        for i in range( 1, main.numCtrls+1):
             onosInstallResult = onosInstallResult and \
                     main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
         stepResult = onosInstallResult
@@ -159,12 +167,12 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
-        time.sleep( 5 )
+        time.sleep( 20 )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
         startResult = main.TRUE
         onosIsUp = main.TRUE
-        for i in range( main.numCtrls ):
+        for i in range( 1, main.numCtrls+1 ):
             onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
         if onosIsUp == main.TRUE:
             main.log.report( "ONOS instance is up and ready" )
