Merge pull request #571 from openstack-charmers/lourot/traces-downloading-imgs

Add more logging around downloading/caching test images
This commit is contained in:
David Ames
2021-05-10 08:47:27 -07:00
committed by GitHub
+4
View File
@@ -2478,7 +2478,11 @@ def create_image(glance, image_url, image_name, image_cache_dir=None, tags=[],
local_path = os.path.join(image_cache_dir, img_name)
if not os.path.exists(local_path):
logging.info('Downloading {} ...'.format(image_url))
download_image(image_url, local_path)
else:
logging.info('Cached image found at {} - Skipping download'.format(
local_path))
image = upload_image_to_glance(
glance, local_path, image_name, backend=backend,