Update Cluster Driver

Change-Id: I8a3a57e19637ff210548e57d41178e6f194cf694
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.py b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
index b2ae8c5..e81dda9 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
@@ -80,28 +80,22 @@
             main.exit()
         main.testSetUp.envSetupDescription()
         try:
-            from dependencies.Cluster import Cluster
             from tests.HA.dependencies.HA import HA
             main.HA = HA()
-            main.Cluster = Cluster( main.ONOScell.nodes )
             cellName = main.params[ 'ENV' ][ 'cellName' ]
             main.apps = main.params[ 'ENV' ][ 'appString' ]
-            stepResult = main.testSetUp.envSetup( main.Cluster, hasNode=True )
+            stepResult = main.testSetUp.envSetup()
         except Exception as e:
             main.testSetUp.envSetupException( e )
         main.testSetUp.evnSetupConclusion( stepResult )
         main.HA.generateGraph( "HAkillNodes" )
 
         main.step( "Make sure ONOS service doesn't automatically respawn" )
-        handle = main.Cluster.controllers[0].Bench.handle
-        handle.sendline( "sed -i -e 's/^respawn$/#respawn/g' tools/package/init/onos.conf" )
-        handle.expect( "\$" )  # $ from the command
-        handle.sendline( "sed -i -e 's/^Restart=always/Restart=no/g' tools/package/init/onos.service" )
-        handle.expect( "\$" )  # $ from the command
-        handle.expect( "\$" )  # $ from the prompt
+        main.ONOSbench.preventAutoRespawn()
 
         main.testSetUp.ONOSSetUp( main.Mininet1, main.Cluster, cellName=cellName, removeLog=True,
-                                 extraApply=main.HA.customizeOnosGenPartitions,
+                                 extraApply=[ main.HA.startingMininet,
+                                              main.HA.customizeOnosGenPartitions ],
                                  extraClean=main.HA.cleanUpGenPartition )
 
         main.HA.initialSetUp()
@@ -140,7 +134,6 @@
         """
         The Failure case.
         """
-        assert main.numCtrls, "main.numCtrls not defined"
         assert main, "main not defined"
         assert utilities.assert_equals, "utilities.assert_equals not defined"
         main.case( "Kill minority of ONOS nodes" )
@@ -150,11 +143,11 @@
             main.log.debug( "Checking logs for errors on " + ctrl.name + ":" )
             main.log.warn( ctrl.checkLogs( ctrl.ipAddress ) )
 
-        n = len( main.Cluster.controllers )  # Number of nodes
+        n = len( main.Cluster.runningNodes )  # Number of nodes
         p = ( ( n + 1 ) / 2 ) + 1  # Number of partitions
-        main.kill = [ main.Cluster.controllers[ 0 ] ]  # ONOS node to kill, listed by index in main.nodes
+        main.kill = [ main.Cluster.runningNodes[ 0 ] ]  # ONOS node to kill, listed by index in main.nodes
         if n > 3:
-            main.kill.append( main.Cluster.controllers[ p - 1 ] )
+            main.kill.append( main.Cluster.runningNodes[ p - 1 ] )
             # NOTE: This only works for cluster sizes of 3,5, or 7.
 
         main.step( "Killing nodes: " + str( main.kill ) )
@@ -202,7 +195,7 @@
         except AttributeError:
             main.kill = []
 
-        main.HA.checkStateAfterONOS( main, afterWhich=0 )
+        main.HA.checkStateAfterEvent( main, afterWhich=0 )
         main.step( "Leadership Election is still functional" )
         # Test of LeadershipElection
         leaderList = []