> + OSImageApi osImageApi = api.getOSImageApi(getLocation());
> + Iterable<Offer> offerList = osImageApi.listOffers(publisherName);
> + for (Offer offer : offerList) {
> + Iterable<SKU> skuList = osImageApi.listSKUs(publisherName,
> offer.name());
> + for (SKU sku : skuList) {
> + osImagesRef.add(ImageReference.create(publisherName,
> offer.name(), sku.name(), null));
> + }
> + }
> + }
> +
> + @Override
> + public Iterable<ImageReference> listImages() {
> + final List<ImageReference> osImages = Lists.newArrayList();
> + getImagesFromPublisher("Microsoft.WindowsAzure.Compute", osImages);
> + getImagesFromPublisher("MicrosoftWindowsServer", osImages);
> + getImagesFromPublisher("Canonical", osImages);
It should be better to provide a property with the comma separated values of
publishers. The api metadata should set the default value to these three
elements, but this way we allow users to customize the list of publishers they
want to use, when creating the context.
The same contract for locations applies here. After being transformed by the
transformation function, global images must not have the location set, and
images that only exist in a particular location must inform it.
---
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/267/files/bae5d6dfcdb26e31057db4551c5996836666a31b#r63965264