Retry Hosts call on consistent Map timeouts
Change-Id: I7f2fd9c1973d8543d576eb57473edc7ab1ea8209
diff --git a/TestON/tests/HAkillNodes/HAkillNodes.py b/TestON/tests/HAkillNodes/HAkillNodes.py
index 411857e..4525713 100644
--- a/TestON/tests/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HAkillNodes/HAkillNodes.py
@@ -2178,9 +2178,11 @@
ipResult = main.TRUE
threads = []
for i in main.activeNodes:
- t = main.Thread( target=main.CLIs[i].hosts,
+ t = main.Thread( target=utilities.retry,
name="hosts-" + str( i ),
- args=[ ] )
+ args=[ main.CLIs[i].hosts, [ None ] ],
+ kwargs= { 'sleep': 5, 'attempts': 5,
+ 'randomTime': True } )
threads.append( t )
t.start()
@@ -2321,7 +2323,7 @@
elif i == 28:
deviceId = "2800".zfill(16)
mappings[ macId ] = deviceId
- if hosts[ controller ] and "Error" not in hosts[ controller ]:
+ if hosts[ controller ] is not None and "Error" not in hosts[ controller ]:
if hosts[ controller ] == []:
main.log.warn( "There are no hosts discovered" )
zeroHosts = True