> +      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;
> +   }
> +
> +}

That class lives in the main jclouds repo so you'll have to submit a different 
PR. I'm OK to changing the visibility of those methods and make the build 
method easier to override.

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

Reply via email to