Fix timeout in vPing when booting a VM 13/5213/2
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 24 Dec 2015 17:16:26 +0000 (18:16 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 24 Dec 2015 17:19:04 +0000 (18:19 +0100)
Change-Id: I9ee487dd5e142d2e92a92b0ba4ccc80b1a4cd063
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
testcases/vPing/CI/libraries/vPing.py

index cc52f5a..d9ceb2f 100644 (file)
@@ -121,9 +121,12 @@ def waitVmActive(nova, vm):
         logger.debug("Status: %s" % status)
         if status == "ACTIVE":
             return True
-        if status == "ERROR" or count == 0:
+        if status == "ERROR" or status == "error":
             return False
-            count -= 1
+        if count == 0:
+            logger.debug("Booting a VM timed out...")
+            return False
+        count -= 1
         time.sleep(sleep_time)
     return False