Fix bug, 'or' to 'and'

Change-Id: I120d3d34557f7342f1444568a2a0a3de1de6ef5f
diff --git a/TestON/tests/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HAclusterRestart/HAclusterRestart.py
index 0c3ce16..ed8b2d2 100644
--- a/TestON/tests/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HAclusterRestart/HAclusterRestart.py
@@ -1656,7 +1656,7 @@
                                      onfail="ONOS" + controllerStr +
                                      " links view is incorrect" )
 
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 currentHostsResult = main.Mininet1.compareHosts(
                         mnHosts,
                         hosts[ controller ] )
@@ -2280,8 +2280,7 @@
                                          " links view is correct",
                                          onfail="ONOS" + controllerStr +
                                          " links view is incorrect" )
-
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     currentHostsResult = main.Mininet1.compareHosts(
                             mnHosts,
                             hosts[ controller ] )
@@ -2325,7 +2324,7 @@
                     elif i == 28:
                         deviceId = "2800".zfill(16)
                     mappings[ macId ] = deviceId
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     if hosts[ controller ] == []:
                         main.log.warn( "There are no hosts discovered" )
                         noHosts = True
@@ -2399,7 +2398,7 @@
         consistentHostsResult = main.TRUE
         for controller in range( len( hosts ) ):
             controllerStr = str( controller + 1 )
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 if hosts[ controller ] == hosts[ 0 ]:
                     continue
                 else:  # hosts not consistent
diff --git a/TestON/tests/HAkillNodes/HAkillNodes.py b/TestON/tests/HAkillNodes/HAkillNodes.py
index 5768a2d..411857e 100644
--- a/TestON/tests/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HAkillNodes/HAkillNodes.py
@@ -1681,7 +1681,7 @@
                                      onfail="ONOS" + controllerStr +
                                      " links view is incorrect" )
 
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 currentHostsResult = main.Mininet1.compareHosts(
                         mnHosts,
                         hosts[ controller ] )
@@ -2277,8 +2277,7 @@
                                          " links view is correct",
                                          onfail="ONOS" + controllerStr +
                                          " links view is incorrect" )
-
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     currentHostsResult = main.Mininet1.compareHosts(
                             mnHosts,
                             hosts[ controller ] )
@@ -2322,7 +2321,7 @@
                     elif i == 28:
                         deviceId = "2800".zfill(16)
                     mappings[ macId ] = deviceId
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     if hosts[ controller ] == []:
                         main.log.warn( "There are no hosts discovered" )
                         zeroHosts = True
@@ -2393,7 +2392,7 @@
         consistentHostsResult = main.TRUE
         for controller in range( len( hosts ) ):
             controllerStr = str( main.activeNodes[controller] + 1 )
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 if hosts[ controller ] == hosts[ 0 ]:
                     continue
                 else:  # hosts not consistent
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 5322a9a..1a5bbfe 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -1637,7 +1637,7 @@
                                      onfail="ONOS" + controllerStr +
                                      " links view is incorrect" )
 
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 currentHostsResult = main.Mininet1.compareHosts(
                         mnHosts,
                         hosts[ controller ] )
@@ -2173,8 +2173,7 @@
                                          " links view is correct",
                                          onfail="ONOS" + controllerStr +
                                          " links view is incorrect" )
-
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     currentHostsResult = main.Mininet1.compareHosts(
                             mnHosts,
                             hosts[ controller ] )
@@ -2218,7 +2217,7 @@
                     elif i == 28:
                         deviceId = "2800".zfill(16)
                     mappings[ macId ] = deviceId
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     if hosts[ controller ] == []:
                         main.log.warn( "There are no hosts discovered" )
                         zeroHosts = True
@@ -2290,7 +2289,7 @@
         consistentHostsResult = main.TRUE
         for controller in range( len( hosts ) ):
             controllerStr = str( controller + 1 )
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 if hosts[ controller ] == hosts[ 0 ]:
                     continue
                 else:  # hosts not consistent
diff --git a/TestON/tests/HAstopNodes/HAstopNodes.py b/TestON/tests/HAstopNodes/HAstopNodes.py
index 84e7d9c..cb5032b 100644
--- a/TestON/tests/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HAstopNodes/HAstopNodes.py
@@ -1670,7 +1670,7 @@
                                      onfail="ONOS" + controllerStr +
                                      " links view is incorrect" )
 
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 currentHostsResult = main.Mininet1.compareHosts(
                         mnHosts,
                         hosts[ controller ] )
@@ -2266,8 +2266,7 @@
                                          " links view is correct",
                                          onfail="ONOS" + controllerStr +
                                          " links view is incorrect" )
-
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     currentHostsResult = main.Mininet1.compareHosts(
                             mnHosts,
                             hosts[ controller ] )
@@ -2311,7 +2310,7 @@
                     elif i == 28:
                         deviceId = "2800".zfill(16)
                     mappings[ macId ] = deviceId
-                if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     if hosts[ controller ] == []:
                         main.log.warn( "There are no hosts discovered" )
                         zeroHosts = True
@@ -2382,7 +2381,7 @@
         consistentHostsResult = main.TRUE
         for controller in range( len( hosts ) ):
             controllerStr = str( main.activeNodes[controller] + 1 )
-            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+            if hosts[ controller ] and "Error" not in hosts[ controller ]:
                 if hosts[ controller ] == hosts[ 0 ]:
                     continue
                 else:  # hosts not consistent