Revert "[ONOS-7756] Start/stop Atomix cluster as part of ONOS cluster setup"
This reverts commit 1cf0b32922b9da9491bd9a684f8749cdfc83080a.
Change-Id: Iba06308cfe5e3a28106c5dc7b6e4e7744dfacc93
diff --git a/TestON/tests/dependencies/Cluster.py b/TestON/tests/dependencies/Cluster.py
index 6bfbb3f..a67bad5 100644
--- a/TestON/tests/dependencies/Cluster.py
+++ b/TestON/tests/dependencies/Cluster.py
@@ -176,27 +176,7 @@
specificDriver=1,
getFrom=0 if installMax else 1 )
- def uninstallAtomix( self, uninstallMax ):
- """
- Description:
- uninstalling atomix
- Required:
- * uninstallMax - True for uninstalling max number of nodes
- False for uninstalling the current running nodes.
- Returns:
- Returns main.TRUE if it successfully uninstalled.
- """
- result = main.TRUE
- uninstallResult = self.command( "atomixUninstall",
- kwargs={ "nodeIp": "ipAddress" },
- specificDriver=1,
- getFrom=0 if uninstallMax else 1,
- funcFromCtrl=True )
- for uninstallR in uninstallResult:
- result = result and uninstallR
- return result
-
- def uninstallOnos( self, uninstallMax ):
+ def uninstall( self, uninstallMax ):
"""
Description:
uninstalling onos
@@ -264,31 +244,7 @@
main.log.warn( ctrl.name + " may not be up." )
return onosIsUp
- def killAtomix( self, killMax, stopAtomix ):
- """
- Description:
- killing atomix. It will either kill the current runningnodes or
- max number of the nodes.
- Required:
- * killRemoveMax - The boolean that will decide either to kill
- only running nodes ( False ) or max number of nodes ( True ).
- * stopAtomix - If wish to atomix onos before killing it. True for
- enable stop, False for disable stop.
- Returns:
- Returns main.TRUE if successfully killing it.
- """
- result = main.TRUE
- killResult = self.command( "atomixKill",
- args=[ "ipAddress" ],
- specificDriver=1,
- getFrom=0 if killMax else 1,
- funcFromCtrl=True )
- for i in range( len( killResult ) ):
- result = result and killResult[ i ]
- self.controllers[ i ].active = False
- return result
-
- def killOnos( self, killMax, stopOnos ):
+ def kill( self, killMax, stopOnos ):
"""
Description:
killing the onos. It will either kill the current runningnodes or
@@ -331,42 +287,7 @@
result = result and sshR
return result
- def installAtomix( self, installMax=True, installParallel=True ):
- """
- Description:
- Installing onos.
- Required:
- * installMax - True for installing max number of nodes
- False for installing current running nodes only.
- Returns:
- Returns main.TRUE if it successfully installed
- """
- result = main.TRUE
- threads = []
- i = 0
- for ctrl in self.controllers if installMax else self.runningNodes:
- options = ""
- if installMax and i >= self.numCtrls:
- # TODO: is installMax supported here?
- pass
- if installParallel:
- t = main.Thread( target=ctrl.Bench.atomixInstall,
- name="atomix-install-" + ctrl.name,
- kwargs={ "node" : ctrl.ipAddress,
- "options" : options } )
- threads.append( t )
- t.start()
- else:
- result = result and \
- main.ONOSbench.atomixInstall( node=ctrl.ipAddress, options=options )
- i += 1
- if installParallel:
- for t in threads:
- t.join()
- result = result and t.result
- return result
-
- def installOnos( self, installMax=True, installParallel=True ):
+ def install( self, installMax=True, installParallel=True ):
"""
Description:
Installing onos.
@@ -385,7 +306,7 @@
options = "-nf"
if installParallel:
t = main.Thread( target=ctrl.Bench.onosInstall,
- name="onos-install-" + ctrl.name,
+ name="install-" + ctrl.name,
kwargs={ "node" : ctrl.ipAddress,
"options" : options } )
threads.append( t )
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index 8879220..66eced1 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -183,23 +183,6 @@
# main.scale[ 0 ] determines the current number of ONOS controller
main.Cluster.setRunningNode( int( main.scale.pop( 0 ) ) )
- def killingAllAtomix( self, cluster, killRemoveMax, stopAtomix ):
- """
- Description:
- killing atomix. It will either kill the current runningnodes or
- max number of the nodes.
- Required:
- * cluster - the cluster driver that will be used.
- * killRemoveMax - The boolean that will decide either to kill
- only running nodes ( False ) or max number of nodes ( True ).
- * stopAtomix - If wish to stop atomix before killing it. True for
- enable stop, False for disable stop.
- Returns:
- Returns main.TRUE if successfully killing it.
- """
- main.log.info( "Safety check, killing all Atomix processes" )
- return cluster.killAtomix( killRemoveMax, stopAtomix )
-
def killingAllOnos( self, cluster, killRemoveMax, stopOnos ):
"""
Description:
@@ -210,12 +193,13 @@
* killRemoveMax - The boolean that will decide either to kill
only running nodes ( False ) or max number of nodes ( True ).
* stopOnos - If wish to stop onos before killing it. True for
- enable stop, False for disable stop.
+ enable stop , False for disable stop.
Returns:
Returns main.TRUE if successfully killing it.
"""
main.log.info( "Safety check, killing all ONOS processes" )
- return cluster.killOnos( killRemoveMax, stopOnos )
+
+ return cluster.kill( killRemoveMax, stopOnos )
def createApplyCell( self, cluster, newCell, cellName, cellApps,
mininetIp, useSSH, ips, installMax=False ):
@@ -245,25 +229,6 @@
onfail="Failed to apply cell to environment" )
return stepResult
- def uninstallAtomix( self, cluster, uninstallMax ):
- """
- Description:
- uninstalling atomix and verify the result.
- Required:
- * cluster - a cluster driver that will be used.
- * uninstallMax - True for uninstalling max number of nodes
- False for uninstalling the current running nodes.
- Returns:
- Returns main.TRUE if it successfully uninstalled.
- """
- main.step( "Uninstalling Atomix" )
- atomixUninstallResult = cluster.uninstallAtomix( uninstallMax )
- utilities.assert_equals( expect=main.TRUE,
- actual=atomixUninstallResult,
- onpass="Successfully uninstalled Atomix",
- onfail="Failed to uninstall Atomix" )
- return atomixUninstallResult
-
def uninstallOnos( self, cluster, uninstallMax ):
"""
Description:
@@ -276,7 +241,7 @@
Returns main.TRUE if it successfully uninstalled.
"""
main.step( "Uninstalling ONOS package" )
- onosUninstallResult = cluster.uninstallOnos( uninstallMax )
+ onosUninstallResult = cluster.uninstall( uninstallMax )
utilities.assert_equals( expect=main.TRUE,
actual=onosUninstallResult,
onpass="Successfully uninstalled ONOS package",
@@ -300,29 +265,6 @@
onfail="Failed to create ONOS package" )
return packageResult
- def installAtomix( self, cluster, installMax, parallel=True ):
- """
- Description:
- Installing atomix and verify the result
- Required:
- * cluster - the cluster driver that will be used.
- * installMax - True for installing max number of nodes
- False for installing current running nodes only.
- Returns:
- Returns main.TRUE if it successfully installed
- """
- main.step( "Installing Atomix" )
- atomixInstallResult = main.TRUE
-
- cluster.installAtomix( installMax, parallel )
- utilities.assert_equals( expect=main.TRUE,
- actual=atomixInstallResult,
- onpass="Successfully installed Atomix",
- onfail="Failed to install Atomix" )
- if not atomixInstallResult:
- main.cleanAndExit()
- return atomixInstallResult
-
def installOnos( self, cluster, installMax, parallel=True ):
"""
Description:
@@ -337,7 +279,7 @@
main.step( "Installing ONOS package" )
onosInstallResult = main.TRUE
- cluster.installOnos( installMax, parallel )
+ cluster.install( installMax, parallel )
utilities.assert_equals( expect=main.TRUE,
actual=onosInstallResult,
onpass="Successfully installed ONOS package",
@@ -417,8 +359,7 @@
def ONOSSetUp( self, cluster, hasMultiNodeRounds=False, startOnos=True, newCell=True,
cellName="temp", cellApps="drivers", mininetIp="", removeLog=False, extraApply=None, applyArgs=None,
extraClean=None, cleanArgs=None, skipPack=False, installMax=False, useSSH=True,
- killRemoveMax=True, stopAtomix=False, stopOnos=False, installParallel=True, cellApply=True,
- includeCaseDesc=True ):
+ killRemoveMax=True, stopOnos=False, installParallel=True, cellApply=True, includeCaseDesc=True ):
"""
Description:
Initial ONOS setting up of the tests. It will also verify the result of each steps.
@@ -453,7 +394,6 @@
* useSSH - True for using ssh when creating a cell
* killRemoveMax - True for removing/killing max number of nodes. False for
removing/killing running nodes only.
- * stopAtomix - True if wish to stop atomix before killing it.
* stopOnos - True if wish to stop onos before killing it.
Returns:
Returns main.TRUE if it everything successfully proceeded.
@@ -464,9 +404,7 @@
" node(s) ONOS cluster" )
main.caseExplanation = "Set up ONOS with " + str( cluster.numCtrls ) + \
" node(s) ONOS cluster"
- atomixKillResult = self.killingAllAtomix( cluster, killRemoveMax, stopAtomix )
- onosKillResult = self.killingAllOnos( cluster, killRemoveMax, stopOnos )
- killResult = atomixKillResult and onosKillResult
+ killResult = self.killingAllOnos( cluster, killRemoveMax, stopOnos )
main.log.info( "NODE COUNT = " + str( cluster.numCtrls ) )
cellResult = main.TRUE
@@ -490,17 +428,13 @@
if removeLog:
main.log.info("Removing raft logs")
main.ONOSbench.onosRemoveRaftLogs()
- atomixUninstallResult = self.uninstallAtomix( cluster, killRemoveMax )
onosUninstallResult = self.uninstallOnos( cluster, killRemoveMax )
- uninstallResult = atomixUninstallResult and onosUninstallResult
self.processList( extraApply, applyArgs )
if not skipPack:
packageResult = self.buildOnos(cluster)
- atomixInstallResult = self.installAtomix( cluster, installMax, installParallel )
onosInstallResult = self.installOnos( cluster, installMax, installParallel )
- installResult = atomixInstallResult and onosInstallResult
self.processList( extraClean, cleanArgs )
secureSshResult = self.setupSsh( cluster )
@@ -510,5 +444,5 @@
if startOnos:
onosCliResult = self.startOnosClis( cluster )
- return killResult and cellResult and packageResult and uninstallResult and \
- installResult and secureSshResult and onosServiceResult and onosCliResult
+ return killResult and cellResult and packageResult and onosUninstallResult and \
+ onosInstallResult and secureSshResult and onosServiceResult and onosCliResult