JCLOUDS-614: Add Rackspace Auto Scale UK provider and update US regions
diff --git a/pom.xml b/pom.xml
index fe545b0..92a85ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,6 +58,7 @@
<module>openstack-swift</module>
<module>openstack-marconi</module>
<module>rackspace-autoscale</module>
+ <module>rackspace-autoscale-uk</module>
<module>rackspace-autoscale-us</module>
<module>rackspace-cloudqueues-us</module>
<module>rackspace-cloudqueues-uk</module>
diff --git a/rackspace-autoscale-uk/README.md b/rackspace-autoscale-uk/README.md
new file mode 100644
index 0000000..8ecea5b
--- /dev/null
+++ b/rackspace-autoscale-uk/README.md
@@ -0,0 +1,7 @@
+Rackspace Cloud Auto Scale UK
+=============================
+
+The Rackspace Auto Scale UK Service
+
+Production ready?
+No
diff --git a/rackspace-autoscale-uk/pom.xml b/rackspace-autoscale-uk/pom.xml
new file mode 100644
index 0000000..4d2014b
--- /dev/null
+++ b/rackspace-autoscale-uk/pom.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.jclouds</groupId>
+ <artifactId>jclouds-project</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- TODO: when out of labs, switch to org.jclouds.api -->
+
+ <groupId>org.apache.jclouds.labs</groupId>
+ <artifactId>rackspace-autoscale-uk</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <name>jclouds Rackspace Auto Scale UK Provider</name>
+ <description>jclouds components to access Rackspace Auto Scale UK</description>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <!-- keystone endpoint -->
+ <test.rackspace-autoscale.endpoint>http://localhost:5000/v2.0/</test.rackspace-autoscale.endpoint>
+ <!-- keystone version -->
+ <test.rackspace-autoscale.api-version>2.0</test.rackspace-autoscale.api-version>
+ <test.rackspace-autoscale.build-version />
+ <test.rackspace-autoscale.identity>FIXME_IDENTITY</test.rackspace-autoscale.identity>
+ <test.rackspace-autoscale.credential>FIXME_CREDENTIALS</test.rackspace-autoscale.credential>
+ <test.jclouds.keystone.credential-type>passwordCredentials</test.jclouds.keystone.credential-type>
+
+ <jclouds.osgi.export>org.jclouds.rackspace.autoscale.uk*;version="${project.version}"</jclouds.osgi.export>
+ <jclouds.osgi.import>
+ org.jclouds.rest.internal;version="${jclouds.version}",
+ org.jclouds.labs*;version="${project.version}",
+ org.jclouds*;version="${jclouds.version}",
+ *
+ </jclouds.osgi.import>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>apache-snapshots</id>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.jclouds.labs</groupId>
+ <artifactId>rackspace-autoscale</artifactId>
+ <version>${project.parent.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds.labs</groupId>
+ <artifactId>rackspace-autoscale</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds.api</groupId>
+ <artifactId>openstack-keystone</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds.api</groupId>
+ <artifactId>openstack-keystone</artifactId>
+ <version>${project.parent.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds</groupId>
+ <artifactId>jclouds-core</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds</groupId>
+ <artifactId>jclouds-core</artifactId>
+ <version>${project.parent.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds.driver</groupId>
+ <artifactId>jclouds-slf4j</artifactId>
+ <version>${project.parent.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jclouds.api</groupId>
+ <artifactId>rackspace-cloudidentity</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>live</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>integration</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <forkCount>5</forkCount>
+ <reuseForks>true</reuseForks>
+ <parallel>classes</parallel>
+ <systemPropertyVariables>
+ <test.rackspace-autoscale.endpoint>${test.rackspace-autoscale-uk.endpoint}</test.rackspace-autoscale.endpoint>
+ <test.rackspace-autoscale.api-version>${test.rackspace-autoscale-uk.api-version}</test.rackspace-autoscale.api-version>
+ <test.rackspace-autoscale.build-version>${test.rackspace-autoscale-uk.build-version}</test.rackspace-autoscale.build-version>
+ <test.rackspace-autoscale.identity>${test.rackspace-autoscale-uk.identity}</test.rackspace-autoscale.identity>
+ <test.rackspace-autoscale.credential>${test.rackspace-autoscale-uk.credential}</test.rackspace-autoscale.credential>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/rackspace-autoscale-uk/src/main/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadata.java b/rackspace-autoscale-uk/src/main/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadata.java
new file mode 100644
index 0000000..710edfe
--- /dev/null
+++ b/rackspace-autoscale-uk/src/main/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadata.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.uk;
+
+import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
+import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONE;
+import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONES;
+import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
+import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
+
+import java.net.URI;
+import java.util.Properties;
+
+import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
+import org.jclouds.providers.ProviderMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadata;
+import org.jclouds.rackspace.autoscale.v1.AutoscaleApiMetadata;
+import org.jclouds.rackspace.autoscale.v1.config.AutoscaleHttpApiModule;
+import org.jclouds.rackspace.autoscale.v1.config.AutoscaleParserModule;
+import org.jclouds.rackspace.cloudidentity.v2_0.ServiceType;
+import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticationApiModule;
+import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticationModule;
+import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.inject.Module;
+
+/**
+ * Implementation of {@link ProviderMetadata} for the Rackspace UK Auto Scale API.
+ */
+public class AutoscaleUKProviderMetadata extends BaseProviderMetadata {
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return builder().fromProviderMetadata(this);
+ }
+
+ public AutoscaleUKProviderMetadata() {
+ super(builder());
+ }
+
+ public AutoscaleUKProviderMetadata(Builder builder) {
+ super(builder);
+ }
+
+ public static Properties defaultProperties() {
+ Properties properties = new Properties();
+ properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
+ properties.setProperty(SERVICE_TYPE, ServiceType.AUTO_SCALE);
+
+ properties.setProperty(PROPERTY_ZONES, "LON");
+ properties.setProperty(PROPERTY_ZONE + ".LON." + ISO3166_CODES, "GB-SLG");
+ return properties;
+ }
+
+ public static class Builder extends BaseProviderMetadata.Builder {
+
+ protected Builder(){
+ id("rackspace-autoscale-uk")
+ .name("Rackspace Auto Scale UK")
+ .apiMetadata(new AutoscaleApiMetadata().toBuilder()
+ .identityName("${userName}")
+ .credentialName("${apiKey}")
+ .defaultEndpoint("https://lon.identity.api.rackspacecloud.com/v2.0/")
+ .endpointName("Rackspace Cloud Identity service URL ending in /v2.0/")
+ .documentation(URI.create("http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/Overview.html"))
+ .version("1.0")
+ .defaultModules(ImmutableSet.<Class<? extends Module>>builder()
+ .add(CloudIdentityAuthenticationApiModule.class)
+ .add(CloudIdentityAuthenticationModule.class)
+ .add(ZoneModule.class)
+ .add(AutoscaleParserModule.class)
+ .add(AutoscaleHttpApiModule.class)
+ .build())
+ .build())
+ .homepage(URI.create("http://www.rackspace.com/cloud/autoscale/"))
+ .console(URI.create("https://mycloud.rackspace.co.uk"))
+ .linkedServices("rackspace-cloudbigdata-uk", "rackspace-cloudblockstorage-uk",
+ "rackspace-clouddatabases-uk", "rackspace-clouddns-uk", "rackspace-cloudfiles-uk",
+ "rackspace-cloudloadbalancers-uk", "rackspace-cloudqueues-uk",
+ "rackspace-cloudservers-uk")
+ .iso3166Codes("GB-SLG")
+ .endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/")
+ .defaultProperties(AutoscaleUKProviderMetadata.defaultProperties());
+ }
+
+ @Override
+ public AutoscaleUKProviderMetadata build() {
+ return new AutoscaleUKProviderMetadata(this);
+ }
+
+ @Override
+ public Builder fromProviderMetadata(ProviderMetadata in) {
+ super.fromProviderMetadata(in);
+ return this;
+ }
+ }
+}
diff --git a/rackspace-autoscale-uk/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/rackspace-autoscale-uk/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
new file mode 100644
index 0000000..237416e
--- /dev/null
+++ b/rackspace-autoscale-uk/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.jclouds.rackspace.autoscale.uk.AutoscaleUKProviderMetadata
diff --git a/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadataExpectTest.java b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadataExpectTest.java
new file mode 100644
index 0000000..6bbeba2
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderMetadataExpectTest.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.uk;
+
+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 {
+
+ public AutoscaleUKProviderMetadataExpectTest() {
+ this.provider = "rackspace-autoscale-uk";
+ this.identity = "myUsername";
+ this.credential = "myApiKey";
+ }
+
+ public void testCanGetConfiguredZones() {
+
+ HttpRequest authenticate = HttpRequest.builder().method("POST")
+ .endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
+ .addHeader("Accept", "application/json")
+ .payload(payloadFromStringWithContentType(
+ "{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
+ , "application/json")).build();
+
+ HttpResponse authenticationResponse = HttpResponse.builder()
+ .statusCode(200)
+ .payload(payloadFromResourceWithContentType("/access_rax_uk.json", "application/json"))
+ .build();
+
+ AutoscaleApi whenNovaRegionExists = requestSendsResponse(authenticate, authenticationResponse);
+
+ assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("LON"));
+
+ }
+
+}
diff --git a/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderTest.java b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderTest.java
new file mode 100644
index 0000000..e05d521
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/AutoscaleUKProviderTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.uk;
+
+import org.jclouds.providers.internal.BaseProviderMetadataTest;
+import org.jclouds.rackspace.autoscale.v1.AutoscaleApiMetadata;
+import org.testng.annotations.Test;
+
+/**
+ * Tests the Rackspace Auto Scale UK Provider Metadata.
+ */
+@Test(groups = "unit", testName = "AutoscaleUKProviderTest")
+public class AutoscaleUKProviderTest extends BaseProviderMetadataTest {
+
+ public AutoscaleUKProviderTest() {
+ super(new AutoscaleUKProviderMetadata(), new AutoscaleApiMetadata());
+ }
+}
diff --git a/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKGroupApiLiveTest.java b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKGroupApiLiveTest.java
new file mode 100644
index 0000000..b6a6399
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKGroupApiLiveTest.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.uk.features;
+
+import org.jclouds.rackspace.autoscale.v1.features.GroupApiLiveTest;
+import org.testng.annotations.Test;
+
+/**
+ * Tests GroupApi - live
+ */
+@Test(groups = "live", testName = "AutoscaleUKGroupApiLiveTest", singleThreaded = true)
+public class AutoscaleUKGroupApiLiveTest extends GroupApiLiveTest {
+ public AutoscaleUKGroupApiLiveTest() {
+ provider = "rackspace-autoscale-uk";
+ }
+}
diff --git a/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKScalingPolicyApiLiveTest.java b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKScalingPolicyApiLiveTest.java
new file mode 100644
index 0000000..7badb15
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKScalingPolicyApiLiveTest.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.uk.features;
+
+import org.jclouds.rackspace.autoscale.v1.features.ScalingPolicyApiLiveTest;
+import org.testng.annotations.Test;
+
+/**
+ * Tests Scaling Policy Api - live
+ */
+@Test(groups = "live", testName = "AutoscaleUKScalingPolicyApiLiveTest", singleThreaded = true)
+public class AutoscaleUKScalingPolicyApiLiveTest extends ScalingPolicyApiLiveTest {
+ public AutoscaleUKScalingPolicyApiLiveTest() {
+ provider = "rackspace-autoscale-uk";
+ }
+}
diff --git a/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKWebhookApiLiveTest.java b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKWebhookApiLiveTest.java
new file mode 100644
index 0000000..65a8b00
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/java/org/jclouds/rackspace/autoscale/uk/features/AutoscaleUKWebhookApiLiveTest.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.uk.features;
+
+import org.jclouds.rackspace.autoscale.v1.features.WebhookApiLiveTest;
+import org.testng.annotations.Test;
+
+/**
+ * Tests WebhookApi - live
+ */
+@Test(groups = "live", testName = "AutoscaleUKWebhookApiLiveTest", singleThreaded = true)
+public class AutoscaleUKWebhookApiLiveTest extends WebhookApiLiveTest {
+ public AutoscaleUKWebhookApiLiveTest() {
+ provider = "rackspace-autoscale-uk";
+ }
+}
diff --git a/rackspace-autoscale-uk/src/test/resources/access_rax_uk.json b/rackspace-autoscale-uk/src/test/resources/access_rax_uk.json
new file mode 100644
index 0000000..584dd79
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/resources/access_rax_uk.json
@@ -0,0 +1,140 @@
+{
+ "access": {
+ "token": {
+ "id": "bdd18214-e266-4ad3-b985-d9bfb22c8da8",
+ "expires": "2012-10-01T02:11:16.000+01:00",
+ "tenant": {
+ "id": "10001786",
+ "name": "10001786"
+ }
+ },
+ "serviceCatalog": [
+ {
+ "endpoints": [
+ {
+ "region": "LON",
+ "tenantId": "MossoCloudFS_83a9d536-2e25-4166-bd3b-a503a934f953",
+ "publicURL": "https://storage101.lon3.clouddrive.com/v1/MossoCloudFS_83a9d536-2e25-4166-bd3b-a503a934f953",
+ "internalURL": "https://snet-storage101.lon3.clouddrive.com/v1/MossoCloudFS_83a9d536-2e25-4166-bd3b-a503a934f953"
+ }
+ ],
+ "name": "cloudFiles",
+ "type": "object-store"
+ },
+ {
+ "endpoints": [
+ {
+ "region": "LON",
+ "tenantId": "MossoCloudFS_83a9d536-2e25-4166-bd3b-a503a934f953",
+ "publicURL": "https://cdn3.clouddrive.com/v1/MossoCloudFS_83a9d536-2e25-4166-bd3b-a503a934f953"
+ }
+ ],
+ "name": "cloudFilesCDN",
+ "type": "rax:object-cdn"
+ },
+ {
+ "endpoints": [
+ {
+ "tenantId": "10001786",
+ "publicURL": "https://lon.servers.api.rackspacecloud.com/v1.0/10001786",
+ "versionInfo": "https://lon.servers.api.rackspacecloud.com/v1.0",
+ "versionList": "https://lon.servers.api.rackspacecloud.com/",
+ "versionId": "1.0"
+ }
+ ],
+ "name": "cloudServers",
+ "type": "compute"
+ },
+ {
+ "endpoints": [
+ {
+ "tenantId": "10001786",
+ "publicURL": "https://lon.dns.api.rackspacecloud.com/v1.0/10001786"
+ }
+ ],
+ "name": "cloudDNS",
+ "type": "rax:dns"
+ },
+ {
+ "endpoints": [
+ {
+ "region": "LON",
+ "tenantId": "10001786",
+ "publicURL": "https://lon.loadbalancers.api.rackspacecloud.com/v1.0/10001786"
+ }
+ ],
+ "name": "cloudLoadBalancers",
+ "type": "rax:load-balancer"
+ },
+ {
+ "endpoints": [
+ {
+ "tenantId": "10001786",
+ "publicURL": "https://monitoring.api.rackspacecloud.com/v1.0/10001786"
+ }
+ ],
+ "name": "cloudMonitoring",
+ "type": "rax:monitor"
+ },
+ {
+ "endpoints": [
+ {
+ "region": "LON",
+ "tenantId": "10001786",
+ "publicURL": "https://lon.databases.api.rackspacecloud.com/v1.0/10001786"
+ }
+ ],
+ "name": "cloudDatabases",
+ "type": "rax:database"
+ },
+ {
+ "endpoints": [
+ {
+ "region": "LON",
+ "tenantId": "10001786",
+ "publicURL": "https://lon.servers.api.rackspacecloud.com/v2/10001786",
+ "versionInfo": "https://lon.servers.api.rackspacecloud.com/v2",
+ "versionList": "https://lon.servers.api.rackspacecloud.com/",
+ "versionId": "2"
+ }
+ ],
+ "name": "cloudServersOpenStack",
+ "type": "compute"
+ },
+ {
+ "endpoints": [
+ {
+ "publicURL": "https://lon.blockstorage.api.rackspacecloud.com/v1/10001786",
+ "tenantId": "10001786",
+ "region": "LON"
+ }
+ ],
+ "name": "cloudBlockStorage",
+ "type": "volume"
+ },
+ {
+ "endpoints": [
+ {
+ "region": "LON",
+ "tenantId": "10001786",
+ "publicURL": "https:\/\/lon.autoscale.api.rackspacecloud.com\/v1.0\/10001786"
+ }
+ ],
+ "name": "autoscale",
+ "type": "rax:autoscale"
+ }
+ ],
+ "user": {
+ "id": "378",
+ "roles": [
+ {
+ "id": "3",
+ "description": "User Admin Role.",
+ "name": "identity:user-admin"
+ }
+ ],
+ "name": "jclouds",
+ "RAX-AUTH:defaultRegion": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/rackspace-autoscale-uk/src/test/resources/logback.xml b/rackspace-autoscale-uk/src/test/resources/logback.xml
new file mode 100644
index 0000000..6559c23
--- /dev/null
+++ b/rackspace-autoscale-uk/src/test/resources/logback.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<configuration scan="false">
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>target/test-data/jclouds.log</file>
+
+ <encoder>
+ <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
+ </encoder>
+ </appender>
+
+ <appender name="WIREFILE" class="ch.qos.logback.core.FileAppender">
+ <file>target/test-data/jclouds-wire.log</file>
+
+ <encoder>
+ <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
+ </encoder>
+ </appender>
+
+ <appender name="BLOBSTOREFILE" class="ch.qos.logback.core.FileAppender">
+ <file>target/test-data/jclouds-blobstore.log</file>
+
+ <encoder>
+ <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
+ </encoder>
+ </appender>
+
+ <root>
+ <level value="warn" />
+ </root>
+
+ <logger name="org.jclouds">
+ <level value="DEBUG" />
+ <appender-ref ref="FILE" />
+ </logger>
+
+ <logger name="jclouds.wire">
+ <level value="DEBUG" />
+ <appender-ref ref="WIREFILE" />
+ </logger>
+
+ <logger name="jclouds.headers">
+ <level value="DEBUG" />
+ <appender-ref ref="WIREFILE" />
+ </logger>
+
+ <logger name="jclouds.blobstore">
+ <level value="DEBUG" />
+ <appender-ref ref="BLOBSTOREFILE" />
+ </logger>
+
+</configuration>
diff --git a/rackspace-autoscale-us/pom.xml b/rackspace-autoscale-us/pom.xml
index 571f558..4f32b87 100644
--- a/rackspace-autoscale-us/pom.xml
+++ b/rackspace-autoscale-us/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.jclouds.labs</groupId>
<artifactId>rackspace-autoscale-us</artifactId>
<version>1.8.0-SNAPSHOT</version>
- <name>jclouds rackspace-autoscale api provider</name>
+ <name>jclouds Rackspace Auto Scale US Provider</name>
<description>jclouds components to access Rackspace Autoscale</description>
<packaging>bundle</packaging>
@@ -43,7 +43,7 @@
<test.rackspace-autoscale.credential>FIXME_CREDENTIALS</test.rackspace-autoscale.credential>
<test.jclouds.keystone.credential-type>passwordCredentials</test.jclouds.keystone.credential-type>
- <jclouds.osgi.export>org.jclouds.rackspace.autoscale.v1_0*;version="${project.version}"</jclouds.osgi.export>
+ <jclouds.osgi.export>org.jclouds.rackspace.autoscale.us*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>
org.jclouds.rest.internal;version="${jclouds.version}",
org.jclouds.labs*;version="${project.version}",
diff --git a/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/AutoscaleUSProviderMetadata.java b/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/AutoscaleUSProviderMetadata.java
new file mode 100644
index 0000000..5d5b1d5
--- /dev/null
+++ b/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/AutoscaleUSProviderMetadata.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.rackspace.autoscale.us;
+
+import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
+import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONE;
+import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONES;
+import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
+import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
+
+import java.net.URI;
+import java.util.Properties;
+
+import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
+import org.jclouds.providers.ProviderMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadata;
+import org.jclouds.rackspace.autoscale.v1.AutoscaleApiMetadata;
+import org.jclouds.rackspace.autoscale.v1.config.AutoscaleHttpApiModule;
+import org.jclouds.rackspace.autoscale.v1.config.AutoscaleParserModule;
+import org.jclouds.rackspace.cloudidentity.v2_0.ServiceType;
+import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticationApiModule;
+import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticationModule;
+import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.inject.Module;
+
+/**
+ * Implementation of {@link ProviderMetadata} for Rackspace US Auto Scale API.
+ */
+public class AutoscaleUSProviderMetadata extends BaseProviderMetadata {
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return builder().fromProviderMetadata(this);
+ }
+
+ public AutoscaleUSProviderMetadata() {
+ super(builder());
+ }
+
+ public AutoscaleUSProviderMetadata(Builder builder) {
+ super(builder);
+ }
+
+ public static Properties defaultProperties() {
+ Properties properties = new Properties();
+ properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
+ properties.setProperty(SERVICE_TYPE, ServiceType.AUTO_SCALE);
+
+ properties.setProperty(PROPERTY_ZONES, "ORD,DFW,IAD,SYD,HKG");
+ properties.setProperty(PROPERTY_ZONE + ".ORD." + ISO3166_CODES, "US-IL");
+ properties.setProperty(PROPERTY_ZONE + ".DFW." + ISO3166_CODES, "US-TX");
+ properties.setProperty(PROPERTY_ZONE + ".IAD." + ISO3166_CODES, "US-VA");
+ properties.setProperty(PROPERTY_ZONE + ".SYD." + ISO3166_CODES, "AU-NSW");
+ properties.setProperty(PROPERTY_ZONE + ".HKG." + ISO3166_CODES, "HK");
+
+ return properties;
+ }
+
+ public static class Builder extends BaseProviderMetadata.Builder {
+
+ protected Builder(){
+ id("rackspace-autoscale-us")
+ .name("Rackspace Auto Scale US")
+ .apiMetadata(new AutoscaleApiMetadata().toBuilder()
+ .identityName("${userName}")
+ .credentialName("${apiKey}")
+ .defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
+ .endpointName("Rackspace Cloud Identity service URL ending in /v2.0/")
+ .documentation(URI.create("http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/Overview.html"))
+ .version("1.0")
+ .defaultModules(ImmutableSet.<Class<? extends Module>>builder()
+ .add(CloudIdentityAuthenticationApiModule.class)
+ .add(CloudIdentityAuthenticationModule.class)
+ .add(ZoneModule.class)
+ .add(AutoscaleParserModule.class)
+ .add(AutoscaleHttpApiModule.class)
+ .build())
+ .build())
+ .homepage(URI.create("http://www.rackspace.com/cloud/public/autoscale/"))
+ .console(URI.create("https://mycloud.rackspace.com"))
+ .linkedServices("rackspace-cloudbigdata-us", "rackspace-cloudblockstorage-us",
+ "rackspace-clouddatabases-us", "rackspace-clouddns-us", "rackspace-cloudfiles-us",
+ "rackspace-cloudloadbalancers-us", "rackspace-cloudqueues-us",
+ "rackspace-cloudservers-us")
+ .iso3166Codes("US-IL", "US-TX", "US-VA", "AU-NSW", "HK")
+ .endpoint("https://identity.api.rackspacecloud.com/v2.0/")
+ .defaultProperties(AutoscaleUSProviderMetadata.defaultProperties());
+ }
+
+ @Override
+ public AutoscaleUSProviderMetadata build() {
+ return new AutoscaleUSProviderMetadata(this);
+ }
+
+ @Override
+ public Builder fromProviderMetadata(ProviderMetadata in) {
+ super.fromProviderMetadata(in);
+ return this;
+ }
+ }
+}
diff --git a/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadata.java b/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadata.java
index ebf3b39..6d2b0d5 100644
--- a/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadata.java
+++ b/rackspace-autoscale-us/src/main/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadata.java
@@ -40,8 +40,12 @@
import com.google.inject.Module;
/**
- * Implementation of {@link ProviderMetadata} for Rackspace Autoscale API
+ * Implementation of {@link ProviderMetadata} for Rackspace US Auto Scale API.
+ *
+ * @deprecated Please use {@link org.jclouds.rackspace.autoscale.us.AutoscaleUSProviderMetadata} as
+ * this method will be removed in jclouds 2.0.
*/
+@Deprecated
public class AutoscaleUSProviderMetadata extends BaseProviderMetadata {
public static Builder builder() {
@@ -61,16 +65,18 @@
super(builder);
}
- // NOTE: SYD is disabled for now. Enable when service is enabled in SYD
public static Properties defaultProperties() {
Properties properties = new Properties();
properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
- properties.setProperty(SERVICE_TYPE, ServiceType.AUTO_SCALE);
- //properties.setProperty(PROPERTY_ZONES, "ORD,DFW,SYD");
- properties.setProperty(PROPERTY_ZONES, "ORD,DFW");
+ properties.setProperty(SERVICE_TYPE, ServiceType.AUTO_SCALE);
+
+ properties.setProperty(PROPERTY_ZONES, "ORD,DFW,IAD,SYD,HKG");
properties.setProperty(PROPERTY_ZONE + ".ORD." + ISO3166_CODES, "US-IL");
properties.setProperty(PROPERTY_ZONE + ".DFW." + ISO3166_CODES, "US-TX");
- //properties.setProperty(PROPERTY_ZONE + ".SYD." + ISO3166_CODES, "AU-NSW");
+ properties.setProperty(PROPERTY_ZONE + ".IAD." + ISO3166_CODES, "US-VA");
+ properties.setProperty(PROPERTY_ZONE + ".SYD." + ISO3166_CODES, "AU-NSW");
+ properties.setProperty(PROPERTY_ZONE + ".HKG." + ISO3166_CODES, "HK");
+
return properties;
}
@@ -78,27 +84,31 @@
protected Builder(){
id("rackspace-autoscale-us")
- .name("Rackspace autoscale US")
+ .name("Rackspace Auto Scale US")
.apiMetadata(new AutoscaleApiMetadata().toBuilder()
.identityName("${userName}")
.credentialName("${apiKey}")
.defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
- .endpointName("identity service url ending in /v2.0/")
- .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
+ .endpointName("Rackspace Cloud Identity service URL ending in /v2.0/")
+ .documentation(URI.create("http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/Overview.html"))
+ .version("1.0")
.defaultModules(ImmutableSet.<Class<? extends Module>>builder()
.add(CloudIdentityAuthenticationApiModule.class)
.add(CloudIdentityAuthenticationModule.class)
.add(ZoneModule.class)
.add(AutoscaleParserModule.class)
- .add(AutoscaleHttpApiModule.class).build())
+ .add(AutoscaleHttpApiModule.class)
.build())
- .homepage(URI.create("http://www.rackspace.com/cloud/public/autoscale/"))
- .console(URI.create("https://mycloud.rackspace.com"))
- .linkedServices("rackspace-cloudservers-us", "cloudfiles-us")
- //.iso3166Codes("US-IL", "US-TX", "AU-NSW")
- .iso3166Codes("US-IL", "US-TX")
- .endpoint("https://identity.api.rackspacecloud.com/v2.0/")
- .defaultProperties(AutoscaleUSProviderMetadata.defaultProperties());
+ .build())
+ .homepage(URI.create("http://www.rackspace.com/cloud/public/autoscale/"))
+ .console(URI.create("https://mycloud.rackspace.com"))
+ .linkedServices("rackspace-cloudbigdata-us", "rackspace-cloudblockstorage-us",
+ "rackspace-clouddatabases-us", "rackspace-clouddns-us", "rackspace-cloudfiles-us",
+ "rackspace-cloudloadbalancers-us", "rackspace-cloudqueues-us",
+ "rackspace-cloudservers-us")
+ .iso3166Codes("US-IL", "US-TX", "US-VA", "AU-NSW", "HK")
+ .endpoint("https://identity.api.rackspacecloud.com/v2.0/")
+ .defaultProperties(AutoscaleUSProviderMetadata.defaultProperties());
}
@Override
diff --git a/rackspace-autoscale-us/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/rackspace-autoscale-us/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
index 1717af9..5b557fc 100644
--- a/rackspace-autoscale-us/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
+++ b/rackspace-autoscale-us/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
@@ -14,5 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
-org.jclouds.rackspace.autoscale.us.v1.AutoscaleUSProviderMetadata
+org.jclouds.rackspace.autoscale.us.AutoscaleUSProviderMetadata
diff --git a/rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadataExpectTest.java b/rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadataExpectTest.java
index c4399e4..8dab4c2 100644
--- a/rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadataExpectTest.java
+++ b/rackspace-autoscale-us/src/test/java/org/jclouds/rackspace/autoscale/us/v1/AutoscaleUSProviderMetadataExpectTest.java
@@ -55,7 +55,7 @@
AutoscaleApi whenNovaRegionExists = requestSendsResponse(authenticate, authenticationResponse);
- assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("ORD", "DFW"));
+ assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("DFW", "ORD", "IAD"));
}
diff --git a/rackspace-autoscale-us/src/test/resources/access_rax_us.json b/rackspace-autoscale-us/src/test/resources/access_rax_us.json
index 2fba05d..c66d300 100644
--- a/rackspace-autoscale-us/src/test/resources/access_rax_us.json
+++ b/rackspace-autoscale-us/src/test/resources/access_rax_us.json
@@ -151,26 +151,25 @@
"type":"compute"
},
{
- "name":"autoscale",
- "endpoints":[
+ "name": "autoscale",
+ "endpoints": [
{
- "region":"ORD",
- "tenantId":"888888",
- "publicURL":"https:\/\/ord.autoscale.api.rackspacecloud.com\/v1.0\/888888",
- "versionInfo":null,
- "versionList":null,
- "versionId":"1.0"
+ "region": "DFW",
+ "tenantId": "888888",
+ "publicURL": "https:\/\/dfw.autoscale.api.rackspacecloud.com\/v1.0\/888888"
},
{
- "region":"DFW",
- "tenantId":"888888",
- "publicURL":"https:\/\/dfw.autoscale.api.rackspacecloud.com\/v1.0\/888888",
- "versionInfo":null,
- "versionList":null,
- "versionId":"1.0"
+ "region": "ORD",
+ "tenantId": "888888",
+ "publicURL": "https:\/\/ord.autoscale.api.rackspacecloud.com\/v1.0\/888888"
+ },
+ {
+ "region": "IAD",
+ "tenantId": "888888",
+ "publicURL": "https:\/\/iad.autoscale.api.rackspacecloud.com\/v1.0\/888888"
}
],
- "type":"rax:autoscale"
+ "type": "rax:autoscale"
},
{
"name":"cloudMonitoring",
diff --git a/rackspace-autoscale/pom.xml b/rackspace-autoscale/pom.xml
index 67f1f95..6d4ada8 100644
--- a/rackspace-autoscale/pom.xml
+++ b/rackspace-autoscale/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.jclouds.labs</groupId>
<artifactId>rackspace-autoscale</artifactId>
<version>1.8.0-SNAPSHOT</version>
- <name>jclouds rackspace-autoscale api</name>
+ <name>jclouds Rackspace Auto Scale API</name>
<description>jclouds components to access Rackspace Autoscale</description>
<packaging>bundle</packaging>
diff --git a/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/GroupApiLiveTest.java b/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/GroupApiLiveTest.java
index 9476c3e..0d2e07c 100644
--- a/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/GroupApiLiveTest.java
+++ b/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/GroupApiLiveTest.java
@@ -26,6 +26,9 @@
import java.util.Map;
import org.jclouds.openstack.v2_0.domain.Link;
+import org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy;
+import org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy.ScalingPolicyTargetType;
+import org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy.ScalingPolicyType;
import org.jclouds.rackspace.autoscale.v1.domain.Group;
import org.jclouds.rackspace.autoscale.v1.domain.GroupConfiguration;
import org.jclouds.rackspace.autoscale.v1.domain.GroupState;
@@ -33,9 +36,6 @@
import org.jclouds.rackspace.autoscale.v1.domain.LaunchConfiguration.LaunchConfigurationType;
import org.jclouds.rackspace.autoscale.v1.domain.LoadBalancer;
import org.jclouds.rackspace.autoscale.v1.domain.Personality;
-import org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy;
-import org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy.ScalingPolicyTargetType;
-import org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy.ScalingPolicyType;
import org.jclouds.rackspace.autoscale.v1.internal.BaseAutoscaleApiLiveTest;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@@ -73,7 +73,7 @@
.builder()
.loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
.serverName("autoscale_server")
- .serverImageRef("57b8a366-ab2c-454b-939f-215303a4431f")
+ .serverImageRef("5cc098a5-7286-4b96-b3a2-49f4c4f82537")
.serverFlavorRef("2")
.serverDiskConfig("AUTO")
.serverMetadata(
@@ -235,7 +235,7 @@
.builder()
.loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
.serverName("autoscale_server")
- .serverImageRef("57b8a366-ab2c-454b-939f-215303a4431f")
+ .serverImageRef("5cc098a5-7286-4b96-b3a2-49f4c4f82537")
.serverFlavorRef("2")
.serverDiskConfig("AUTO")
.serverMetadata(
diff --git a/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/ScalingPolicyApiLiveTest.java b/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/ScalingPolicyApiLiveTest.java
index df24f3e..a1c440c 100644
--- a/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/ScalingPolicyApiLiveTest.java
+++ b/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/ScalingPolicyApiLiveTest.java
@@ -74,7 +74,7 @@
.builder()
.loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
.serverName("autoscale_server")
- .serverImageRef("c52a0ca6-c1f2-4cd1-b7d6-afbcd1ebda22")
+ .serverImageRef("5cc098a5-7286-4b96-b3a2-49f4c4f82537")
.serverFlavorRef("2")
.serverDiskConfig("AUTO")
.serverMetadata(
diff --git a/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/WebhookApiLiveTest.java b/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/WebhookApiLiveTest.java
index 8498863..4393ef8 100644
--- a/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/WebhookApiLiveTest.java
+++ b/rackspace-autoscale/src/test/java/org/jclouds/rackspace/autoscale/v1/features/WebhookApiLiveTest.java
@@ -81,7 +81,7 @@
.builder()
.loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
.serverName("autoscale_server")
- .serverImageRef("c52a0ca6-c1f2-4cd1-b7d6-afbcd1ebda22")
+ .serverImageRef("5cc098a5-7286-4b96-b3a2-49f4c4f82537")
.serverFlavorRef("2")
.serverDiskConfig("AUTO")
.serverMetadata(