Don't try to use nodes not active

Change-Id: I6febbaf317096cc206a2cec36f1f5d4279d54cea
diff --git a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
index c229b03..6bb32e2 100644
--- a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
@@ -261,7 +261,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
@@ -1853,7 +1854,8 @@
 
         for i in range( 10 ):
             ready = True
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 output = cli.summary()
                 if not output:
                     ready = False
@@ -1874,7 +1876,8 @@
 
         # Rerun for election on restarted nodes
         runResults = main.TRUE
-        for cli in main.CLIs:
+        for i in main.activeNodes:
+            cli = main.CLIs[i]
             run = cli.electionTestRun()
             if run != main.TRUE:
                 main.log.error( "Error running for election on " + cli.name )
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
index dd1e1fb..6eb81d9 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
@@ -286,7 +286,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.py b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
index 52a242c..62062fc 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
@@ -297,7 +297,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
diff --git a/TestON/tests/HA/HAsanity/HAsanity.py b/TestON/tests/HA/HAsanity/HAsanity.py
index 3c77dd0..13b4084 100644
--- a/TestON/tests/HA/HAsanity/HAsanity.py
+++ b/TestON/tests/HA/HAsanity/HAsanity.py
@@ -262,7 +262,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
diff --git a/TestON/tests/HA/HAscaling/HAscaling.py b/TestON/tests/HA/HAscaling/HAscaling.py
index 8cf1026..3ecbe4c 100644
--- a/TestON/tests/HA/HAscaling/HAscaling.py
+++ b/TestON/tests/HA/HAscaling/HAscaling.py
@@ -319,7 +319,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
diff --git a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index 25aa0ba..1adb53c 100644
--- a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -251,7 +251,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )
diff --git a/TestON/tests/HA/HAstopNodes/HAstopNodes.py b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
index 240c9c4..f329fd8 100644
--- a/TestON/tests/HA/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
@@ -286,7 +286,8 @@
                                  onfail="Nodes check NOT successful" )
 
         if not nodeResults:
-            for cli in main.CLIs:
+            for i in main.activeNodes:
+                cli = main.CLIs[i]
                 main.log.debug( "{} components not ACTIVE: \n{}".format(
                     cli.name,
                     cli.sendline( "scr:list | grep -v ACTIVE" ) ) )