mirror of https://github.com/apache/jclouds.git
Issue 506:support hosteurope blobstore; break out scality-rs2
This commit is contained in:
parent
916863f1da
commit
9bdd97340b
|
@ -24,6 +24,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory),
|
|||
our blobstore api supports: aws-s3, cloudfiles-us, cloudfiles-uk, filesystem,
|
||||
azureblob, atmos (generic), synaptic-storage, scaleup-storage,
|
||||
cloudonestorage, walrus(generic), googlestorage,
|
||||
scality-rs2 (generic), hosteurope-storage,
|
||||
eucalyptus-partnercloud-s3, swift (generic), transient (in-mem)
|
||||
|
||||
* note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to
|
||||
|
|
|
@ -44,11 +44,21 @@
|
|||
<artifactId>googlestorage</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>scality-rs2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>scaleup-storage</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>hosteurope-storage</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>synaptic-storage</artifactId>
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<module>s3</module>
|
||||
<module>ec2</module>
|
||||
<module>walrus</module>
|
||||
<module>scality-rs2</module>
|
||||
<module>eucalyptus</module>
|
||||
<module>swift</module>
|
||||
<module>cloudfiles</module>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
====
|
||||
|
||||
Copyright (C) 2010 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.
|
||||
====================================================================
|
||||
====
|
||||
|
||||
#
|
||||
# The jclouds API for RS2, Scality RING's s3 flavour (http://www.scality.com/scalable-data-storage-technology/).
|
||||
#
|
||||
# Expects the jclouds S3 API to be present on your application's classpath.
|
||||
#
|
||||
# TODO: Implementation status.
|
||||
# TODO: Supported features.
|
||||
# TODO: Usage example.
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
|
||||
Copyright (C) 2010 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.api</groupId>
|
||||
<artifactId>scality-rs2</artifactId>
|
||||
<name>jclouds Eucalyptus Walrus api</name>
|
||||
<description>Simple Storage Service (S3) implementation based on Scality RING RS2</description>
|
||||
|
||||
<properties>
|
||||
<test.initializer>org.jclouds.scality.rs2.blobstore.ScalityRS2TestInitializer</test.initializer>
|
||||
<test.scality-rs2.endpoint>FIXME_ENDPOINT</test.scality-rs2.endpoint>
|
||||
<test.scality-rs2.apiversion>2006-03-01</test.scality-rs2.apiversion>
|
||||
<test.scality-rs2.identity>FIXME_IDENTITY</test.scality-rs2.identity>
|
||||
<test.scality-rs2.credential>FIXME_CREDENTIAL</test.scality-rs2.credential>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>s3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>s3</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.scality-rs2.endpoint</name>
|
||||
<value>${test.scality-rs2.endpoint}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>test.scality-rs2.apiversion</name>
|
||||
<value>${test.scality-rs2.apiversion}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>test.scality-rs2.identity</name>
|
||||
<value>${test.scality-rs2.identity}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>test.scality-rs2.credential</name>
|
||||
<value>${test.scality-rs2.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>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2;
|
||||
|
||||
import static org.jclouds.blobstore.attr.BlobScopes.CONTAINER;
|
||||
|
||||
import org.jclouds.blobstore.attr.BlobScope;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.annotations.SkipEncoding;
|
||||
import org.jclouds.s3.S3AsyncClient;
|
||||
import org.jclouds.s3.filters.RequestAuthorizeSignature;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@SkipEncoding('/')
|
||||
@RequestFilters(RequestAuthorizeSignature.class)
|
||||
@BlobScope(CONTAINER)
|
||||
public interface ScalityRS2AsyncClient extends S3AsyncClient {
|
||||
public static final String VERSION = "2006-03-01";
|
||||
|
||||
}
|
|
@ -17,29 +17,35 @@
|
|||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.scaleup.storage;
|
||||
package org.jclouds.scality.rs2;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.s3.S3ContextBuilder;
|
||||
import org.jclouds.scaleup.storage.blobstore.config.ScaleUpStorageBlobStoreContextModule;
|
||||
import org.jclouds.scality.rs2.blobstore.config.ScalityRS2BlobStoreContextModule;
|
||||
import org.jclouds.scality.rs2.config.ScalityRS2RestClientModule;
|
||||
|
||||
import com.google.inject.Module;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class ScaleUpStorageContextBuilder extends S3ContextBuilder {
|
||||
public class ScalityRS2ContextBuilder extends S3ContextBuilder {
|
||||
|
||||
public ScaleUpStorageContextBuilder(Properties props) {
|
||||
public ScalityRS2ContextBuilder(Properties props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addClientModule(List<Module> modules) {
|
||||
modules.add(new ScalityRS2RestClientModule());
|
||||
}
|
||||
@Override
|
||||
protected void addContextModule(List<Module> modules) {
|
||||
modules.add(new ScaleUpStorageBlobStoreContextModule());
|
||||
modules.add(new ScalityRS2BlobStoreContextModule());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2;
|
||||
|
||||
import static org.jclouds.Constants.PROPERTY_API_VERSION;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.s3.S3PropertiesBuilder;
|
||||
|
||||
/**
|
||||
* Builds properties used in ScalityRS2 Clients
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class ScalityRS2PropertiesBuilder extends S3PropertiesBuilder {
|
||||
@Override
|
||||
protected Properties defaultProperties() {
|
||||
Properties properties = super.defaultProperties();
|
||||
properties.setProperty(PROPERTY_API_VERSION, ScalityRS2AsyncClient.VERSION);
|
||||
return properties;
|
||||
}
|
||||
|
||||
public ScalityRS2PropertiesBuilder(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.scaleup.storage.blobstore.config;
|
||||
package org.jclouds.scality.rs2.blobstore.config;
|
||||
|
||||
import org.jclouds.s3.blobstore.config.S3BlobStoreContextModule;
|
||||
|
||||
|
@ -25,6 +25,6 @@ import org.jclouds.s3.blobstore.config.S3BlobStoreContextModule;
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class ScaleUpStorageBlobStoreContextModule extends S3BlobStoreContextModule {
|
||||
public class ScalityRS2BlobStoreContextModule extends S3BlobStoreContextModule {
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.config;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.http.RequiresHttp;
|
||||
import org.jclouds.rest.ConfiguresRestClient;
|
||||
import org.jclouds.s3.S3AsyncClient;
|
||||
import org.jclouds.s3.S3Client;
|
||||
import org.jclouds.s3.config.S3RestClientModule;
|
||||
import org.jclouds.scality.rs2.ScalityRS2AsyncClient;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@ConfiguresRestClient
|
||||
@RequiresHttp
|
||||
public class ScalityRS2RestClientModule extends S3RestClientModule<S3Client, ScalityRS2AsyncClient> {
|
||||
|
||||
public ScalityRS2RestClientModule() {
|
||||
super(S3Client.class, ScalityRS2AsyncClient.class);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
S3AsyncClient provideS3AsyncClient(ScalityRS2AsyncClient in) {
|
||||
return in;
|
||||
}
|
||||
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
* ====================================================================
|
||||
*/
|
||||
|
||||
package org.jclouds.scaleup.storage;
|
||||
package org.jclouds.scality.rs2;
|
||||
|
||||
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
||||
import org.jclouds.s3.S3AsyncClient;
|
||||
|
@ -30,8 +30,8 @@ import com.google.inject.TypeLiteral;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
|
||||
@Test(enabled = false, groups = "unit", testName = "ScaleUpStorageAsyncClientTest")
|
||||
public class ScaleUpStorageAsyncClientTestDisabled extends S3AsyncClientTest<S3AsyncClient> {
|
||||
@Test(enabled = false, groups = "unit", testName = "ScalityRS2AsyncClientTest")
|
||||
public class ScalityRS2AsyncClientTestDisabled extends S3AsyncClientTest<S3AsyncClient> {
|
||||
|
||||
@Override
|
||||
protected TypeLiteral<RestAnnotationProcessor<S3AsyncClient>> createTypeLiteral() {
|
||||
|
@ -39,9 +39,9 @@ public class ScaleUpStorageAsyncClientTestDisabled extends S3AsyncClientTest<S3A
|
|||
};
|
||||
}
|
||||
|
||||
public ScaleUpStorageAsyncClientTestDisabled() {
|
||||
this.provider = "scaleup-storage";
|
||||
this.url = "commondatastorage.googleapis.com";
|
||||
public ScalityRS2AsyncClientTestDisabled() {
|
||||
this.provider = "scality-rs2";
|
||||
this.url = "scality-test.com";
|
||||
}
|
||||
|
||||
// TODO parameterize this test so that it can pass
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.s3.S3ClientLiveTest;
|
||||
import org.jclouds.s3.domain.S3Object;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* Tests behavior of {@code S3Client}
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", sequential = true, testName = "ScalityRS2ClientLiveTest")
|
||||
public class ScalityRS2ClientLiveTest extends S3ClientLiveTest {
|
||||
// no support for content encoding
|
||||
@Override
|
||||
protected void assertContentEncoding(S3Object newObject, String string) {
|
||||
assert (newObject.getPayload().getContentMetadata().getContentEncoding().indexOf(string) != -1);
|
||||
assert (newObject.getMetadata().getContentMetadata().getContentEncoding().indexOf(string) != -1);
|
||||
}
|
||||
|
||||
// no support for cache control
|
||||
@Override
|
||||
protected void assertCacheControl(S3Object newObject, String string) {
|
||||
assertEquals(newObject.getMetadata().getCacheControl(), null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.blobstore.domain.Blob;
|
||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2BlobIntegrationLiveTest")
|
||||
public class ScalityRS2BlobIntegrationLiveTest extends S3BlobIntegrationLiveTest {
|
||||
// no support for content language
|
||||
@Override
|
||||
protected void checkContentLanguage(Blob blob, String contentLanguage) {
|
||||
assert blob.getPayload().getContentMetadata().getContentLanguage() == null;
|
||||
assert blob.getMetadata().getContentMetadata().getContentLanguage() == null;
|
||||
}
|
||||
|
||||
// double range not supported
|
||||
@Test(groups = { "integration", "live" })
|
||||
@Override
|
||||
public void testGetTwoRanges() throws InterruptedException, IOException {
|
||||
|
||||
}
|
||||
|
||||
// no md5
|
||||
@Override
|
||||
protected void checkMD5(BlobMetadata metadata) throws IOException {
|
||||
assertEquals(metadata.getContentMetadata().getContentMD5(), null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2BlobLiveTest")
|
||||
public class ScalityRS2BlobLiveTest extends S3BlobLiveTest {
|
||||
|
||||
// no md5
|
||||
@Override
|
||||
protected void checkMD5(String container, String name, byte[] md5) {
|
||||
assertEquals(context.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobMapIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2BlobMapIntegrationLiveTest")
|
||||
public class ScalityRS2BlobMapIntegrationLiveTest extends S3BlobMapIntegrationLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobSignerLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2BlobSignerLiveTest")
|
||||
public class ScalityRS2BlobSignerLiveTest extends S3BlobSignerLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||
import org.jclouds.s3.blobstore.integration.S3ContainerIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2ContainerIntegrationLiveTest")
|
||||
public class ScalityRS2ContainerIntegrationLiveTest extends S3ContainerIntegrationLiveTest {
|
||||
// doesn't support MD5
|
||||
@Override
|
||||
protected void checkMD5(BlobMetadata metadata) throws IOException {
|
||||
assertEquals(metadata.getContentMetadata().getContentMD5(), null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3ContainerLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2ContainerLiveTest")
|
||||
public class ScalityRS2ContainerLiveTest extends S3ContainerLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3InputStreamMapIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2InputStreamMapIntegrationLiveTest")
|
||||
public class ScalityRS2InputStreamMapIntegrationLiveTest extends S3InputStreamMapIntegrationLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3ServiceIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScalityRS2ServiceIntegrationLiveTest")
|
||||
public class ScalityRS2ServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.scality.rs2.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3TestInitializer;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class ScalityRS2TestInitializer extends S3TestInitializer {
|
||||
|
||||
public ScalityRS2TestInitializer() {
|
||||
provider = "scality-rs2";
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -23,7 +23,7 @@
|
|||
Current supported services are:
|
||||
[transient, filesystem, azureblob, atmos, walrus, scaleup-storage,
|
||||
googlestorage, synaptic, peer1-storage, aws-s3, eucalyptus-partnercloud-s3,
|
||||
cloudfiles-us, cloudfiles-uk, swift]
|
||||
cloudfiles-us, cloudfiles-uk, swift, scality-rs2, hosteurope-storage]
|
||||
|
||||
Here's a quick example of how to viewresources in rackspace
|
||||
|
||||
|
|
|
@ -169,9 +169,15 @@ eucalyptus-partnercloud-s3.propertiesbuilder=org.jclouds.epc.EucalyptusPartnerCl
|
|||
googlestorage.contextbuilder=org.jclouds.googlestorage.GoogleStorageContextBuilder
|
||||
googlestorage.propertiesbuilder=org.jclouds.googlestorage.GoogleStoragePropertiesBuilder
|
||||
|
||||
scaleup-storage.contextbuilder=org.jclouds.scaleup.storage.ScaleUpStorageContextBuilder
|
||||
scality-rs2.contextbuilder=org.jclouds.scality.rs2.ScalityRS2ContextBuilder
|
||||
scality-rs2.propertiesbuilder=org.jclouds.scality.rs2.ScalityRS2PropertiesBuilder
|
||||
|
||||
scaleup-storage.contextbuilder=org.jclouds.scality.rs2.ScalityRS2ContextBuilder
|
||||
scaleup-storage.propertiesbuilder=org.jclouds.scaleup.storage.ScaleUpStoragePropertiesBuilder
|
||||
|
||||
hosteurope-storage.contextbuilder=org.jclouds.scality.rs2.ScalityRS2ContextBuilder
|
||||
hosteurope-storage.propertiesbuilder=org.jclouds.hosteurope.storage.HostEuropeStoragePropertiesBuilder
|
||||
|
||||
transient.contextbuilder=org.jclouds.blobstore.TransientBlobStoreContextBuilder
|
||||
transient.propertiesbuilder=org.jclouds.blobstore.TransientBlobStorePropertiesBuilder
|
||||
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
|
||||
Copyright (C) 2010 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>hosteurope-storage</artifactId>
|
||||
<name>jclouds Host Europe Cloud Storage provider</name>
|
||||
<description>Scality RING (ScalityRS2) implementation targeted to Host Europe Cloud Storage</description>
|
||||
|
||||
<properties>
|
||||
<test.initializer>org.jclouds.hosteurope.storage.blobstore.HostEuropeStorageTestInitializer</test.initializer>
|
||||
<test.hosteurope-storage.endpoint>https://cs.hosteurope.de</test.hosteurope-storage.endpoint>
|
||||
<test.hosteurope-storage.apiversion>2006-03-01</test.hosteurope-storage.apiversion>
|
||||
<test.hosteurope-storage.identity>FIX_ME</test.hosteurope-storage.identity>
|
||||
<test.hosteurope-storage.credential>FIX_ME</test.hosteurope-storage.credential>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>scality-rs2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>scality-rs2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>s3</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.hosteurope-storage.endpoint</name>
|
||||
<value>${test.hosteurope-storage.endpoint}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>test.hosteurope-storage.apiversion</name>
|
||||
<value>${test.hosteurope-storage.apiversion}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>test.hosteurope-storage.identity</name>
|
||||
<value>${test.hosteurope-storage.identity}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>test.hosteurope-storage.credential</name>
|
||||
<value>${test.hosteurope-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>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage;
|
||||
|
||||
import static org.jclouds.Constants.PROPERTY_ENDPOINT;
|
||||
import static org.jclouds.Constants.PROPERTY_ISO3166_CODES;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.scality.rs2.ScalityRS2PropertiesBuilder;
|
||||
|
||||
/**
|
||||
* Builds properties used in HostEurope Storage
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class HostEuropeStoragePropertiesBuilder extends ScalityRS2PropertiesBuilder {
|
||||
@Override
|
||||
protected Properties defaultProperties() {
|
||||
Properties properties = super.defaultProperties();
|
||||
properties.setProperty(PROPERTY_ISO3166_CODES, "DE");
|
||||
properties.setProperty(PROPERTY_ENDPOINT, "https://cs.hosteurope.de<");
|
||||
return properties;
|
||||
}
|
||||
|
||||
public HostEuropeStoragePropertiesBuilder(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage;
|
||||
|
||||
import org.jclouds.scality.rs2.ScalityRS2ClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* Tests behavior of {@code ScalityRS2Client}
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", sequential = true, testName = "HostEuropeStorageClientLiveTest")
|
||||
public class HostEuropeStorageClientLiveTest extends ScalityRS2ClientLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageBlobIntegrationLiveTest")
|
||||
public class HostEuropeStorageBlobIntegrationLiveTest extends ScalityRS2BlobIntegrationLiveTest {
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageBlobLiveTest")
|
||||
public class HostEuropeStorageBlobLiveTest extends ScalityRS2BlobLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobMapIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageBlobMapIntegrationLiveTest")
|
||||
public class HostEuropeStorageBlobMapIntegrationLiveTest extends ScalityRS2BlobMapIntegrationLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobSignerLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageBlobSignerLiveTest")
|
||||
public class HostEuropeStorageBlobSignerLiveTest extends ScalityRS2BlobSignerLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2ContainerIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageContainerIntegrationLiveTest")
|
||||
public class HostEuropeStorageContainerIntegrationLiveTest extends ScalityRS2ContainerIntegrationLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2ContainerLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageContainerLiveTest")
|
||||
public class HostEuropeStorageContainerLiveTest extends ScalityRS2ContainerLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2InputStreamMapIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageInputStreamMapIntegrationLiveTest")
|
||||
public class HostEuropeStorageInputStreamMapIntegrationLiveTest extends ScalityRS2InputStreamMapIntegrationLiveTest {
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2ServiceIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "HostEuropeStorageServiceIntegrationLiveTest")
|
||||
public class HostEuropeStorageServiceIntegrationLiveTest extends ScalityRS2ServiceIntegrationLiveTest {
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("DE");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 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.hosteurope.storage.blobstore;
|
||||
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2TestInitializer;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class HostEuropeStorageTestInitializer extends ScalityRS2TestInitializer {
|
||||
|
||||
public HostEuropeStorageTestInitializer() {
|
||||
provider = "hosteurope-storage";
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -41,6 +41,7 @@
|
|||
<module>aws-ec2</module>
|
||||
<module>googlestorage</module>
|
||||
<module>scaleup-storage</module>
|
||||
<module>hosteurope-storage</module>
|
||||
<module>synaptic-storage</module>
|
||||
<module>cloudonestorage</module>
|
||||
<module>eucalyptus-partnercloud-s3</module>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>scaleup-storage</artifactId>
|
||||
<name>jclouds ScaleUp Cloud Storage provider</name>
|
||||
<description>Simple Storage Service (S3) implementation targeted to ScaleUp Cloud Storage</description>
|
||||
<description>Scality RING (ScalityRS2) implementation targeted to ScaleUp Cloud Storage</description>
|
||||
|
||||
<properties>
|
||||
<test.initializer>org.jclouds.scaleup.storage.blobstore.ScaleUpStorageTestInitializer</test.initializer>
|
||||
|
@ -45,10 +45,17 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>s3</artifactId>
|
||||
<artifactId>scality-rs2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>scality-rs2</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.api</groupId>
|
||||
<artifactId>s3</artifactId>
|
||||
|
|
|
@ -24,14 +24,14 @@ import static org.jclouds.Constants.PROPERTY_ISO3166_CODES;
|
|||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.s3.S3PropertiesBuilder;
|
||||
import org.jclouds.scality.rs2.ScalityRS2PropertiesBuilder;
|
||||
|
||||
/**
|
||||
* Builds properties used in Google Storage
|
||||
* Builds properties used in ScaleUp Storage
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class ScaleUpStoragePropertiesBuilder extends S3PropertiesBuilder {
|
||||
public class ScaleUpStoragePropertiesBuilder extends ScalityRS2PropertiesBuilder {
|
||||
@Override
|
||||
protected Properties defaultProperties() {
|
||||
Properties properties = super.defaultProperties();
|
||||
|
|
|
@ -19,29 +19,15 @@
|
|||
|
||||
package org.jclouds.scaleup.storage;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.s3.S3ClientLiveTest;
|
||||
import org.jclouds.s3.domain.S3Object;
|
||||
import org.jclouds.scality.rs2.ScalityRS2ClientLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* Tests behavior of {@code S3Client}
|
||||
* Tests behavior of {@code ScalityRS2Client}
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", sequential = true, testName = "ScaleUpStorageClientLiveTest")
|
||||
public class ScaleUpStorageClientLiveTest extends S3ClientLiveTest {
|
||||
// no support for content encoding
|
||||
@Override
|
||||
protected void assertContentEncoding(S3Object newObject, String string) {
|
||||
assert (newObject.getPayload().getContentMetadata().getContentEncoding().indexOf(string) != -1);
|
||||
assert (newObject.getMetadata().getContentMetadata().getContentEncoding().indexOf(string) != -1);
|
||||
}
|
||||
public class ScaleUpStorageClientLiveTest extends ScalityRS2ClientLiveTest {
|
||||
|
||||
// no support for cache control
|
||||
@Override
|
||||
protected void assertCacheControl(S3Object newObject, String string) {
|
||||
assertEquals(newObject.getMetadata().getCacheControl(), null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,40 +19,15 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.blobstore.domain.Blob;
|
||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobIntegrationLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageBlobIntegrationLiveTest")
|
||||
public class ScaleUpStorageBlobIntegrationLiveTest extends S3BlobIntegrationLiveTest {
|
||||
public class ScaleUpStorageBlobIntegrationLiveTest extends ScalityRS2BlobIntegrationLiveTest {
|
||||
|
||||
|
||||
// no support for content language
|
||||
@Override
|
||||
protected void checkContentLanguage(Blob blob, String contentLanguage) {
|
||||
assert blob.getPayload().getContentMetadata().getContentLanguage() == null;
|
||||
assert blob.getMetadata().getContentMetadata().getContentLanguage() == null;
|
||||
}
|
||||
|
||||
// double range not supported
|
||||
@Test(groups = { "integration", "live" })
|
||||
@Override
|
||||
public void testGetTwoRanges() throws InterruptedException, IOException {
|
||||
|
||||
}
|
||||
|
||||
// no md5
|
||||
@Override
|
||||
protected void checkMD5(BlobMetadata metadata) throws IOException {
|
||||
assertEquals(metadata.getContentMetadata().getContentMD5(), null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,20 +19,13 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageBlobLiveTest")
|
||||
public class ScaleUpStorageBlobLiveTest extends S3BlobLiveTest {
|
||||
public class ScaleUpStorageBlobLiveTest extends ScalityRS2BlobLiveTest {
|
||||
|
||||
// no md5
|
||||
@Override
|
||||
protected void checkMD5(String container, String name, byte[] md5) {
|
||||
assertEquals(context.getBlobStore().blobMetadata(container, name).getContentMetadata().getContentMD5(), null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobMapIntegrationLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobMapIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageBlobMapIntegrationLiveTest")
|
||||
public class ScaleUpStorageBlobMapIntegrationLiveTest extends S3BlobMapIntegrationLiveTest {
|
||||
public class ScaleUpStorageBlobMapIntegrationLiveTest extends ScalityRS2BlobMapIntegrationLiveTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3BlobSignerLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2BlobSignerLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
|
@ -27,6 +27,6 @@ import org.testng.annotations.Test;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageBlobSignerLiveTest")
|
||||
public class ScaleUpStorageBlobSignerLiveTest extends S3BlobSignerLiveTest {
|
||||
public class ScaleUpStorageBlobSignerLiveTest extends ScalityRS2BlobSignerLiveTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -19,22 +19,13 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||
import org.jclouds.s3.blobstore.integration.S3ContainerIntegrationLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2ContainerIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageContainerIntegrationLiveTest")
|
||||
public class ScaleUpStorageContainerIntegrationLiveTest extends S3ContainerIntegrationLiveTest {
|
||||
// doesn't support MD5
|
||||
@Override
|
||||
protected void checkMD5(BlobMetadata metadata) throws IOException {
|
||||
assertEquals(metadata.getContentMetadata().getContentMD5(), null);
|
||||
}
|
||||
public class ScaleUpStorageContainerIntegrationLiveTest extends ScalityRS2ContainerIntegrationLiveTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3ContainerLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2ContainerLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageContainerLiveTest")
|
||||
public class ScaleUpStorageContainerLiveTest extends S3ContainerLiveTest {
|
||||
public class ScaleUpStorageContainerLiveTest extends ScalityRS2ContainerLiveTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3InputStreamMapIntegrationLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2InputStreamMapIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageInputStreamMapIntegrationLiveTest")
|
||||
public class ScaleUpStorageInputStreamMapIntegrationLiveTest extends S3InputStreamMapIntegrationLiveTest {
|
||||
public class ScaleUpStorageInputStreamMapIntegrationLiveTest extends ScalityRS2InputStreamMapIntegrationLiveTest {
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.jclouds.scaleup.storage.blobstore;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3ServiceIntegrationLiveTest;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2ServiceIntegrationLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -30,7 +30,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "ScaleUpStorageServiceIntegrationLiveTest")
|
||||
public class ScaleUpStorageServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTest {
|
||||
public class ScaleUpStorageServiceIntegrationLiveTest extends ScalityRS2ServiceIntegrationLiveTest {
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("DE");
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
|
||||
package org.jclouds.scaleup.storage.blobstore;
|
||||
|
||||
import org.jclouds.s3.blobstore.integration.S3TestInitializer;
|
||||
import org.jclouds.scality.rs2.blobstore.ScalityRS2TestInitializer;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class ScaleUpStorageTestInitializer extends S3TestInitializer {
|
||||
public class ScaleUpStorageTestInitializer extends ScalityRS2TestInitializer {
|
||||
|
||||
public ScaleUpStorageTestInitializer() {
|
||||
provider = "scaleup-storage";
|
||||
|
|
|
@ -50,6 +50,7 @@ public class Zone implements Comparable<Zone> {
|
|||
private NetworkType networkType;
|
||||
private String status;
|
||||
private String VLAN;
|
||||
private boolean securityGroupsEnabled;
|
||||
|
||||
public Builder id(long id) {
|
||||
this.id = id;
|
||||
|
@ -111,9 +112,14 @@ public class Zone implements Comparable<Zone> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder securityGroupsEnabled(boolean securityGroupsEnabled) {
|
||||
this.securityGroupsEnabled = securityGroupsEnabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Zone build() {
|
||||
return new Zone(id, description, displayText, DNS, domain, domainId, guestCIDRAddress, internalDNS, name,
|
||||
networkType, status, VLAN);
|
||||
networkType, status, VLAN, securityGroupsEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,6 +147,8 @@ public class Zone implements Comparable<Zone> {
|
|||
private String status;
|
||||
@SerializedName("vlan")
|
||||
private String VLAN;
|
||||
@SerializedName("securitygroupsenabled")
|
||||
private boolean securityGroupsEnabled;
|
||||
|
||||
/**
|
||||
* present only for serializer
|
||||
|
@ -151,8 +159,8 @@ public class Zone implements Comparable<Zone> {
|
|||
}
|
||||
|
||||
public Zone(long id, String description, String displayText, List<String> DNS, String domain, long domainId,
|
||||
String guestCIDRAddress, List<String> internalDNS, String name, NetworkType networkType, String status,
|
||||
String vLAN) {
|
||||
String guestCIDRAddress, List<String> internalDNS, String name, NetworkType networkType, String status,
|
||||
String vLAN, boolean securityGroupsEnabled) {
|
||||
this.id = id;
|
||||
this.description = description;
|
||||
this.displayText = displayText;
|
||||
|
@ -167,6 +175,7 @@ public class Zone implements Comparable<Zone> {
|
|||
this.networkType = networkType;
|
||||
this.status = status;
|
||||
this.VLAN = vLAN;
|
||||
this.securityGroupsEnabled = securityGroupsEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -276,6 +285,14 @@ public class Zone implements Comparable<Zone> {
|
|||
return VLAN;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true if this is an advanced network with security groups enabled, or a basic network.
|
||||
*/
|
||||
public boolean isSecurityGroupsEnabled() {
|
||||
return securityGroupsEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
@ -293,7 +310,7 @@ public class Zone implements Comparable<Zone> {
|
|||
result = prime * result + ((internalDNS2 == null) ? 0 : internalDNS2.hashCode());
|
||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||
result = prime * result + ((networkType == null) ? 0 : networkType.hashCode());
|
||||
result = prime * result + ((status == null) ? 0 : status.hashCode());
|
||||
result = prime * result + (securityGroupsEnabled ? 1231 : 1237);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -360,12 +377,12 @@ public class Zone implements Comparable<Zone> {
|
|||
return false;
|
||||
} else if (!name.equals(other.name))
|
||||
return false;
|
||||
if (networkType != other.networkType)
|
||||
return false;
|
||||
if (status == null) {
|
||||
if (other.status != null)
|
||||
if (networkType == null) {
|
||||
if (other.networkType != null)
|
||||
return false;
|
||||
} else if (!status.equals(other.status))
|
||||
} else if (!networkType.equals(other.networkType))
|
||||
return false;
|
||||
if (securityGroupsEnabled != other.securityGroupsEnabled)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -373,9 +390,9 @@ public class Zone implements Comparable<Zone> {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "[id=" + id + ", status=" + status + ", name=" + name + ", description=" + description + ", displayText="
|
||||
+ displayText + ", domain=" + domain + ", domainId=" + domainId + ", networkType=" + networkType
|
||||
+ ", guestCIDRAddress=" + guestCIDRAddress + ", VLAN=" + VLAN + ", DNS=" + getDNS() + ", internalDNS="
|
||||
+ getInternalDNS() + "]";
|
||||
+ displayText + ", domain=" + domain + ", domainId=" + domainId + ", networkType=" + networkType
|
||||
+ ", guestCIDRAddress=" + guestCIDRAddress + ", VLAN=" + VLAN + ", DNS=" + getDNS()
|
||||
+ ", securityGroupsEnabled=" + isSecurityGroupsEnabled() + ", internalDNS=" + getInternalDNS() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,15 +20,12 @@
|
|||
package org.jclouds.cloudstack.features;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.jclouds.cloudstack.domain.NetworkType;
|
||||
import org.jclouds.cloudstack.domain.SecurityGroup;
|
||||
import org.jclouds.cloudstack.domain.Zone;
|
||||
import org.jclouds.cloudstack.options.ListSecurityGroupsOptions;
|
||||
import org.jclouds.http.HttpResponseException;
|
||||
import org.testng.annotations.AfterGroups;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -46,14 +43,15 @@ public class SecurityGroupClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
private SecurityGroup group;
|
||||
|
||||
public void testCreateDestroySecurityGroup() throws Exception {
|
||||
if (Iterables.any(client.getZoneClient().listZones(), new Predicate<Zone>() {
|
||||
try {
|
||||
Iterables.find(client.getZoneClient().listZones(), new Predicate<Zone>() {
|
||||
|
||||
@Override
|
||||
public boolean apply(Zone arg0) {
|
||||
return arg0.getNetworkType() == NetworkType.BASIC;
|
||||
}
|
||||
@Override
|
||||
public boolean apply(Zone arg0) {
|
||||
return arg0.isSecurityGroupsEnabled();
|
||||
}
|
||||
|
||||
})) {
|
||||
});
|
||||
for (SecurityGroup securityGroup : client.getSecurityGroupClient().listSecurityGroups(
|
||||
ListSecurityGroupsOptions.Builder.named(prefix)))
|
||||
client.getSecurityGroupClient().deleteSecurityGroup(securityGroup.getId());
|
||||
|
@ -67,29 +65,8 @@ public class SecurityGroupClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
} catch (IllegalStateException e) {
|
||||
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
client.getSecurityGroupClient().createSecurityGroup(prefix);
|
||||
assert false;
|
||||
} catch (HttpResponseException e) {
|
||||
assertEquals(e.getResponse().getStatusCode(), 530);
|
||||
}
|
||||
}
|
||||
} catch (NoSuchElementException e) {
|
||||
|
||||
}
|
||||
|
||||
public void testListSecurityGroups() throws Exception {
|
||||
Set<SecurityGroup> response = client.getSecurityGroupClient().listSecurityGroups();
|
||||
assert null != response;
|
||||
long groupCount = response.size();
|
||||
assertTrue(groupCount >= 0);
|
||||
for (SecurityGroup group : response) {
|
||||
SecurityGroup newDetails = Iterables.getOnlyElement(client.getSecurityGroupClient().listSecurityGroups(
|
||||
ListSecurityGroupsOptions.Builder.id(group.getId())));
|
||||
assertEquals(group.getId(), newDetails.getId());
|
||||
// sometimes this comes up different
|
||||
// assertEquals(group,newDetails);
|
||||
checkGroup(group);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue