From 17db25cceb2b83b57588dec05fc62162822b6d4f Mon Sep 17 00:00:00 2001 From: Jeremy Whitlock Date: Thu, 2 Jun 2011 23:58:50 -0600 Subject: [PATCH] Issue 550: Added ProviderMetadata for AT&T Synaptic Storage. [in providers/synaptic-storage/src] * main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java, src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata, src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java: Added. --- .../SynapticStorageProviderMetadata.java | 109 ++++++++++++++++++ .../org.jclouds.providers.ProviderMetadata | 1 + .../storage/SynapticStorageProviderTest.java | 37 ++++++ 3 files changed, 147 insertions(+) create mode 100644 providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java create mode 100644 providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java diff --git a/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java b/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java new file mode 100644 index 0000000000..a5b8c84edc --- /dev/null +++ b/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStorageProviderMetadata.java @@ -0,0 +1,109 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * 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.synaptic.storage; + +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 AT&T's + * Synaptic Storage provider. + * + * @author Jeremy Whitlock + */ +public class SynapticStorageProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "synaptic-storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.BLOBSTORE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "AT&T Synaptic Storage"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Email Username"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Password"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("https://www.synaptic.att.com/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://www.synaptic.att.com/clouduser/login.htm"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("https://www.synaptic.att.com/clouduser/emc_atmos_api.htm"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-VA", "US-TX"); + } + +} \ No newline at end of file diff --git a/providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..35deaa8fcb --- /dev/null +++ b/providers/synaptic-storage/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.synaptic.storage.SynapticStorageProviderMetadata diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java new file mode 100644 index 0000000000..92e7aab916 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageProviderTest.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * 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.synaptic.storage; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The SynapticStorageProviderTest tests the {@link org.jclouds.synaptic.storage.SynapticStorageProviderMetadata} class. + * + * @author Jeremy Whitlock + */ +@Test(groups = "unit", testName = "SynapticStorageProviderTest") +public class SynapticStorageProviderTest extends BaseProviderMetadataTest { + + public SynapticStorageProviderTest() { + super(new SynapticStorageProviderMetadata(), ProviderMetadata.BLOBSTORE_TYPE); + } + +} \ No newline at end of file