aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-23 10:04:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-23 10:04:21 +0000
commita7bae3c764e1a1f006cc7670ad455091e30d7a5c (patch)
tree4dfb9bcf78701c14101f4a917cf7951f510bb8ec
parent03208634b25e61faebaa34e932e282a8f26c0ea4 (diff)
parentf4691faa65c542654d776aeb0614d35c41ab42fd (diff)
Merge "[odl-sfc] Fix wait_for_vnf returning vnf_id on timeout"
-rw-r--r--functest/utils/openstack_tacker.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/functest/utils/openstack_tacker.py b/functest/utils/openstack_tacker.py
index 07acc8b3a..8327fdbe2 100644
--- a/functest/utils/openstack_tacker.py
+++ b/functest/utils/openstack_tacker.py
@@ -176,6 +176,11 @@ def wait_for_vnf(tacker_client, vnf_id=None, vnf_name=None, timeout=60):
elif vnf['status'] == 'PENDING_CREATE':
time.sleep(3)
timeout -= 3
+ vnf = get_vnf(tacker_client, vnf_id, vnf_name)
+
+ if (timeout < 0):
+ raise Exception('Timeout when booting vnf %s' % vnf['id'])
+
return vnf['id']
except Exception, e:
logger.error("error [wait_for_vnf(tacker_client, '%s', '%s')]: %s"