You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by an...@apache.org on 2013/08/02 23:30:23 UTC
[2/6] Removing OpenStack modules from Labs repo (now in
jclouds-labs-openstack)
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/resources/access_rax_us.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/resources/access_rax_us.json b/openstack/openstack-reddwarf/src/test/resources/access_rax_us.json
deleted file mode 100644
index 6f71c9e..0000000
--- a/openstack/openstack-reddwarf/src/test/resources/access_rax_us.json
+++ /dev/null
@@ -1,163 +0,0 @@
-{
- "access": {
- "token": {
- "id": "myToken",
- "expires": "2012-09-30T17:15:32.000-05:00",
- "tenant": {
- "id": "717071",
- "name": "717071"
- }
- },
- "serviceCatalog": [
- {
- "endpoints": [
- {
- "tenantId": "717071",
- "publicURL": "https://dns.api.rackspacecloud.com/v1.0/717071"
- }
- ],
- "name": "cloudDNS",
- "type": "rax:dns"
- },
- {
- "endpoints": [
- {
- "tenantId": "717071",
- "publicURL": "https://monitoring.api.rackspacecloud.com/v1.0/717071"
- }
- ],
- "name": "cloudMonitoring",
- "type": "rax:monitor"
- },
- {
- "endpoints": [
- {
- "region": "DFW",
- "tenantId": "717071",
- "publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/717071",
- "versionInfo": "https://dfw.servers.api.rackspacecloud.com/v2",
- "versionList": "https://dfw.servers.api.rackspacecloud.com/",
- "versionId": "2"
- },
- {
- "region": "ORD",
- "tenantId": "717071",
- "publicURL": "https://ord.servers.api.rackspacecloud.com/v2/717071",
- "versionInfo": "https://ord.servers.api.rackspacecloud.com/v2",
- "versionList": "https://ord.servers.api.rackspacecloud.com/",
- "versionId": "2"
- }
- ],
- "name": "cloudServersOpenStack",
- "type": "compute"
- },
- {
- "endpoints": [
- {
- "region": "ORD",
- "tenantId": "717071",
- "publicURL": "https://ord.loadbalancers.api.rackspacecloud.com/v1.0/717071"
- },
- {
- "region": "DFW",
- "tenantId": "717071",
- "publicURL": "https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/717071"
- }
- ],
- "name": "cloudLoadBalancers",
- "type": "rax:load-balancer"
- },
- {
- "endpoints": [
- {
- "region": "DFW",
- "tenantId": "717071",
- "publicURL": "https://dfw.databases.api.rackspacecloud.com/v1.0/717071"
- },
- {
- "region": "ORD",
- "tenantId": "717071",
- "publicURL": "https://ord.databases.api.rackspacecloud.com/v1.0/717071"
- }
- ],
- "name": "cloudDatabases",
- "type": "rax:database"
- },
- {
- "endpoints": [
- {
- "region": "DFW",
- "tenantId": "MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9",
- "publicURL": "https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9",
- "internalURL": "https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9"
- },
- {
- "region": "ORD",
- "tenantId": "MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9",
- "publicURL": "https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9",
- "internalURL": "https://snet-storage101.ord1.clouddrive.com/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9"
- }
- ],
- "name": "cloudFiles",
- "type": "object-store"
- },
- {
- "endpoints": [
- {
- "region": "DFW",
- "tenantId": "MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9",
- "publicURL": "https://cdn1.clouddrive.com/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9"
- },
- {
- "region": "ORD",
- "tenantId": "MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9",
- "publicURL": "https://cdn2.clouddrive.com/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9"
- }
- ],
- "name": "cloudFilesCDN",
- "type": "rax:object-cdn"
- },
- {
- "endpoints": [
- {
- "tenantId": "717071",
- "publicURL": "https://servers.api.rackspacecloud.com/v1.0/717071",
- "versionInfo": "https://servers.api.rackspacecloud.com/v1.0",
- "versionList": "https://servers.api.rackspacecloud.com/",
- "versionId": "1.0"
- }
- ],
- "name": "cloudServers",
- "type": "compute"
- },
- {
- "endpoints": [
- {
- "publicURL": "https://ord.blockstorage.api.rackspacecloud.com/v1/717071",
- "tenantId": "717071",
- "region": "ORD"
- },
- {
- "region": "DFW",
- "tenantId": "717071",
- "publicURL": "https://dfw.blockstorage.api.rackspacecloud.com/v1/717071"
- }
- ],
- "name": "cloudBlockStorage",
- "type": "volume"
- }
- ],
- "user": {
- "id": "224085",
- "roles": [
- {
- "id": "3",
- "description": "User Admin Role.",
- "name": "identity:user-admin"
- }
- ],
- "name": "myUsername",
- "RAX-AUTH:defaultRegion": "DFW"
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/resources/flavor_get.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/resources/flavor_get.json b/openstack/openstack-reddwarf/src/test/resources/flavor_get.json
deleted file mode 100644
index ea07770..0000000
--- a/openstack/openstack-reddwarf/src/test/resources/flavor_get.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "flavor":{
- "id":1,
- "links":[
- {
- "href":"https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1",
- "rel":"self"
- },
- {
- "href":"https://ord.databases.api.rackspacecloud.com/flavors/1",
- "rel":"bookmark"
- }
- ],
- "name":"512MB Instance",
- "ram":512
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/resources/flavor_list.json
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/resources/flavor_list.json b/openstack/openstack-reddwarf/src/test/resources/flavor_list.json
deleted file mode 100644
index a9108f2..0000000
--- a/openstack/openstack-reddwarf/src/test/resources/flavor_list.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "flavors":[
- {
- "ram":512,
- "id":1,
- "links":[
- {
- "href":"https://localhost:8778/v1.0/811050/flavors/1",
- "rel":"self"
- },
- {
- "href":"https://localhost:8778/flavors/1",
- "rel":"bookmark"
- }
- ],
- "name":"512MB Instance"
- },
- {
- "ram":1024,
- "id":2,
- "links":[
- {
- "href":"https://localhost:8778/v1.0/811050/flavors/2",
- "rel":"self"
- },
- {
- "href":"https://localhost:8778/flavors/2",
- "rel":"bookmark"
- }
- ],
- "name":"1GB Instance"
- },
- {
- "ram":2048,
- "id":3,
- "links":[
- {
- "href":"https://localhost:8778/v1.0/811050/flavors/3",
- "rel":"self"
- },
- {
- "href":"https://localhost:8778/flavors/3",
- "rel":"bookmark"
- }
- ],
- "name":"2GB Instance"
- },
- {
- "ram":4096,
- "id":4,
- "links":[
- {
- "href":"https://localhost:8778/v1.0/811050/flavors/4",
- "rel":"self"
- },
- {
- "href":"https://localhost:8778/flavors/4",
- "rel":"bookmark"
- }
- ],
- "name":"4GB Instance"
- },
- {
- "ram":8192,
- "id":5,
- "links":[
- {
- "href":"https://localhost:8778/v1.0/811050/flavors/5",
- "rel":"self"
- },
- {
- "href":"https://localhost:8778/flavors/5",
- "rel":"bookmark"
- }
- ],
- "name":"8GB Instance"
- },
- {
- "ram":16384,
- "id":6,
- "links":[
- {
- "href":"https://localhost:8778/v1.0/811050/flavors/6",
- "rel":"self"
- },
- {
- "href":"https://localhost:8778/flavors/6",
- "rel":"bookmark"
- }
- ],
- "name":"16GB Instance"
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-reddwarf/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/openstack/openstack-reddwarf/src/test/resources/logback.xml b/openstack/openstack-reddwarf/src/test/resources/logback.xml
deleted file mode 100644
index a36c4c6..0000000
--- a/openstack/openstack-reddwarf/src/test/resources/logback.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<configuration scan="false">
- <appender name="FILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds.log</file>
-
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <appender name="WIREFILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds-wire.log</file>
-
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <appender name="BLOBSTOREFILE" class="ch.qos.logback.core.FileAppender">
- <file>target/test-data/jclouds-blobstore.log</file>
-
- <encoder>
- <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
- </encoder>
- </appender>
-
- <root>
- <level value="warn" />
- </root>
-
- <logger name="org.jclouds">
- <level value="DEBUG" />
- <appender-ref ref="FILE" />
- </logger>
-
- <logger name="jclouds.wire">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
-
- <logger name="jclouds.headers">
- <level value="DEBUG" />
- <appender-ref ref="WIREFILE" />
- </logger>
-
- <logger name="jclouds.blobstore">
- <level value="DEBUG" />
- <appender-ref ref="BLOBSTOREFILE" />
- </logger>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/pom.xml
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/pom.xml b/openstack/openstack-swift/pom.xml
deleted file mode 100644
index 2a2d23d..0000000
--- a/openstack/openstack-swift/pom.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF 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.apache.jclouds.labs</groupId>
- <artifactId>jclouds-labs-openstack</artifactId>
- <version>1.6.2-SNAPSHOT</version>
- </parent>
-
- <!-- TODO: when out of labs, switch to org.jclouds.api -->
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>openstack-swift</artifactId>
- <name>jclouds openstack-swift api</name>
- <description>jclouds components to access an implementation of OpenStack Swift</description>
- <packaging>bundle</packaging>
-
- <properties>
- <!-- keystone endpoint -->
- <test.openstack-swift.endpoint>http://localhost:5000/v2.0/</test.openstack-swift.endpoint>
- <test.openstack-swift.api-version>1.0</test.openstack-swift.api-version>
- <test.openstack-swift.build-version />
- <test.openstack-swift.identity>FIXME_IDENTITY</test.openstack-swift.identity>
- <test.openstack-swift.credential>FIXME_CREDENTIALS</test.openstack-swift.credential>
- <test.jclouds.keystone.credential-type>passwordCredentials</test.jclouds.keystone.credential-type>
- <jclouds.blobstore.httpstream.url>FIXME_HTTPURL</jclouds.blobstore.httpstream.url>
- <jclouds.blobstore.httpstream.md5>FIXME_HTTPMD5</jclouds.blobstore.httpstream.md5>
-
- <jclouds.osgi.export>org.jclouds.openstack.swift.v1*;version="${project.version}"</jclouds.osgi.export>
- <jclouds.osgi.import>
- org.jclouds.blobstore.internal;version="${jclouds.version}",
- org.jclouds.rest.internal;version="${jclouds.version}",
- org.jclouds*;version="${jclouds.version}",
- *
- </jclouds.osgi.import>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>openstack-keystone</artifactId>
- <version>${jclouds.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-blobstore</artifactId>
- <version>${jclouds.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${jclouds.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>openstack-keystone</artifactId>
- <version>${jclouds.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-blobstore</artifactId>
- <version>${jclouds.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-slf4j</artifactId>
- <version>${jclouds.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <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.openstack-swift.endpoint>${test.openstack-swift.endpoint}</test.openstack-swift.endpoint>
- <test.openstack-swift.api-version>${test.openstack-swift.api-version}</test.openstack-swift.api-version>
- <test.openstack-swift.build-version>${test.openstack-swift.build-version}</test.openstack-swift.build-version>
- <test.openstack-swift.identity>${test.openstack-swift.identity}</test.openstack-swift.identity>
- <test.openstack-swift.credential>${test.openstack-swift.credential}</test.openstack-swift.credential>
- <test.jclouds.keystone.credential-type>${test.jclouds.keystone.credential-type}</test.jclouds.keystone.credential-type>
- <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>
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java
deleted file mode 100644
index 826914c..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1;
-
-import java.io.Closeable;
-import java.util.Set;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.Region;
-import org.jclouds.location.functions.RegionToEndpoint;
-import org.jclouds.openstack.swift.v1.features.AccountApi;
-import org.jclouds.openstack.swift.v1.features.ContainerApi;
-import org.jclouds.openstack.swift.v1.features.ObjectApi;
-import org.jclouds.openstack.v2_0.features.ExtensionApi;
-import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.rest.annotations.EndpointParam;
-
-import com.google.inject.Provides;
-
-/**
- * Provides access to Swift.
- * <p/>
- *
- * @see <a href="http://docs.openstack.org/api/openstack-object-storage/1.0/content">api doc</a>
- * @author Adrian Cole
- * @author Zack Shoylev
- */
-public interface SwiftApi extends Closeable {
- /**
- *
- * @return the Region codes configured
- */
- @Provides
- @Region
- Set<String> getConfiguredRegions();
-
- /**
- * Provides access to Extension features.
- */
- @Delegate
- ExtensionApi getExtensionApiForRegion(
- @EndpointParam(parser = RegionToEndpoint.class) @Nullable String region);
-
- /**
- * Provides access to Account features.
- */
- @Delegate
- AccountApi getAccountApiForRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region);
-
- /**
- * Provides access to Container features.
- */
- @Delegate
- ContainerApi getContainerApiForRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region);
-
- /**
- * Provides access to Object features.
- */
- @Delegate
- ObjectApi getObjectApiForRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java
deleted file mode 100644
index 0cde00b..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1;
-
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
-import java.net.URI;
-import java.util.Properties;
-import org.jclouds.apis.ApiMetadata;
-import org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule;
-import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.RegionModule;
-import org.jclouds.openstack.swift.v1.config.SwiftHttpApiModule;
-import org.jclouds.openstack.v2_0.ServiceType;
-import org.jclouds.rest.internal.BaseHttpApiMetadata;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Implementation of {@link ApiMetadata} for Swift 1.0 API
- *
- * @author Adrian Cole
- * @author Zack Shoylev
- */
-public class SwiftApiMetadata extends BaseHttpApiMetadata<SwiftApi> {
-
- @Override
- public Builder toBuilder() {
- return new Builder().fromApiMetadata(this);
- }
-
- public SwiftApiMetadata() {
- this(new Builder());
- }
-
- protected SwiftApiMetadata(Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- Properties properties = BaseHttpApiMetadata.defaultProperties();
- properties.setProperty(SERVICE_TYPE, ServiceType.OBJECT_STORE);
- properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS);
- return properties;
- }
-
- public static class Builder extends BaseHttpApiMetadata.Builder<SwiftApi, Builder> {
-
- protected Builder() {
- id("openstack-swift")
- .name("OpenStack Swift Diablo+ API")
- .identityName("${tenantName}:${userName} or ${userName}, if your keystone supports a default tenant")
- .credentialName("${password}")
- .documentation(URI.create("http://docs.openstack.org/api/openstack-object-storage/1.0/content/ch_object-storage-dev-overview.html"))
- .version("1.0")
- .endpointName("KeyStone base url ending in /v2.0/")
- .defaultEndpoint("http://localhost:5000/v2.0/")
- .defaultProperties(SwiftApiMetadata.defaultProperties())
- .defaultModules(ImmutableSet.<Class<? extends Module>>builder()
- .add(AuthenticationApiModule.class)
- .add(KeystoneAuthenticationModule.class)
- .add(RegionModule.class)
- .add(SwiftHttpApiModule.class).build());
- }
-
- @Override
- public SwiftApiMetadata build() {
- return new SwiftApiMetadata(this);
- }
-
- @Override
- protected Builder self() {
- return this;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftHttpApiModule.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftHttpApiModule.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftHttpApiModule.java
deleted file mode 100644
index 9d35e2f..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftHttpApiModule.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.config;
-import java.net.URI;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import javax.inject.Provider;
-import javax.inject.Singleton;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.annotation.ClientError;
-import org.jclouds.http.annotation.Redirection;
-import org.jclouds.http.annotation.ServerError;
-import org.jclouds.json.config.GsonModule.DateAdapter;
-import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
-import org.jclouds.openstack.swift.v1.SwiftApi;
-import org.jclouds.openstack.swift.v1.handlers.SwiftErrorHandler;
-import org.jclouds.openstack.v2_0.domain.Extension;
-import org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet;
-import org.jclouds.rest.ConfiguresHttpApi;
-import org.jclouds.rest.config.HttpApiModule;
-import org.jclouds.rest.functions.ImplicitOptionalConverter;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.Multimap;
-import com.google.inject.Provides;
-
-/**
- * Configures the Swift connection.
- *
- * @author Adrian Cole
- * @author Zack Shoylev
- */
-@ConfiguresHttpApi
-public class SwiftHttpApiModule extends HttpApiModule<SwiftApi> {
-
- public SwiftHttpApiModule() {
- }
-
- @Override
- protected void configure() {
- bind(DateAdapter.class).to(Iso8601DateAdapter.class);
- bind(ImplicitOptionalConverter.class).to(PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.class);
- super.configure();
- }
-
- @Provides
- @Singleton
- public Multimap<URI, URI> aliases() {
- return ImmutableMultimap.<URI, URI>builder()
- .build();
- }
-
- @Provides
- @Singleton
- public LoadingCache<String, Set<? extends Extension>> provideExtensionsByZone(final Provider<SwiftApi> swiftApi) {
- return CacheBuilder.newBuilder().expireAfterWrite(23, TimeUnit.HOURS)
- .build(new CacheLoader<String, Set<? extends Extension>>() {
- @Override
- public Set<? extends Extension> load(String key) throws Exception {
- return swiftApi.get().getExtensionApiForRegion(key).list();
- }
- });
- }
-
- @Override
- protected void bindErrorHandlers() {
- bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(SwiftErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(SwiftErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(SwiftErrorHandler.class);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftProperties.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftProperties.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftProperties.java
deleted file mode 100644
index 70983bd..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftProperties.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.config;
-
-/**
- * Configuration properties and constants used in openstack Swift connections.
- *
- * @author Adam Lowe
- */
-public class SwiftProperties {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Account.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Account.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Account.java
deleted file mode 100644
index aaa07ec..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Account.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.domain;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Objects.toStringHelper;
-
-import java.beans.ConstructorProperties;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * @author Adrian Cole
- * @see <a href="http://docs.openstack.org/api/openstack-object-storage/1.0/content/retrieve-account-metadata.html">api doc</a>
- */
-public class Account {
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return builder().fromAccountMetadata(this);
- }
-
- public static class Builder {
- protected int containerCount;
- protected long bytesUsed;
-
- /**
- * @see Account#getContainerCount()
- */
- public Builder containerCount(int containerCount) {
- this.containerCount = containerCount;
- return this;
- }
-
- /**
- * @see Account#getBytesUsed()
- */
- public Builder bytesUsed(long bytesUsed) {
- this.bytesUsed = bytesUsed;
- return this;
- }
-
- public Account build() {
- return new Account(containerCount, bytesUsed);
- }
-
- public Builder fromAccountMetadata(Account from) {
- return containerCount(from.getContainerCount()).bytesUsed(from.getBytesUsed());
- }
- }
-
- protected int containerCount;
- protected long bytesUsed;
-
- @ConstructorProperties({"containerCount", "bytesUsed"})
- protected Account(int containerCount, long bytesUsed) {
- this.containerCount = containerCount;
- this.bytesUsed = bytesUsed;
- }
-
- /**
- *
- * @return the number of containers in OpenStack Object Storage for the account
- */
- public int getContainerCount() {
- return containerCount;
- }
-
- /**
- * @return the total bytes stored in OpenStack Object Storage for the account
- */
- public long getBytesUsed() {
- return bytesUsed;
- }
-
- @Override
- public boolean equals(Object object) {
- if (this == object) {
- return true;
- }
- if (object instanceof Account) {
- final Account other = Account.class.cast(object);
- return equal(getContainerCount(), other.getContainerCount()) && equal(getBytesUsed(), other.getBytesUsed());
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(getContainerCount(), getBytesUsed());
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- protected ToStringHelper string() {
- return toStringHelper("").add("containerCount", getContainerCount()).add("bytesUsed", getBytesUsed());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Container.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Container.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Container.java
deleted file mode 100644
index 4a62906..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Container.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.domain;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Objects.toStringHelper;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.beans.ConstructorProperties;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * retrieve a list of existing storage containers ordered by name. The sort order for the name is
- * based on a binary comparison, a single built-in collating sequence that compares string data
- * using SQLite's memcmp() function, regardless of text encoding.
- *
- * @author Adrian Cole
- * @see <a
- * href="http://docs.openstack.org/api/openstack-object-storage/1.0/content/s_listcontainers.html">api
- * doc</a>
- */
-public class Container implements Comparable<Container> {
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return builder().fromContainer(this);
- }
-
- public static class Builder {
- protected String name;
- protected int count;
- protected int bytes;
-
- /**
- * @see Container#getName()
- */
- public Builder name(String name) {
- this.name = checkNotNull(name, "name");
- return this;
- }
-
- /**
- * @see Container#getCount()
- */
- public Builder count(int count) {
- this.count = count;
- return this;
- }
-
- /**
- * @see Container#getBytes()
- */
- public Builder bytes(int bytes) {
- this.bytes = bytes;
- return this;
- }
-
- public Container build() {
- return new Container(name, count, bytes);
- }
-
- public Builder fromContainer(Container from) {
- return name(from.getName()).count(from.getCount()).bytes(from.getBytes());
- }
- }
-
- protected String name;
- protected int count;
- protected int bytes;
-
- @ConstructorProperties({"name", "count", "bytes"})
- protected Container(String name, int count, int bytes) {
- this.name = checkNotNull(name, "name");
- this.count = count;
- this.bytes = bytes;
- }
-
- /**
- *
- * @return the name of the container
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- * @return the number of objects in the container
- */
- public int getCount() {
- return count;
- }
-
- /**
- * @return the total bytes stored in this container
- */
- public int getBytes() {
- return bytes;
- }
-
- @Override
- public boolean equals(Object object) {
- if (this == object) {
- return true;
- }
- if (object instanceof Container) {
- final Container other = Container.class.cast(object);
- return equal(getName(), other.getName()) && equal(getCount(), other.getCount())
- && equal(getBytes(), other.getBytes());
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(getName(), getCount(), getBytes());
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- protected ToStringHelper string() {
- return toStringHelper("").add("name", getName()).add("count", getCount()).add("bytes", getBytes());
- }
-
- @Override
- public int compareTo(Container that) {
- if (that == null)
- return 1;
- if (this == that)
- return 0;
- return this.getName().compareTo(that.getName());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java
deleted file mode 100644
index 4c7f0e8..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import javax.ws.rs.HEAD;
-import javax.ws.rs.Path;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.swift.v1.domain.Account;
-import org.jclouds.openstack.swift.v1.functions.ParseAccountMetadataResponseFromHeaders;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-
-/**
- * Storage Account Services
- *
- * @author Adrian Cole
- * @author Zack Shoylev
- * @see <a
- * href="http://docs.openstack.org/api/openstack-object-storage/1.0/content/storage-account-services.html"
- * >api doc</a>
- */
-@RequestFilters(AuthenticateRequest.class)
-public interface AccountApi {
-
- /**
- * Retrieve Account Metadata
- *
- * @return account metadata including container count and bytes used
- */
- @HEAD
- @ResponseParser(ParseAccountMetadataResponseFromHeaders.class)
- @Path("/")
- Account get();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java
deleted file mode 100644
index 5696d77..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.MediaType;
-import org.jclouds.Fallbacks.EmptyFluentIterableOnNotFoundOr404;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.swift.v1.domain.Container;
-import org.jclouds.openstack.swift.v1.options.ListContainersOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-
-import com.google.common.collect.FluentIterable;
-
-/**
- * Storage Container Services
- *
- * @author Adrian Cole
- * @author Zack Shoylev
- * @see <a href=
- * "http://docs.openstack.org/api/openstack-object-storage/1.0/content/storage-container-services.html"
- * >api doc</a>
- */
-@RequestFilters(AuthenticateRequest.class)
-public interface ContainerApi {
-
- /**
- * @see #list(ListContainersOptions)
- */
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "format", values = "json")
- @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
- @Path("/")
- FluentIterable<? extends Container> list();
-
- /**
- * retrieve a list of existing storage containers ordered by name. The sort order for the name is
- * based on a binary comparison, a single built-in collating sequence that compares string data
- * using SQLite's memcmp() function, regardless of text encoding.
- *
- * @param options
- * @return a list of existing storage containers ordered by name.
- */
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "format", values = "json")
- @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
- @Path("/")
- FluentIterable<? extends Container> list(ListContainersOptions options);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java
deleted file mode 100644
index 93775a4..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.rest.annotations.RequestFilters;
-
-/**
- * Storage Object Services An object represents the data and any metadata for the files stored in
- * the system. Through the ReST interface, metadata for an object can be included by adding custom
- * HTTP headers to the request and the data payload as the request body. Objects cannot exceed 5GB
- * and must have names that do not exceed 1024 bytes after URL encoding. However, objects larger
- * than 5GB can be segmented and then concatenated together so that you can upload 5 GB segments and
- * download a single concatenated object. You can work with the segments and manifests directly with
- * HTTP requests.
- *
- * @author Adrian Cole
- * @author Zack Shoylev
- * @see <a href=
- * "http://docs.openstack.org/api/openstack-object-storage/1.0/content/storage-object-services.html"
- * >api doc</a>
- */
-@RequestFilters(AuthenticateRequest.class)
-public interface ObjectApi {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseAccountMetadataResponseFromHeaders.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseAccountMetadataResponseFromHeaders.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseAccountMetadataResponseFromHeaders.java
deleted file mode 100644
index 6fb20fe..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseAccountMetadataResponseFromHeaders.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.functions;
-
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.swift.v1.domain.Account;
-
-import com.google.common.base.Function;
-
-/**
- * This parses {@link Account} from HTTP headers.
- *
- * @author James Murty
- */
-public class ParseAccountMetadataResponseFromHeaders implements Function<HttpResponse, Account> {
-
- /**
- * parses the http response headers to create a new {@link Account} object.
- */
- public Account apply(HttpResponse from) {
- return Account.builder()
- .bytesUsed(Long.parseLong(from.getFirstHeaderOrNull("X-Account-Bytes-Used")))
- .containerCount(Integer.parseInt(from.getFirstHeaderOrNull("X-Account-Container-Count")))
- .build();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/handlers/SwiftErrorHandler.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/handlers/SwiftErrorHandler.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/handlers/SwiftErrorHandler.java
deleted file mode 100644
index 2cd5343..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/handlers/SwiftErrorHandler.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.handlers;
-
-import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.inject.Singleton;
-
-import org.jclouds.blobstore.ContainerNotFoundException;
-import org.jclouds.blobstore.KeyNotFoundException;
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.HttpResponseException;
-import org.jclouds.rest.AuthorizationException;
-
-/**
- * This will parse and set an appropriate exception on the command object.
- *
- * @author Adrian Cole
- *
- */
-// TODO: is there error spec someplace? let's type errors, etc.
-@Singleton
-public class SwiftErrorHandler implements HttpErrorHandler {
- public static final String PREFIX = "^/v[0-9][^/]*/[a-zA-Z]+_[^/]+/";
- public static final Pattern CONTAINER_PATH = Pattern.compile(PREFIX + "([^/]+)$");
- public static final Pattern CONTAINER_KEY_PATH = Pattern.compile(PREFIX + "([^/]+)/(.*)");
-
- public void handleError(HttpCommand command, HttpResponse response) {
- // it is important to always read fully and close streams
- byte[] data = closeClientButKeepContentStream(response);
- String message = data != null ? new String(data) : null;
-
- Exception exception = message != null ? new HttpResponseException(command, response, message)
- : new HttpResponseException(command, response);
- message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
- response.getStatusLine());
- switch (response.getStatusCode()) {
- case 401:
- exception = new AuthorizationException(exception.getMessage(), exception);
- break;
- case 404:
- if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
- String path = command.getCurrentRequest().getEndpoint().getPath();
- Matcher matcher = CONTAINER_PATH.matcher(path);
- Exception oldException = exception;
- if (matcher.find()) {
- exception = new ContainerNotFoundException(matcher.group(1), message);
- exception.initCause(oldException);
- } else {
- matcher = CONTAINER_KEY_PATH.matcher(path);
- if (matcher.find()) {
- exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
- exception.initCause(oldException);
- }
- }
- }
- break;
- }
- command.setException(exception);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/ListContainersOptions.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/ListContainersOptions.java b/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/ListContainersOptions.java
deleted file mode 100644
index 2efa90b..0000000
--- a/openstack/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/ListContainersOptions.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.options;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkState;
-
-import org.jclouds.http.options.BaseHttpRequestOptions;
-
-/**
- * Contains options supported in the REST API for the GET container operation. <h2>
- */
-public class ListContainersOptions extends BaseHttpRequestOptions {
- public static final ListContainersOptions NONE = new ListContainersOptions();
-
- /**
- * Given a string value x, return object names greater in value than the specified marker.
- */
- public ListContainersOptions marker(String marker) {
- queryParameters.put("marker", checkNotNull(marker, "marker"));
- return this;
- }
-
- public String getMarker() {
- return getFirstQueryOrNull("marker");
- }
-
- /**
- * For an integer value n, limits the number of results to n values.
- */
- public ListContainersOptions limit(int limit) {
- checkState(limit >= 0, "limit must be >= 0");
- checkState(limit <= 10000, "limit must be <= 10000");
- queryParameters.put("limit", Integer.toString(limit));
- return this;
- }
-
- public int getLimit() {
- String val = getFirstQueryOrNull("limit");
- return val != null ? Integer.valueOf(val) : 10000;
- }
-
-
- public static class Builder {
-
- /**
- * @see ListContainersOptions#marker(String)
- */
- public static ListContainersOptions marker(String marker) {
- ListContainersOptions options = new ListContainersOptions();
- return options.marker(marker);
- }
-
- /**
- * @see ListContainersOptions#limit(int)
- */
- public static ListContainersOptions limit(int limit) {
- ListContainersOptions options = new ListContainersOptions();
- return options.limit(limit);
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata b/openstack/openstack-swift/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
deleted file mode 100644
index 84f1200..0000000
--- a/openstack/openstack-swift/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
+++ /dev/null
@@ -1 +0,0 @@
-org.jclouds.openstack.swift.v1.SwiftApiMetadata
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/PasswordAuthenticationExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/PasswordAuthenticationExpectTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/PasswordAuthenticationExpectTest.java
deleted file mode 100644
index 7e0a746..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/PasswordAuthenticationExpectTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.Properties;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties;
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiExpectTest;
-import org.jclouds.openstack.swift.v1.parse.ParseContainerListTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @see KeystoneProperties#CREDENTIAL_TYPE
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "PasswordAuthenticationExpectTest")
-public class PasswordAuthenticationExpectTest extends BaseSwiftApiExpectTest {
-
- /**
- * this reflects the properties that a user would pass to createContext
- */
- @Override
- protected Properties setupProperties() {
- Properties contextProperties = super.setupProperties();
- contextProperties.setProperty("jclouds.keystone.credential-type", "passwordCredentials");
- return contextProperties;
- }
-
- public void testListContainersWhenResponseIs2xx() throws Exception {
- HttpRequest list = HttpRequest
- .builder()
- .method("GET")
- .endpoint("https://objects.jclouds.org/v1.0/40806637803162/?format=json")
- .addHeader("Accept", "application/json")
- .addHeader("X-Auth-Token", authToken).build();
-
- HttpResponse listResponse = HttpResponse.builder().statusCode(200)
- .payload(payloadFromResource("/container_list.json")).build();
-
- SwiftApi apiWhenContainersExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
- responseWithKeystoneAccess, list, listResponse);
-
- assertEquals(apiWhenContainersExist.getConfiguredRegions(), ImmutableSet.of("region-a.geo-1"));
-
- assertEquals(apiWhenContainersExist.getContainerApiForRegion("region-a.geo-1").list().toString(),
- new ParseContainerListTest().expected().toString());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java
deleted file mode 100644
index 7b83ef1..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1;
-
-import org.jclouds.View;
-import org.jclouds.apis.internal.BaseApiMetadataTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.reflect.TypeToken;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "SwiftApiMetadataTest")
-// public class SwiftApiMetadataTest extends BaseBlobStoreApiMetadataTest {
-public class SwiftApiMetadataTest extends BaseApiMetadataTest {
- public SwiftApiMetadataTest() {
- super(new SwiftApiMetadata(), ImmutableSet.<TypeToken<? extends View>> of());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftErrorHandlerTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftErrorHandlerTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftErrorHandlerTest.java
deleted file mode 100644
index ddd38dd..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftErrorHandlerTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1;
-
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.reportMatcher;
-import static org.easymock.EasyMock.verify;
-
-import java.net.URI;
-
-import org.easymock.IArgumentMatcher;
-import org.jclouds.blobstore.ContainerNotFoundException;
-import org.jclouds.blobstore.KeyNotFoundException;
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.swift.v1.handlers.SwiftErrorHandler;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "SwiftErrorHandlerTest")
-public class SwiftErrorHandlerTest {
-
- @Test
- public void test404SetsKeyNotFoundExceptionMosso() {
- assertCodeMakes("HEAD", URI
- .create("http://host/v1/MossoCloudFS_7064cdb1d49d4dcba3c899ac33e8409d/adriancole-blobstore1/key"), 404,
- "Not Found", "", KeyNotFoundException.class);
- }
-
- @Test
- public void test404SetsKeyNotFoundExceptionSwift() {
- assertCodeMakes("HEAD", URI
- .create("http://67.202.39.175:8080/v1/AUTH_7064cdb1d49d4dcba3c899ac33e8409d/adriancole-blobstore1/key"),
- 404, "Not Found", "", KeyNotFoundException.class);
- }
-
- @Test
- public void test404SetsContainerNotFoundExceptionMosso() {
- assertCodeMakes("HEAD", URI
- .create("http://host/v1/MossoCloudFS_7064cdb1d49d4dcba3c899ac33e8409d/adriancole-blobstore1"), 404,
- "Not Found", "", ContainerNotFoundException.class);
- }
-
- @Test
- public void test404SetsContainerNotFoundExceptionSwift() {
- assertCodeMakes("HEAD", URI
- .create("http://67.202.39.175:8080/v1/AUTH_7064cdb1d49d4dcba3c899ac33e8409d/adriancole-blobstore1"),
- 404, "Not Found", "", ContainerNotFoundException.class);
- }
-
- private void assertCodeMakes(String method, URI uri, int statusCode, String message, String content,
- Class<? extends Exception> expected) {
- assertCodeMakes(method, uri, statusCode, message, "text/plain", content, expected);
- }
-
- private void assertCodeMakes(String method, URI uri, int statusCode, String message, String contentType,
- String content, Class<? extends Exception> expected) {
-
- SwiftErrorHandler function = new SwiftErrorHandler();
-
- HttpCommand command = createMock(HttpCommand.class);
- HttpRequest request = HttpRequest.builder().method(method).endpoint(uri).build();
- HttpResponse response = HttpResponse.builder().statusCode(statusCode).message(message).payload(content).build();
- response.getPayload().getContentMetadata().setContentType(contentType);
-
- expect(command.getCurrentRequest()).andReturn(request).atLeastOnce();
- command.setException(classEq(expected));
-
- replay(command);
-
- function.handleError(command, response);
-
- verify(command);
- }
-
- public static Exception classEq(final Class<? extends Exception> in) {
- reportMatcher(new IArgumentMatcher() {
-
- @Override
- public void appendTo(StringBuffer buffer) {
- buffer.append("classEq(");
- buffer.append(in);
- buffer.append(")");
- }
-
- @Override
- public boolean matches(Object arg) {
- return arg.getClass() == in;
- }
-
- });
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiExpectTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiExpectTest.java
deleted file mode 100644
index 3eb9bd6..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiExpectTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import static org.testng.Assert.assertEquals;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.swift.v1.SwiftApi;
-import org.jclouds.openstack.swift.v1.domain.Account;
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiExpectTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "AccountApiExpectTest")
-public class AccountApiExpectTest extends BaseSwiftApiExpectTest {
-
- public void testGetAccountMetadataWhenResponseIs2xx() throws Exception {
-
- HttpRequest get = HttpRequest
- .builder()
- .method("HEAD")
- .endpoint("https://objects.jclouds.org/v1.0/40806637803162/")
- .addHeader("X-Auth-Token", authToken).build();
-
- HttpResponse listResponse = HttpResponse.builder().statusCode(204)
- .addHeader("X-Account-Container-Count", "3")
- .addHeader("X-Account-Bytes-Used", "323479").build();
-
- SwiftApi apiWhenExists = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
- responseWithKeystoneAccess, get, listResponse);
-
- assertEquals(
- apiWhenExists.getAccountApiForRegion("region-a.geo-1").get(),
- Account.builder().containerCount(3).bytesUsed(323479).build());
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiLiveTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiLiveTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiLiveTest.java
deleted file mode 100644
index d112e1c..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiLiveTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.openstack.swift.v1.domain.Account;
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiLiveTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Adrian Cole
- * @author Zack Shoylev
- */
-@Test(groups = "live", testName = "ContainerApiLiveTest")
-public class AccountApiLiveTest extends BaseSwiftApiLiveTest {
-
- @Test
- public void testGetAccountMetadata() throws Exception {
- for (String regionId : api.getConfiguredRegions()) {
- AccountApi accountApi = api.getAccountApiForRegion(regionId);
- Account account = accountApi.get();
- assertNotNull(account);
- assertTrue(account.getContainerCount() >= 0);
- assertTrue(account.getBytesUsed() >= 0);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java
deleted file mode 100644
index 7dd68d0..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import static org.testng.Assert.assertEquals;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.openstack.swift.v1.SwiftApi;
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiExpectTest;
-import org.jclouds.openstack.swift.v1.parse.ParseContainerListTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "ContainerAsyncApiTest")
-public class ContainerApiExpectTest extends BaseSwiftApiExpectTest {
- public void testListContainersWhenResponseIs2xx() throws Exception {
-
- HttpRequest list = HttpRequest
- .builder()
- .method("GET")
- .endpoint("https://objects.jclouds.org/v1.0/40806637803162/?format=json")
- .addHeader("Accept", "application/json")
- .addHeader("X-Auth-Token", authToken).build();
-
- HttpResponse listResponse = HttpResponse.builder().statusCode(200)
- .payload(payloadFromResource("/container_list.json")).build();
-
- SwiftApi apiWhenContainersExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
- responseWithKeystoneAccess, list, listResponse);
-
- assertEquals(
- apiWhenContainersExist.getContainerApiForRegion("region-a.geo-1").list()
- .toString(), new ParseContainerListTest().expected().toString());
- }
-
- public void testListContainersWhenResponseIs404() throws Exception {
- HttpRequest list = HttpRequest
- .builder()
- .method("GET")
- .endpoint("https://objects.jclouds.org/v1.0/40806637803162/?format=json")
- .addHeader("Accept", "application/json")
- .addHeader("X-Auth-Token", authToken).build();
-
- HttpResponse listResponse = HttpResponse.builder().statusCode(404).build();
-
- SwiftApi apiWhenNoContainersExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
- responseWithKeystoneAccess, list, listResponse);
-
- assertEquals(apiWhenNoContainersExist.getContainerApiForRegion("region-a.geo-1").list().toSet(),
- ImmutableSet.of());
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiLiveTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiLiveTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiLiveTest.java
deleted file mode 100644
index d547a45..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiLiveTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.openstack.swift.v1.domain.Container;
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiLiveTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.FluentIterable;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "live", testName = "ContainerApiLiveTest")
-public class ContainerApiLiveTest extends BaseSwiftApiLiveTest {
-
- @Test
- public void testListContainers() throws Exception {
- for (String regionId : api.getConfiguredRegions()) {
- ContainerApi containerApi = api.getContainerApiForRegion(regionId);
- FluentIterable<? extends Container> response = containerApi.list();
- assertNotNull(response);
- for (Container container : response) {
- assertNotNull(container.getName());
- assertTrue(container.getCount() >= 0);
- assertTrue(container.getBytes() >= 0);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiExpectTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiExpectTest.java
deleted file mode 100644
index db521d2..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiExpectTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiExpectTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "ObjectAsyncApiTest")
-public class ObjectApiExpectTest extends BaseSwiftApiExpectTest {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiLiveTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiLiveTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiLiveTest.java
deleted file mode 100644
index a9e83e7..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiLiveTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.features;
-
-import org.jclouds.openstack.swift.v1.internal.BaseSwiftApiLiveTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Adrian Cole
- */
-@Test(groups = "live", testName = "ObjectApiLiveTest")
-public class ObjectApiLiveTest extends BaseSwiftApiLiveTest {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/0736d2dd/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/internal/BaseSwiftApiExpectTest.java
----------------------------------------------------------------------
diff --git a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/internal/BaseSwiftApiExpectTest.java b/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/internal/BaseSwiftApiExpectTest.java
deleted file mode 100644
index 2b18142..0000000
--- a/openstack/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/internal/BaseSwiftApiExpectTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.openstack.swift.v1.internal;
-
-import org.jclouds.openstack.swift.v1.SwiftApi;
-
-/**
- * Base class for writing KeyStone Rest Api Expect tests
- *
- * @author Adrian Cole
- */
-public class BaseSwiftApiExpectTest extends BaseSwiftExpectTest<SwiftApi> {
-
-}