Issue 440: extracted cloudservers and cloudfiles into their own api modules, moved rackspace into commons

This commit is contained in:
Adrian Cole 2011-01-08 10:46:54 -08:00
parent 609ac300be
commit 9d6537dfc2
200 changed files with 1153 additions and 674 deletions

View File

@ -70,8 +70,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-rackspace</artifactId>
<groupId>org.jclouds.api</groupId>
<artifactId>cloudfiles</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View File

@ -45,8 +45,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-rackspace</artifactId>
<groupId>org.jclouds.api</groupId>
<artifactId>cloudservers</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View File

@ -1,106 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!--
Copyright (C) 2010 Cloud Conscious, LLC.
<info@cloudconscious.com>
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
====================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
====================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions
and limitations under the License.
====================================================================
-->
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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4.0.0.xsd" >
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-project</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../project/pom.xml</relativePath>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<artifactId>jclouds-rackspace</artifactId>
<name>jclouds rackspace components</name>
<groupId>org.jclouds.api</groupId>
<artifactId>cloudfiles</artifactId>
<name>jcloud cloudfiles api</name>
<description>jclouds components to access an implementation of CloudFiles</description>
<properties>
<test.rackspace.endpoint>https://auth.api.rackspacecloud.com</test.rackspace.endpoint>
<test.rackspace.apiversion>1.0</test.rackspace.apiversion>
<test.rackspace.identity>FIXME</test.rackspace.identity>
<test.rackspace.credential>FIXME</test.rackspace.credential>
<test.initializer>org.jclouds.rackspace.cloudfiles.blobstore.integration.CloudFilesTestInitializer</test.initializer>
<!-- when instances are hung, open a ticket and add here -->
<jclouds.compute.blacklist-nodes>trmkrun-ccc,test.trmk-924</jclouds.compute.blacklist-nodes>
<test.cloudfiles.endpoint>${test.rackspace.endpoint}</test.cloudfiles.endpoint>
<test.cloudfiles.apiversion>${test.rackspace.apiversion}</test.cloudfiles.apiversion>
<test.initializer>org.jclouds.cloudfiles.blobstore.integration.CloudFilesTestInitializer</test.initializer>
<test.cloudfiles.endpoint>https://auth.api.rackspacecloud.com</test.cloudfiles.endpoint>
<test.cloudfiles.apiversion>1.0</test.cloudfiles.apiversion>
<test.cloudfiles.identity>${test.rackspace.identity}</test.cloudfiles.identity>
<test.cloudfiles.credential>${test.rackspace.credential}</test.cloudfiles.credential>
<test.cloudservers.endpoint>${test.rackspace.endpoint}</test.cloudservers.endpoint>
<test.cloudservers.apiversion>${test.rackspace.apiversion}</test.cloudservers.apiversion>
<test.cloudservers.identity>${test.rackspace.identity}</test.cloudservers.identity>
<test.cloudservers.credential>${test.rackspace.credential}</test.cloudservers.credential>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.jclouds.common</groupId>
<artifactId>rackspace-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-blobstore</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>${project.groupId}</groupId>
<artifactId>jclouds-blobstore</artifactId>
<groupId>org.jclouds.common</groupId>
<artifactId>rackspace-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-blobstore</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-log4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-jsch</artifactId>
<version>${project.version}</version>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>live</id>
@ -134,26 +121,6 @@
<name>test.cloudfiles.credential</name>
<value>${test.cloudfiles.credential}</value>
</property>
<property>
<name>test.cloudservers.endpoint</name>
<value>${test.cloudservers.endpoint}</value>
</property>
<property>
<name>test.cloudservers.apiversion</name>
<value>${test.cloudservers.apiversion}</value>
</property>
<property>
<name>test.cloudservers.identity</name>
<value>${test.cloudservers.identity}</value>
</property>
<property>
<name>test.cloudservers.credential</name>
<value>${test.cloudservers.credential}</value>
</property>
<property>
<name>jclouds.compute.blacklist-nodes</name>
<value>${jclouds.compute.blacklist-nodes}</value>
</property>
<property>
<name>test.initializer</name>
<value>${test.initializer}</value>
@ -176,4 +143,6 @@
</profile>
</profiles>
</project>

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles;
package org.jclouds.cloudfiles;
import java.net.URI;
import java.util.Map;
@ -45,24 +45,24 @@ import org.jclouds.http.functions.ParseETagHeader;
import org.jclouds.http.options.GetOptions;
import org.jclouds.rackspace.CloudFiles;
import org.jclouds.rackspace.CloudFilesCDN;
import org.jclouds.rackspace.cloudfiles.binders.BindCFObjectMetadataToRequest;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.rackspace.cloudfiles.functions.ObjectName;
import org.jclouds.rackspace.cloudfiles.functions.ParseAccountMetadataResponseFromHeaders;
import org.jclouds.rackspace.cloudfiles.functions.ParseCdnUriFromHeaders;
import org.jclouds.rackspace.cloudfiles.functions.ParseContainerCDNMetadataFromHeaders;
import org.jclouds.rackspace.cloudfiles.functions.ParseObjectFromHeadersAndHttpContent;
import org.jclouds.rackspace.cloudfiles.functions.ParseObjectInfoFromHeaders;
import org.jclouds.rackspace.cloudfiles.functions.ParseObjectInfoListFromJsonResponse;
import org.jclouds.rackspace.cloudfiles.functions.ReturnTrueOn404FalseOn409;
import org.jclouds.rackspace.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions;
import org.jclouds.rackspace.cloudfiles.reference.CloudFilesHeaders;
import org.jclouds.cloudfiles.binders.BindCFObjectMetadataToRequest;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.functions.ObjectName;
import org.jclouds.cloudfiles.functions.ParseAccountMetadataResponseFromHeaders;
import org.jclouds.cloudfiles.functions.ParseCdnUriFromHeaders;
import org.jclouds.cloudfiles.functions.ParseContainerCDNMetadataFromHeaders;
import org.jclouds.cloudfiles.functions.ParseObjectFromHeadersAndHttpContent;
import org.jclouds.cloudfiles.functions.ParseObjectInfoFromHeaders;
import org.jclouds.cloudfiles.functions.ParseObjectInfoListFromJsonResponse;
import org.jclouds.cloudfiles.functions.ReturnTrueOn404FalseOn409;
import org.jclouds.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.cloudfiles.options.ListContainerOptions;
import org.jclouds.cloudfiles.reference.CloudFilesHeaders;
import org.jclouds.rackspace.filters.AuthenticateRequest;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.Endpoint;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles;
package org.jclouds.cloudfiles;
import java.net.URI;
import java.util.Map;
@ -29,14 +29,14 @@ import org.jclouds.blobstore.ContainerNotFoundException;
import org.jclouds.blobstore.domain.PageSet;
import org.jclouds.concurrent.Timeout;
import org.jclouds.http.options.GetOptions;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.rackspace.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.cloudfiles.options.ListContainerOptions;
import java.util.concurrent.Future;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles;
package org.jclouds.cloudfiles;
import java.util.List;
import java.util.Properties;
@ -25,8 +25,8 @@ import java.util.Properties;
import org.jclouds.blobstore.BlobStoreContextBuilder;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.logging.jdk.config.JDKLoggingModule;
import org.jclouds.rackspace.cloudfiles.blobstore.config.CloudFilesBlobStoreContextModule;
import org.jclouds.rackspace.cloudfiles.config.CloudFilesRestClientModule;
import org.jclouds.cloudfiles.blobstore.config.CloudFilesBlobStoreContextModule;
import org.jclouds.cloudfiles.config.CloudFilesRestClientModule;
import com.google.inject.Injector;
import com.google.inject.Module;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles;
package org.jclouds.cloudfiles;
import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.binders;
package org.jclouds.cloudfiles.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@ -29,8 +29,8 @@ import javax.ws.rs.core.MediaType;
import org.jclouds.blobstore.binders.BindUserMetadataToHeadersWithPrefix;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.utils.ModifyRequest;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.rest.Binder;
@Singleton

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore;
package org.jclouds.cloudfiles.blobstore;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.blobstore.util.BlobStoreUtils.createParentIfNeededAsync;
@ -46,18 +46,18 @@ import org.jclouds.collect.Memoized;
import org.jclouds.concurrent.Futures;
import org.jclouds.domain.Location;
import org.jclouds.http.options.GetOptions;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.CloudFilesClient;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.BlobStoreListContainerOptionsToListContainerOptions;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ContainerToResourceList;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ContainerToResourceMetadata;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlobMetadata;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.CloudFilesClient;
import org.jclouds.cloudfiles.blobstore.functions.BlobStoreListContainerOptionsToListContainerOptions;
import org.jclouds.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.cloudfiles.blobstore.functions.ContainerToResourceList;
import org.jclouds.cloudfiles.blobstore.functions.ContainerToResourceMetadata;
import org.jclouds.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.cloudfiles.blobstore.functions.ObjectToBlobMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@ -144,7 +144,7 @@ public class CloudFilesAsyncBlobStore extends BaseAsyncBlobStore {
*/
@Override
public ListenableFuture<PageSet<? extends StorageMetadata>> list(String container, ListContainerOptions options) {
org.jclouds.rackspace.cloudfiles.options.ListContainerOptions httpOptions = container2ContainerListOptions
org.jclouds.cloudfiles.options.ListContainerOptions httpOptions = container2ContainerListOptions
.apply(options);
ListenableFuture<PageSet<ObjectInfo>> returnVal = async.listObjects(container, httpOptions);
ListenableFuture<PageSet<? extends StorageMetadata>> list = Futures.compose(returnVal, container2ResourceList,

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore;
package org.jclouds.cloudfiles.blobstore;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.blobstore.util.BlobStoreUtils.cleanRequest;
@ -31,9 +31,9 @@ import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.options.GetOptions;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.rest.internal.RestAnnotationProcessor;
/**
@ -74,4 +74,4 @@ public class CloudFilesBlobRequestSigner implements BlobRequestSigner {
return cleanRequest(processor.createRequest(deleteMethod, container, name));
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore;
package org.jclouds.cloudfiles.blobstore;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.blobstore.util.BlobStoreUtils.createParentIfNeededAsync;
@ -42,14 +42,14 @@ import org.jclouds.blobstore.util.BlobUtils;
import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location;
import org.jclouds.http.options.GetOptions;
import org.jclouds.rackspace.cloudfiles.CloudFilesClient;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.BlobStoreListContainerOptionsToListContainerOptions;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ContainerToResourceList;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ContainerToResourceMetadata;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlobMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.CloudFilesClient;
import org.jclouds.cloudfiles.blobstore.functions.BlobStoreListContainerOptionsToListContainerOptions;
import org.jclouds.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.cloudfiles.blobstore.functions.ContainerToResourceList;
import org.jclouds.cloudfiles.blobstore.functions.ContainerToResourceMetadata;
import org.jclouds.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.cloudfiles.blobstore.functions.ObjectToBlobMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@ -135,7 +135,7 @@ public class CloudFilesBlobStore extends BaseBlobStore {
*/
@Override
public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options) {
org.jclouds.rackspace.cloudfiles.options.ListContainerOptions httpOptions = container2ContainerListOptions
org.jclouds.cloudfiles.options.ListContainerOptions httpOptions = container2ContainerListOptions
.apply(options);
PageSet<? extends StorageMetadata> list = container2ResourceList.apply(sync.listObjects(container, httpOptions));
return options.isDetailed() ? fetchBlobMetadataProvider.get().setContainerName(container).apply(list) : list;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.config;
package org.jclouds.cloudfiles.blobstore.config;
import java.util.Set;
@ -32,11 +32,11 @@ import org.jclouds.blobstore.config.BlobStoreMapModule;
import org.jclouds.blobstore.internal.BlobStoreContextImpl;
import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.CloudFilesClient;
import org.jclouds.rackspace.cloudfiles.blobstore.CloudFilesAsyncBlobStore;
import org.jclouds.rackspace.cloudfiles.blobstore.CloudFilesBlobRequestSigner;
import org.jclouds.rackspace.cloudfiles.blobstore.CloudFilesBlobStore;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.CloudFilesClient;
import org.jclouds.cloudfiles.blobstore.CloudFilesAsyncBlobStore;
import org.jclouds.cloudfiles.blobstore.CloudFilesBlobRequestSigner;
import org.jclouds.cloudfiles.blobstore.CloudFilesBlobStore;
import org.jclouds.rackspace.config.RackspaceLocationsSupplier;
import com.google.common.base.Supplier;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import static com.google.common.base.Preconditions.checkNotNull;
@ -33,11 +33,11 @@ import com.google.common.base.Function;
@Singleton
public class BlobStoreListContainerOptionsToListContainerOptions
implements
Function<ListContainerOptions, org.jclouds.rackspace.cloudfiles.options.ListContainerOptions> {
public org.jclouds.rackspace.cloudfiles.options.ListContainerOptions apply(
Function<ListContainerOptions, org.jclouds.cloudfiles.options.ListContainerOptions> {
public org.jclouds.cloudfiles.options.ListContainerOptions apply(
ListContainerOptions from) {
checkNotNull(from, "set options to instance NONE instead of passing null");
org.jclouds.rackspace.cloudfiles.options.ListContainerOptions options = new org.jclouds.rackspace.cloudfiles.options.ListContainerOptions();
org.jclouds.cloudfiles.options.ListContainerOptions options = new org.jclouds.cloudfiles.options.ListContainerOptions();
if ((from.getDir() == null) && (from.isRecursive())) {
options.withPrefix("");
}
@ -60,4 +60,4 @@ public class BlobStoreListContainerOptionsToListContainerOptions
return options;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import static com.google.common.base.Preconditions.checkNotNull;
@ -25,7 +25,7 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.CFObject;
import com.google.common.base.Function;
@ -51,4 +51,4 @@ public class BlobToObject implements Function<Blob, CFObject> {
object.setAllHeaders(from.getAllHeaders());
return object;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import javax.inject.Singleton;
@ -58,4 +58,4 @@ public class BlobToObjectGetOptions implements
}
return httpOptions;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -28,7 +28,7 @@ import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.StorageType;
import org.jclouds.blobstore.domain.internal.PageSetImpl;
import org.jclouds.blobstore.domain.internal.StorageMetadataImpl;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
@ -59,4 +59,4 @@ public class ContainerToResourceList implements Function<PageSet<ObjectInfo>, Pa
}), from.getNextMarker());
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -27,7 +27,7 @@ import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.StorageType;
import org.jclouds.blobstore.domain.internal.MutableStorageMetadataImpl;
import org.jclouds.domain.Location;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@ -51,4 +51,4 @@ public class ContainerToResourceMetadata implements Function<ContainerMetadata,
to.setType(StorageType.CONTAINER);
return to;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import static com.google.common.base.Preconditions.checkNotNull;
@ -26,7 +26,7 @@ import javax.inject.Singleton;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.Blob.Factory;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.CFObject;
import com.google.common.base.Function;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -27,8 +27,8 @@ import org.jclouds.blobstore.domain.StorageType;
import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl;
import org.jclouds.blobstore.strategy.IfDirectoryReturnNameStrategy;
import org.jclouds.crypto.CryptoStreams;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import com.google.common.base.Function;
@ -69,4 +69,4 @@ public class ObjectToBlobMetadata implements Function<ObjectInfo, MutableBlobMet
}
return to;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import java.util.Map.Entry;
@ -27,8 +27,8 @@ import org.jclouds.blobstore.domain.BlobMetadata;
import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.StorageType;
import org.jclouds.crypto.CryptoStreams;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.internal.MutableObjectInfoWithMetadataImpl;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.internal.MutableObjectInfoWithMetadataImpl;
import com.google.common.base.Function;
@ -60,4 +60,4 @@ public class ResourceToObjectInfo implements Function<StorageMetadata, MutableOb
return to;
}
}
}

View File

@ -17,15 +17,15 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.config;
package org.jclouds.cloudfiles.config;
import javax.inject.Inject;
import javax.inject.Provider;
import org.jclouds.blobstore.config.BlobStoreObjectModule;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.internal.CFObjectImpl;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.internal.CFObjectImpl;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
@ -63,4 +63,4 @@ public class CFObjectModule extends AbstractModule {
return factory.create(null);
}
}
}

View File

@ -17,16 +17,16 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.config;
package org.jclouds.cloudfiles.config;
import org.jclouds.http.HttpErrorHandler;
import org.jclouds.http.RequiresHttp;
import org.jclouds.http.annotation.ClientError;
import org.jclouds.http.annotation.Redirection;
import org.jclouds.http.annotation.ServerError;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.CloudFilesClient;
import org.jclouds.rackspace.cloudfiles.handlers.ParseCloudFilesErrorFromHttpResponse;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.CloudFilesClient;
import org.jclouds.cloudfiles.handlers.ParseCloudFilesErrorFromHttpResponse;
import org.jclouds.rackspace.config.RackspaceAuthenticationRestModule;
import org.jclouds.rest.ConfiguresRestClient;
import org.jclouds.rest.config.RestClientModule;
@ -68,4 +68,4 @@ public class CloudFilesRestClientModule extends
bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(
ParseCloudFilesErrorFromHttpResponse.class);
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain;
package org.jclouds.cloudfiles.domain;
/**
*

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain;
package org.jclouds.cloudfiles.domain;
import javax.annotation.Nullable;
@ -42,4 +42,4 @@ public interface CFObject extends PayloadEnclosing, Comparable<CFObject> {
Multimap<String, String> getAllHeaders();
void setAllHeaders(Multimap<String, String> allHeaders);
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain;
package org.jclouds.cloudfiles.domain;
import java.net.URI;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain;
package org.jclouds.cloudfiles.domain;
/**

View File

@ -17,12 +17,12 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain;
package org.jclouds.cloudfiles.domain;
import java.util.Date;
import java.util.Map;
import org.jclouds.rackspace.cloudfiles.domain.internal.MutableObjectInfoWithMetadataImpl;
import org.jclouds.cloudfiles.domain.internal.MutableObjectInfoWithMetadataImpl;
import com.google.inject.ImplementedBy;
@ -46,4 +46,4 @@ public interface MutableObjectInfoWithMetadata extends ObjectInfo {
Map<String, String> getMetadata();
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain;
package org.jclouds.cloudfiles.domain;
import java.util.Date;
@ -38,4 +38,4 @@ public interface ObjectInfo extends Comparable<ObjectInfo> {
Date getLastModified();
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain.internal;
package org.jclouds.cloudfiles.domain.internal;
import static com.google.common.base.Preconditions.checkNotNull;
@ -26,8 +26,8 @@ import javax.inject.Inject;
import org.jclouds.http.HttpUtils;
import org.jclouds.http.internal.PayloadEnclosingImpl;
import org.jclouds.io.Payload;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.Multimap;

View File

@ -17,14 +17,14 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain.internal;
package org.jclouds.cloudfiles.domain.internal;
import java.util.Date;
import java.util.Map;
import org.jclouds.io.payloads.BaseMutableContentMetadata;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
/**
*
@ -129,4 +129,4 @@ public class DelegatingMutableObjectInfoWithMetadata extends BaseMutableContentM
public int compareTo(ObjectInfo o) {
return delegate.compareTo(o);
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain.internal;
package org.jclouds.cloudfiles.domain.internal;
import java.util.Arrays;
import java.util.Date;
@ -25,8 +25,8 @@ import java.util.Map;
import javax.ws.rs.core.MediaType;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import com.google.common.collect.Maps;
@ -143,4 +143,4 @@ public class MutableObjectInfoWithMetadataImpl implements MutableObjectInfoWithM
this.lastModified = lastModified;
}
}
}

View File

@ -17,12 +17,12 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain.internal;
package org.jclouds.cloudfiles.domain.internal;
import java.util.Arrays;
import java.util.Date;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.ObjectInfo;
public class ObjectInfoImpl implements ObjectInfo {
String name;
@ -115,4 +115,4 @@ public class ObjectInfoImpl implements ObjectInfo {
+ ", last_modified=" + last_modified.getTime() + ", name=" + name
+ "]";
}
}
}

View File

@ -17,9 +17,9 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.CFObject;
import com.google.common.base.Function;
@ -33,4 +33,4 @@ public class ObjectName implements Function<Object, String> {
return ((CFObject) from).getInfo().getName();
}
}
}

View File

@ -17,13 +17,13 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static com.google.common.base.Preconditions.checkNotNull;
import org.jclouds.http.HttpResponse;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.reference.CloudFilesHeaders;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.reference.CloudFilesHeaders;
import com.google.common.base.Function;
@ -49,4 +49,4 @@ public class ParseAccountMetadataResponseFromHeaders implements
Long.parseLong(containersCountString),
Long.parseLong(bytesString));
}
}
}

View File

@ -17,15 +17,15 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
import org.jclouds.http.HttpResponse;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.reference.CloudFilesHeaders;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.reference.CloudFilesHeaders;
import com.google.common.base.Function;
@ -44,4 +44,4 @@ public class ParseCdnUriFromHeaders implements Function<HttpResponse, URI> {
CloudFilesHeaders.CDN_URI);
return URI.create(cdnUri);
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static com.google.common.base.Preconditions.checkNotNull;
@ -25,9 +25,9 @@ import java.net.URI;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.rackspace.cloudfiles.reference.CloudFilesHeaders;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.cloudfiles.reference.CloudFilesHeaders;
import org.jclouds.rest.InvocationContext;
import com.google.common.base.Function;
@ -66,4 +66,4 @@ public class ParseContainerCDNMetadataFromHeaders implements
this.request = request;
return this;
}
}
}

View File

@ -17,14 +17,14 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import javax.inject.Inject;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rest.InvocationContext;
import com.google.common.base.Function;
@ -63,4 +63,4 @@ public class ParseObjectFromHeadersAndHttpContent implements Function<HttpRespon
infoParser.setContext(request);
return this;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders;
@ -28,8 +28,8 @@ import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
import org.jclouds.crypto.CryptoStreams;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ResourceToObjectInfo;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.blobstore.functions.ResourceToObjectInfo;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rest.InvocationContext;
import com.google.common.base.Function;
@ -71,4 +71,4 @@ public class ParseObjectInfoFromHeaders implements Function<HttpResponse, Mutabl
return this;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
@ -34,9 +34,9 @@ import org.jclouds.blobstore.domain.internal.PageSetImpl;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.functions.ParseJson;
import org.jclouds.json.Json;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.rackspace.cloudfiles.domain.internal.ObjectInfoImpl;
import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.internal.ObjectInfoImpl;
import org.jclouds.cloudfiles.options.ListContainerOptions;
import org.jclouds.rest.InvocationContext;
import org.jclouds.rest.internal.GeneratedHttpRequest;
@ -94,4 +94,4 @@ public class ParseObjectInfoListFromJsonResponse extends ParseJson<PageSet<Objec
this.request = (GeneratedHttpRequest<?>) request;
return this;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static com.google.common.base.Predicates.in;
import static com.google.common.collect.ImmutableSet.of;
@ -36,4 +36,4 @@ public class ReturnTrueOn404FalseOn409 implements Function<Exception, Boolean> {
Boolean returnVal = returnValueOnCodeOrNull(from, true, in(of(404, 409)));
return returnVal != null ? returnVal : Boolean.class.cast(propagateOrNull(from));
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.handlers;
package org.jclouds.cloudfiles.handlers;
import static org.jclouds.http.HttpUtils.releasePayload;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.options;
package org.jclouds.cloudfiles.options;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.options;
package org.jclouds.cloudfiles.options;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;

View File

@ -23,4 +23,4 @@
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090311.pdf" />
* @author Adrian Cole
*/
package org.jclouds.rackspace.cloudfiles;
package org.jclouds.cloudfiles;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.reference;
package org.jclouds.cloudfiles.reference;
/**

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.reference;
package org.jclouds.cloudfiles.reference;
/**
@ -39,4 +39,4 @@ public interface CloudFilesHeaders {
public static final String CONTAINER_BYTES_USED = "X-Container-Bytes-Used";
public static final String CONTAINER_OBJECT_COUNT = "X-Container-Object-Count";
public static final String USER_METADATA_PREFIX = "X-Object-Meta-";
}
}

View File

@ -21,4 +21,4 @@
* This package contains properties and reference data used in Rackspace Cloud Files.
* @author Adrian Cole
*/
package org.jclouds.rackspace.cloudfiles.reference;
package org.jclouds.cloudfiles.reference;

View File

@ -17,9 +17,9 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles;
package org.jclouds.cloudfiles;
import static org.jclouds.rackspace.cloudfiles.options.ListContainerOptions.Builder.underPath;
import static org.jclouds.cloudfiles.options.ListContainerOptions.Builder.underPath;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
@ -39,14 +39,14 @@ import org.jclouds.crypto.CryptoStreams;
import org.jclouds.http.HttpResponseException;
import org.jclouds.http.options.GetOptions;
import org.jclouds.io.Payloads;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.rackspace.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.cloudfiles.options.ListContainerOptions;
import org.jclouds.util.Strings2;
import org.testng.annotations.Test;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.binders;
package org.jclouds.cloudfiles.binders;
import static org.testng.Assert.assertEquals;
@ -30,8 +30,8 @@ import javax.ws.rs.HttpMethod;
import org.jclouds.http.HttpRequest;
import org.jclouds.io.Payload;
import org.jclouds.io.Payloads;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.rest.RestClientTest;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.rest.RestContextSpec;
@ -152,4 +152,4 @@ public class BindCFObjectMetadataToRequestTest extends RestClientTest<CloudFiles
public RestContextSpec<?, ?> createContextSpec() {
return new RestContextFactory().createContextSpec("cloudfiles", "identity", "credential", new Properties());
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore;
package org.jclouds.cloudfiles.blobstore;
import static org.testng.Assert.assertEquals;
@ -27,10 +27,10 @@ import java.util.Properties;
import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.Blob.Factory;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.config.CloudFilesRestClientModule;
import org.jclouds.http.HttpRequest;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.config.CloudFilesRestClientModule;
import org.jclouds.rackspace.cloudservers.TestRackspaceAuthenticationRestClientModule;
import org.jclouds.rackspace.TestRackspaceAuthenticationRestClientModule;
import org.jclouds.rest.RestClientTest;
import org.jclouds.rest.RestContextFactory;
import org.jclouds.rest.RestContextSpec;
@ -120,4 +120,4 @@ public class CloudFilesBlobRequestSignerTest extends RestClientTest<CloudFilesAs
return new RestContextFactory().createContextSpec("cloudfiles", "identity", "credential", new Properties());
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import javax.inject.Singleton;
@ -31,9 +31,9 @@ import com.google.common.base.Function;
@Singleton
public class ListContainerOptionsToBlobStoreListContainerOptions
implements
Function<org.jclouds.rackspace.cloudfiles.options.ListContainerOptions[], ListContainerOptions> {
Function<org.jclouds.cloudfiles.options.ListContainerOptions[], ListContainerOptions> {
public ListContainerOptions apply(
org.jclouds.rackspace.cloudfiles.options.ListContainerOptions[] optionsList) {
org.jclouds.cloudfiles.options.ListContainerOptions[] optionsList) {
ListContainerOptions options = new ListContainerOptions();
if (optionsList.length != 0) {
if (optionsList[0].getPath() != null && !optionsList[0].getPath().equals("")) {

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.functions;
package org.jclouds.cloudfiles.blobstore.functions;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -25,7 +25,7 @@ import javax.inject.Singleton;
import org.jclouds.blobstore.domain.PageSet;
import org.jclouds.blobstore.domain.StorageMetadata;
import org.jclouds.blobstore.domain.internal.PageSetImpl;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
@ -54,4 +54,4 @@ public class ResourceToObjectList implements
}), list.getNextMarker());
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest;
@ -51,4 +51,4 @@ public class CloudFilesBlobIntegrationLiveTest extends BaseBlobIntegrationTest {
assert blob.getMetadata().getContentMetadata().getContentLanguage() == null;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseBlobLiveTest;
import org.testng.annotations.Test;
@ -30,4 +30,4 @@ import org.testng.annotations.Test;
@Test(groups = { "live" })
public class CloudFilesBlobLiveTest extends BaseBlobLiveTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseBlobMapIntegrationTest;
import org.testng.annotations.Test;
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
@Test(groups = "live")
public class CloudFilesBlobMapIntegrationLiveTest extends BaseBlobMapIntegrationTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest;
import org.testng.annotations.Test;
@ -29,4 +29,4 @@ import org.testng.annotations.Test;
@Test(groups = { "live" })
public class CloudFilesBlobSignerLiveTest extends BaseBlobSignerLiveTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseContainerIntegrationTest;
import org.testng.annotations.Test;
@ -29,4 +29,4 @@ import org.testng.annotations.Test;
@Test(groups = "live")
public class CloudFilesContainerIntegrationLiveTest extends BaseContainerIntegrationTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest;
import org.testng.annotations.Test;
@ -29,4 +29,4 @@ import org.testng.annotations.Test;
@Test(groups = { "live" })
public class CloudFilesContainerLiveTest extends BaseContainerLiveTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseInputStreamMapIntegrationTest;
import org.testng.annotations.Test;
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
@Test(groups = "live")
public class CloudFilesInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import org.jclouds.blobstore.integration.internal.BaseServiceIntegrationTest;
import org.testng.annotations.Test;
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
@Test(groups = "live")
public class CloudFilesServiceIntegrationLiveTest extends BaseServiceIntegrationTest {
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
package org.jclouds.cloudfiles.blobstore.integration;
import java.io.IOException;
@ -46,4 +46,4 @@ public class CloudFilesTestInitializer extends TransientBlobStoreTestInitializer
new Log4JLoggingModule()), setupProperties(endpoint, apiversion, identity, credential));
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.domain.internal;
package org.jclouds.cloudfiles.domain.internal;
import static org.easymock.EasyMock.expect;
import static org.easymock.classextension.EasyMock.createMock;
@ -30,9 +30,9 @@ import java.util.Set;
import org.jclouds.crypto.CryptoStreams;
import org.jclouds.date.internal.SimpleDateFormatDateService;
import org.jclouds.json.config.GsonModule;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.rackspace.cloudfiles.functions.ParseObjectInfoListFromJsonResponse;
import org.jclouds.rackspace.cloudfiles.options.ListContainerOptions;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.functions.ParseObjectInfoListFromJsonResponse;
import org.jclouds.cloudfiles.options.ListContainerOptions;
import org.jclouds.rackspace.config.RackspaceParserModule;
import org.jclouds.rest.internal.GeneratedHttpRequest;
import org.testng.annotations.Test;
@ -53,7 +53,7 @@ public class ParseObjectInfoListFromJsonResponseTest {
Injector i = Guice.createInjector(new RackspaceParserModule(), new GsonModule());
public void testApplyInputStream() {
InputStream is = getClass().getResourceAsStream("/cloudfiles/test_list_container.json");
InputStream is = getClass().getResourceAsStream("/test_list_container.json");
Set<ObjectInfo> expects = Sets.newHashSet();
ObjectInfoImpl one = i.getInstance(ObjectInfoImpl.class);
one.name = "test_obj_1";

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static org.testng.Assert.assertEquals;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static org.testng.Assert.assertEquals;
@ -30,7 +30,7 @@ import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.ParseJson;
import org.jclouds.io.Payloads;
import org.jclouds.json.config.GsonModule;
import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.rackspace.config.RackspaceParserModule;
import org.testng.annotations.Test;
@ -52,7 +52,7 @@ public class ParseContainerCDNMetadataListFromJsonResponseTest {
@Test
public void testApplyInputStream() {
InputStream is = getClass().getResourceAsStream("/cloudfiles/test_list_cdn.json");
InputStream is = getClass().getResourceAsStream("/test_list_cdn.json");
Set<ContainerCDNMetadata> expects = ImmutableSortedSet.of(
new ContainerCDNMetadata("adriancole-blobstore.testCDNOperationsContainerWithCDN", false, 3600, URI

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static org.testng.Assert.assertEquals;
@ -28,7 +28,7 @@ import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.ParseJson;
import org.jclouds.io.Payloads;
import org.jclouds.json.config.GsonModule;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import org.jclouds.rackspace.config.RackspaceParserModule;
import org.jclouds.util.Strings2;
import org.testng.annotations.Test;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
package org.jclouds.cloudfiles.functions;
import static org.easymock.EasyMock.expect;
import static org.easymock.classextension.EasyMock.createMock;
@ -30,7 +30,7 @@ import org.jclouds.Constants;
import org.jclouds.blobstore.reference.BlobStoreConstants;
import org.jclouds.http.HttpResponse;
import org.jclouds.io.Payloads;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rest.internal.GeneratedHttpRequest;
import org.testng.annotations.Test;

View File

@ -1,4 +1,4 @@
package org.jclouds.rackspace.cloudfiles.handlers;
package org.jclouds.cloudfiles.handlers;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.reportMatcher;
@ -98,4 +98,4 @@ public class ParseCloudFilesErrorFromHttpResponseTest {
return null;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.internal;
package org.jclouds.cloudfiles.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Futures.immediateFuture;
@ -41,19 +41,19 @@ import org.jclouds.blobstore.functions.HttpGetOptionsListToGetOptions;
import org.jclouds.blobstore.options.ListContainerOptions;
import org.jclouds.concurrent.Futures;
import org.jclouds.http.options.GetOptions;
import org.jclouds.rackspace.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ListContainerOptionsToBlobStoreListContainerOptions;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ResourceToObjectInfo;
import org.jclouds.rackspace.cloudfiles.blobstore.functions.ResourceToObjectList;
import org.jclouds.rackspace.cloudfiles.domain.AccountMetadata;
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rackspace.cloudfiles.domain.ObjectInfo;
import org.jclouds.rackspace.cloudfiles.options.ListCdnContainerOptions;
import org.jclouds.cloudfiles.CloudFilesAsyncClient;
import org.jclouds.cloudfiles.blobstore.functions.BlobToObject;
import org.jclouds.cloudfiles.blobstore.functions.ListContainerOptionsToBlobStoreListContainerOptions;
import org.jclouds.cloudfiles.blobstore.functions.ObjectToBlob;
import org.jclouds.cloudfiles.blobstore.functions.ResourceToObjectInfo;
import org.jclouds.cloudfiles.blobstore.functions.ResourceToObjectList;
import org.jclouds.cloudfiles.domain.AccountMetadata;
import org.jclouds.cloudfiles.domain.CFObject;
import org.jclouds.cloudfiles.domain.ContainerCDNMetadata;
import org.jclouds.cloudfiles.domain.ContainerMetadata;
import org.jclouds.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.cloudfiles.domain.ObjectInfo;
import org.jclouds.cloudfiles.options.ListCdnContainerOptions;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
@ -153,7 +153,7 @@ public class StubCloudFilesAsyncClient implements CloudFilesAsyncClient {
}
public ListenableFuture<? extends Set<ContainerMetadata>> listContainers(
org.jclouds.rackspace.cloudfiles.options.ListContainerOptions... options) {
org.jclouds.cloudfiles.options.ListContainerOptions... options) {
return immediateFuture(Sets.newHashSet(Iterables.transform(blobStore.getContainerToBlobs().keySet(),
new Function<String, ContainerMetadata>() {
public ContainerMetadata apply(String name) {
@ -163,7 +163,7 @@ public class StubCloudFilesAsyncClient implements CloudFilesAsyncClient {
}
public ListenableFuture<PageSet<ObjectInfo>> listObjects(String container,
org.jclouds.rackspace.cloudfiles.options.ListContainerOptions... optionsList) {
org.jclouds.cloudfiles.options.ListContainerOptions... optionsList) {
ListContainerOptions options = container2ContainerListOptions.apply(optionsList);
return Futures.compose(blobStore.list(container, options), resource2ObjectList, service);
}

View File

@ -17,18 +17,18 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.options;
package org.jclouds.cloudfiles.options;
import static org.jclouds.rackspace.cloudfiles.options.ListContainerOptions.Builder.afterMarker;
import static org.jclouds.rackspace.cloudfiles.options.ListContainerOptions.Builder.underPath;
import static org.jclouds.rackspace.cloudfiles.options.ListContainerOptions.Builder.maxResults;
import static org.jclouds.rackspace.cloudfiles.options.ListContainerOptions.Builder.withPrefix;
import static org.jclouds.cloudfiles.options.ListContainerOptions.Builder.afterMarker;
import static org.jclouds.cloudfiles.options.ListContainerOptions.Builder.underPath;
import static org.jclouds.cloudfiles.options.ListContainerOptions.Builder.maxResults;
import static org.jclouds.cloudfiles.options.ListContainerOptions.Builder.withPrefix;
import static org.testng.Assert.assertEquals;
import java.io.UnsupportedEncodingException;
import java.util.Collections;
import org.jclouds.rackspace.cloudfiles.reference.CloudFilesConstants;
import org.jclouds.cloudfiles.reference.CloudFilesConstants;
import org.jclouds.http.options.HttpRequestOptions;
import org.testng.annotations.Test;

145
apis/cloudservers/pom.xml Normal file
View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
====================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
====================================================================
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4.0.0.xsd" >
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-project</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<groupId>org.jclouds.api</groupId>
<artifactId>cloudservers</artifactId>
<name>jcloud cloudservers api</name>
<description>jclouds components to access an implementation of CloudServers</description>
<properties>
<test.cloudservers.endpoint>https://auth.api.rackspacecloud.com</test.cloudservers.endpoint>
<test.cloudservers.apiversion>1.0</test.cloudservers.apiversion>
<test.cloudservers.identity>${test.rackspace.identity}</test.cloudservers.identity>
<test.cloudservers.credential>${test.rackspace.credential}</test.cloudservers.credential>
</properties>
<dependencies>
<dependency>
<groupId>org.jclouds.common</groupId>
<artifactId>rackspace-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</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.common</groupId>
<artifactId>rackspace-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-jsch</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-log4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>live</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<systemProperties>
<property>
<name>test.cloudservers.endpoint</name>
<value>${test.cloudservers.endpoint}</value>
</property>
<property>
<name>test.cloudservers.apiversion</name>
<value>${test.cloudservers.apiversion}</value>
</property>
<property>
<name>test.cloudservers.identity</name>
<value>${test.cloudservers.identity}</value>
</property>
<property>
<name>test.cloudservers.credential</name>
<value>${test.cloudservers.credential}</value>
</property>
<property>
<name>test.initializer</name>
<value>${test.initializer}</value>
</property>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers;
package org.jclouds.cloudservers;
import java.util.Set;
import java.util.concurrent.ExecutionException;
@ -34,26 +34,26 @@ import javax.ws.rs.core.MediaType;
import org.jclouds.http.functions.ReturnFalseOn404;
import org.jclouds.rackspace.CloudServers;
import org.jclouds.rackspace.cloudservers.binders.BindAdminPassToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindBackupScheduleToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindConfirmResizeToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindCreateImageToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindRebootTypeToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindResizeFlavorToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindRevertResizeToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindServerNameToJsonPayload;
import org.jclouds.rackspace.cloudservers.binders.BindSharedIpGroupToJsonPayload;
import org.jclouds.rackspace.cloudservers.domain.Addresses;
import org.jclouds.rackspace.cloudservers.domain.BackupSchedule;
import org.jclouds.rackspace.cloudservers.domain.Flavor;
import org.jclouds.rackspace.cloudservers.domain.Image;
import org.jclouds.rackspace.cloudservers.domain.RebootType;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.rackspace.cloudservers.domain.SharedIpGroup;
import org.jclouds.rackspace.cloudservers.options.CreateServerOptions;
import org.jclouds.rackspace.cloudservers.options.CreateSharedIpGroupOptions;
import org.jclouds.rackspace.cloudservers.options.ListOptions;
import org.jclouds.rackspace.cloudservers.options.RebuildServerOptions;
import org.jclouds.cloudservers.binders.BindAdminPassToJsonPayload;
import org.jclouds.cloudservers.binders.BindBackupScheduleToJsonPayload;
import org.jclouds.cloudservers.binders.BindConfirmResizeToJsonPayload;
import org.jclouds.cloudservers.binders.BindCreateImageToJsonPayload;
import org.jclouds.cloudservers.binders.BindRebootTypeToJsonPayload;
import org.jclouds.cloudservers.binders.BindResizeFlavorToJsonPayload;
import org.jclouds.cloudservers.binders.BindRevertResizeToJsonPayload;
import org.jclouds.cloudservers.binders.BindServerNameToJsonPayload;
import org.jclouds.cloudservers.binders.BindSharedIpGroupToJsonPayload;
import org.jclouds.cloudservers.domain.Addresses;
import org.jclouds.cloudservers.domain.BackupSchedule;
import org.jclouds.cloudservers.domain.Flavor;
import org.jclouds.cloudservers.domain.Image;
import org.jclouds.cloudservers.domain.RebootType;
import org.jclouds.cloudservers.domain.Server;
import org.jclouds.cloudservers.domain.SharedIpGroup;
import org.jclouds.cloudservers.options.CreateServerOptions;
import org.jclouds.cloudservers.options.CreateSharedIpGroupOptions;
import org.jclouds.cloudservers.options.ListOptions;
import org.jclouds.cloudservers.options.RebuildServerOptions;
import org.jclouds.rackspace.filters.AddTimestampQuery;
import org.jclouds.rackspace.filters.AuthenticateRequest;
import org.jclouds.rest.annotations.BinderParam;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers;
package org.jclouds.cloudservers;
import java.util.Set;
import java.util.concurrent.ExecutionException;
@ -26,17 +26,17 @@ import java.util.concurrent.TimeUnit;
import javax.ws.rs.PathParam;
import org.jclouds.concurrent.Timeout;
import org.jclouds.rackspace.cloudservers.domain.Addresses;
import org.jclouds.rackspace.cloudservers.domain.BackupSchedule;
import org.jclouds.rackspace.cloudservers.domain.Flavor;
import org.jclouds.rackspace.cloudservers.domain.Image;
import org.jclouds.rackspace.cloudservers.domain.RebootType;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.rackspace.cloudservers.domain.SharedIpGroup;
import org.jclouds.rackspace.cloudservers.options.CreateServerOptions;
import org.jclouds.rackspace.cloudservers.options.CreateSharedIpGroupOptions;
import org.jclouds.rackspace.cloudservers.options.ListOptions;
import org.jclouds.rackspace.cloudservers.options.RebuildServerOptions;
import org.jclouds.cloudservers.domain.Addresses;
import org.jclouds.cloudservers.domain.BackupSchedule;
import org.jclouds.cloudservers.domain.Flavor;
import org.jclouds.cloudservers.domain.Image;
import org.jclouds.cloudservers.domain.RebootType;
import org.jclouds.cloudservers.domain.Server;
import org.jclouds.cloudservers.domain.SharedIpGroup;
import org.jclouds.cloudservers.options.CreateServerOptions;
import org.jclouds.cloudservers.options.CreateSharedIpGroupOptions;
import org.jclouds.cloudservers.options.ListOptions;
import org.jclouds.cloudservers.options.RebuildServerOptions;
import org.jclouds.rest.ResourceNotFoundException;
import java.util.concurrent.Future;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers;
package org.jclouds.cloudservers;
import java.util.List;
import java.util.Properties;
@ -25,8 +25,8 @@ import java.util.Properties;
import org.jclouds.compute.ComputeServiceContextBuilder;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.logging.jdk.config.JDKLoggingModule;
import org.jclouds.rackspace.cloudservers.compute.config.CloudServersComputeServiceContextModule;
import org.jclouds.rackspace.cloudservers.config.CloudServersRestClientModule;
import org.jclouds.cloudservers.compute.config.CloudServersComputeServiceContextModule;
import org.jclouds.cloudservers.config.CloudServersRestClientModule;
import com.google.inject.Injector;
import com.google.inject.Module;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkArgument;
@ -26,7 +26,7 @@ import java.util.Map;
import javax.inject.Singleton;
import org.jclouds.http.HttpRequest;
import org.jclouds.rackspace.cloudservers.domain.BackupSchedule;
import org.jclouds.cloudservers.domain.BackupSchedule;
import org.jclouds.rest.binders.BindToJsonPayload;
import com.google.common.collect.ImmutableMap;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import javax.inject.Singleton;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@ -27,7 +27,7 @@ import java.util.Map;
import javax.inject.Singleton;
import org.jclouds.http.HttpRequest;
import org.jclouds.rackspace.cloudservers.domain.RebootType;
import org.jclouds.cloudservers.domain.RebootType;
import org.jclouds.rest.binders.BindToJsonPayload;
import com.google.common.collect.ImmutableMap;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import javax.inject.Singleton;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.binders;
package org.jclouds.cloudservers.binders;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.config;
package org.jclouds.cloudservers.compute.config;
import org.jclouds.compute.config.BindComputeStrategiesByClass;
import org.jclouds.compute.strategy.AddNodeWithTagStrategy;
@ -27,11 +27,11 @@ import org.jclouds.compute.strategy.ListNodesStrategy;
import org.jclouds.compute.strategy.RebootNodeStrategy;
import org.jclouds.compute.strategy.ResumeNodeStrategy;
import org.jclouds.compute.strategy.SuspendNodeStrategy;
import org.jclouds.rackspace.cloudservers.compute.strategy.CloudServersAddNodeWithTagStrategy;
import org.jclouds.rackspace.cloudservers.compute.strategy.CloudServersDestroyNodeStrategy;
import org.jclouds.rackspace.cloudservers.compute.strategy.CloudServersGetNodeMetadataStrategy;
import org.jclouds.rackspace.cloudservers.compute.strategy.CloudServersListNodesStrategy;
import org.jclouds.rackspace.cloudservers.compute.strategy.CloudServersLifeCycleStrategy;
import org.jclouds.cloudservers.compute.strategy.CloudServersAddNodeWithTagStrategy;
import org.jclouds.cloudservers.compute.strategy.CloudServersDestroyNodeStrategy;
import org.jclouds.cloudservers.compute.strategy.CloudServersGetNodeMetadataStrategy;
import org.jclouds.cloudservers.compute.strategy.CloudServersListNodesStrategy;
import org.jclouds.cloudservers.compute.strategy.CloudServersLifeCycleStrategy;
/**
*
@ -74,4 +74,4 @@ public class CloudServersBindComputeStrategiesByClass extends BindComputeStrateg
protected Class<? extends SuspendNodeStrategy> defineStopNodeStrategy() {
return CloudServersLifeCycleStrategy.class;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.config;
package org.jclouds.cloudservers.compute.config;
import java.util.Set;
@ -25,8 +25,8 @@ import org.jclouds.compute.config.BindComputeSuppliersByClass;
import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.domain.Image;
import org.jclouds.domain.Location;
import org.jclouds.rackspace.cloudservers.compute.suppliers.CloudServersHardwareSupplier;
import org.jclouds.rackspace.cloudservers.compute.suppliers.CloudServersImageSupplier;
import org.jclouds.cloudservers.compute.suppliers.CloudServersHardwareSupplier;
import org.jclouds.cloudservers.compute.suppliers.CloudServersImageSupplier;
import org.jclouds.rackspace.config.RackspaceLocationsSupplier;
import com.google.common.base.Supplier;
@ -51,4 +51,4 @@ public class CloudServersBindComputeSuppliersByClass extends BindComputeSupplier
protected Class<? extends Supplier<Set<? extends Location>>> defineLocationSupplier() {
return RackspaceLocationsSupplier.class;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.config;
package org.jclouds.cloudservers.compute.config;
import org.jclouds.compute.config.BaseComputeServiceContextModule;
import org.jclouds.compute.internal.BaseComputeService;

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.config;
package org.jclouds.cloudservers.compute.config;
import java.util.Map;
@ -31,15 +31,15 @@ import org.jclouds.compute.domain.NodeState;
import org.jclouds.compute.domain.OperatingSystem;
import org.jclouds.compute.internal.BaseComputeService;
import org.jclouds.compute.internal.ComputeServiceContextImpl;
import org.jclouds.rackspace.cloudservers.CloudServersAsyncClient;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.rackspace.cloudservers.compute.functions.CloudServersImageToImage;
import org.jclouds.rackspace.cloudservers.compute.functions.CloudServersImageToOperatingSystem;
import org.jclouds.rackspace.cloudservers.compute.functions.FlavorToHardware;
import org.jclouds.rackspace.cloudservers.compute.functions.ServerToNodeMetadata;
import org.jclouds.rackspace.cloudservers.domain.Flavor;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.rackspace.cloudservers.domain.ServerStatus;
import org.jclouds.cloudservers.CloudServersAsyncClient;
import org.jclouds.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.compute.functions.CloudServersImageToImage;
import org.jclouds.cloudservers.compute.functions.CloudServersImageToOperatingSystem;
import org.jclouds.cloudservers.compute.functions.FlavorToHardware;
import org.jclouds.cloudservers.compute.functions.ServerToNodeMetadata;
import org.jclouds.cloudservers.domain.Flavor;
import org.jclouds.cloudservers.domain.Server;
import org.jclouds.cloudservers.domain.ServerStatus;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.RestContextImpl;
@ -64,10 +64,10 @@ public class CloudServersComputeServiceDependenciesModule extends AbstractModule
bind(new TypeLiteral<Function<Server, NodeMetadata>>() {
}).to(ServerToNodeMetadata.class);
bind(new TypeLiteral<Function<org.jclouds.rackspace.cloudservers.domain.Image, Image>>() {
bind(new TypeLiteral<Function<org.jclouds.cloudservers.domain.Image, Image>>() {
}).to(CloudServersImageToImage.class);
bind(new TypeLiteral<Function<org.jclouds.rackspace.cloudservers.domain.Image, OperatingSystem>>() {
bind(new TypeLiteral<Function<org.jclouds.cloudservers.domain.Image, OperatingSystem>>() {
}).to(CloudServersImageToOperatingSystem.class);
bind(new TypeLiteral<Function<Flavor, Hardware>>() {

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.functions;
package org.jclouds.cloudservers.compute.functions;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -34,15 +34,15 @@ import com.google.common.base.Function;
* @author Adrian Cole
*/
@Singleton
public class CloudServersImageToImage implements Function<org.jclouds.rackspace.cloudservers.domain.Image, Image> {
private final Function<org.jclouds.rackspace.cloudservers.domain.Image, OperatingSystem> imageToOs;
public class CloudServersImageToImage implements Function<org.jclouds.cloudservers.domain.Image, Image> {
private final Function<org.jclouds.cloudservers.domain.Image, OperatingSystem> imageToOs;
@Inject
CloudServersImageToImage(Function<org.jclouds.rackspace.cloudservers.domain.Image, OperatingSystem> imageToOs) {
CloudServersImageToImage(Function<org.jclouds.cloudservers.domain.Image, OperatingSystem> imageToOs) {
this.imageToOs = imageToOs;
}
public Image apply(org.jclouds.rackspace.cloudservers.domain.Image from) {
public Image apply(org.jclouds.cloudservers.domain.Image from) {
ImageBuilder builder = new ImageBuilder();
builder.ids(from.getId() + "");
builder.name(from.getName());
@ -53,4 +53,4 @@ public class CloudServersImageToImage implements Function<org.jclouds.rackspace.
Image image = builder.build();
return image;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.functions;
package org.jclouds.cloudservers.compute.functions;
import java.util.Map;
import java.util.regex.Matcher;
@ -42,7 +42,7 @@ import com.google.common.base.Function;
*/
@Singleton
public class CloudServersImageToOperatingSystem implements
Function<org.jclouds.rackspace.cloudservers.domain.Image, OperatingSystem> {
Function<org.jclouds.cloudservers.domain.Image, OperatingSystem> {
public static final Pattern DEFAULT_PATTERN = Pattern.compile("(([^ ]*) ([0-9.]+) ?.*)");
// Windows Server 2008 R2 x64
public static final Pattern WINDOWS_PATTERN = Pattern.compile("Windows (.*) (x[86][64])");
@ -58,7 +58,7 @@ public class CloudServersImageToOperatingSystem implements
this.osVersionMap = osVersionMap;
}
public OperatingSystem apply(final org.jclouds.rackspace.cloudservers.domain.Image from) {
public OperatingSystem apply(final org.jclouds.cloudservers.domain.Image from) {
OsFamily osFamily = null;
String osName = null;
String osArch = null;
@ -89,4 +89,4 @@ public class CloudServersImageToOperatingSystem implements
}
return new OperatingSystem(osFamily, osName, osVersion, osArch, osDescription, is64Bit);
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.functions;
package org.jclouds.cloudservers.compute.functions;
import javax.inject.Singleton;
@ -26,7 +26,7 @@ import org.jclouds.compute.domain.HardwareBuilder;
import org.jclouds.compute.domain.Processor;
import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.domain.internal.VolumeImpl;
import org.jclouds.rackspace.cloudservers.domain.Flavor;
import org.jclouds.cloudservers.domain.Flavor;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
@ -41,4 +41,4 @@ public class FlavorToHardware implements Function<Flavor, Hardware> {
.processors(ImmutableList.of(new Processor(from.getDisk() / 10.0, 1.0))).ram(from.getRam())
.volumes(ImmutableList.<Volume> of(new VolumeImpl((float) from.getDisk(), true, true))).build();
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.functions;
package org.jclouds.cloudservers.compute.functions;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.compute.util.ComputeServiceUtils.parseTagFromName;
@ -42,8 +42,8 @@ import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.logging.Logger;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.rackspace.cloudservers.domain.ServerStatus;
import org.jclouds.cloudservers.domain.Server;
import org.jclouds.cloudservers.domain.ServerStatus;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
@ -136,4 +136,4 @@ public class ServerToNodeMetadata implements Function<Server, NodeMetadata> {
}
return null;
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.strategy;
package org.jclouds.cloudservers.compute.strategy;
import static com.google.common.base.Preconditions.checkNotNull;
@ -30,8 +30,8 @@ import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.strategy.AddNodeWithTagStrategy;
import org.jclouds.domain.Credentials;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.domain.Server;
import com.google.common.base.Function;
@ -60,4 +60,4 @@ public class CloudServersAddNodeWithTagStrategy implements AddNodeWithTagStrateg
return serverToNodeMetadata.apply(from);
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.strategy;
package org.jclouds.cloudservers.compute.strategy;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -25,7 +25,7 @@ import javax.inject.Singleton;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.strategy.DestroyNodeStrategy;
import org.jclouds.compute.strategy.GetNodeMetadataStrategy;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.CloudServersClient;
/**
* @author Adrian Cole
@ -49,4 +49,4 @@ public class CloudServersDestroyNodeStrategy implements DestroyNodeStrategy {
return getNode.getNode(id);
}
}
}

View File

@ -17,15 +17,15 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.strategy;
package org.jclouds.cloudservers.compute.strategy;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.strategy.GetNodeMetadataStrategy;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.domain.Server;
import com.google.common.base.Function;
@ -51,4 +51,4 @@ public class CloudServersGetNodeMetadataStrategy implements GetNodeMetadataStrat
Server server = client.getServer(serverId);
return server == null ? null : serverToNodeMetadata.apply(server);
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.strategy;
package org.jclouds.cloudservers.compute.strategy;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -27,8 +27,8 @@ import org.jclouds.compute.strategy.GetNodeMetadataStrategy;
import org.jclouds.compute.strategy.RebootNodeStrategy;
import org.jclouds.compute.strategy.ResumeNodeStrategy;
import org.jclouds.compute.strategy.SuspendNodeStrategy;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.rackspace.cloudservers.domain.RebootType;
import org.jclouds.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.domain.RebootType;
/**
* @author Adrian Cole
@ -62,4 +62,4 @@ public class CloudServersLifeCycleStrategy implements RebootNodeStrategy, Suspen
throw new UnsupportedOperationException("resume not supported");
}
}
}

View File

@ -17,7 +17,7 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.strategy;
package org.jclouds.cloudservers.compute.strategy;
import javax.inject.Inject;
import javax.inject.Singleton;
@ -26,9 +26,9 @@ import org.jclouds.compute.domain.ComputeMetadata;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.predicates.NodePredicates;
import org.jclouds.compute.strategy.ListNodesStrategy;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.rackspace.cloudservers.domain.Server;
import org.jclouds.rackspace.cloudservers.options.ListOptions;
import org.jclouds.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.domain.Server;
import org.jclouds.cloudservers.options.ListOptions;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
@ -59,4 +59,4 @@ public class CloudServersListNodesStrategy implements ListNodesStrategy {
return Iterables.filter(Iterables.transform(client.listServers(ListOptions.Builder.withDetails()),
serverToNodeMetadata), filter);
}
}
}

View File

@ -17,9 +17,9 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.suppliers;
package org.jclouds.cloudservers.compute.suppliers;
import static org.jclouds.rackspace.cloudservers.options.ListOptions.Builder.withDetails;
import static org.jclouds.cloudservers.options.ListOptions.Builder.withDetails;
import java.util.Set;
@ -31,8 +31,8 @@ import javax.inject.Singleton;
import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.logging.Logger;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.rackspace.cloudservers.domain.Flavor;
import org.jclouds.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.domain.Flavor;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@ -65,4 +65,4 @@ public class CloudServersHardwareSupplier implements Supplier<Set<? extends Hard
logger.debug("<< hardware(%d)", hardware.size());
return hardware;
}
}
}

View File

@ -17,9 +17,9 @@
* ====================================================================
*/
package org.jclouds.rackspace.cloudservers.compute.suppliers;
package org.jclouds.cloudservers.compute.suppliers;
import static org.jclouds.rackspace.cloudservers.options.ListOptions.Builder.withDetails;
import static org.jclouds.cloudservers.options.ListOptions.Builder.withDetails;
import java.util.Set;
@ -31,7 +31,7 @@ import javax.inject.Singleton;
import org.jclouds.compute.domain.Image;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.logging.Logger;
import org.jclouds.rackspace.cloudservers.CloudServersClient;
import org.jclouds.cloudservers.CloudServersClient;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@ -50,11 +50,11 @@ public class CloudServersImageSupplier implements Supplier<Set<? extends Image>>
protected Logger logger = Logger.NULL;
protected final CloudServersClient sync;
protected final Function<org.jclouds.rackspace.cloudservers.domain.Image, Image> cloudServersImageToImage;
protected final Function<org.jclouds.cloudservers.domain.Image, Image> cloudServersImageToImage;
@Inject
CloudServersImageSupplier(CloudServersClient sync,
Function<org.jclouds.rackspace.cloudservers.domain.Image, Image> cloudServersImageToImage) {
Function<org.jclouds.cloudservers.domain.Image, Image> cloudServersImageToImage) {
this.sync = sync;
this.cloudServersImageToImage = cloudServersImageToImage;
}
@ -68,4 +68,4 @@ public class CloudServersImageSupplier implements Supplier<Set<? extends Image>>
logger.debug("<< images(%d)", images.size());
return images;
}
}
}

Some files were not shown because too many files have changed in this diff Show More