You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Jeremy Daggett <no...@github.com> on 2014/06/24 21:20:22 UTC

[jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

This PR adds the Rackspace Auto Scale UK provider and updates the US supported regions.

JIRA: https://issues.apache.org/jira/browse/JCLOUDS-614

Live tests have been run against both US and UK providers.
You can merge this Pull Request by running:

  git pull https://github.com/rackerlabs/jclouds-labs-openstack autoscale-region-update

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs-openstack/pull/112

-- Commit Summary --

  * Add Rackspace Auto Scale UK provider and update US regions
  * Removed version from package name in Rackspace Auto Scale US provider
  * Updated failing live tests due to invalid serverImageRef
  * Updated Auto Scale poms

-- File Changes --

    M pom.xml (1)
    A rackspace-autoscale-uk/README.md (7)
    A rackspace-autoscale-uk/pom.xml (159)
    A rackspace-autoscale-uk/src/main/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadata.java (116)
    A rackspace-autoscale-uk/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata (18)
    A rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadataExpectTest.java (62)
    A rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderTest.java (32)
    A rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKGroupApiLiveTest.java (30)
    A rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKScalingPolicyApiLiveTest.java (30)
    A rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKWebhookApiLiveTest.java (30)
    A rackspace-autoscale-uk/src/test/resources/access_rax_uk.json (140)
    A rackspace-autoscale-uk/src/test/resources/logback.xml (69)
    M rackspace-autoscale-us/pom.xml (4)
    R rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/AutoscaleUSProviderMetadata.java (40)
    M rackspace-autoscale-us/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata (2)
    R rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/AutoscaleUSProviderMetadataExpectTest.java (5)
    R rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/AutoscaleUSProviderTest.java (3)
    R rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/features/AutoscaleUSGroupApiLiveTest.java (2)
    R rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/features/AutoscaleUSScalingPolicyApiLiveTest.java (2)
    R rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/features/AutoscaleUSWebhookApiLiveTest.java (2)
    M rackspace-autoscale-us/src/test/resources/access_rax_us.json (29)
    M rackspace-autoscale/pom.xml (2)
    M rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/GroupApiLiveTest.java (10)
    M rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/ScalingPolicyApiLiveTest.java (2)
    M rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/WebhookApiLiveTest.java (2)

-- Patch Links --

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

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Everett Toews <no...@github.com>.
How about taking this opportunity to create a `org.jclouds.rackspace.autoscale.us.AutoscaleUSProviderMetadata` and deprecating `org.jclouds.rackspace.autoscale.us.v1.AutoscaleUSProviderMetadata` with the deprecation comment saying it will be removed in 2.0 and pointing to the versionless AutoscaleUSProviderMetadata as the replacement?

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1388](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1388/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Andrew Phillips <no...@github.com>.
Just a couple of minor [Checkstyle violations](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/291/org.apache.jclouds.labs$rackspace-autoscale-us/violations/), otherwise looks good to me.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
Pushed to master 16367dd

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #311](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/311/) SUCCESS
This pull request looks good

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1407](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1407/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
@nacx Thanks, it totally makes sense to me now!

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
> +            }
> +        ],
> +        "user": {
> +            "id": "378",
> +            "roles": [
> +                {
> +                    "id": "3",
> +                    "description": "User Admin Role.",
> +                    "name": "identity:user-admin"
> +                }
> +            ],
> +            "name": "jclouds",
> +            "RAX-AUTH:defaultRegion": ""
> +        }
> +    }
> +}

I use this wonderful online tool: http://jsonlint.org

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Ignasi Barrera <no...@github.com>.
In environments where the ServiceLoader might be different (I recall issues with this on Android), users might want to directly pass a metadata instance to the ContextBuilder to avoid the ServiceLoader lookup.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Everett Toews <no...@github.com>.
Sounds like a backwards incompatible change to me. :(

Let's leave the others as is for the moment. We have actually had any reports of confusion yet. ;)

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Chris Custine <no...@github.com>.
+1 Looks good.  I do agree that metadata probably doesn't need to be versioned so I think that is a good future opportunity.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #313](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/313/) SUCCESS
This pull request looks good

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
> +import static org.testng.Assert.assertEquals;
> +
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.http.HttpResponse;
> +import org.jclouds.rackspace.autoscale.v1.AutoscaleApi;
> +import org.jclouds.rackspace.autoscale.v1.internal.BaseAutoscaleApiExpectTest;
> +import org.testng.annotations.Test;
> +
> +import com.google.common.collect.ImmutableSet;
> +
> +/**
> + * This test ensures that the wiring in {@link AutoscaleUKProviderMetadata} is correct.
> + * 
> + */
> +@Test(groups = "unit", testName = "AutoscaleUKProviderMetadataExpectTest")
> +public class AutoscaleUKProviderMetadataExpectTest extends BaseAutoscaleApiExpectTest {

Yes, because the API itself and US provider use them today. We will eventually move all of the tests to use MWS.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
@everett-toews When you have a min, can you please take a look at commit `d7f71c2`?  Help me understand how you consider this a backwards incompatible change. Thx!

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #302](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/302/) FAILURE
Looks like there's a problem with this pull request

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
Closed #112.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Everett Toews <no...@github.com>.
Hmmmm...thinking about it a bit more...

Most of the time users refer to the provider by id. e.g. "rackspace-cloudfiles-uk" which doesn't have any version info in it. 

If we were to version the provider package, that would imply that we're going to create a AutoscaleUKProviderMetadata with v2 in its package hierarchy at some point in the future. But then what would the id be for that? "rackspace-cloudfiles-uk-v2" Yuck.

The API version is handled as part of the metadata so it probably doesn't belong in the package hierarchy. Does that make sense? WDYT?

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Andrew Phillips <no...@github.com>.
> +import static org.testng.Assert.assertEquals;
> +
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.http.HttpResponse;
> +import org.jclouds.rackspace.autoscale.v1.AutoscaleApi;
> +import org.jclouds.rackspace.autoscale.v1.internal.BaseAutoscaleApiExpectTest;
> +import org.testng.annotations.Test;
> +
> +import com.google.common.collect.ImmutableSet;
> +
> +/**
> + * This test ensures that the wiring in {@link AutoscaleUKProviderMetadata} is correct.
> + * 
> + */
> +@Test(groups = "unit", testName = "AutoscaleUKProviderMetadataExpectTest")
> +public class AutoscaleUKProviderMetadataExpectTest extends BaseAutoscaleApiExpectTest {

[minor] Still doing expect tests here?

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Everett Toews <no...@github.com>.
You're changing the package name. Anyone importing the existing package in their code would be broken by this change.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1361](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1361/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #291](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/291/) SUCCESS
This pull request looks good

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1414](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1414/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Everett Toews <no...@github.com>.
What's the rationale for removing v1 from the providers when the api still has it?

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Andrew Phillips <no...@github.com>.
> +            }
> +        ],
> +        "user": {
> +            "id": "378",
> +            "roles": [
> +                {
> +                    "id": "3",
> +                    "description": "User Admin Role.",
> +                    "name": "identity:user-admin"
> +                }
> +            ],
> +            "name": "jclouds",
> +            "RAX-AUTH:defaultRegion": ""
> +        }
> +    }
> +}

[minor] What formatting are we using for JSON now?

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #305](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/305/) SUCCESS
This pull request looks good

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
Yeah, exactly! Users don't care (nor should they care) about the *version* of a particular provider. 

We should pull version references from the `ProviderMetadata` and only have them in `ApiMetadata` package names.

Additionally, we ran into this recently in supporting multiple versions of the Glance API in a single provider. The service loader file for Glance now has two entries:
```
org.jclouds.openstack.glance.v2.GlanceApiMetadata
org.jclouds.openstack.glance.v1_0.GlanceApiMetadata
```
As you say, if the provider references a version in its package name, (to me) it implies that there might be yet *another* version at some point in time. That could lead to unnecessary confusion.

I would need to submit another PR to make the other providers consistent with this rationale. Sound good?


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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
@everett-toews The rationale was that the majority of the Rackspace providers, with the exception of Cloud Big Data US, use a version in their package names. `APIMetadata` does indeed have a version in them, but `ProviderMetadata` does not. That said, maybe we should version all of the provider metadata? WDYT?

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
Hmm, I can't understand how/why anyone would ever import or instantiate this class directly. AutoscaleUSProviderMetadata is an internal class and only used by the Service Loader (and expect tests). ??

I reverted the commit that changed the package name and we can change it in a future release.

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

Posted by Jeremy Daggett <no...@github.com>.
@everett-toews Please take a look at a9a4905 ! If that looks good I will rebase/squash/push to master. I don't believe this needs to backported to 1.7.x

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

Re: [jclouds-labs-openstack] Rackspace Auto Scale Provider Update (#112)

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

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