>           throw new IllegalStateException(illegalStateExceptionMessage);
>        }
>     }
>  
>     @Override
>     public boolean deleteImage(String id) {
> +
> +      VMImage image = VMImageToImage.decodeFieldsFromUniqueId(id);
> +      if (image.custom()) {
> +         StorageServiceKeys keys = 
> api.getStorageAccountApi(image.group()).getKeys(image.storage());
> +
> +         // This removes now all the images in this storage. At least in 
> theory, there should be just one and if there is
> +         // more, they should be copies of each other.
> +         BlobHelper.deleteContainerIfExists(image.storage(), keys.key1(), 
> "system");
> +         if (BlobHelper.customImageExists(image.storage(), keys.key1())) {
> +            return false;
> +         }
> +         return true;

[minor] Just `return !BlobHelper.customImageExists(image.storage(), 
keys.key1());`

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/305/files/cfe9f0b3aaebedf1e91a8934cab0d7f930974f63#r73664001

Reply via email to