forked from jclouds/legacy-jclouds
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 550: added rackspace provider metadata
- Loading branch information
Adrian Cole
committed
May 30, 2011
1 parent
319235a
commit 009479c
Showing
15 changed files
with
758 additions
and
0 deletions.
There are no files selected for viewing
116 changes: 116 additions & 0 deletions
116
...files-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/** | ||
* | ||
* Copyright (C) 2011 Cloud Consciouk, LLC. <info@cloudconsciouk.com> | ||
* | ||
* ==================================================================== | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not uke 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.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; | ||
|
||
/** | ||
* Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Files in UK. | ||
* | ||
* @author Adrian Cole | ||
*/ | ||
public class CloudFilesUKProviderMetadata extends BaseProviderMetadata { | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getId() { | ||
return "cloudfiles-uk"; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getType() { | ||
return ProviderMetadata.BLOBSTORE_TYPE; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getName() { | ||
return "Rackspace Cloud Files 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.co.uk/cloud-hosting/cloud-products/cloud-files"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public URI getConsole() { | ||
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} | ||
*/ | ||
@Override | ||
public Set<String> getLinkedServices() { | ||
return ImmutableSet.of("cloudfiles-uk", "cloudservers-uk"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public Set<String> getIso3166Codes() { | ||
return ImmutableSet.of("GB-SLG"); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...cloudfiles-uk/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.jclouds.rackspace.cloudfiles.CloudFilesUKProviderMetadata |
35 changes: 35 additions & 0 deletions
35
...loudfiles-uk/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* | ||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> | ||
* | ||
* ==================================================================== | ||
* Licensed 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.cloudfiles; | ||
|
||
import org.jclouds.providers.BaseProviderMetadataTest; | ||
import org.jclouds.providers.ProviderMetadata; | ||
import org.testng.annotations.Test; | ||
|
||
/** | ||
* | ||
* @author Adrian Cole | ||
*/ | ||
@Test(groups = "unit", testName = "CloudFilesUKProviderTest") | ||
public class CloudFilesUKProviderTest extends BaseProviderMetadataTest { | ||
|
||
public CloudFilesUKProviderTest() { | ||
super(new CloudFilesUKProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
...files-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/** | ||
* | ||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> | ||
* | ||
* ==================================================================== | ||
* Licensed 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.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; | ||
|
||
/** | ||
* Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Cloud Files in US. | ||
* | ||
* @author Adrian Cole | ||
*/ | ||
public class CloudFilesUSProviderMetadata extends BaseProviderMetadata { | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getId() { | ||
return "cloudfiles-us"; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getType() { | ||
return ProviderMetadata.BLOBSTORE_TYPE; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getName() { | ||
return "Rackspace Cloud Files 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/files"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public URI getConsole() { | ||
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} | ||
*/ | ||
@Override | ||
public Set<String> getLinkedServices() { | ||
return ImmutableSet.of("cloudfiles-us", "cloudservers-us", "cloudloadbalancers-us"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public Set<String> getIso3166Codes() { | ||
return ImmutableSet.of("US-IL","US-TX"); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...cloudfiles-us/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.jclouds.rackspace.cloudfiles.CloudFilesUSProviderMetadata |
35 changes: 35 additions & 0 deletions
35
...loudfiles-us/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* | ||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> | ||
* | ||
* ==================================================================== | ||
* Licensed 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.cloudfiles; | ||
|
||
import org.jclouds.providers.BaseProviderMetadataTest; | ||
import org.jclouds.providers.ProviderMetadata; | ||
import org.testng.annotations.Test; | ||
|
||
/** | ||
* | ||
* @author Adrian Cole | ||
*/ | ||
@Test(groups = "unit", testName = "CloudFilesUSProviderTest") | ||
public class CloudFilesUSProviderTest extends BaseProviderMetadataTest { | ||
|
||
public CloudFilesUSProviderTest() { | ||
super(new CloudFilesUSProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); | ||
} | ||
} |
Oops, something went wrong.