Issue 488: added storage provider for ninefold

This commit is contained in:
Adrian Cole 2011-02-24 21:54:42 -08:00
parent d49dea0c50
commit 164fa05d2b
14 changed files with 559 additions and 0 deletions

View File

@ -137,6 +137,9 @@ atmos.apiversion=1.3.0
synaptic-storage.contextbuilder=org.jclouds.atmos.AtmosContextBuilder
synaptic-storage.propertiesbuilder=org.jclouds.synaptic.storage.SynapticStoragePropertiesBuilder
ninefold-storage.contextbuilder=org.jclouds.atmos.AtmosContextBuilder
ninefold-storage.propertiesbuilder=org.jclouds.ninefold.storage.NinefoldStoragePropertiesBuilder
cloudonestorage.contextbuilder=org.jclouds.atmos.AtmosContextBuilder
cloudonestorage.propertiesbuilder=org.jclouds.cloudonestorage.CloudOneStoragePropertiesBuilder

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
====================================================================
-->
<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.jclouds</groupId>
<artifactId>jclouds-project</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<groupId>org.jclouds.provider</groupId>
<artifactId>ninefold-storage</artifactId>
<name>jclouds ninefold storage provider</name>
<description>BlobStore implementation targeted to ninefold storage</description>
<properties>
<test.initializer>org.jclouds.ninefold.storage.blobstore.integration.NinefoldStorageTestInitializer</test.initializer>
<test.ninefold-storage.endpoint>http://onlinestorage.ninefold.com</test.ninefold-storage.endpoint>
<test.ninefold-storage.apiversion>1.2.7c</test.ninefold-storage.apiversion>
<test.ninefold-storage.identity>FIXME_IDENTITY</test.ninefold-storage.identity>
<test.ninefold-storage.credential>FIXME_CREDENTIAL</test.ninefold-storage.credential>
</properties>
<dependencies>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>atmos</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>atmos</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-blobstore</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-log4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</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>
<systemProperties>
<property>
<name>test.ninefold-storage.endpoint</name>
<value>${test.ninefold-storage.endpoint}</value>
</property>
<property>
<name>test.ninefold-storage.apiversion</name>
<value>${test.ninefold-storage.apiversion}</value>
</property>
<property>
<name>test.ninefold-storage.identity</name>
<value>${test.ninefold-storage.identity}</value>
</property>
<property>
<name>test.ninefold-storage.credential</name>
<value>${test.ninefold-storage.credential}</value>
</property>
<property>
<name>test.initializer</name>
<value>${test.initializer}</value>
</property>
<property>
<name>jclouds.blobstore.httpstream.url</name>
<value>${jclouds.blobstore.httpstream.url}</value>
</property>
<property>
<name>jclouds.blobstore.httpstream.md5</name>
<value>${jclouds.blobstore.httpstream.md5}</value>
</property>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,54 @@
/**
*
* 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.ninefold.storage;
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;
/**
* Builds properties used in Ninefold Storage
*
* @author Adrian Cole
*/
public class NinefoldStoragePropertiesBuilder extends PropertiesBuilder {
@Override
protected Properties defaultProperties() {
Properties properties = super.defaultProperties();
properties.setProperty(PROPERTY_ENDPOINT, "http://onlinestorage.ninefold.com");
properties.setProperty(PROPERTY_ISO3166_CODES, "AU-NSW");
properties.setProperty(PROPERTY_API_VERSION, "1.2.7C");
return properties;
}
public NinefoldStoragePropertiesBuilder() {
super();
}
public NinefoldStoragePropertiesBuilder(Properties properties) {
super(properties);
}
}

View File

@ -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.ninefold.storage;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
@Test(groups = "unit", testName = "NinefoldStorageAsyncClientTest")
public class NinefoldStorageAsyncClientTest extends org.jclouds.atmos.AtmosAsyncClientTest {
public NinefoldStorageAsyncClientTest() {
this.provider = "ninefold-storage";
}
}

View File

@ -0,0 +1,33 @@
/**
*
* 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.ninefold.storage;
import org.jclouds.atmos.AtmosClientLiveTest;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code AtmosClient}
*
* @author Adrian Cole
*/
@Test(groups = "live", sequential = true, testName = "NinefoldStorageClientLiveTest")
public class NinefoldStorageClientLiveTest extends AtmosClientLiveTest {
}

View File

@ -0,0 +1,31 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageBlobIntegrationLiveTest")
public class NinefoldStorageBlobIntegrationLiveTest extends AtmosIntegrationLiveTest {
}

View File

@ -0,0 +1,31 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageBlobLiveTest")
public class NinefoldStorageBlobLiveTest extends AtmosLiveTest {
}

View File

@ -0,0 +1,31 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosMapIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageBlobMapIntegrationLiveTest")
public class NinefoldStorageBlobMapIntegrationLiveTest extends AtmosMapIntegrationLiveTest {
}

View File

@ -0,0 +1,32 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosBlobSignerLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageBlobSignerLiveTest")
public class NinefoldStorageBlobSignerLiveTest extends AtmosBlobSignerLiveTest {
}

View File

@ -0,0 +1,31 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosContainerIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageContainerIntegrationLiveTest")
public class NinefoldStorageContainerIntegrationLiveTest extends AtmosContainerIntegrationLiveTest {
}

View File

@ -0,0 +1,31 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosContainerLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageContainerLiveTest")
public class NinefoldStorageContainerLiveTest extends AtmosContainerLiveTest {
}

View File

@ -0,0 +1,31 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosInputStreamMapIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageInputStreamMapIntegrationLiveTest")
public class NinefoldStorageInputStreamMapIntegrationLiveTest extends AtmosInputStreamMapIntegrationLiveTest {
}

View File

@ -0,0 +1,38 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import java.util.Set;
import org.jclouds.atmos.blobstore.integration.AtmosServiceIntegrationLiveTest;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "NinefoldStorageServiceIntegrationLiveTest")
public class NinefoldStorageServiceIntegrationLiveTest extends AtmosServiceIntegrationLiveTest {
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("AU-NSW");
}
}

View File

@ -0,0 +1,34 @@
/**
*
* 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.ninefold.storage.blobstore.integration;
import org.jclouds.atmos.blobstore.integration.AtmosTestInitializer;
/**
*
* @author Adrian Cole
*/
public class NinefoldStorageTestInitializer extends AtmosTestInitializer {
public NinefoldStorageTestInitializer() {
provider = "ninefold-storage";
}
}