Merge "Stop hardcoding results suffix in push_to_db"
[functest.git] / functest / utils / openstack_tacker.py
index 07acc8b..8327fdb 100644 (file)
@@ -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"