> +      logger.info("Image %s not found in the image cache. Trying to get it 
> from the provider...", imageId);
> +      // Note that this will generate make a call to the provider instead of 
> using a cache, but
> +      // this will be executed rarely, only when an image is not present in 
> the image list but
> +      // it actually exists in the provider. It shouldn't be an expensive 
> call so using a cache just for
> +      // this corner case is overkill.
> +      Image imageFromProvider = getImageStrategy.getImage(imageId);
> +      if (imageFromProvider == null) {
> +         throwNoSuchElementExceptionAfterLoggingImageIds(format("%s not 
> found", idPredicate), images);
> +      }
> +      // Register the just found image in the image cache, so subsequent 
> uses of the TemplateBuilder and
> +      // the ComptueService find it.
> +      this.images.registerImage(imageFromProvider);
> +      return imageFromProvider;
> +   }
> +
> +}

Could you explain a bit what the implementation tries to do, and why the 
default TemplateBuilder does not work for this provider?
There is many sensible code that is just copied from the parent class. If 
needed, we'd better change the visibility of those methods to avoid code 
duplication.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72/files#r17229198

Reply via email to