summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_instance.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-04-13 10:04:47 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-04-13 10:04:47 -0600
commit6c5dc1025d91ccb9119635d86f7d0f1e64280b1e (patch)
tree79e06628c5d26dd94e4236b8d64240367fb699c7 /snaps/openstack/create_instance.py
parentf340c1e7b021fa3a67c295bcec7f09cddfb687cc (diff)
Ensuring each port manipulation test waits for the instance to become active
The problem with OpenStack is that when one attempts to delete an instance that is still spawning, it can take an inordinate amount of time for OpenStack to complete the request resulting in artifacts being left. JIRA: SNAPS-64 Change-Id: I39f33291e650c00a8b5a40cb0051b99b71923acf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r--snaps/openstack/create_instance.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index 793f4c7..12add1a 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -141,7 +141,8 @@ class OpenStackVmInstance:
logger.info('Created instance with name - ' + self.instance_settings.name)
if block:
- self.vm_active(block=True)
+ if not self.vm_active(block=True):
+ raise Exception('Fatal error, VM did not become ACTIVE within the alloted time')
# TODO - the call above should add security groups. The return object shows they exist but the association
# had never been made by OpenStack. This call is here to ensure they have been added