diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesPropertiesBuilder.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesPropertiesBuilder.java new file mode 100644 index 0000000000..cef4e42ca2 --- /dev/null +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesPropertiesBuilder.java @@ -0,0 +1,41 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds 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.cloudfiles; + +import java.util.Properties; + +import org.jclouds.openstack.swift.SwiftPropertiesBuilder; + +/** + * + * @author Adrian Cole + */ +public class CloudFilesPropertiesBuilder extends SwiftPropertiesBuilder { + + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + return properties; + } + + public CloudFilesPropertiesBuilder(Properties properties) { + super(properties); + } + +} diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesProviderMetadata.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesProviderMetadata.java new file mode 100644 index 0000000000..6fcc489901 --- /dev/null +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesProviderMetadata.java @@ -0,0 +1,69 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds 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.cloudfiles; + +import java.net.URI; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Common implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Files + * + * @author Dan Lo Bianco + */ +public abstract class CloudFilesProviderMetadata extends BaseProviderMetadata { + + public CloudFilesProviderMetadata() { + super(); + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.BLOBSTORE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://docs.rackspacecloud.com/files/api/v1/cfdevguide_d5/content/ch01.html"); + } + +} \ No newline at end of file diff --git a/apis/cloudloadbalancers/src/main/java/org/jclouds/cloudloadbalancers/CloudLoadBalancersPropertiesBuilder.java b/apis/cloudloadbalancers/src/main/java/org/jclouds/cloudloadbalancers/CloudLoadBalancersPropertiesBuilder.java new file mode 100644 index 0000000000..6bc06c18ce --- /dev/null +++ b/apis/cloudloadbalancers/src/main/java/org/jclouds/cloudloadbalancers/CloudLoadBalancersPropertiesBuilder.java @@ -0,0 +1,45 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds 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.cloudloadbalancers; + +import static org.jclouds.Constants.PROPERTY_API_VERSION; + +import java.util.Properties; + +import org.jclouds.PropertiesBuilder; + +/** + * Builds properties used inRackspace Cloud Load Balancers Clients + * + * @author Dan Lo Bianco + */ +public class CloudLoadBalancersPropertiesBuilder extends PropertiesBuilder { + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + properties.setProperty(PROPERTY_API_VERSION, "1.0"); + + return properties; + } + + public CloudLoadBalancersPropertiesBuilder(Properties properties) { + super(properties); + } + + } diff --git a/apis/cloudloadbalancers/src/main/java/org/jclouds/cloudloadbalancers/CloudLoadBalancersProviderMetadata.java b/apis/cloudloadbalancers/src/main/java/org/jclouds/cloudloadbalancers/CloudLoadBalancersProviderMetadata.java new file mode 100644 index 0000000000..700cb849cc --- /dev/null +++ b/apis/cloudloadbalancers/src/main/java/org/jclouds/cloudloadbalancers/CloudLoadBalancersProviderMetadata.java @@ -0,0 +1,69 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds 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.cloudloadbalancers; + +import java.net.URI; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Common implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud LoadBalancers. + * + * @author Dan Lo Bianco + */ +public abstract class CloudLoadBalancersProviderMetadata extends BaseProviderMetadata { + + public CloudLoadBalancersProviderMetadata() { + super(); + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.LOADBALANCER_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://docs.rackspacecloud.com/loadbalancers/api/v1.0/clb-devguide/content/ch01.html"); + } + +} \ No newline at end of file diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersPropertiesBuilder.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersPropertiesBuilder.java new file mode 100644 index 0000000000..b4af167dbe --- /dev/null +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersPropertiesBuilder.java @@ -0,0 +1,45 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds 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.cloudservers; + +import static org.jclouds.Constants.PROPERTY_API_VERSION; + +import java.util.Properties; + +import org.jclouds.PropertiesBuilder; +import org.jclouds.openstack.OpenStackAuthAsyncClient; + +/** + * + * @author Dan Lo Bianco + */ +public class CloudServersPropertiesBuilder extends PropertiesBuilder { + + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + properties.setProperty(PROPERTY_API_VERSION, OpenStackAuthAsyncClient.VERSION); + return properties; + } + + public CloudServersPropertiesBuilder(Properties properties) { + super(properties); + } + +} diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersProviderMetadata.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersProviderMetadata.java new file mode 100644 index 0000000000..fde4fead7b --- /dev/null +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersProviderMetadata.java @@ -0,0 +1,69 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds 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.cloudservers; + +import java.net.URI; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** +* Common implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Servers. +* +* @author Dan Lo Bianco +*/ +public abstract class CloudServersProviderMetadata extends BaseProviderMetadata { + + public CloudServersProviderMetadata() { + super(); + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "API Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://docs.rackspacecloud.com/servers/api/v1.0/cs-devguide/content/ch01.html"); + } + +} \ No newline at end of file diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties index f3b3850b55..b7801f54fb 100644 --- a/core/src/main/resources/rest.properties +++ b/core/src/main/resources/rest.properties @@ -74,6 +74,9 @@ eucalyptus-partnercloud-ec2.propertiesbuilder=org.jclouds.epc.EucalyptusPartnerC nova.contextbuilder=org.jclouds.openstack.nova.NovaContextBuilder nova.propertiesbuilder=org.jclouds.openstack.nova.NovaPropertiesBuilder +cloudservers.contextbuilder=org.jclouds.cloudservers.CloudServersContextBuilder +cloudservers.propertiesbuilder=org.jclouds.cloudservers.CloudServersPropertiesBuilder + cloudservers-uk.contextbuilder=org.jclouds.cloudservers.CloudServersContextBuilder cloudservers-uk.propertiesbuilder=org.jclouds.rackspace.cloudservers.CloudServersUKPropertiesBuilder @@ -169,12 +172,18 @@ softlayer.propertiesbuilder=org.jclouds.softlayer.SoftLayerPropertiesBuilder savvis-symphonyvpdc.contextbuilder=org.jclouds.savvis.vpdc.VPDCContextBuilder savvis-symphonyvpdc.propertiesbuilder=org.jclouds.savvis.vpdc.VPDCPropertiesBuilder +cloudloadbalancers.contextbuilder=org.jclouds.cloudloadbalancers.CloudLoadBalancersContextBuilder +cloudloadbalancers.propertiesbuilder=org.jclouds.cloudloadbalancers.CloudLoadBalancersPropertiesBuilder + cloudloadbalancers-us.contextbuilder=org.jclouds.cloudloadbalancers.CloudLoadBalancersContextBuilder cloudloadbalancers-us.propertiesbuilder=org.jclouds.rackspace.cloudloadbalancers.CloudLoadBalancersUSPropertiesBuilder cloudloadbalancers-uk.contextbuilder=org.jclouds.cloudloadbalancers.CloudLoadBalancersContextBuilder cloudloadbalancers-uk.propertiesbuilder=org.jclouds.rackspace.cloudloadbalancers.CloudLoadBalancersUKPropertiesBuilder +cloudfiles.contextbuilder=org.jclouds.cloudfiles.CloudFilesContextBuilder +cloudfiles.propertiesbuilder=org.jclouds.cloudfiles.CloudFilesPropertiesBuilder + cloudfiles-us.contextbuilder=org.jclouds.cloudfiles.CloudFilesContextBuilder cloudfiles-us.propertiesbuilder=org.jclouds.rackspace.cloudfiles.CloudFilesUSPropertiesBuilder diff --git a/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKPropertiesBuilder.java b/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKPropertiesBuilder.java index 5f7d81236f..8ca6198225 100644 --- a/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKPropertiesBuilder.java +++ b/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKPropertiesBuilder.java @@ -24,13 +24,13 @@ import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import java.util.Properties; -import org.jclouds.openstack.swift.SwiftPropertiesBuilder; +import org.jclouds.cloudfiles.CloudFilesPropertiesBuilder; /** * * @author Adrian Cole */ -public class CloudFilesUKPropertiesBuilder extends SwiftPropertiesBuilder { +public class CloudFilesUKPropertiesBuilder extends CloudFilesPropertiesBuilder { @Override protected Properties defaultProperties() { diff --git a/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java b/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java index 7eccd87611..1068fc6ce2 100644 --- a/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java +++ b/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java @@ -18,20 +18,19 @@ */ package org.jclouds.rackspace.cloudfiles; -import com.google.common.collect.ImmutableSet; - import java.net.URI; import java.util.Set; -import org.jclouds.providers.BaseProviderMetadata; -import org.jclouds.providers.ProviderMetadata; +import org.jclouds.cloudfiles.CloudFilesProviderMetadata; + +import com.google.common.collect.ImmutableSet; /** * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Files in UK. * * @author Adrian Cole */ -public class CloudFilesUKProviderMetadata extends BaseProviderMetadata { +public class CloudFilesUKProviderMetadata extends CloudFilesProviderMetadata { /** * {@inheritDoc} @@ -41,14 +40,6 @@ public class CloudFilesUKProviderMetadata extends BaseProviderMetadata { return "cloudfiles-uk"; } - /** - * {@inheritDoc} - */ - @Override - public String getType() { - return ProviderMetadata.BLOBSTORE_TYPE; - } - /** * {@inheritDoc} */ @@ -57,22 +48,6 @@ public class CloudFilesUKProviderMetadata extends BaseProviderMetadata { return "Rackspace Cloud Files UK"; } - /** - * {@inheritDoc} - */ - @Override - public String getIdentityName() { - return "Username"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getCredentialName() { - return "API Key"; - } - /** * {@inheritDoc} */ @@ -89,14 +64,6 @@ public class CloudFilesUKProviderMetadata extends BaseProviderMetadata { return URI.create("https://lon.manage.rackspacecloud.com"); } - /** - * {@inheritDoc} - */ - @Override - public URI getApiDocumentation() { - return URI.create("http://docs.rackspacecloud.com/files/api/v1/cfdevguide_d5/content/ch01.html"); - } - /** * {@inheritDoc} */ diff --git a/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSPropertiesBuilder.java b/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSPropertiesBuilder.java index bdb0cd8928..fff5bc1d09 100644 --- a/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSPropertiesBuilder.java +++ b/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSPropertiesBuilder.java @@ -24,13 +24,13 @@ import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import java.util.Properties; -import org.jclouds.openstack.swift.SwiftPropertiesBuilder; +import org.jclouds.cloudfiles.CloudFilesPropertiesBuilder; /** * * @author Adrian Cole */ -public class CloudFilesUSPropertiesBuilder extends SwiftPropertiesBuilder { +public class CloudFilesUSPropertiesBuilder extends CloudFilesPropertiesBuilder { @Override protected Properties defaultProperties() { diff --git a/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java b/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java index 99f623e612..b364f0239e 100644 --- a/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java +++ b/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java @@ -23,15 +23,15 @@ import com.google.common.collect.ImmutableSet; import java.net.URI; import java.util.Set; -import org.jclouds.providers.BaseProviderMetadata; -import org.jclouds.providers.ProviderMetadata; +import org.jclouds.cloudfiles.CloudFilesProviderMetadata; + /** * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Files in US. * * @author Adrian Cole */ -public class CloudFilesUSProviderMetadata extends BaseProviderMetadata { +public class CloudFilesUSProviderMetadata extends CloudFilesProviderMetadata { /** * {@inheritDoc} @@ -41,14 +41,6 @@ public class CloudFilesUSProviderMetadata extends BaseProviderMetadata { return "cloudfiles-us"; } - /** - * {@inheritDoc} - */ - @Override - public String getType() { - return ProviderMetadata.BLOBSTORE_TYPE; - } - /** * {@inheritDoc} */ @@ -57,22 +49,6 @@ public class CloudFilesUSProviderMetadata extends BaseProviderMetadata { return "Rackspace Cloud Files US"; } - /** - * {@inheritDoc} - */ - @Override - public String getIdentityName() { - return "Username"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getCredentialName() { - return "API Key"; - } - /** * {@inheritDoc} */ @@ -89,14 +65,6 @@ public class CloudFilesUSProviderMetadata extends BaseProviderMetadata { return URI.create("https://manage.rackspacecloud.com"); } - /** - * {@inheritDoc} - */ - @Override - public URI getApiDocumentation() { - return URI.create("http://docs.rackspacecloud.com/files/api/v1/cfdevguide_d5/content/ch01.html"); - } - /** * {@inheritDoc} */ diff --git a/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKPropertiesBuilder.java b/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKPropertiesBuilder.java index 15e09ce7cf..fc9c750a82 100644 --- a/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKPropertiesBuilder.java +++ b/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKPropertiesBuilder.java @@ -30,18 +30,17 @@ import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import java.util.Properties; -import org.jclouds.PropertiesBuilder; +import org.jclouds.cloudloadbalancers.CloudLoadBalancersPropertiesBuilder; /** * Builds properties used inRackspace Cloud Load Balancers Clients * * @author Dan Lo Bianco */ -public class CloudLoadBalancersUKPropertiesBuilder extends PropertiesBuilder { +public class CloudLoadBalancersUKPropertiesBuilder extends CloudLoadBalancersPropertiesBuilder { @Override protected Properties defaultProperties() { Properties properties = super.defaultProperties(); - properties.setProperty(PROPERTY_API_VERSION, "1.0"); properties.setProperty(PROPERTY_REGIONS, "UK"); properties.setProperty(PROPERTY_ENDPOINT, "https://lon.auth.api.rackspacecloud.com"); properties.setProperty(PROPERTY_ISO3166_CODES, "GB-SLG"); diff --git a/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKProviderMetadata.java b/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKProviderMetadata.java index 6f4fea16ce..7143076db6 100644 --- a/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKProviderMetadata.java +++ b/providers/cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUKProviderMetadata.java @@ -18,20 +18,19 @@ */ package org.jclouds.rackspace.cloudloadbalancers; -import com.google.common.collect.ImmutableSet; - import java.net.URI; import java.util.Set; -import org.jclouds.providers.BaseProviderMetadata; -import org.jclouds.providers.ProviderMetadata; +import org.jclouds.cloudloadbalancers.CloudLoadBalancersProviderMetadata; + +import com.google.common.collect.ImmutableSet; /** * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud LoadBalancers in UK. * * @author Dan Lo Bianco */ -public class CloudLoadBalancersUKProviderMetadata extends BaseProviderMetadata { +public class CloudLoadBalancersUKProviderMetadata extends CloudLoadBalancersProviderMetadata { /** * {@inheritDoc} @@ -41,14 +40,6 @@ public class CloudLoadBalancersUKProviderMetadata extends BaseProviderMetadata { return "cloudloadbalancers-uk"; } - /** - * {@inheritDoc} - */ - @Override - public String getType() { - return ProviderMetadata.LOADBALANCER_TYPE; - } - /** * {@inheritDoc} */ @@ -56,29 +47,13 @@ public class CloudLoadBalancersUKProviderMetadata extends BaseProviderMetadata { public String getName() { return "Rackspace Cloud Load Balancers UK"; } - - /** - * {@inheritDoc} - */ - @Override - public String getIdentityName() { - return "Username"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getCredentialName() { - return "API Key"; - } - + /** * {@inheritDoc} */ @Override public URI getHomepage() { - return URI.create("http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers"); + return URI.create("http://www.rackspace.co.uk/cloud-hosting/cloud-products/cloud-load-balancers/"); } /** @@ -86,15 +61,7 @@ public class CloudLoadBalancersUKProviderMetadata extends BaseProviderMetadata { */ @Override public URI getConsole() { - return URI.create("https://manage.rackspacecloud.com"); - } - - /** - * {@inheritDoc} - */ - @Override - public URI getApiDocumentation() { - return URI.create("http://docs.rackspacecloud.com/loadbalancers/api/v1.0/clb-devguide/content/ch01.html"); + return URI.create("https://lon.manage.rackspacecloud.com"); } /** diff --git a/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSPropertiesBuilder.java b/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSPropertiesBuilder.java index d61b0603dc..ad7416e3fc 100644 --- a/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSPropertiesBuilder.java +++ b/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSPropertiesBuilder.java @@ -31,7 +31,7 @@ import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; import java.util.Properties; -import org.jclouds.PropertiesBuilder; +import org.jclouds.cloudloadbalancers.CloudLoadBalancersPropertiesBuilder; import com.google.common.base.Joiner; @@ -40,11 +40,10 @@ import com.google.common.base.Joiner; * * @author Adrian Cole */ -public class CloudLoadBalancersUSPropertiesBuilder extends PropertiesBuilder { +public class CloudLoadBalancersUSPropertiesBuilder extends CloudLoadBalancersPropertiesBuilder { @Override protected Properties defaultProperties() { Properties properties = super.defaultProperties(); - properties.setProperty(PROPERTY_API_VERSION, "1.0"); properties.setProperty(PROPERTY_ENDPOINT, "https://auth.api.rackspacecloud.com"); properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(ORD, DFW)); properties.setProperty(PROPERTY_ISO3166_CODES, "US-IL,US-TX"); diff --git a/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSProviderMetadata.java b/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSProviderMetadata.java index 090180120c..1b266aab75 100644 --- a/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSProviderMetadata.java +++ b/providers/cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersUSProviderMetadata.java @@ -18,20 +18,19 @@ */ package org.jclouds.rackspace.cloudloadbalancers; -import com.google.common.collect.ImmutableSet; - import java.net.URI; import java.util.Set; -import org.jclouds.providers.BaseProviderMetadata; -import org.jclouds.providers.ProviderMetadata; +import org.jclouds.cloudloadbalancers.CloudLoadBalancersProviderMetadata; + +import com.google.common.collect.ImmutableSet; /** * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud LoadBalancers in US. * * @author Adrian Cole */ -public class CloudLoadBalancersUSProviderMetadata extends BaseProviderMetadata { +public class CloudLoadBalancersUSProviderMetadata extends CloudLoadBalancersProviderMetadata { /** * {@inheritDoc} @@ -41,14 +40,6 @@ public class CloudLoadBalancersUSProviderMetadata extends BaseProviderMetadata { return "cloudloadbalancers-us"; } - /** - * {@inheritDoc} - */ - @Override - public String getType() { - return ProviderMetadata.LOADBALANCER_TYPE; - } - /** * {@inheritDoc} */ @@ -56,30 +47,14 @@ public class CloudLoadBalancersUSProviderMetadata extends BaseProviderMetadata { public String getName() { return "Rackspace Cloud Load Balancers US"; } - + /** - * {@inheritDoc} - */ - @Override - public String getIdentityName() { - return "Username"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getCredentialName() { - return "API Key"; - } - - /** - * {@inheritDoc} - */ - @Override - public URI getHomepage() { - return URI.create("http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers"); - } + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers"); + } /** * {@inheritDoc} @@ -89,14 +64,6 @@ public class CloudLoadBalancersUSProviderMetadata extends BaseProviderMetadata { return URI.create("https://manage.rackspacecloud.com"); } - /** - * {@inheritDoc} - */ - @Override - public URI getApiDocumentation() { - return URI.create("http://docs.rackspacecloud.com/loadbalancers/api/v1.0/clb-devguide/content/ch01.html"); - } - /** * {@inheritDoc} */ diff --git a/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKPropertiesBuilder.java b/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKPropertiesBuilder.java index c21540ad6b..248e503514 100644 --- a/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKPropertiesBuilder.java +++ b/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKPropertiesBuilder.java @@ -18,27 +18,24 @@ */ package org.jclouds.rackspace.cloudservers; -import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.Constants.PROPERTY_ISO3166_CODES; import java.util.Properties; -import org.jclouds.PropertiesBuilder; -import org.jclouds.openstack.OpenStackAuthAsyncClient; +import org.jclouds.cloudservers.CloudServersPropertiesBuilder; /** * * @author Adrian Cole */ -public class CloudServersUKPropertiesBuilder extends PropertiesBuilder { +public class CloudServersUKPropertiesBuilder extends CloudServersPropertiesBuilder { @Override protected Properties defaultProperties() { Properties properties = super.defaultProperties(); properties.setProperty(PROPERTY_ISO3166_CODES, "GB-SLG"); properties.setProperty(PROPERTY_ENDPOINT, "https://lon.auth.api.rackspacecloud.com"); - properties.setProperty(PROPERTY_API_VERSION, OpenStackAuthAsyncClient.VERSION); return properties; } diff --git a/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java b/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java index 9d71efc7ef..978b0f6aec 100644 --- a/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java +++ b/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java @@ -18,20 +18,19 @@ */ package org.jclouds.rackspace.cloudservers; -import com.google.common.collect.ImmutableSet; - import java.net.URI; import java.util.Set; -import org.jclouds.providers.BaseProviderMetadata; -import org.jclouds.providers.ProviderMetadata; +import org.jclouds.cloudservers.CloudServersProviderMetadata; + +import com.google.common.collect.ImmutableSet; /** - * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Servers. + * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Servers in UK. * * @author Adrian Cole */ -public class CloudServersUKProviderMetadata extends BaseProviderMetadata { +public class CloudServersUKProviderMetadata extends CloudServersProviderMetadata { /** * {@inheritDoc} @@ -41,14 +40,6 @@ public class CloudServersUKProviderMetadata extends BaseProviderMetadata { return "cloudservers-uk"; } - /** - * {@inheritDoc} - */ - @Override - public String getType() { - return ProviderMetadata.COMPUTE_TYPE; - } - /** * {@inheritDoc} */ @@ -57,22 +48,6 @@ public class CloudServersUKProviderMetadata extends BaseProviderMetadata { return "Rackspace Cloud Servers UK"; } - /** - * {@inheritDoc} - */ - @Override - public String getIdentityName() { - return "Username"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getCredentialName() { - return "API Key"; - } - /** * {@inheritDoc} */ @@ -89,14 +64,6 @@ public class CloudServersUKProviderMetadata extends BaseProviderMetadata { return URI.create("https://lon.manage.rackspacecloud.com"); } - /** - * {@inheritDoc} - */ - @Override - public URI getApiDocumentation() { - return URI.create("http://docs.rackspacecloud.com/servers/api/v1.0/cs-devguide/content/ch01.html"); - } - /** * {@inheritDoc} */ diff --git a/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSPropertiesBuilder.java b/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSPropertiesBuilder.java index 51b4ad1b5b..76c0ac294d 100644 --- a/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSPropertiesBuilder.java +++ b/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSPropertiesBuilder.java @@ -18,27 +18,24 @@ */ package org.jclouds.rackspace.cloudservers; -import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.Constants.PROPERTY_ISO3166_CODES; import java.util.Properties; -import org.jclouds.PropertiesBuilder; -import org.jclouds.openstack.OpenStackAuthAsyncClient; +import org.jclouds.cloudservers.CloudServersPropertiesBuilder; /** * * @author Adrian Cole */ -public class CloudServersUSPropertiesBuilder extends PropertiesBuilder { +public class CloudServersUSPropertiesBuilder extends CloudServersPropertiesBuilder { @Override protected Properties defaultProperties() { Properties properties = super.defaultProperties(); properties.setProperty(PROPERTY_ISO3166_CODES, "US-IL,US-TX"); properties.setProperty(PROPERTY_ENDPOINT, "https://auth.api.rackspacecloud.com"); - properties.setProperty(PROPERTY_API_VERSION, OpenStackAuthAsyncClient.VERSION); return properties; } diff --git a/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java b/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java index c2054e2312..1866ae61a2 100644 --- a/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java +++ b/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java @@ -23,15 +23,15 @@ import com.google.common.collect.ImmutableSet; import java.net.URI; import java.util.Set; -import org.jclouds.providers.BaseProviderMetadata; -import org.jclouds.providers.ProviderMetadata; +import org.jclouds.cloudservers.CloudServersProviderMetadata; + /** * Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Servers in US. * * @author Adrian Cole */ -public class CloudServersUSProviderMetadata extends BaseProviderMetadata { +public class CloudServersUSProviderMetadata extends CloudServersProviderMetadata { /** * {@inheritDoc} @@ -41,14 +41,6 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata { return "cloudservers-us"; } - /** - * {@inheritDoc} - */ - @Override - public String getType() { - return ProviderMetadata.COMPUTE_TYPE; - } - /** * {@inheritDoc} */ @@ -57,22 +49,6 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata { return "Rackspace Cloud Servers US"; } - /** - * {@inheritDoc} - */ - @Override - public String getIdentityName() { - return "Username"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getCredentialName() { - return "API Key"; - } - /** * {@inheritDoc} */ @@ -89,14 +65,6 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata { return URI.create("https://manage.rackspacecloud.com"); } - /** - * {@inheritDoc} - */ - @Override - public URI getApiDocumentation() { - return URI.create("http://docs.rackspacecloud.com/servers/api/v1.0/cs-devguide/content/ch01.html"); - } - /** * {@inheritDoc} */