refactored out commonalities and added apis to the rest.properties, plus corrected some meta-data

This commit is contained in:
danikov 2011-11-10 15:34:58 +00:00
parent 9e3fa50328
commit 914f9adf41
19 changed files with 392 additions and 249 deletions

View File

@ -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);
}
}

View File

@ -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");
}
}

View File

@ -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);
}
}

View File

@ -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");
}
}

View File

@ -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);
}
}

View File

@ -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");
}
}

View File

@ -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

View File

@ -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() {

View File

@ -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}
*/

View File

@ -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() {

View File

@ -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}
*/

View File

@ -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");

View File

@ -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");
}
/**

View File

@ -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");

View File

@ -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}
*/

View File

@ -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;
}

View File

@ -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}
*/

View File

@ -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;
}

View File

@ -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}
*/