You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ignasi Barrera <no...@github.com> on 2015/06/29 17:24:19 UTC

[jclouds-labs] JCLOUDS-946: Properly scope images to the locations where they are available (#183)

https://issues.apache.org/jira/browse/JCLOUDS-946

This changes how images are returned by the compute service. Since there are images that are only available in certain regions, and the mapping between an image and a location in jclouds is a one to one, we have to return one image for each location where it is available.

This PR does exactly this, and encodes the region in the image id, as done in other providers such as AWS or OpenStack.

/cc @ccustine 
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/183

-- Commit Summary --

  * JCLOUDS-946: Properly scope images to the locations where they are available

-- File Changes --

    M .gitignore (3)
    M digitalocean2/pom.xml (2)
    M digitalocean2/src/main/java/org/jclouds/digitalocean2/DigitalOcean2ApiMetadata.java (2)
    M digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/DigitalOcean2ComputeServiceAdapter.java (47)
    M digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/config/DigitalOcean2ComputeServiceContextModule.java (15)
    M digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/extensions/DigitalOcean2ImageExtension.java (8)
    M digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/functions/DropletToNodeMetadata.java (25)
    A digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/functions/ImageInRegionToImage.java (92)
    D digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/functions/ImageToImage.java (65)
    A digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/internal/ImageInRegion.java (54)
    D digitalocean2/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (18)
    M digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/DigitalOcean2TemplateBuilderLiveTest.java (2)
    M digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/functions/DropletToNodeMetadataTest.java (4)
    R digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/functions/ImageInRegionToImageTest.java (49)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/183.patch
https://github.com/jclouds/jclouds-labs/pull/183.diff

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

Re: [jclouds-labs] JCLOUDS-946: Properly scope images to the locations where they are available (#183)

Posted by Ignasi Barrera <no...@github.com>.
Yay! Note that v1 is also affected but I won't apply this change there as the change in the image id can break existing code (for example the Jenkins plugin). This is something that can be expected when migrating from v1 to v2.

Thanks for the feedback @ccustine!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/183#issuecomment-117339528

Re: [jclouds-labs] JCLOUDS-946: Properly scope images to the locations where they are available (#183)

Posted by Ignasi Barrera <no...@github.com>.
Closed #183.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/183#event-344707120

Re: [jclouds-labs] JCLOUDS-946: Properly scope images to the locations where they are available (#183)

Posted by Chris Custine <no...@github.com>.
:+1: Tests run fine for me in several regions and the change looks good.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/183#issuecomment-117297454

Re: [jclouds-labs] JCLOUDS-946: Properly scope images to the locations where they are available (#183)

Posted by Ignasi Barrera <no...@github.com>.
Squashed, rebased, and pushed to master as [c001f260](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/c001f260).

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/183#issuecomment-117344560