Issue 972: add greenqloud-storage as org.jclouds.labs/greenqloud-storage

This commit is contained in:
Adrian Cole 2012-06-12 23:08:53 -07:00
parent 46edf40d40
commit 64069236ef
14 changed files with 567 additions and 0 deletions

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to jclouds, Inc. (jclouds) under one or more
contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. jclouds licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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.5.0-SNAPSHOT</version>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<groupId>org.jclouds.labs</groupId>
<artifactId>greenqloud-storage</artifactId>
<name>jclouds GreenQloud Simple Storage Service (S3) provider</name>
<description>Simple Storage Service (S3) implementation targeted to GreenQloud Web Services</description>
<packaging>bundle</packaging>
<properties>
<test.greenqloud-storage.endpoint>https://s.greenqloud.com</test.greenqloud-storage.endpoint>
<test.greenqloud-storage.api-version>2006-03-01</test.greenqloud-storage.api-version>
<test.greenqloud-storage.build-version></test.greenqloud-storage.build-version>
<test.greenqloud-storage.identity>${test.greenqloud.identity}</test.greenqloud-storage.identity>
<test.greenqloud-storage.credential>${test.greenqloud.credential}</test.greenqloud-storage.credential>
<jclouds.osgi.export>org.jclouds.greenqloud.storage*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>
org.jclouds*;version="${project.version}",
*
</jclouds.osgi.import>
</properties>
<dependencies>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>s3</artifactId>
<version>${project.version}</version>
</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.api</groupId>
<artifactId>s3</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>
<systemPropertyVariables>
<test.greenqloud-storage.endpoint>${test.greenqloud-storage.endpoint}</test.greenqloud-storage.endpoint>
<test.greenqloud-storage.api-version>${test.greenqloud-storage.api-version}</test.greenqloud-storage.api-version>
<test.greenqloud-storage.build-version>${test.greenqloud-storage.build-version}</test.greenqloud-storage.build-version>
<test.greenqloud-storage.identity>${test.greenqloud-storage.identity}</test.greenqloud-storage.identity>
<test.greenqloud-storage.credential>${test.greenqloud-storage.credential}</test.greenqloud-storage.credential>
<jclouds.blobstore.httpstream.url>${jclouds.blobstore.httpstream.url}</jclouds.blobstore.httpstream.url>
<jclouds.blobstore.httpstream.md5>${jclouds.blobstore.httpstream.md5}</jclouds.blobstore.httpstream.md5>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,94 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage;
import static org.jclouds.location.reference.LocationConstants.ENDPOINT;
import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
import java.net.URI;
import java.util.Properties;
import org.jclouds.providers.ProviderMetadata;
import org.jclouds.providers.internal.BaseProviderMetadata;
import org.jclouds.s3.S3ApiMetadata;
/**
* Implementation of {@link org.jclouds.providers.ProviderMetadata} for GreenQloud Simple Storage Service (S3).
*
* @author Adrian Cole
*/
public class GreenQloudStorageProviderMetadata extends BaseProviderMetadata {
/** The serialVersionUID */
private static final long serialVersionUID = 1L;
public static Builder builder() {
return new Builder();
}
@Override
public Builder toBuilder() {
return builder().fromProviderMetadata(this);
}
public GreenQloudStorageProviderMetadata() {
super(builder());
}
public GreenQloudStorageProviderMetadata(Builder builder) {
super(builder);
}
public static Properties defaultProperties() {
Properties properties = new Properties();
properties.setProperty(PROPERTY_REGIONS, "is-1");
properties.setProperty(PROPERTY_REGION + ".is-1." + ISO3166_CODES, "IS-1");
properties.setProperty(PROPERTY_REGION + "." + "is-1" + "." + ENDPOINT, "https://s.greenqloud.com");
return properties;
}
public static class Builder extends BaseProviderMetadata.Builder {
protected Builder(){
id("greenqloud-storage")
.name("GreenQloud Simple Storage Service (S3)")
.apiMetadata(new S3ApiMetadata())
.homepage(URI.create("http://www.greenqloud.com"))
.console(URI.create("https://manage.greenqloud.com"))
.linkedServices("greenqloud-compute", "greenqloud-storage")
.iso3166Codes("IS-1")
.endpoint("https://s.greenqloud.com")
.defaultProperties(GreenQloudStorageProviderMetadata.defaultProperties());
}
@Override
public GreenQloudStorageProviderMetadata build() {
return new GreenQloudStorageProviderMetadata(this);
}
@Override
public Builder fromProviderMetadata(
ProviderMetadata in) {
super.fromProviderMetadata(in);
return this;
}
}
}

View File

@ -0,0 +1 @@
org.jclouds.greenqloud.storage.GreenQloudStorageProviderMetadata

View File

@ -0,0 +1,34 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage;
import org.jclouds.s3.S3ClientLiveTest;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code S3Client}
*
* @author Adrian Cole
*/
@Test(groups = "live", singleThreaded = true, testName = "GreenQloudStorageClientLiveTest")
public class GreenQloudStorageClientLiveTest extends S3ClientLiveTest {
public GreenQloudStorageClientLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,37 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage;
import org.jclouds.providers.internal.BaseProviderMetadataTest;
import org.jclouds.s3.S3ApiMetadata;
import org.testng.annotations.Test;
/**
* The GreenQloudStorageProviderTest tests the {@link GreenQloudStorageProviderMetadata} class.
*
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "GreenQloudStorageProviderTest")
public class GreenQloudStorageProviderTest extends BaseProviderMetadataTest {
public GreenQloudStorageProviderTest() {
super(new GreenQloudStorageProviderMetadata(), new S3ApiMetadata());
}
}

View File

@ -0,0 +1,33 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3BlobIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageBlobIntegrationLiveTest")
public class GreenQloudStorageBlobIntegrationLiveTest extends S3BlobIntegrationLiveTest {
public GreenQloudStorageBlobIntegrationLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,33 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3BlobLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageBlobLiveTest")
public class GreenQloudStorageBlobLiveTest extends S3BlobLiveTest {
public GreenQloudStorageBlobLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,33 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3BlobMapIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageBlobMapIntegrationLiveTest")
public class GreenQloudStorageBlobMapIntegrationLiveTest extends S3BlobMapIntegrationLiveTest {
public GreenQloudStorageBlobMapIntegrationLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,34 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3BlobSignerLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageBlobSignerLiveTest")
public class GreenQloudStorageBlobSignerLiveTest extends S3BlobSignerLiveTest {
public GreenQloudStorageBlobSignerLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,33 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3ContainerIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageContainerIntegrationLiveTest")
public class GreenQloudStorageContainerIntegrationLiveTest extends S3ContainerIntegrationLiveTest {
public GreenQloudStorageContainerIntegrationLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,33 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3ContainerLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageContainerLiveTest")
public class GreenQloudStorageContainerLiveTest extends S3ContainerLiveTest {
public GreenQloudStorageContainerLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,34 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import org.jclouds.s3.blobstore.integration.S3InputStreamMapIntegrationLiveTest;
import org.testng.annotations.Test;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageInputStreamMapIntegrationLiveTest")
public class GreenQloudStorageInputStreamMapIntegrationLiveTest extends
S3InputStreamMapIntegrationLiveTest {
public GreenQloudStorageInputStreamMapIntegrationLiveTest() {
provider = "greenqloud-storage";
}
}

View File

@ -0,0 +1,43 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.greenqloud.storage.blobstore;
import java.util.Set;
import org.jclouds.s3.blobstore.integration.S3ServiceIntegrationLiveTest;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
/**
* @author Adrian Cole
*/
@Test(groups = "live", testName = "GreenQloudStorageServiceIntegrationLiveTest")
public class GreenQloudStorageServiceIntegrationLiveTest extends S3ServiceIntegrationLiveTest {
public GreenQloudStorageServiceIntegrationLiveTest() {
provider = "greenqloud-storage";
}
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("IS-1");
}
}

View File

@ -50,5 +50,6 @@
<module>rackspace-cloudidentity</module>
<module>rackspace-cloudservers-us</module>
<module>greenqloud-compute</module>
<module>greenqloud-storage</module>
</modules>
</project>