aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Kosonen <juha.kosonen@nokia.com>2018-01-31 07:05:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-31 07:05:01 +0000
commit41d7f56276e1bb6c5b25695857bcd3ac2408b2ec (patch)
treee0956d7e4bbfbddfe4ae0349df8852558057e95c
parent8296b68bbb2e6da34676af2c1e81e264c626296c (diff)
parent049d8ffac11de402ab7db3e96609faada13c2902 (diff)
Merge "proper instance status handling"
-rw-r--r--functest/utils/openstack_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index 1d7cdafb9..655ca464f 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -519,7 +519,10 @@ def create_instance_and_wait_for_active(flavor_name,
count = VM_BOOT_TIMEOUT / SLEEP
for n in range(count, -1, -1):
status = get_instance_status(nova_client, instance)
- if status.lower() == "active":
+ if status is None:
+ time.sleep(SLEEP)
+ continue
+ elif status.lower() == "active":
return instance
elif status.lower() == "error":
logger.error("The instance %s went to ERROR status."