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/03/23 17:58:48 UTC

[jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Fixes the volume extension namespace in the HPCloud Compute provider.
This PR also adds a custom method to make it easier to override the default OpenStack namespaces without having to copy/paste the entire Guice module, and allows to configure the Cinder version in the tests (which could be different than the provider's compute version, for example).

/cc @zack-shoylev @ccustine @everett-toews

While fixing this I've noticed that the RAX UK provider was not updated with the volume attachment fixes. Should that be done?
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/711

-- Commit Summary --

  * Fixed VolumeAttachment in HPCloud Compute

-- File Changes --

    M apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/config/NovaHttpApiModule.java (8)
    M apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java (5)
    M providers/hpcloud-compute/pom.xml (6)
    M providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/HPCloudComputeProviderMetadata.java (6)
    A providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/config/HPCloudComputeHttpApiModule.java (49)
    A providers/hpcloud-compute/src/test/java/org/jclouds/hpcloud/compute/extensions/HPCloudComputeVolumeAttachmentExtensionLiveTest.java (45)
    M providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/config/CloudServersUSHttpApiModule.java (111)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/711.patch
https://github.com/jclouds/jclouds/pull/711.diff

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Zack Shoylev <no...@github.com>.
Seems to work with both UK and US Rackspace providers!

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
Jenkins, rebuild please

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Zack Shoylev <no...@github.com>.
> @@ -91,17 +91,16 @@ protected void configure() {
>        }
>     }
>  
> +   // Allow providers to cleanly contribute their own aliases

Maybe add some more info about the mechanics of it.

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -91,17 +91,16 @@ protected void configure() {
>        }
>     }
>  
> +   // Allow providers to cleanly contribute their own aliases

The [MapBinder](http://google.github.io/guice/api-docs/latest/javadoc/index.html?com/google/inject/multibindings/MapBinder.html) javadoc already has the detailed documentation of how it works and several examples. Replicating it here seems unnecessary. The object returned by this method already has the docs describing its usage.

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
Hey jenkins, rebuild please

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
Once this is in, [this commit](https://github.com/nacx/jclouds-labs-openstack/commit/8b252a4f3487a5533ace98da14f76c8e799810ad) will need to be cherry-picked in jclouds-labs-openstack to align Neutron with the changes in this PR. /cc @zack-shoylev 

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Everett Toews <no...@github.com>.
:+1: 

Success on OpenStack Juno (with DevStack)

    mvn clean test -Plive -Dtest.openstack-nova.endpoint=http://$DEVSTACK_HOST:5000/v2.0/ -Dtest.openstack-nova.identity=demo:demo -Dtest.openstack-nova.credential=devstack -Dtest.openstack-nova.image-id=$IMAGE_ID -Dtest.openstack-nova.flavor-id=2 -Dtest=VolumeAttachmentApiLiveTest

Success on Rackspace

    mvn clean test -Plive -Dtest.rackspace-cloudservers-us.identity=$RACKSPACE_USERNAME -Dtest.rackspace-cloudservers-us.credential=$RACKSPACE_API_KEY -Dtest.rackspace-cloudservers-us.image-id=$IMAGE_ID -Dtest.rackspace-cloudservers-us.flavor-id=performance1-1 -Dtest.rackspace-cloudservers-us.region=IAD -Dtest.rackspace-cloudservers-us.volume-size-gb=100 -Dtest=CloudServersUSVolumeAttachmentExtensionLiveTest


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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
Pushed to master as [4db2b75a](https://git1-us-west.apache.org/repos/asf?p=jclouds.git;a=commit;h=4db2b75a).

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
Also note that the bindings configured in the providers are *added* to the aliases map; they don't override the existing keys, but that should be aligned with the current behavior, that already expects more than one namespace URI for a given extension type (see [here](https://github.com/jclouds/jclouds/blob/master/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/functions/PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.java#L63-L69) and [here](https://github.com/jclouds/jclouds/blob/master/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/predicates/ExtensionPredicates.java#L88)).

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Zack Shoylev <no...@github.com>.
> @@ -62,7 +62,7 @@ protected void configure() {
>     @Provides
>     @Singleton
>     public Multimap<URI, URI> aliases() {
> -       return ImmutableMultimap.<URI, URI>builder()
> +       return customAliases(ImmutableMultimap.<URI, URI>builder()

Good approach. It works for both the HP and rackspace providers. Thanks @nacx !

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
Thanks for helping with the testing @zack-shoylev, @everett-toews!

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

Re: [jclouds] Fixed VolumeAttachment in HPCloud Compute (#711)

Posted by Ignasi Barrera <no...@github.com>.
The last change completely refactors how the extension namespace aliases are configured. Now aliases are configured using Guice multibindings to allow providers to contribute their own aliases in a clean way.

This also fixes the HPCloud volume attachment configuration and adds the corresponding live test, configures the Rackspace US provider accordingly, and supercedes https://github.com/jclouds/jclouds/pull/712.

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