[ONOS-6593]Review and Refactor ONOS startup procedures in TestON

Change-Id: I509a8ee7a26c198957bebf59da5c85a0edb8b995
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
index 7cc2258..b67a5f7 100644
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
@@ -18,7 +18,7 @@
         the OF-Config server is running on the node to be configured
     """
     startResult = main.FALSE
-    startResult = main.CLIs[ 0 ].activateApp( appName="org.onosproject.netconf" )
+    startResult = main.RESTs[ 0 ].activateApp( appName="org.onosproject.netconf" )
     return startResult
 
 
@@ -96,7 +96,7 @@
     method = "POST"
     data = main.cfgJson
     configResult = main.FALSE
-    sendResult = main.CLIs[ 0 ].send( url=url, method=method, data=data )
+    sendResult = main.RESTs[ 0 ].send( url=url, method=method, data=data )
     main.log.info( "Device configuration request response code: " + str( sendResult[ 0 ] ) )
     if ( 200 <= sendResult[ 0 ] <= 299 ):
         configResult = main.TRUE
@@ -117,8 +117,8 @@
     addressResult = main.FALSE
     driverResult = main.FALSE
     try:
-        apiResult = main.CLIs[ 0 ].devices()
-        cliResult = main.CLIs2[ 0 ].devices()
+        apiResult = main.RESTs[ 0 ].devices()
+        cliResult = main.CLIs[ 0 ].devices()
 
         apiDict = json.loads( apiResult )
         cliDict = json.loads( cliResult )
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/startUp.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/startUp.py
deleted file mode 100644
index a9becf9..0000000
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/startUp.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-    This wrapper function is use for starting up onos instance
-"""
-import time
-import os
-import json
-
-
-def onosBuild( main, gitBranch ):
-    """
-        This includes pulling ONOS and building it using maven install
-    """
-    buildResult = main.FALSE
-
-    # Git checkout a branch of ONOS
-    checkOutResult = main.ONOSbench.gitCheckout( gitBranch )
-    # Does the git pull on the branch that was checked out
-    if not checkOutResult:
-        main.log.warn( "Failed to checked out " + gitBranch +
-                                           " branch" )
-    else:
-        main.log.info( "Successfully checked out " + gitBranch +
-                                           " branch" )
-    gitPullResult = main.ONOSbench.gitPull()
-    if gitPullResult == main.ERROR:
-        main.log.error( "Error pulling git branch" )
-    else:
-        main.log.info( "Successfully pulled " + gitBranch + " branch" )
-
-    # buck build
-    buildResult = main.ONOSbench.buckBuild()
-
-    return buildResult
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/topo.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/topo.py
deleted file mode 100644
index 7217d4d..0000000
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/topo.py
+++ /dev/null
@@ -1,102 +0,0 @@
-"""
-    These functions can be used for topology comparisons
-"""
-import time
-import os
-import json
-
-
-def getAllDevices( main ):
-    """
-        Return a list containing the devices output from each ONOS node
-    """
-    devices = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].devices,
-                         name="devices-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        devices.append( t.result )
-    return devices
-
-
-def getAllHosts( main ):
-    """
-        Return a list containing the hosts output from each ONOS node
-    """
-    hosts = []
-    ipResult = main.TRUE
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].hosts,
-                         name="hosts-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        hosts.append( t.result )
-    return hosts
-
-
-def getAllPorts( main ):
-    """
-        Return a list containing the ports output from each ONOS node
-    """
-    ports = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].ports,
-                         name="ports-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        ports.append( t.result )
-    return ports
-
-
-def getAllLinks( main ):
-    """
-        Return a list containing the links output from each ONOS node
-    """
-    links = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].links,
-                         name="links-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        links.append( t.result )
-    return links
-
-
-def getAllClusters( main ):
-    """
-        Return a list containing the clusters output from each ONOS node
-    """
-    clusters = []
-    threads = []
-    for i in range( main.numCtrls ):
-        t = main.Thread( target=main.CLIs[ i ].clusters,
-                         name="clusters-" + str( i ),
-                         args=[] )
-        threads.append( t )
-        t.start()
-
-    for t in threads:
-        t.join()
-        clusters.append( t.result )
-    return clusters