Print a warning to inform the caller that we cannot delete
images that are protected.
Change-Id: I236f6f55964f483016500b58cbeb48fd8665b62b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
def _remove_images_from_cloud(images, cloud):
print('Removing {} images from {}.'.format(len(images), cloud.cloud_config.name))
for image in images:
+ if image.is_protected:
+ print('WARNING: Image {} is protected. Cannot remove...'.format(image.name))
+ continue
+
try:
result = cloud.delete_image(image.name)
except shade.exc.OpenStackCloudException as e: