aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCiprian Barbu <ciprian.barbu@enea.com>2016-04-14 15:06:58 +0300
committerCiprian Barbu <ciprian.barbu@enea.com>2016-05-12 18:06:20 +0300
commit4d065848c57a7b758f437092cdbdec0ca47e0202 (patch)
tree67898c8fd6842936e3393143dd0d3c7c711a66fe
parentf3260e19665572169e78587c242e9c0f4bcf9b9d (diff)
Allow rally to use existing glance image
This allows to use a prebuilt glance image without deleting it after the test. For ARM platforms this is especially helpful because the test image is three-part and can be created before running any tests. Change-Id: Ia79f519d10fc9155ab2fb44a3e427ae3bb1ce399 Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
index 2176c25c2..6b2908b37 100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
@@ -419,6 +419,7 @@ def main():
logger.debug("Using existing volume type(s)...")
image_id = functest_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
+ image_exists = False
if image_id == '':
logger.debug("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
@@ -435,6 +436,7 @@ def main():
else:
logger.debug("Using existing image '%s' with ID '%s'..." \
% (GLANCE_IMAGE_NAME, image_id))
+ image_exists = True
if args.test_name == "all":
for test_name in tests:
@@ -502,10 +504,11 @@ def main():
if args.noclean:
exit(0)
- logger.debug("Deleting image '%s' with ID '%s'..." \
- % (GLANCE_IMAGE_NAME, image_id))
- if not functest_utils.delete_glance_image(nova_client, image_id):
- logger.error("Error deleting the glance image")
+ if not image_exists:
+ logger.debug("Deleting image '%s' with ID '%s'..." \
+ % (GLANCE_IMAGE_NAME, image_id))
+ if not functest_utils.delete_glance_image(nova_client, image_id):
+ logger.error("Error deleting the glance image")
if not volume_types:
logger.debug("Deleting volume type '%s'..." \