moved provider agnostic location code to core

This commit is contained in:
Adrian Cole 2011-01-02 12:58:35 +01:00
parent 581611abc5
commit 90c5c40fbd
82 changed files with 233 additions and 258 deletions

View File

@ -41,7 +41,7 @@ import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.base.Suppliers; import com.google.common.base.Suppliers;

View File

@ -34,7 +34,7 @@ import org.jclouds.aws.cloudwatch.domain.Datapoint;
import org.jclouds.aws.cloudwatch.functions.ISO8601Format; import org.jclouds.aws.cloudwatch.functions.ISO8601Format;
import org.jclouds.aws.cloudwatch.xml.GetMetricStatisticsResponseHandler; import org.jclouds.aws.cloudwatch.xml.GetMetricStatisticsResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.FormParams;
import org.jclouds.rest.annotations.ParamParser; import org.jclouds.rest.annotations.ParamParser;
@ -67,7 +67,7 @@ public interface CloudWatchAsyncClient {
@XMLResponseParser(GetMetricStatisticsResponseHandler.class) @XMLResponseParser(GetMetricStatisticsResponseHandler.class)
@FormParams(keys = ACTION, values = "GetMetricStatistics") @FormParams(keys = ACTION, values = "GetMetricStatistics")
ListenableFuture<? extends Set<Datapoint>> getMetricStatisticsInRegion( ListenableFuture<? extends Set<Datapoint>> getMetricStatisticsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("MeasureName") String measureName, @FormParam("MeasureName") String measureName,
@FormParam("StartTime") @ParamParser(ISO8601Format.class) Date startTime, @FormParam("StartTime") @ParamParser(ISO8601Format.class) Date startTime,
@FormParam("EndTime") @ParamParser(ISO8601Format.class) Date endTime, @FormParam("Period") int period, @FormParam("EndTime") @ParamParser(ISO8601Format.class) Date endTime, @FormParam("Period") int period,

View File

@ -33,7 +33,6 @@ import java.util.Set;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.aws.Region;
import org.jclouds.aws.handlers.AWSClientErrorRetryHandler; import org.jclouds.aws.handlers.AWSClientErrorRetryHandler;
import org.jclouds.aws.handlers.AWSRedirectionRetryHandler; import org.jclouds.aws.handlers.AWSRedirectionRetryHandler;
import org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent; import org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent;
@ -43,9 +42,10 @@ import org.jclouds.http.RequiresHttp;
import org.jclouds.http.annotation.ClientError; import org.jclouds.http.annotation.ClientError;
import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.Redirection;
import org.jclouds.http.annotation.ServerError; import org.jclouds.http.annotation.ServerError;
import org.jclouds.location.Provider;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger.LoggerFactory; import org.jclouds.logging.Logger.LoggerFactory;
import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.ConfiguresRestClient;
import org.jclouds.rest.annotations.Provider;
import org.jclouds.rest.config.RestClientModule; import org.jclouds.rest.config.RestClientModule;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;

View File

@ -46,7 +46,7 @@ public class EC2BindComputeSuppliersByClass extends BindComputeSuppliersByClass
@Override @Override
protected Class<? extends Supplier<Location>> defineDefaultLocationSupplier() { protected Class<? extends Supplier<Location>> defineDefaultLocationSupplier() {
return org.jclouds.aws.suppliers.DefaultLocationSupplier.class; return org.jclouds.location.suppliers.FirstZoneOrRegionMatchingRegionId.class;
} }
@Override @Override

View File

@ -35,7 +35,7 @@ import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.config.BaseComputeServiceContextModule; import org.jclouds.compute.config.BaseComputeServiceContextModule;
import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.Image;
import org.jclouds.compute.domain.TemplateBuilder; import org.jclouds.compute.domain.TemplateBuilder;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import org.jclouds.rest.suppliers.RetryOnTimeOutButNotOnAuthorizationExceptionSupplier; import org.jclouds.rest.suppliers.RetryOnTimeOutButNotOnAuthorizationExceptionSupplier;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;

View File

@ -46,8 +46,8 @@ import org.jclouds.compute.util.ComputeServiceUtils;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.location.Provider;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.jclouds.rest.annotations.Provider;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;

View File

@ -39,7 +39,7 @@ import org.jclouds.aws.ec2.domain.KeyPair;
import org.jclouds.aws.ec2.options.RunInstancesOptions; import org.jclouds.aws.ec2.options.RunInstancesOptions;
import org.jclouds.compute.domain.Template; import org.jclouds.compute.domain.Template;
import org.jclouds.compute.options.TemplateOptions; import org.jclouds.compute.options.TemplateOptions;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -37,7 +37,6 @@ import javax.inject.Named;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.EC2AsyncClient; import org.jclouds.aws.ec2.EC2AsyncClient;
import org.jclouds.aws.ec2.domain.Reservation; import org.jclouds.aws.ec2.domain.Reservation;
import org.jclouds.aws.ec2.domain.RunningInstance; import org.jclouds.aws.ec2.domain.RunningInstance;
@ -46,6 +45,7 @@ import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.predicates.NodePredicates; import org.jclouds.compute.predicates.NodePredicates;
import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.compute.strategy.ListNodesStrategy; import org.jclouds.compute.strategy.ListNodesStrategy;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -46,8 +46,8 @@ import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.location.Provider;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.jclouds.rest.annotations.Provider;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;

View File

@ -31,7 +31,7 @@ import javax.inject.Singleton;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;

View File

@ -58,13 +58,13 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.compute.domain.RegionAndName; import org.jclouds.aws.ec2.compute.domain.RegionAndName;
import org.jclouds.aws.ec2.compute.functions.ImageParser; import org.jclouds.aws.ec2.compute.functions.ImageParser;
import org.jclouds.aws.ec2.compute.strategy.DescribeImagesParallel; import org.jclouds.aws.ec2.compute.strategy.DescribeImagesParallel;
import org.jclouds.aws.ec2.options.DescribeImagesOptions; import org.jclouds.aws.ec2.options.DescribeImagesOptions;
import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.Image;
import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -24,7 +24,6 @@ import java.util.Map;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region;
import org.jclouds.aws.config.AWSFormSigningRestClientModule; import org.jclouds.aws.config.AWSFormSigningRestClientModule;
import org.jclouds.aws.ec2.EC2AsyncClient; import org.jclouds.aws.ec2.EC2AsyncClient;
import org.jclouds.aws.ec2.EC2Client; import org.jclouds.aws.ec2.EC2Client;
@ -50,6 +49,7 @@ import org.jclouds.aws.ec2.services.SecurityGroupClient;
import org.jclouds.aws.ec2.services.WindowsAsyncClient; import org.jclouds.aws.ec2.services.WindowsAsyncClient;
import org.jclouds.aws.ec2.services.WindowsClient; import org.jclouds.aws.ec2.services.WindowsClient;
import org.jclouds.http.RequiresHttp; import org.jclouds.http.RequiresHttp;
import org.jclouds.location.Region;
import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.ConfiguresRestClient;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View File

@ -25,7 +25,7 @@ import java.util.Map;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region; import org.jclouds.location.Region;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -48,7 +48,7 @@ import org.jclouds.aws.ec2.xml.ImageIdHandler;
import org.jclouds.aws.ec2.xml.PermissionHandler; import org.jclouds.aws.ec2.xml.PermissionHandler;
import org.jclouds.aws.ec2.xml.ProductCodesHandler; import org.jclouds.aws.ec2.xml.ProductCodesHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -78,7 +78,7 @@ public interface AMIAsyncClient {
@XMLResponseParser(DescribeImagesResponseHandler.class) @XMLResponseParser(DescribeImagesResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<Set<? extends Image>> describeImagesInRegion( ListenableFuture<Set<? extends Image>> describeImagesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, DescribeImagesOptions... options); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, DescribeImagesOptions... options);
/** /**
* @see AMIClient#createImageInRegion * @see AMIClient#createImageInRegion
@ -87,7 +87,7 @@ public interface AMIAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "CreateImage") @FormParams(keys = ACTION, values = "CreateImage")
@XMLResponseParser(ImageIdHandler.class) @XMLResponseParser(ImageIdHandler.class)
ListenableFuture<String> createImageInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<String> createImageInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("Name") String name, @FormParam("InstanceId") String instanceId, CreateImageOptions... options); @FormParam("Name") String name, @FormParam("InstanceId") String instanceId, CreateImageOptions... options);
/** /**
@ -96,7 +96,7 @@ public interface AMIAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeregisterImage") @FormParams(keys = ACTION, values = "DeregisterImage")
ListenableFuture<Void> deregisterImageInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> deregisterImageInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
/** /**
@ -107,7 +107,7 @@ public interface AMIAsyncClient {
@FormParams(keys = ACTION, values = "RegisterImage") @FormParams(keys = ACTION, values = "RegisterImage")
@XMLResponseParser(ImageIdHandler.class) @XMLResponseParser(ImageIdHandler.class)
ListenableFuture<String> registerImageFromManifestInRegion( ListenableFuture<String> registerImageFromManifestInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("Name") String imageName, @FormParam("ImageLocation") String pathToManifest, @FormParam("Name") String imageName, @FormParam("ImageLocation") String pathToManifest,
RegisterImageOptions... options); RegisterImageOptions... options);
@ -120,7 +120,7 @@ public interface AMIAsyncClient {
"/dev/sda1", "/dev/sda1" }) "/dev/sda1", "/dev/sda1" })
@XMLResponseParser(ImageIdHandler.class) @XMLResponseParser(ImageIdHandler.class)
ListenableFuture<String> registerUnixImageBackedByEbsInRegion( ListenableFuture<String> registerUnixImageBackedByEbsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("Name") String imageName, @FormParam("Name") String imageName,
@FormParam("BlockDeviceMapping.0.Ebs.SnapshotId") String ebsSnapshotId, @FormParam("BlockDeviceMapping.0.Ebs.SnapshotId") String ebsSnapshotId,
RegisterImageBackedByEbsOptions... options); RegisterImageBackedByEbsOptions... options);
@ -132,7 +132,7 @@ public interface AMIAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ResetImageAttribute", "launchPermission" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetImageAttribute", "launchPermission" })
ListenableFuture<Void> resetLaunchPermissionsOnImageInRegion( ListenableFuture<Void> resetLaunchPermissionsOnImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
/** /**
@ -143,7 +143,7 @@ public interface AMIAsyncClient {
@FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "add", @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "add",
"launchPermission" }) "launchPermission" })
ListenableFuture<Void> addLaunchPermissionsToImageInRegion( ListenableFuture<Void> addLaunchPermissionsToImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds, @BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds,
@BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups, @BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
@ -156,7 +156,7 @@ public interface AMIAsyncClient {
@FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "remove", @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "remove",
"launchPermission" }) "launchPermission" })
ListenableFuture<Void> removeLaunchPermissionsFromImageInRegion( ListenableFuture<Void> removeLaunchPermissionsFromImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds, @BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds,
@BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups, @BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
@ -169,7 +169,7 @@ public interface AMIAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeImageAttribute", "launchPermission" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeImageAttribute", "launchPermission" })
@XMLResponseParser(PermissionHandler.class) @XMLResponseParser(PermissionHandler.class)
ListenableFuture<Permission> getLaunchPermissionForImageInRegion( ListenableFuture<Permission> getLaunchPermissionForImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
/** /**
@ -180,7 +180,7 @@ public interface AMIAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeImageAttribute", "productCodes" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeImageAttribute", "productCodes" })
@XMLResponseParser(ProductCodesHandler.class) @XMLResponseParser(ProductCodesHandler.class)
ListenableFuture<Set<String>> getProductCodesForImageInRegion( ListenableFuture<Set<String>> getProductCodesForImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
/** /**
@ -191,7 +191,7 @@ public interface AMIAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeImageAttribute", "blockDeviceMapping" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeImageAttribute", "blockDeviceMapping" })
@XMLResponseParser(BlockDeviceMappingHandler.class) @XMLResponseParser(BlockDeviceMappingHandler.class)
ListenableFuture<Map<String, EbsBlockDevice>> getBlockDeviceMappingsForImageInRegion( ListenableFuture<Map<String, EbsBlockDevice>> getBlockDeviceMappingsForImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
/** /**
@ -201,7 +201,7 @@ public interface AMIAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "add", @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "add",
"productCodes" }) "productCodes" })
ListenableFuture<Void> addProductCodesToImageInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> addProductCodesToImageInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindProductCodesToIndexedFormParams.class) Iterable<String> productCodes, @BinderParam(BindProductCodesToIndexedFormParams.class) Iterable<String> productCodes,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
@ -213,7 +213,7 @@ public interface AMIAsyncClient {
@FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "remove", @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifyImageAttribute", "remove",
"productCodes" }) "productCodes" })
ListenableFuture<Void> removeProductCodesFromImageInRegion( ListenableFuture<Void> removeProductCodesFromImageInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindProductCodesToIndexedFormParams.class) Iterable<String> productCodes, @BinderParam(BindProductCodesToIndexedFormParams.class) Iterable<String> productCodes,
@FormParam("ImageId") String imageId); @FormParam("ImageId") String imageId);
} }

View File

@ -37,7 +37,7 @@ import org.jclouds.aws.ec2.options.DescribeRegionsOptions;
import org.jclouds.aws.ec2.xml.DescribeAvailabilityZonesResponseHandler; import org.jclouds.aws.ec2.xml.DescribeAvailabilityZonesResponseHandler;
import org.jclouds.aws.ec2.xml.DescribeRegionsResponseHandler; import org.jclouds.aws.ec2.xml.DescribeRegionsResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.FormParams;
@ -68,7 +68,7 @@ public interface AvailabilityZoneAndRegionAsyncClient {
@XMLResponseParser(DescribeAvailabilityZonesResponseHandler.class) @XMLResponseParser(DescribeAvailabilityZonesResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<AvailabilityZoneInfo>> describeAvailabilityZonesInRegion( ListenableFuture<? extends Set<AvailabilityZoneInfo>> describeAvailabilityZonesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
DescribeAvailabilityZonesOptions... options); DescribeAvailabilityZonesOptions... options);
/** /**

View File

@ -49,7 +49,7 @@ import org.jclouds.aws.ec2.xml.DescribeVolumesResponseHandler;
import org.jclouds.aws.ec2.xml.PermissionHandler; import org.jclouds.aws.ec2.xml.PermissionHandler;
import org.jclouds.aws.ec2.xml.SnapshotHandler; import org.jclouds.aws.ec2.xml.SnapshotHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -113,7 +113,7 @@ public interface ElasticBlockStoreAsyncClient {
@FormParams(keys = ACTION, values = "DescribeVolumes") @FormParams(keys = ACTION, values = "DescribeVolumes")
@XMLResponseParser(DescribeVolumesResponseHandler.class) @XMLResponseParser(DescribeVolumesResponseHandler.class)
ListenableFuture<? extends Set<Volume>> describeVolumesInRegion( ListenableFuture<? extends Set<Volume>> describeVolumesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindVolumeIdsToIndexedFormParams.class) String... volumeIds); @BinderParam(BindVolumeIdsToIndexedFormParams.class) String... volumeIds);
/** /**
@ -122,7 +122,7 @@ public interface ElasticBlockStoreAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeleteVolume") @FormParams(keys = ACTION, values = "DeleteVolume")
ListenableFuture<Void> deleteVolumeInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> deleteVolumeInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("VolumeId") String volumeId); @FormParam("VolumeId") String volumeId);
/** /**
@ -132,7 +132,7 @@ public interface ElasticBlockStoreAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DetachVolume") @FormParams(keys = ACTION, values = "DetachVolume")
@ExceptionParser(ReturnVoidOnVolumeAvailable.class) @ExceptionParser(ReturnVoidOnVolumeAvailable.class)
ListenableFuture<Void> detachVolumeInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> detachVolumeInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("VolumeId") String volumeId, @FormParam("Force") boolean force, DetachVolumeOptions... options); @FormParam("VolumeId") String volumeId, @FormParam("Force") boolean force, DetachVolumeOptions... options);
/** /**
@ -143,7 +143,7 @@ public interface ElasticBlockStoreAsyncClient {
@FormParams(keys = ACTION, values = "AttachVolume") @FormParams(keys = ACTION, values = "AttachVolume")
@XMLResponseParser(AttachmentHandler.class) @XMLResponseParser(AttachmentHandler.class)
ListenableFuture<Attachment> attachVolumeInRegion( ListenableFuture<Attachment> attachVolumeInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("VolumeId") String volumeId, @FormParam("InstanceId") String instanceId, @FormParam("VolumeId") String volumeId, @FormParam("InstanceId") String instanceId,
@FormParam("Device") String device); @FormParam("Device") String device);
@ -155,7 +155,7 @@ public interface ElasticBlockStoreAsyncClient {
@FormParams(keys = ACTION, values = "CreateSnapshot") @FormParams(keys = ACTION, values = "CreateSnapshot")
@XMLResponseParser(SnapshotHandler.class) @XMLResponseParser(SnapshotHandler.class)
ListenableFuture<Snapshot> createSnapshotInRegion( ListenableFuture<Snapshot> createSnapshotInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("VolumeId") String volumeId, CreateSnapshotOptions... options); @FormParam("VolumeId") String volumeId, CreateSnapshotOptions... options);
/** /**
@ -167,7 +167,7 @@ public interface ElasticBlockStoreAsyncClient {
@XMLResponseParser(DescribeSnapshotsResponseHandler.class) @XMLResponseParser(DescribeSnapshotsResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<Snapshot>> describeSnapshotsInRegion( ListenableFuture<? extends Set<Snapshot>> describeSnapshotsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
DescribeSnapshotsOptions... options); DescribeSnapshotsOptions... options);
/** /**
@ -177,7 +177,7 @@ public interface ElasticBlockStoreAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeleteSnapshot") @FormParams(keys = ACTION, values = "DeleteSnapshot")
ListenableFuture<Void> deleteSnapshotInRegion( ListenableFuture<Void> deleteSnapshotInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("SnapshotId") String snapshotId); @FormParam("SnapshotId") String snapshotId);
/** /**
@ -188,7 +188,7 @@ public interface ElasticBlockStoreAsyncClient {
@FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifySnapshotAttribute", "add", @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifySnapshotAttribute", "add",
"createVolumePermission" }) "createVolumePermission" })
ListenableFuture<Void> addCreateVolumePermissionsToSnapshotInRegion( ListenableFuture<Void> addCreateVolumePermissionsToSnapshotInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds, @BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds,
@BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups, @BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups,
@FormParam("SnapshotId") String snapshotId); @FormParam("SnapshotId") String snapshotId);
@ -201,7 +201,7 @@ public interface ElasticBlockStoreAsyncClient {
@FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifySnapshotAttribute", "remove", @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifySnapshotAttribute", "remove",
"createVolumePermission" }) "createVolumePermission" })
ListenableFuture<Void> removeCreateVolumePermissionsFromSnapshotInRegion( ListenableFuture<Void> removeCreateVolumePermissionsFromSnapshotInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds, @BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds,
@BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups, @BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups,
@FormParam("SnapshotId") String snapshotId); @FormParam("SnapshotId") String snapshotId);
@ -214,7 +214,7 @@ public interface ElasticBlockStoreAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeSnapshotAttribute", "createVolumePermission" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeSnapshotAttribute", "createVolumePermission" })
@XMLResponseParser(PermissionHandler.class) @XMLResponseParser(PermissionHandler.class)
ListenableFuture<Permission> getCreateVolumePermissionForSnapshotInRegion( ListenableFuture<Permission> getCreateVolumePermissionForSnapshotInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("SnapshotId") String snapshotId); @FormParam("SnapshotId") String snapshotId);
/** /**
@ -224,7 +224,7 @@ public interface ElasticBlockStoreAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ResetSnapshotAttribute", "createVolumePermission" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetSnapshotAttribute", "createVolumePermission" })
ListenableFuture<Void> resetCreateVolumePermissionsOnSnapshotInRegion( ListenableFuture<Void> resetCreateVolumePermissionsOnSnapshotInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("SnapshotId") String snapshotId); @FormParam("SnapshotId") String snapshotId);
} }

View File

@ -35,7 +35,7 @@ import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair;
import org.jclouds.aws.ec2.xml.AllocateAddressResponseHandler; import org.jclouds.aws.ec2.xml.AllocateAddressResponseHandler;
import org.jclouds.aws.ec2.xml.DescribeAddressesResponseHandler; import org.jclouds.aws.ec2.xml.DescribeAddressesResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -66,7 +66,7 @@ public interface ElasticIPAddressAsyncClient {
@XMLResponseParser(AllocateAddressResponseHandler.class) @XMLResponseParser(AllocateAddressResponseHandler.class)
@FormParams(keys = ACTION, values = "AllocateAddress") @FormParams(keys = ACTION, values = "AllocateAddress")
ListenableFuture<String> allocateAddressInRegion( ListenableFuture<String> allocateAddressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region);
/** /**
* @see BaseEC2Client#associateAddressInRegion * @see BaseEC2Client#associateAddressInRegion
@ -75,7 +75,7 @@ public interface ElasticIPAddressAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "AssociateAddress") @FormParams(keys = ACTION, values = "AssociateAddress")
ListenableFuture<Void> associateAddressInRegion( ListenableFuture<Void> associateAddressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("PublicIp") String publicIp, @FormParam("InstanceId") String instanceId); @FormParam("PublicIp") String publicIp, @FormParam("InstanceId") String instanceId);
/** /**
@ -85,7 +85,7 @@ public interface ElasticIPAddressAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DisassociateAddress") @FormParams(keys = ACTION, values = "DisassociateAddress")
ListenableFuture<Void> disassociateAddressInRegion( ListenableFuture<Void> disassociateAddressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("PublicIp") String publicIp); @FormParam("PublicIp") String publicIp);
/** /**
@ -95,7 +95,7 @@ public interface ElasticIPAddressAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "ReleaseAddress") @FormParams(keys = ACTION, values = "ReleaseAddress")
ListenableFuture<Void> releaseAddressInRegion( ListenableFuture<Void> releaseAddressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("PublicIp") String publicIp); @FormParam("PublicIp") String publicIp);
/** /**
@ -107,7 +107,7 @@ public interface ElasticIPAddressAsyncClient {
@XMLResponseParser(DescribeAddressesResponseHandler.class) @XMLResponseParser(DescribeAddressesResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<PublicIpInstanceIdPair>> describeAddressesInRegion( ListenableFuture<? extends Set<PublicIpInstanceIdPair>> describeAddressesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindPublicIpsToIndexedFormParams.class) String... publicIps); @BinderParam(BindPublicIpsToIndexedFormParams.class) String... publicIps);
} }

View File

@ -52,7 +52,7 @@ import org.jclouds.aws.ec2.xml.RunInstancesResponseHandler;
import org.jclouds.aws.ec2.xml.StringValueHandler; import org.jclouds.aws.ec2.xml.StringValueHandler;
import org.jclouds.aws.ec2.xml.UnencodeStringValueHandler; import org.jclouds.aws.ec2.xml.UnencodeStringValueHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -83,7 +83,7 @@ public interface InstanceAsyncClient {
@XMLResponseParser(DescribeInstancesResponseHandler.class) @XMLResponseParser(DescribeInstancesResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<Set<? extends Reservation<? extends RunningInstance>>> describeInstancesInRegion( ListenableFuture<Set<? extends Reservation<? extends RunningInstance>>> describeInstancesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
/** /**
@ -93,7 +93,7 @@ public interface InstanceAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "RunInstances") @FormParams(keys = ACTION, values = "RunInstances")
@XMLResponseParser(RunInstancesResponseHandler.class) @XMLResponseParser(RunInstancesResponseHandler.class)
ListenableFuture<Reservation<? extends RunningInstance>> runInstancesInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Reservation<? extends RunningInstance>> runInstancesInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@Nullable @BinderParam(IfNotNullBindAvailabilityZoneToFormParam.class) String nullableAvailabilityZone, @Nullable @BinderParam(IfNotNullBindAvailabilityZoneToFormParam.class) String nullableAvailabilityZone,
@FormParam("ImageId") String imageId, @FormParam("MinCount") int minCount, @FormParam("ImageId") String imageId, @FormParam("MinCount") int minCount,
@FormParam("MaxCount") int maxCount, RunInstancesOptions... options); @FormParam("MaxCount") int maxCount, RunInstancesOptions... options);
@ -104,7 +104,7 @@ public interface InstanceAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "RebootInstances") @FormParams(keys = ACTION, values = "RebootInstances")
ListenableFuture<Void> rebootInstancesInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> rebootInstancesInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
/** /**
@ -115,7 +115,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = ACTION, values = "TerminateInstances") @FormParams(keys = ACTION, values = "TerminateInstances")
@XMLResponseParser(InstanceStateChangeHandler.class) @XMLResponseParser(InstanceStateChangeHandler.class)
ListenableFuture<Set<? extends InstanceStateChange>> terminateInstancesInRegion( ListenableFuture<Set<? extends InstanceStateChange>> terminateInstancesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
/** /**
@ -126,7 +126,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = ACTION, values = "StopInstances") @FormParams(keys = ACTION, values = "StopInstances")
@XMLResponseParser(InstanceStateChangeHandler.class) @XMLResponseParser(InstanceStateChangeHandler.class)
ListenableFuture<Set<? extends InstanceStateChange>> stopInstancesInRegion( ListenableFuture<Set<? extends InstanceStateChange>> stopInstancesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @FormParam("Force") boolean force, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, @FormParam("Force") boolean force,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
/** /**
@ -137,7 +137,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = ACTION, values = "StartInstances") @FormParams(keys = ACTION, values = "StartInstances")
@XMLResponseParser(InstanceStateChangeHandler.class) @XMLResponseParser(InstanceStateChangeHandler.class)
ListenableFuture<Set<? extends InstanceStateChange>> startInstancesInRegion( ListenableFuture<Set<? extends InstanceStateChange>> startInstancesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
/** /**
@ -148,7 +148,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "userData" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "userData" })
@XMLResponseParser(UnencodeStringValueHandler.class) @XMLResponseParser(UnencodeStringValueHandler.class)
ListenableFuture<String> getUserDataForInstanceInRegion( ListenableFuture<String> getUserDataForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -159,7 +159,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "rootDeviceName" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "rootDeviceName" })
@XMLResponseParser(StringValueHandler.class) @XMLResponseParser(StringValueHandler.class)
ListenableFuture<String> getRootDeviceNameForInstanceInRegion( ListenableFuture<String> getRootDeviceNameForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -170,7 +170,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "ramdisk" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "ramdisk" })
@XMLResponseParser(StringValueHandler.class) @XMLResponseParser(StringValueHandler.class)
ListenableFuture<String> getRamdiskForInstanceInRegion( ListenableFuture<String> getRamdiskForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -180,7 +180,7 @@ public interface InstanceAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "kernel" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "kernel" })
@XMLResponseParser(StringValueHandler.class) @XMLResponseParser(StringValueHandler.class)
ListenableFuture<String> getKernelForInstanceInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<String> getKernelForInstanceInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -191,7 +191,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "disableApiTermination" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "disableApiTermination" })
@XMLResponseParser(BooleanValueHandler.class) @XMLResponseParser(BooleanValueHandler.class)
ListenableFuture<Boolean> isApiTerminationDisabledForInstanceInRegion( ListenableFuture<Boolean> isApiTerminationDisabledForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -202,7 +202,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "instanceType" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "instanceType" })
@XMLResponseParser(InstanceTypeHandler.class) @XMLResponseParser(InstanceTypeHandler.class)
ListenableFuture<String> getInstanceTypeForInstanceInRegion( ListenableFuture<String> getInstanceTypeForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -214,7 +214,7 @@ public interface InstanceAsyncClient {
"instanceInitiatedShutdownBehavior" }) "instanceInitiatedShutdownBehavior" })
@XMLResponseParser(InstanceInitiatedShutdownBehaviorHandler.class) @XMLResponseParser(InstanceInitiatedShutdownBehaviorHandler.class)
ListenableFuture<InstanceInitiatedShutdownBehavior> getInstanceInitiatedShutdownBehaviorForInstanceInRegion( ListenableFuture<InstanceInitiatedShutdownBehavior> getInstanceInitiatedShutdownBehaviorForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -225,7 +225,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "blockDeviceMapping" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "blockDeviceMapping" })
@XMLResponseParser(BlockDeviceMappingHandler.class) @XMLResponseParser(BlockDeviceMappingHandler.class)
ListenableFuture<? extends Map<String, RunningInstance.EbsBlockDevice>> getBlockDeviceMappingForInstanceInRegion( ListenableFuture<? extends Map<String, RunningInstance.EbsBlockDevice>> getBlockDeviceMappingForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -235,7 +235,7 @@ public interface InstanceAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "ramdisk" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "ramdisk" })
ListenableFuture<Void> resetRamdiskForInstanceInRegion( ListenableFuture<Void> resetRamdiskForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -244,7 +244,7 @@ public interface InstanceAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "kernel" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "kernel" })
ListenableFuture<Void> resetKernelForInstanceInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> resetKernelForInstanceInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId); @FormParam("InstanceId") String instanceId);
/** /**
@ -253,7 +253,7 @@ public interface InstanceAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "userData" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "userData" })
ListenableFuture<Void> setUserDataForInstanceInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> setUserDataForInstanceInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("InstanceId") String instanceId,
@FormParam("Value") @ParamParser(ConvertUnencodedBytesToBase64EncodedString.class) byte[] unencodedData); @FormParam("Value") @ParamParser(ConvertUnencodedBytesToBase64EncodedString.class) byte[] unencodedData);
@ -263,7 +263,7 @@ public interface InstanceAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "ramdisk" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "ramdisk" })
ListenableFuture<Void> setRamdiskForInstanceInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> setRamdiskForInstanceInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("Value") String ramdisk); @FormParam("InstanceId") String instanceId, @FormParam("Value") String ramdisk);
/** /**
@ -272,7 +272,7 @@ public interface InstanceAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "kernel" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "kernel" })
ListenableFuture<Void> setKernelForInstanceInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> setKernelForInstanceInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("Value") String kernel); @FormParam("InstanceId") String instanceId, @FormParam("Value") String kernel);
/** /**
@ -282,7 +282,7 @@ public interface InstanceAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "disableApiTermination" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "disableApiTermination" })
ListenableFuture<Void> setApiTerminationDisabledForInstanceInRegion( ListenableFuture<Void> setApiTerminationDisabledForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("Value") boolean apiTerminationDisabled); @FormParam("InstanceId") String instanceId, @FormParam("Value") boolean apiTerminationDisabled);
/** /**
@ -292,7 +292,7 @@ public interface InstanceAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "instanceType" }) @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "instanceType" })
ListenableFuture<Void> setInstanceTypeForInstanceInRegion( ListenableFuture<Void> setInstanceTypeForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("Value") String instanceType); @FormParam("InstanceId") String instanceId, @FormParam("Value") String instanceType);
/** /**
@ -303,7 +303,7 @@ public interface InstanceAsyncClient {
@FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute",
"instanceInitiatedShutdownBehavior" }) "instanceInitiatedShutdownBehavior" })
ListenableFuture<Void> setInstanceInitiatedShutdownBehaviorForInstanceInRegion( ListenableFuture<Void> setInstanceInitiatedShutdownBehaviorForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("InstanceId") String instanceId,
@FormParam("Value") InstanceInitiatedShutdownBehavior instanceInitiatedShutdownBehavior); @FormParam("Value") InstanceInitiatedShutdownBehavior instanceInitiatedShutdownBehavior);
@ -314,7 +314,7 @@ public interface InstanceAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION }, values = { "ModifyInstanceAttribute" }) @FormParams(keys = { ACTION }, values = { "ModifyInstanceAttribute" })
ListenableFuture<Void> setBlockDeviceMappingForInstanceInRegion( ListenableFuture<Void> setBlockDeviceMappingForInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("InstanceId") String instanceId,
@BinderParam(BindBlockDeviceMappingToIndexedFormParams.class) BlockDeviceMapping blockDeviceMapping); @BinderParam(BindBlockDeviceMappingToIndexedFormParams.class) BlockDeviceMapping blockDeviceMapping);

View File

@ -35,7 +35,7 @@ import org.jclouds.aws.ec2.domain.KeyPair;
import org.jclouds.aws.ec2.xml.DescribeKeyPairsResponseHandler; import org.jclouds.aws.ec2.xml.DescribeKeyPairsResponseHandler;
import org.jclouds.aws.ec2.xml.KeyPairResponseHandler; import org.jclouds.aws.ec2.xml.KeyPairResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -66,7 +66,7 @@ public interface KeyPairAsyncClient {
@FormParams(keys = ACTION, values = "CreateKeyPair") @FormParams(keys = ACTION, values = "CreateKeyPair")
@XMLResponseParser(KeyPairResponseHandler.class) @XMLResponseParser(KeyPairResponseHandler.class)
ListenableFuture<KeyPair> createKeyPairInRegion( ListenableFuture<KeyPair> createKeyPairInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("KeyName") String keyName); @FormParam("KeyName") String keyName);
/** /**
@ -78,7 +78,7 @@ public interface KeyPairAsyncClient {
@XMLResponseParser(DescribeKeyPairsResponseHandler.class) @XMLResponseParser(DescribeKeyPairsResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<KeyPair>> describeKeyPairsInRegion( ListenableFuture<? extends Set<KeyPair>> describeKeyPairsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindKeyNamesToIndexedFormParams.class) String... keyPairNames); @BinderParam(BindKeyNamesToIndexedFormParams.class) String... keyPairNames);
/** /**
@ -88,7 +88,7 @@ public interface KeyPairAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeleteKeyPair") @FormParams(keys = ACTION, values = "DeleteKeyPair")
ListenableFuture<Void> deleteKeyPairInRegion( ListenableFuture<Void> deleteKeyPairInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("KeyName") String keyName); @FormParam("KeyName") String keyName);
} }

View File

@ -34,7 +34,7 @@ import org.jclouds.aws.ec2.binders.BindInstanceIdsToIndexedFormParams;
import org.jclouds.aws.ec2.domain.MonitoringState; import org.jclouds.aws.ec2.domain.MonitoringState;
import org.jclouds.aws.ec2.xml.MonitoringStateHandler; import org.jclouds.aws.ec2.xml.MonitoringStateHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.FormParams;
@ -63,7 +63,7 @@ public interface MonitoringAsyncClient {
@FormParams(keys = ACTION, values = "MonitorInstances") @FormParams(keys = ACTION, values = "MonitorInstances")
@XMLResponseParser(MonitoringStateHandler.class) @XMLResponseParser(MonitoringStateHandler.class)
ListenableFuture<? extends Map<String, MonitoringState>> monitorInstancesInRegion( ListenableFuture<? extends Map<String, MonitoringState>> monitorInstancesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId.0") String instanceId, @FormParam("InstanceId.0") String instanceId,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
@ -75,7 +75,7 @@ public interface MonitoringAsyncClient {
@FormParams(keys = ACTION, values = "UnmonitorInstances") @FormParams(keys = ACTION, values = "UnmonitorInstances")
@XMLResponseParser(MonitoringStateHandler.class) @XMLResponseParser(MonitoringStateHandler.class)
ListenableFuture<? extends Map<String, MonitoringState>> unmonitorInstancesInRegion( ListenableFuture<? extends Map<String, MonitoringState>> unmonitorInstancesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId.0") String instanceId, @FormParam("InstanceId.0") String instanceId,
@BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
} }

View File

@ -34,7 +34,7 @@ import org.jclouds.aws.ec2.binders.BindGroupNamesToIndexedFormParams;
import org.jclouds.aws.ec2.domain.PlacementGroup; import org.jclouds.aws.ec2.domain.PlacementGroup;
import org.jclouds.aws.ec2.xml.DescribePlacementGroupsResponseHandler; import org.jclouds.aws.ec2.xml.DescribePlacementGroupsResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -65,7 +65,7 @@ public interface PlacementGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "CreatePlacementGroup") @FormParams(keys = ACTION, values = "CreatePlacementGroup")
ListenableFuture<Void> createPlacementGroupInRegion( ListenableFuture<Void> createPlacementGroupInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("GroupName") String name, @FormParam("Strategy") String strategy); @FormParam("GroupName") String name, @FormParam("Strategy") String strategy);
/** /**
@ -75,7 +75,7 @@ public interface PlacementGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = { ACTION, "Strategy" }, values = { "CreatePlacementGroup", "cluster" }) @FormParams(keys = { ACTION, "Strategy" }, values = { "CreatePlacementGroup", "cluster" })
ListenableFuture<Void> createPlacementGroupInRegion( ListenableFuture<Void> createPlacementGroupInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @FormParam("GroupName") String name); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, @FormParam("GroupName") String name);
/** /**
* @see PlacementGroupClient#deletePlacementGroupInRegion * @see PlacementGroupClient#deletePlacementGroupInRegion
@ -85,7 +85,7 @@ public interface PlacementGroupAsyncClient {
@FormParams(keys = ACTION, values = "DeletePlacementGroup") @FormParams(keys = ACTION, values = "DeletePlacementGroup")
@ExceptionParser(ReturnVoidOnNotFoundOr404.class) @ExceptionParser(ReturnVoidOnNotFoundOr404.class)
ListenableFuture<Void> deletePlacementGroupInRegion( ListenableFuture<Void> deletePlacementGroupInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @FormParam("GroupName") String name); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, @FormParam("GroupName") String name);
/** /**
* @see PlacementGroupClient#describePlacementGroupsInRegion * @see PlacementGroupClient#describePlacementGroupsInRegion
@ -96,7 +96,7 @@ public interface PlacementGroupAsyncClient {
@XMLResponseParser(DescribePlacementGroupsResponseHandler.class) @XMLResponseParser(DescribePlacementGroupsResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<PlacementGroup>> describePlacementGroupsInRegion( ListenableFuture<? extends Set<PlacementGroup>> describePlacementGroupsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindGroupNamesToIndexedFormParams.class) String... placementGroupIds); @BinderParam(BindGroupNamesToIndexedFormParams.class) String... placementGroupIds);
} }

View File

@ -37,7 +37,7 @@ import org.jclouds.aws.ec2.domain.SecurityGroup;
import org.jclouds.aws.ec2.domain.UserIdGroupPair; import org.jclouds.aws.ec2.domain.UserIdGroupPair;
import org.jclouds.aws.ec2.xml.DescribeSecurityGroupsResponseHandler; import org.jclouds.aws.ec2.xml.DescribeSecurityGroupsResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -68,7 +68,7 @@ public interface SecurityGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "CreateSecurityGroup") @FormParams(keys = ACTION, values = "CreateSecurityGroup")
ListenableFuture<Void> createSecurityGroupInRegion( ListenableFuture<Void> createSecurityGroupInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("GroupName") String name, @FormParam("GroupDescription") String description); @FormParam("GroupName") String name, @FormParam("GroupDescription") String description);
/** /**
@ -79,7 +79,7 @@ public interface SecurityGroupAsyncClient {
@FormParams(keys = ACTION, values = "DeleteSecurityGroup") @FormParams(keys = ACTION, values = "DeleteSecurityGroup")
@ExceptionParser(ReturnVoidOnNotFoundOr404.class) @ExceptionParser(ReturnVoidOnNotFoundOr404.class)
ListenableFuture<Void> deleteSecurityGroupInRegion( ListenableFuture<Void> deleteSecurityGroupInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @FormParam("GroupName") String name); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, @FormParam("GroupName") String name);
/** /**
* @see SecurityGroupClient#describeSecurityGroupsInRegion * @see SecurityGroupClient#describeSecurityGroupsInRegion
@ -90,7 +90,7 @@ public interface SecurityGroupAsyncClient {
@XMLResponseParser(DescribeSecurityGroupsResponseHandler.class) @XMLResponseParser(DescribeSecurityGroupsResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<SecurityGroup>> describeSecurityGroupsInRegion( ListenableFuture<? extends Set<SecurityGroup>> describeSecurityGroupsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindGroupNamesToIndexedFormParams.class) String... securityGroupNames); @BinderParam(BindGroupNamesToIndexedFormParams.class) String... securityGroupNames);
/** /**
@ -101,7 +101,7 @@ public interface SecurityGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "AuthorizeSecurityGroupIngress") @FormParams(keys = ACTION, values = "AuthorizeSecurityGroupIngress")
ListenableFuture<Void> authorizeSecurityGroupIngressInRegion( ListenableFuture<Void> authorizeSecurityGroupIngressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("GroupName") String groupName, @FormParam("GroupName") String groupName,
@BinderParam(BindUserIdGroupPairToSourceSecurityGroupFormParams.class) UserIdGroupPair sourceSecurityGroup); @BinderParam(BindUserIdGroupPairToSourceSecurityGroupFormParams.class) UserIdGroupPair sourceSecurityGroup);
@ -113,7 +113,7 @@ public interface SecurityGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "AuthorizeSecurityGroupIngress") @FormParams(keys = ACTION, values = "AuthorizeSecurityGroupIngress")
ListenableFuture<Void> authorizeSecurityGroupIngressInRegion( ListenableFuture<Void> authorizeSecurityGroupIngressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("GroupName") String groupName, @FormParam("IpProtocol") IpProtocol ipProtocol, @FormParam("GroupName") String groupName, @FormParam("IpProtocol") IpProtocol ipProtocol,
@FormParam("FromPort") int fromPort, @FormParam("ToPort") int toPort, @FormParam("CidrIp") String cidrIp); @FormParam("FromPort") int fromPort, @FormParam("ToPort") int toPort, @FormParam("CidrIp") String cidrIp);
@ -125,7 +125,7 @@ public interface SecurityGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "RevokeSecurityGroupIngress") @FormParams(keys = ACTION, values = "RevokeSecurityGroupIngress")
ListenableFuture<Void> revokeSecurityGroupIngressInRegion( ListenableFuture<Void> revokeSecurityGroupIngressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("GroupName") String groupName, @FormParam("GroupName") String groupName,
@BinderParam(BindUserIdGroupPairToSourceSecurityGroupFormParams.class) UserIdGroupPair sourceSecurityGroup); @BinderParam(BindUserIdGroupPairToSourceSecurityGroupFormParams.class) UserIdGroupPair sourceSecurityGroup);
@ -137,7 +137,7 @@ public interface SecurityGroupAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "RevokeSecurityGroupIngress") @FormParams(keys = ACTION, values = "RevokeSecurityGroupIngress")
ListenableFuture<Void> revokeSecurityGroupIngressInRegion( ListenableFuture<Void> revokeSecurityGroupIngressInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("GroupName") String groupName, @FormParam("IpProtocol") IpProtocol ipProtocol, @FormParam("GroupName") String groupName, @FormParam("IpProtocol") IpProtocol ipProtocol,
@FormParam("FromPort") int fromPort, @FormParam("ToPort") int toPort, @FormParam("CidrIp") String cidrIp); @FormParam("FromPort") int fromPort, @FormParam("ToPort") int toPort, @FormParam("CidrIp") String cidrIp);
} }

View File

@ -37,7 +37,7 @@ import org.jclouds.aws.ec2.options.BundleInstanceS3StorageOptions;
import org.jclouds.aws.ec2.xml.BundleTaskHandler; import org.jclouds.aws.ec2.xml.BundleTaskHandler;
import org.jclouds.aws.ec2.xml.DescribeBundleTasksResponseHandler; import org.jclouds.aws.ec2.xml.DescribeBundleTasksResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser; import org.jclouds.rest.annotations.ExceptionParser;
@ -68,7 +68,7 @@ public interface WindowsAsyncClient {
@FormParams(keys = ACTION, values = "BundleInstance") @FormParams(keys = ACTION, values = "BundleInstance")
@XMLResponseParser(BundleTaskHandler.class) @XMLResponseParser(BundleTaskHandler.class)
ListenableFuture<BundleTask> bundleInstanceInRegion( ListenableFuture<BundleTask> bundleInstanceInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("InstanceId") String instanceId, @FormParam("Storage.S3.Prefix") String prefix, @FormParam("InstanceId") String instanceId, @FormParam("Storage.S3.Prefix") String prefix,
@FormParam("Storage.S3.Bucket") String bucket, @FormParam("Storage.S3.Bucket") String bucket,
@BinderParam(BindS3UploadPolicyAndSignature.class) String uploadPolicy, @BinderParam(BindS3UploadPolicyAndSignature.class) String uploadPolicy,
@ -82,7 +82,7 @@ public interface WindowsAsyncClient {
@FormParams(keys = ACTION, values = "CancelBundleTask") @FormParams(keys = ACTION, values = "CancelBundleTask")
@XMLResponseParser(BundleTaskHandler.class) @XMLResponseParser(BundleTaskHandler.class)
ListenableFuture<BundleTask> cancelBundleTaskInRegion( ListenableFuture<BundleTask> cancelBundleTaskInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("BundleId") String bundleId); @FormParam("BundleId") String bundleId);
/** /**
@ -94,7 +94,7 @@ public interface WindowsAsyncClient {
@XMLResponseParser(DescribeBundleTasksResponseHandler.class) @XMLResponseParser(DescribeBundleTasksResponseHandler.class)
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
ListenableFuture<? extends Set<BundleTask>> describeBundleTasksInRegion( ListenableFuture<? extends Set<BundleTask>> describeBundleTasksInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@BinderParam(BindBundleIdsToIndexedFormParams.class) String... bundleTaskIds); @BinderParam(BindBundleIdsToIndexedFormParams.class) String... bundleTaskIds);
} }

View File

@ -24,11 +24,11 @@ import java.util.Date;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Attachment; import org.jclouds.aws.ec2.domain.Attachment;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
/** /**

View File

@ -26,7 +26,6 @@ import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Attachment; import org.jclouds.aws.ec2.domain.Attachment;
import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.InstanceState;
import org.jclouds.aws.ec2.domain.MonitoringState; import org.jclouds.aws.ec2.domain.MonitoringState;
@ -36,6 +35,7 @@ import org.jclouds.aws.ec2.domain.RunningInstance;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult; import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;

View File

@ -23,11 +23,11 @@ import java.util.Date;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.BundleTask; import org.jclouds.aws.ec2.domain.BundleTask;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
/** /**
* *

View File

@ -28,13 +28,13 @@ import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Attachment; import org.jclouds.aws.ec2.domain.Attachment;
import org.jclouds.aws.ec2.domain.Volume; import org.jclouds.aws.ec2.domain.Volume;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;

View File

@ -24,10 +24,10 @@ import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult; import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -24,9 +24,9 @@ import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo; import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;

View File

@ -25,7 +25,6 @@ import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Image; import org.jclouds.aws.ec2.domain.Image;
import org.jclouds.aws.ec2.domain.RootDeviceType; import org.jclouds.aws.ec2.domain.RootDeviceType;
import org.jclouds.aws.ec2.domain.Image.Architecture; import org.jclouds.aws.ec2.domain.Image.Architecture;
@ -34,6 +33,7 @@ import org.jclouds.aws.ec2.domain.Image.ImageState;
import org.jclouds.aws.ec2.domain.Image.ImageType; import org.jclouds.aws.ec2.domain.Image.ImageType;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;

View File

@ -23,10 +23,10 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Reservation; import org.jclouds.aws.ec2.domain.Reservation;
import org.jclouds.aws.ec2.domain.RunningInstance; import org.jclouds.aws.ec2.domain.RunningInstance;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.location.Region;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -23,10 +23,10 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.KeyPair; import org.jclouds.aws.ec2.domain.KeyPair;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -23,13 +23,13 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.IpPermission; import org.jclouds.aws.ec2.domain.IpPermission;
import org.jclouds.aws.ec2.domain.IpProtocol; import org.jclouds.aws.ec2.domain.IpProtocol;
import org.jclouds.aws.ec2.domain.SecurityGroup; import org.jclouds.aws.ec2.domain.SecurityGroup;
import org.jclouds.aws.ec2.domain.UserIdGroupPair; import org.jclouds.aws.ec2.domain.UserIdGroupPair;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -23,11 +23,11 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.InstanceState;
import org.jclouds.aws.ec2.domain.InstanceStateChange; import org.jclouds.aws.ec2.domain.InstanceStateChange;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult; import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult;
import org.jclouds.location.Region;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -21,10 +21,10 @@ package org.jclouds.aws.ec2.xml;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.KeyPair; import org.jclouds.aws.ec2.domain.KeyPair;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
/** /**
* *

View File

@ -21,12 +21,12 @@ package org.jclouds.aws.ec2.xml;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.PlacementGroup; import org.jclouds.aws.ec2.domain.PlacementGroup;
import org.jclouds.aws.ec2.domain.PlacementGroup.State; import org.jclouds.aws.ec2.domain.PlacementGroup.State;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
/** /**
* *

View File

@ -21,10 +21,10 @@ package org.jclouds.aws.ec2.xml;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.ReservedInstancesOffering; import org.jclouds.aws.ec2.domain.ReservedInstancesOffering;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
/** /**
* *

View File

@ -21,10 +21,10 @@ package org.jclouds.aws.ec2.xml;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Reservation; import org.jclouds.aws.ec2.domain.Reservation;
import org.jclouds.aws.ec2.domain.RunningInstance; import org.jclouds.aws.ec2.domain.RunningInstance;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.location.Region;
/** /**
* Parses the following XML document: * Parses the following XML document:

View File

@ -23,12 +23,12 @@ import java.util.Date;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Snapshot; import org.jclouds.aws.ec2.domain.Snapshot;
import org.jclouds.aws.ec2.domain.Snapshot.Status; import org.jclouds.aws.ec2.domain.Snapshot.Status;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
/** /**
* *

View File

@ -36,7 +36,7 @@ import org.jclouds.aws.elb.xml.CreateLoadBalancerResponseHandler;
import org.jclouds.aws.elb.xml.DescribeLoadBalancersResponseHandler; import org.jclouds.aws.elb.xml.DescribeLoadBalancersResponseHandler;
import org.jclouds.aws.elb.xml.RegisterInstancesWithLoadBalancerResponseHandler; import org.jclouds.aws.elb.xml.RegisterInstancesWithLoadBalancerResponseHandler;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.FormParams;
@ -66,7 +66,7 @@ public interface ELBAsyncClient {
@XMLResponseParser(CreateLoadBalancerResponseHandler.class) @XMLResponseParser(CreateLoadBalancerResponseHandler.class)
@FormParams(keys = ACTION, values = "CreateLoadBalancer") @FormParams(keys = ACTION, values = "CreateLoadBalancer")
ListenableFuture<String> createLoadBalancerInRegion( ListenableFuture<String> createLoadBalancerInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("LoadBalancerName") String name, @FormParam("LoadBalancerName") String name,
@FormParam("Listeners.member.1.Protocol") String protocol, @FormParam("Listeners.member.1.Protocol") String protocol,
@FormParam("Listeners.member.1.LoadBalancerPort") int loadBalancerPort, @FormParam("Listeners.member.1.LoadBalancerPort") int loadBalancerPort,
@ -80,7 +80,7 @@ public interface ELBAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeleteLoadBalancer") @FormParams(keys = ACTION, values = "DeleteLoadBalancer")
ListenableFuture<Void> deleteLoadBalancerInRegion( ListenableFuture<Void> deleteLoadBalancerInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("LoadBalancerName") String name); @FormParam("LoadBalancerName") String name);
/** /**
@ -91,7 +91,7 @@ public interface ELBAsyncClient {
@XMLResponseParser(RegisterInstancesWithLoadBalancerResponseHandler.class) @XMLResponseParser(RegisterInstancesWithLoadBalancerResponseHandler.class)
@FormParams(keys = ACTION, values = "RegisterInstancesWithLoadBalancer") @FormParams(keys = ACTION, values = "RegisterInstancesWithLoadBalancer")
ListenableFuture<? extends Set<String>> registerInstancesWithLoadBalancerInRegion( ListenableFuture<? extends Set<String>> registerInstancesWithLoadBalancerInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("LoadBalancerName") String name, @FormParam("LoadBalancerName") String name,
@BinderParam(BindELBInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindELBInstanceIdsToIndexedFormParams.class) String... instanceIds);
@ -102,7 +102,7 @@ public interface ELBAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeregisterInstancesFromLoadBalancer") @FormParams(keys = ACTION, values = "DeregisterInstancesFromLoadBalancer")
ListenableFuture<Void> deregisterInstancesWithLoadBalancerInRegion( ListenableFuture<Void> deregisterInstancesWithLoadBalancerInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("LoadBalancerName") String name, @FormParam("LoadBalancerName") String name,
@BinderParam(BindELBInstanceIdsToIndexedFormParams.class) String... instanceIds); @BinderParam(BindELBInstanceIdsToIndexedFormParams.class) String... instanceIds);
@ -114,6 +114,6 @@ public interface ELBAsyncClient {
@XMLResponseParser(DescribeLoadBalancersResponseHandler.class) @XMLResponseParser(DescribeLoadBalancersResponseHandler.class)
@FormParams(keys = ACTION, values = "DescribeLoadBalancers") @FormParams(keys = ACTION, values = "DescribeLoadBalancers")
ListenableFuture<? extends Set<LoadBalancer>> describeLoadBalancersInRegion( ListenableFuture<? extends Set<LoadBalancer>> describeLoadBalancersInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region);
} }

View File

@ -24,7 +24,6 @@ import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.util.EC2Utils; import org.jclouds.aws.ec2.util.EC2Utils;
import org.jclouds.aws.elb.domain.LoadBalancer; import org.jclouds.aws.elb.domain.LoadBalancer;
import org.jclouds.aws.elb.domain.LoadBalancer.AppCookieStickinessPolicy; import org.jclouds.aws.elb.domain.LoadBalancer.AppCookieStickinessPolicy;
@ -33,6 +32,7 @@ import org.jclouds.aws.elb.domain.LoadBalancer.LoadBalancerListener;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;

View File

@ -23,7 +23,6 @@ import java.util.Set;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region;
import org.jclouds.aws.s3.S3AsyncClient; import org.jclouds.aws.s3.S3AsyncClient;
import org.jclouds.aws.s3.S3Client; import org.jclouds.aws.s3.S3Client;
import org.jclouds.aws.s3.blobstore.S3AsyncBlobStore; import org.jclouds.aws.s3.blobstore.S3AsyncBlobStore;
@ -31,7 +30,6 @@ import org.jclouds.aws.s3.blobstore.S3BlobRequestSigner;
import org.jclouds.aws.s3.blobstore.S3BlobStore; import org.jclouds.aws.s3.blobstore.S3BlobStore;
import org.jclouds.aws.s3.blobstore.functions.LocationFromBucketLocation; import org.jclouds.aws.s3.blobstore.functions.LocationFromBucketLocation;
import org.jclouds.aws.s3.domain.BucketMetadata; import org.jclouds.aws.s3.domain.BucketMetadata;
import org.jclouds.aws.suppliers.DefaultLocationSupplier;
import org.jclouds.blobstore.AsyncBlobStore; import org.jclouds.blobstore.AsyncBlobStore;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.BlobStore;
@ -43,7 +41,9 @@ import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import org.jclouds.location.Region;
import org.jclouds.location.suppliers.FirstZoneOrRegionMatchingRegionId;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
@ -65,7 +65,7 @@ public class S3BlobStoreContextModule extends AbstractModule {
protected void configure() { protected void configure() {
install(new BlobStoreMapModule()); install(new BlobStoreMapModule());
bind(new TypeLiteral<Supplier<Location>>() { bind(new TypeLiteral<Supplier<Location>>() {
}).to(new TypeLiteral<DefaultLocationSupplier>() { }).to(new TypeLiteral<FirstZoneOrRegionMatchingRegionId>() {
}); });
bind(ConsistencyModel.class).toInstance(ConsistencyModel.EVENTUAL); bind(ConsistencyModel.class).toInstance(ConsistencyModel.EVENTUAL);
bind(AsyncBlobStore.class).to(S3AsyncBlobStore.class).in(Scopes.SINGLETON); bind(AsyncBlobStore.class).to(S3AsyncBlobStore.class).in(Scopes.SINGLETON);

View File

@ -30,7 +30,6 @@ import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint;
import org.jclouds.aws.simpledb.binders.BindAttributesToIndexedFormParams; import org.jclouds.aws.simpledb.binders.BindAttributesToIndexedFormParams;
import org.jclouds.aws.simpledb.domain.Item; import org.jclouds.aws.simpledb.domain.Item;
import org.jclouds.aws.simpledb.domain.AttributePair; import org.jclouds.aws.simpledb.domain.AttributePair;
@ -38,6 +37,7 @@ import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.aws.simpledb.options.ListDomainsOptions; import org.jclouds.aws.simpledb.options.ListDomainsOptions;
import org.jclouds.aws.simpledb.xml.ItemsHandler; import org.jclouds.aws.simpledb.xml.ItemsHandler;
import org.jclouds.aws.simpledb.xml.ListDomainsResponseHandler; import org.jclouds.aws.simpledb.xml.ListDomainsResponseHandler;
import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.FormParams;
@ -68,7 +68,7 @@ public interface SimpleDBAsyncClient {
@FormParams(keys = ACTION, values = "ListDomains") @FormParams(keys = ACTION, values = "ListDomains")
@XMLResponseParser(ListDomainsResponseHandler.class) @XMLResponseParser(ListDomainsResponseHandler.class)
ListenableFuture<? extends ListDomainsResponse> listDomainsInRegion( ListenableFuture<? extends ListDomainsResponse> listDomainsInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListDomainsOptions... options); @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, ListDomainsOptions... options);
/** /**
* @see SimpleDBClient#createDomainInRegion * @see SimpleDBClient#createDomainInRegion
@ -76,7 +76,7 @@ public interface SimpleDBAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "CreateDomain") @FormParams(keys = ACTION, values = "CreateDomain")
ListenableFuture<Void> createDomainInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> createDomainInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("DomainName") String domainName); @FormParam("DomainName") String domainName);
/** /**
@ -85,7 +85,7 @@ public interface SimpleDBAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "DeleteDomain") @FormParams(keys = ACTION, values = "DeleteDomain")
ListenableFuture<Void> deleteDomainInRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> deleteDomainInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("DomainName") String domainName); @FormParam("DomainName") String domainName);
@ -95,7 +95,7 @@ public interface SimpleDBAsyncClient {
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "PutAttributes") @FormParams(keys = ACTION, values = "PutAttributes")
ListenableFuture<Void> putAttributes(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<Void> putAttributes(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("DomainName") String domainName, @FormParam("DomainName") String domainName,
@FormParam("ItemName") String itemName, @FormParam("ItemName") String itemName,
@BinderParam(BindAttributesToIndexedFormParams.class) Item attributes); @BinderParam(BindAttributesToIndexedFormParams.class) Item attributes);
@ -107,7 +107,7 @@ public interface SimpleDBAsyncClient {
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "Select") @FormParams(keys = ACTION, values = "Select")
@XMLResponseParser(ItemsHandler.class) @XMLResponseParser(ItemsHandler.class)
ListenableFuture<? extends Map<String, Item>> select(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, ListenableFuture<? extends Map<String, Item>> select(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("SelectExpression") String selectExpression); @FormParam("SelectExpression") String selectExpression);

View File

@ -25,12 +25,12 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.ws.rs.FormParam; import javax.ws.rs.FormParam;
import org.jclouds.aws.functions.RegionToEndpoint;
import org.jclouds.aws.simpledb.domain.Item; import org.jclouds.aws.simpledb.domain.Item;
import org.jclouds.aws.simpledb.domain.AttributePair; import org.jclouds.aws.simpledb.domain.AttributePair;
import org.jclouds.aws.simpledb.domain.ListDomainsResponse; import org.jclouds.aws.simpledb.domain.ListDomainsResponse;
import org.jclouds.aws.simpledb.options.ListDomainsOptions; import org.jclouds.aws.simpledb.options.ListDomainsOptions;
import org.jclouds.concurrent.Timeout; import org.jclouds.concurrent.Timeout;
import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;

View File

@ -30,7 +30,6 @@ import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import org.jclouds.aws.filters.FormSigner; import org.jclouds.aws.filters.FormSigner;
import org.jclouds.aws.functions.RegionToEndpoint;
import org.jclouds.aws.sqs.domain.Queue; import org.jclouds.aws.sqs.domain.Queue;
import org.jclouds.aws.sqs.functions.QueueLocation; import org.jclouds.aws.sqs.functions.QueueLocation;
import org.jclouds.aws.sqs.options.CreateQueueOptions; import org.jclouds.aws.sqs.options.CreateQueueOptions;
@ -38,6 +37,7 @@ import org.jclouds.aws.sqs.options.ListQueuesOptions;
import org.jclouds.aws.sqs.xml.RegexListQueuesResponseHandler; import org.jclouds.aws.sqs.xml.RegexListQueuesResponseHandler;
import org.jclouds.aws.sqs.xml.RegexMD5Handler; import org.jclouds.aws.sqs.xml.RegexMD5Handler;
import org.jclouds.aws.sqs.xml.RegexQueueHandler; import org.jclouds.aws.sqs.xml.RegexQueueHandler;
import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.FormParams;
import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.RequestFilters;
@ -66,7 +66,7 @@ public interface SQSAsyncClient {
@FormParams(keys = ACTION, values = "ListQueues") @FormParams(keys = ACTION, values = "ListQueues")
@ResponseParser(RegexListQueuesResponseHandler.class) @ResponseParser(RegexListQueuesResponseHandler.class)
ListenableFuture<? extends Set<Queue>> listQueuesInRegion( ListenableFuture<? extends Set<Queue>> listQueuesInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
ListQueuesOptions... options); ListQueuesOptions... options);
/** /**
@ -77,7 +77,7 @@ public interface SQSAsyncClient {
@FormParams(keys = ACTION, values = "CreateQueue") @FormParams(keys = ACTION, values = "CreateQueue")
@ResponseParser(RegexQueueHandler.class) @ResponseParser(RegexQueueHandler.class)
ListenableFuture<Queue> createQueueInRegion( ListenableFuture<Queue> createQueueInRegion(
@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region, @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
@FormParam("QueueName") String queueName, CreateQueueOptions... options); @FormParam("QueueName") String queueName, CreateQueueOptions... options);
/** /**

View File

@ -26,9 +26,9 @@ import javax.inject.Inject;
import javax.inject.Provider; import javax.inject.Provider;
import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriBuilder;
import org.jclouds.aws.Region;
import org.jclouds.aws.sqs.domain.Queue; import org.jclouds.aws.sqs.domain.Queue;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.location.Region;
import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableBiMap;

View File

@ -26,11 +26,11 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region;
import org.jclouds.aws.sqs.domain.Queue; import org.jclouds.aws.sqs.domain.Queue;
import org.jclouds.aws.sqs.xml.internal.BaseRegexQueueHandler; import org.jclouds.aws.sqs.xml.internal.BaseRegexQueueHandler;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.ReturnStringIf2xx; import org.jclouds.http.functions.ReturnStringIf2xx;
import org.jclouds.location.Region;
import com.google.common.base.Function; import com.google.common.base.Function;

View File

@ -25,11 +25,11 @@ import java.util.Map;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region;
import org.jclouds.aws.sqs.domain.Queue; import org.jclouds.aws.sqs.domain.Queue;
import org.jclouds.aws.sqs.xml.internal.BaseRegexQueueHandler; import org.jclouds.aws.sqs.xml.internal.BaseRegexQueueHandler;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.ReturnStringIf2xx; import org.jclouds.http.functions.ReturnStringIf2xx;
import org.jclouds.location.Region;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;

View File

@ -72,7 +72,7 @@ public abstract class BaseEC2AsyncClientTest<T> extends RestClientTest<T> {
@Override @Override
protected Map<String, String> provideAvailabilityZoneToRegions(EC2Client client, protected Map<String, String> provideAvailabilityZoneToRegions(EC2Client client,
@org.jclouds.aws.Region Map<String, URI> regions) { @org.jclouds.location.Region Map<String, URI> regions) {
return ImmutableMap.<String, String> of(AvailabilityZone.US_EAST_1A, Region.US_EAST_1); return ImmutableMap.<String, String> of(AvailabilityZone.US_EAST_1A, Region.US_EAST_1);
} }
} }

View File

@ -57,7 +57,7 @@ public class BaseEC2HandlerTest extends BaseHandlerTest {
@SuppressWarnings("unused") @SuppressWarnings("unused")
@Singleton @Singleton
@Provides @Provides
@org.jclouds.aws.Region @org.jclouds.location.Region
String provideDefaultRegion() { String provideDefaultRegion() {
return defaultRegion; return defaultRegion;
} }

View File

@ -51,7 +51,7 @@ public class DescribeAvailabilityZonesResponseHandlerTest extends BaseHandlerTes
@Override @Override
protected void configure() { protected void configure() {
bindConstant().annotatedWith(org.jclouds.aws.Region.class).to("SHOULDNTSEETHISASXMLHASREGIONDATA"); bindConstant().annotatedWith(org.jclouds.location.Region.class).to("SHOULDNTSEETHISASXMLHASREGIONDATA");
super.configure(); super.configure();
} }

View File

@ -24,7 +24,6 @@ import static org.testng.Assert.assertEquals;
import java.io.InputStream; import java.io.InputStream;
import java.util.Set; import java.util.Set;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.compute.functions.ImageParserTest; import org.jclouds.aws.ec2.compute.functions.ImageParserTest;
import org.jclouds.aws.ec2.domain.Image; import org.jclouds.aws.ec2.domain.Image;
import org.jclouds.aws.ec2.domain.Image.Architecture; import org.jclouds.aws.ec2.domain.Image.Architecture;
@ -34,6 +33,7 @@ import org.jclouds.aws.ec2.domain.Image.ImageType;
import org.jclouds.aws.ec2.domain.RootDeviceType; import org.jclouds.aws.ec2.domain.RootDeviceType;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.http.functions.config.SaxParserModule; import org.jclouds.http.functions.config.SaxParserModule;
import org.jclouds.location.Region;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View File

@ -25,7 +25,6 @@ import java.io.InputStream;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.Set; import java.util.Set;
import org.jclouds.aws.Region;
import org.jclouds.aws.ec2.domain.Attachment; import org.jclouds.aws.ec2.domain.Attachment;
import org.jclouds.aws.ec2.domain.AvailabilityZone; import org.jclouds.aws.ec2.domain.AvailabilityZone;
import org.jclouds.aws.ec2.domain.InstanceState; import org.jclouds.aws.ec2.domain.InstanceState;
@ -38,6 +37,7 @@ import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.http.functions.config.SaxParserModule; import org.jclouds.http.functions.config.SaxParserModule;
import org.jclouds.location.Region;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -29,7 +29,7 @@ import org.jclouds.aws.domain.Region;
import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.BaseHandlerTest;
import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax;
import org.jclouds.http.functions.config.SaxParserModule; import org.jclouds.http.functions.config.SaxParserModule;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import org.jclouds.util.Strings2; import org.jclouds.util.Strings2;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -61,7 +61,7 @@ public class SimpleDBRestClientModuleTest {
@Test @Test
void testRegions() { void testRegions() {
Map<String, URI> regionMap = createInjector().getInstance( Map<String, URI> regionMap = createInjector().getInstance(
new Key<Map<String, URI>>(org.jclouds.aws.Region.class) { new Key<Map<String, URI>>(org.jclouds.location.Region.class) {
}); });
assertEquals(regionMap, ImmutableMap.<String, URI> of(Region.US_EAST_1, URI assertEquals(regionMap, ImmutableMap.<String, URI> of(Region.US_EAST_1, URI
.create("https://sdb.amazonaws.com"), Region.US_WEST_1, URI .create("https://sdb.amazonaws.com"), Region.US_WEST_1, URI

View File

@ -61,7 +61,7 @@ public class SQSRestClientModuleTest {
@Test @Test
void testRegions() { void testRegions() {
Map<String, URI> regionMap = createInjector().getInstance( Map<String, URI> regionMap = createInjector().getInstance(
new Key<Map<String, URI>>(org.jclouds.aws.Region.class) { new Key<Map<String, URI>>(org.jclouds.location.Region.class) {
}); });
assertEquals(regionMap, ImmutableMap.<String, URI> of(Region.US_EAST_1, URI assertEquals(regionMap, ImmutableMap.<String, URI> of(Region.US_EAST_1, URI
.create("https://sqs.us-east-1.amazonaws.com"), Region.US_WEST_1, URI .create("https://sqs.us-east-1.amazonaws.com"), Region.US_WEST_1, URI

View File

@ -88,7 +88,7 @@ public class ListQueuesResponseHandlerTest extends PerformanceTest {
@SuppressWarnings("unused") @SuppressWarnings("unused")
@Provides @Provides
@Singleton @Singleton
@org.jclouds.aws.Region @org.jclouds.location.Region
Map<String, URI> provideRegions() { Map<String, URI> provideRegions() {
return ImmutableMap.<String, URI> of(Region.EU_WEST_1, URI return ImmutableMap.<String, URI> of(Region.EU_WEST_1, URI
.create("https://eu-west-1.queue.amazonaws.com")); .create("https://eu-west-1.queue.amazonaws.com"));

View File

@ -41,7 +41,7 @@ import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.base.Suppliers; import com.google.common.base.Suppliers;

View File

@ -38,7 +38,7 @@ import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.base.Suppliers; import com.google.common.base.Suppliers;

View File

@ -21,16 +21,19 @@ package org.jclouds.compute.config;
import java.util.Set; import java.util.Set;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.Image;
import org.jclouds.compute.suppliers.DefaultLocationSupplier;
import org.jclouds.compute.suppliers.LocationSupplier;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
import com.google.inject.Scopes; import com.google.inject.Scopes;
import com.google.inject.TypeLiteral; import com.google.inject.TypeLiteral;
/** /**
* @author Adrian Cole * @author Adrian Cole
*/ */
@ -49,11 +52,27 @@ public abstract class BindComputeSuppliersByClass extends AbstractModule {
protected abstract Class<? extends Supplier<Set<? extends Hardware>>> defineHardwareSupplier(); protected abstract Class<? extends Supplier<Set<? extends Hardware>>> defineHardwareSupplier();
protected Class<? extends Supplier<Set<? extends Location>>> defineLocationSupplier() { protected Class<? extends Supplier<Set<? extends Location>>> defineLocationSupplier() {
return LocationSupplier.class; return SupplierOfLocationSet.class;
}
@Singleton
static class SupplierOfLocationSet implements Supplier<Set<? extends Location>> {
private final Set<? extends Location> locations;
@Inject
SupplierOfLocationSet(Set<? extends Location> locations) {
this.locations = locations;
}
@Override
public Set<? extends Location> get() {
return locations;
}
} }
protected Class<? extends Supplier<Location>> defineDefaultLocationSupplier() { protected Class<? extends Supplier<Location>> defineDefaultLocationSupplier() {
return DefaultLocationSupplier.class; return OnlyLocationOrFirstZone.class;
} }
protected void bindImageSupplier(Class<? extends Supplier<Set<? extends Image>>> clazz) { protected void bindImageSupplier(Class<? extends Supplier<Set<? extends Image>>> clazz) {

View File

@ -40,8 +40,8 @@ import org.jclouds.compute.strategy.RebootNodeStrategy;
import org.jclouds.compute.strategy.ResumeNodeStrategy; import org.jclouds.compute.strategy.ResumeNodeStrategy;
import org.jclouds.compute.strategy.SuspendNodeStrategy; import org.jclouds.compute.strategy.SuspendNodeStrategy;
import org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies; import org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies;
import org.jclouds.compute.suppliers.DefaultLocationSupplier;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
@ -120,7 +120,7 @@ public class ComputeServiceAdapterContextModule<S, A, N, H, I, L> extends BaseCo
protected void bindDefaultLocation() { protected void bindDefaultLocation() {
bind(new TypeLiteral<Supplier<Location>>() { bind(new TypeLiteral<Supplier<Location>>() {
}).to(DefaultLocationSupplier.class); }).to(OnlyLocationOrFirstZone.class);
} }
@Provides @Provides

View File

@ -69,7 +69,7 @@ public class StubComputeServiceAdapter implements JCloudsNativeComputeServiceAda
public StubComputeServiceAdapter(ConcurrentMap<String, NodeMetadata> nodes, Supplier<Location> location, public StubComputeServiceAdapter(ConcurrentMap<String, NodeMetadata> nodes, Supplier<Location> location,
@Named("NODE_ID") Provider<Integer> idProvider, @Named("PUBLIC_IP_PREFIX") String publicIpPrefix, @Named("NODE_ID") Provider<Integer> idProvider, @Named("PUBLIC_IP_PREFIX") String publicIpPrefix,
@Named("PRIVATE_IP_PREFIX") String privateIpPrefix, @Named("PASSWORD_PREFIX") String passwordPrefix, @Named("PRIVATE_IP_PREFIX") String privateIpPrefix, @Named("PASSWORD_PREFIX") String passwordPrefix,
@org.jclouds.rest.annotations.Provider String providerName, Map<OsFamily, Map<String, String>> osToVersionMap) { @org.jclouds.location.Provider String providerName, Map<OsFamily, Map<String, String>> osToVersionMap) {
this.nodes = nodes; this.nodes = nodes;
this.location = location; this.location = location;
this.idProvider = idProvider; this.idProvider = idProvider;

View File

@ -1,51 +0,0 @@
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.compute.suppliers;
import java.util.Set;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.jclouds.domain.Location;
import com.google.common.base.Supplier;
/**
*
* @author Adrian Cole
*
* By default allows you to use a static set of locations bound to Set<? extends Location>
*/
@Singleton
public class LocationSupplier implements Supplier<Set<? extends Location>> {
private final Set<? extends Location> locations;
@Inject
LocationSupplier(Set<? extends Location> locations) {
this.locations = locations;
}
@Override
public Set<? extends Location> get() {
return locations;
}
}

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.rest.annotations; package org.jclouds.location;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.FIELD;

View File

@ -17,7 +17,7 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.aws; package org.jclouds.location;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
@ -27,7 +27,7 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier; import javax.inject.Qualifier;
/** /**
* Related to a EC2 resource. * Related to a Region-scoped resource.
* *
* @author Adrian Cole * @author Adrian Cole
* *

View File

@ -17,16 +17,19 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.aws.functions; package org.jclouds.location.functions;
import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI; import java.net.URI;
import java.util.Map; import java.util.Map;
import javax.annotation.Nullable;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region; import org.jclouds.location.Provider;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Region;
import com.google.common.base.Function; import com.google.common.base.Function;
@ -35,17 +38,18 @@ import com.google.common.base.Function;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Singleton @Singleton
public class RegionToEndpoint implements Function<Object, URI> { public class RegionToEndpointOrProviderIfNull implements Function<Object, URI> {
private final Map<String, URI> regionToEndpoint;
private final URI defaultUri; private final URI defaultUri;
private final Map<String, URI> regionToEndpoint;
@Inject @Inject
public RegionToEndpoint(@Region Map<String, URI> regionToEndpoint, @Provider URI defaultUri) { public RegionToEndpointOrProviderIfNull(@Provider URI defaultUri, @Region Map<String, URI> regionToEndpoint) {
this.regionToEndpoint = regionToEndpoint; this.defaultUri = checkNotNull(defaultUri, "defaultUri");
this.defaultUri = defaultUri; this.regionToEndpoint = checkNotNull(regionToEndpoint, "regionToEndpoint");
} }
public URI apply(Object from) { @Override
public URI apply(@Nullable Object from) {
return from == null ? defaultUri : regionToEndpoint.get(from); return from == null ? defaultUri : regionToEndpoint.get(from);
} }

View File

@ -17,7 +17,9 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.aws.suppliers; package org.jclouds.location.suppliers;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.Set; import java.util.Set;
@ -25,10 +27,10 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import org.jclouds.aws.Region;
import org.jclouds.collect.Memoized; import org.jclouds.collect.Memoized;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.location.Region;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
@ -38,21 +40,21 @@ import com.google.common.collect.Iterables;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Singleton @Singleton
public class DefaultLocationSupplier implements Supplier<Location> { public class FirstZoneOrRegionMatchingRegionId implements Supplier<Location> {
private final String region; private final String region;
private final Supplier<Set<? extends Location>> set; private final Supplier<Set<? extends Location>> locationsSupplier;
@Inject @Inject
DefaultLocationSupplier(@Region final String region, @Memoized Supplier<Set<? extends Location>> set) { FirstZoneOrRegionMatchingRegionId(@Region String region, @Memoized Supplier<Set<? extends Location>> locationsSupplier) {
this.region = region; this.region = checkNotNull(region, "region");
this.set = set; this.locationsSupplier = checkNotNull(locationsSupplier, "locationsSupplier");
} }
@Override @Override
@Singleton @Singleton
public Location get() { public Location get() {
try { try {
Location toReturn = Iterables.find(set.get(), new Predicate<Location>() { Location toReturn = Iterables.find(locationsSupplier.get(), new Predicate<Location>() {
@Override @Override
public boolean apply(Location input) { public boolean apply(Location input) {
@ -69,7 +71,7 @@ public class DefaultLocationSupplier implements Supplier<Location> {
}); });
return toReturn.getScope() == LocationScope.REGION ? toReturn : toReturn.getParent(); return toReturn.getScope() == LocationScope.REGION ? toReturn : toReturn.getParent();
} catch (NoSuchElementException e) { } catch (NoSuchElementException e) {
throw new IllegalStateException(String.format("region: %s not found in %s", region, set)); throw new IllegalStateException(String.format("region: %s not found in %s", region, locationsSupplier));
} }
} }
} }

View File

@ -17,8 +17,9 @@
* ==================================================================== * ====================================================================
*/ */
package org.jclouds.compute.suppliers; package org.jclouds.location.suppliers;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Iterables.find; import static com.google.common.collect.Iterables.find;
import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.collect.Iterables.getOnlyElement;
@ -40,19 +41,19 @@ import com.google.common.base.Supplier;
* *
*/ */
@Singleton @Singleton
public class DefaultLocationSupplier implements Supplier<Location> { public class OnlyLocationOrFirstZone implements Supplier<Location> {
private final Supplier<Set<? extends Location>> locations; private final Supplier<Set<? extends Location>> locationsSupplier;
@Inject @Inject
DefaultLocationSupplier(@Memoized Supplier<Set<? extends Location>> locations) { OnlyLocationOrFirstZone(@Memoized Supplier<Set<? extends Location>> locationsSupplier) {
this.locations = locations; this.locationsSupplier = checkNotNull(locationsSupplier, "locationsSupplierSupplier");
} }
@Override @Override
public Location get() { public Location get() {
if (locations.get().size() == 1) if (locationsSupplier.get().size() == 1)
return getOnlyElement(locations.get()); return getOnlyElement(locationsSupplier.get());
return find(locations.get(), new Predicate<Location>() { return find(locationsSupplier.get(), new Predicate<Location>() {
@Override @Override
public boolean apply(Location input) { public boolean apply(Location input) {

View File

@ -41,13 +41,13 @@ import org.jclouds.concurrent.config.ExecutorServiceModule;
import org.jclouds.http.RequiresHttp; import org.jclouds.http.RequiresHttp;
import org.jclouds.http.config.ConfiguresHttpCommandExecutorService; import org.jclouds.http.config.ConfiguresHttpCommandExecutorService;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.location.Provider;
import org.jclouds.logging.config.LoggingModule; import org.jclouds.logging.config.LoggingModule;
import org.jclouds.logging.jdk.config.JDKLoggingModule; import org.jclouds.logging.jdk.config.JDKLoggingModule;
import org.jclouds.rest.annotations.Api; import org.jclouds.rest.annotations.Api;
import org.jclouds.rest.annotations.ApiVersion; import org.jclouds.rest.annotations.ApiVersion;
import org.jclouds.rest.annotations.Credential; import org.jclouds.rest.annotations.Credential;
import org.jclouds.rest.annotations.Identity; import org.jclouds.rest.annotations.Identity;
import org.jclouds.rest.annotations.Provider;
import org.jclouds.rest.config.CredentialStoreModule; import org.jclouds.rest.config.CredentialStoreModule;
import org.jclouds.rest.config.RestClientModule; import org.jclouds.rest.config.RestClientModule;
import org.jclouds.rest.config.RestModule; import org.jclouds.rest.config.RestModule;

View File

@ -403,7 +403,7 @@ public class RestAnnotationProcessor<T> {
} }
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
logger.trace("looking up default endpoint for %s", cma); logger.trace("looking up default endpoint for %s", cma);
endpoint = injector.getInstance(Key.get(URI.class, org.jclouds.rest.annotations.Provider.class)); endpoint = injector.getInstance(Key.get(URI.class, org.jclouds.location.Provider.class));
logger.trace("using default endpoint %s for %s", endpoint, cma); logger.trace("using default endpoint %s for %s", endpoint, cma);
} }
GeneratedHttpRequest.Builder<T> requestBuilder; GeneratedHttpRequest.Builder<T> requestBuilder;

View File

@ -28,12 +28,12 @@ import javax.inject.Inject;
import org.jclouds.domain.Credentials; import org.jclouds.domain.Credentials;
import org.jclouds.lifecycle.Closer; import org.jclouds.lifecycle.Closer;
import org.jclouds.location.Provider;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.jclouds.rest.RestContext; import org.jclouds.rest.RestContext;
import org.jclouds.rest.Utils; import org.jclouds.rest.Utils;
import org.jclouds.rest.annotations.ApiVersion; import org.jclouds.rest.annotations.ApiVersion;
import org.jclouds.rest.annotations.Identity; import org.jclouds.rest.annotations.Identity;
import org.jclouds.rest.annotations.Provider;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Key; import com.google.inject.Key;

View File

@ -41,8 +41,8 @@ import org.jclouds.elasticstack.domain.Server;
import org.jclouds.elasticstack.domain.ServerInfo; import org.jclouds.elasticstack.domain.ServerInfo;
import org.jclouds.elasticstack.domain.WellKnownImage; import org.jclouds.elasticstack.domain.WellKnownImage;
import org.jclouds.elasticstack.reference.ElasticStackConstants; import org.jclouds.elasticstack.reference.ElasticStackConstants;
import org.jclouds.location.Provider;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.jclouds.rest.annotations.Provider;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;

View File

@ -34,7 +34,6 @@ import org.jclouds.compute.domain.Image;
import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.Volume; import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.compute.suppliers.DefaultLocationSupplier;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.elasticstack.ElasticStackAsyncClient; import org.jclouds.elasticstack.ElasticStackAsyncClient;
import org.jclouds.elasticstack.ElasticStackClient; import org.jclouds.elasticstack.ElasticStackClient;
@ -52,6 +51,7 @@ import org.jclouds.elasticstack.domain.WellKnownImage;
import org.jclouds.elasticstack.predicates.DriveClaimed; import org.jclouds.elasticstack.predicates.DriveClaimed;
import org.jclouds.functions.IdentityFunction; import org.jclouds.functions.IdentityFunction;
import org.jclouds.json.Json; import org.jclouds.json.Json;
import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
import org.jclouds.predicates.RetryablePredicate; import org.jclouds.predicates.RetryablePredicate;
import org.jclouds.util.Strings2; import org.jclouds.util.Strings2;
@ -84,7 +84,7 @@ public class ElasticStackComputeServiceContextModule
}).to(ElasticStackComputeServiceAdapter.class); }).to(ElasticStackComputeServiceAdapter.class);
bind(IdentityFunction.class).toInstance(IdentityFunction.INSTANCE); bind(IdentityFunction.class).toInstance(IdentityFunction.INSTANCE);
bind(new TypeLiteral<Supplier<Location>>() { bind(new TypeLiteral<Supplier<Location>>() {
}).to(DefaultLocationSupplier.class); }).to(OnlyLocationOrFirstZone.class);
bind(new TypeLiteral<Function<ServerInfo, NodeMetadata>>() { bind(new TypeLiteral<Function<ServerInfo, NodeMetadata>>() {
}).to(ServerInfoToNodeMetadata.class); }).to(ServerInfoToNodeMetadata.class);
bind(new TypeLiteral<Function<Image, Image>>() { bind(new TypeLiteral<Function<Image, Image>>() {

View File

@ -58,8 +58,8 @@ import org.jclouds.domain.Credentials;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.location.Provider;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.jclouds.rest.annotations.Provider;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;

View File

@ -50,9 +50,9 @@ import org.jclouds.compute.domain.TemplateBuilder;
import org.jclouds.compute.domain.Volume; import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.domain.os.OsFamilyVersion64Bit; import org.jclouds.compute.domain.os.OsFamilyVersion64Bit;
import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.compute.suppliers.DefaultLocationSupplier;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.functions.IdentityFunction; import org.jclouds.functions.IdentityFunction;
import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
import org.jclouds.predicates.RetryablePredicate; import org.jclouds.predicates.RetryablePredicate;
import com.google.common.base.Function; import com.google.common.base.Function;
@ -89,7 +89,7 @@ public class CloudSigmaComputeServiceContextModule
}).to(CloudSigmaComputeServiceAdapter.class); }).to(CloudSigmaComputeServiceAdapter.class);
bind(IdentityFunction.class).toInstance(IdentityFunction.INSTANCE); bind(IdentityFunction.class).toInstance(IdentityFunction.INSTANCE);
bind(new TypeLiteral<Supplier<Location>>() { bind(new TypeLiteral<Supplier<Location>>() {
}).to(DefaultLocationSupplier.class); }).to(OnlyLocationOrFirstZone.class);
bind(new TypeLiteral<Function<ServerInfo, NodeMetadata>>() { bind(new TypeLiteral<Function<ServerInfo, NodeMetadata>>() {
}).to(ServerInfoToNodeMetadata.class); }).to(ServerInfoToNodeMetadata.class);
bind(new TypeLiteral<Function<Hardware, Hardware>>() { bind(new TypeLiteral<Function<Hardware, Hardware>>() {

View File

@ -32,8 +32,8 @@ import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.gogrid.GoGridClient; import org.jclouds.gogrid.GoGridClient;
import org.jclouds.gogrid.domain.Option; import org.jclouds.gogrid.domain.Option;
import org.jclouds.location.Provider;
import org.jclouds.logging.Logger; import org.jclouds.logging.Logger;
import org.jclouds.rest.annotations.Provider;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;

View File

@ -28,7 +28,7 @@ import org.jclouds.compute.internal.BaseComputeService;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.inject.Provides; import com.google.inject.Provides;

View File

@ -26,7 +26,7 @@ import javax.inject.Inject;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope; import org.jclouds.domain.LocationScope;
import org.jclouds.domain.internal.LocationImpl; import org.jclouds.domain.internal.LocationImpl;
import org.jclouds.rest.annotations.Provider; import org.jclouds.location.Provider;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;

View File

@ -51,7 +51,7 @@ public class IBMDeveloperCloudLocationSupplier implements Supplier<Set<? extends
@Inject @Inject
IBMDeveloperCloudLocationSupplier(IBMDeveloperCloudClient sync, IBMDeveloperCloudLocationSupplier(IBMDeveloperCloudClient sync,
@org.jclouds.rest.annotations.Provider String providerName) { @org.jclouds.location.Provider String providerName) {
this.sync = sync; this.sync = sync;
this.providerName = providerName; this.providerName = providerName;

View File

@ -22,8 +22,8 @@ package org.jclouds.servermanager.compute.config;
import org.jclouds.compute.ComputeServiceAdapter; import org.jclouds.compute.ComputeServiceAdapter;
import org.jclouds.compute.config.ComputeServiceAdapterContextModule; import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.suppliers.DefaultLocationSupplier;
import org.jclouds.domain.Location; import org.jclouds.domain.Location;
import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
import org.jclouds.servermanager.Datacenter; import org.jclouds.servermanager.Datacenter;
import org.jclouds.servermanager.Hardware; import org.jclouds.servermanager.Hardware;
import org.jclouds.servermanager.Image; import org.jclouds.servermanager.Image;
@ -56,7 +56,7 @@ public class ServerManagerComputeServiceContextModule extends
bind(new TypeLiteral<ComputeServiceAdapter<Server, Hardware, Image, Datacenter>>() { bind(new TypeLiteral<ComputeServiceAdapter<Server, Hardware, Image, Datacenter>>() {
}).to(ServerManagerComputeServiceAdapter.class); }).to(ServerManagerComputeServiceAdapter.class);
bind(new TypeLiteral<Supplier<Location>>() { bind(new TypeLiteral<Supplier<Location>>() {
}).to(DefaultLocationSupplier.class); }).to(OnlyLocationOrFirstZone.class);
bind(new TypeLiteral<Function<Server, NodeMetadata>>() { bind(new TypeLiteral<Function<Server, NodeMetadata>>() {
}).to(ServerToNodeMetadata.class); }).to(ServerToNodeMetadata.class);
bind(new TypeLiteral<Function<Image, org.jclouds.compute.domain.Image>>() { bind(new TypeLiteral<Function<Image, org.jclouds.compute.domain.Image>>() {

View File

@ -44,7 +44,7 @@ public class OrgAndVDCToLocationSupplier implements Supplier<Set<? extends Locat
private final Supplier<Map<String, ? extends Org>> orgNameToVDCResource; private final Supplier<Map<String, ? extends Org>> orgNameToVDCResource;
@Inject @Inject
OrgAndVDCToLocationSupplier(@org.jclouds.rest.annotations.Provider String providerName, OrgAndVDCToLocationSupplier(@org.jclouds.location.Provider String providerName,
@org.jclouds.vcloud.endpoints.Org Supplier<Map<String, ReferenceType>> orgNameToResource, @org.jclouds.vcloud.endpoints.Org Supplier<Map<String, ReferenceType>> orgNameToResource,
Supplier<Map<String, ? extends Org>> orgNameToVDCResource) { Supplier<Map<String, ? extends Org>> orgNameToVDCResource) {
this.providerName = providerName; this.providerName = providerName;

View File

@ -32,9 +32,9 @@ import javax.ws.rs.core.HttpHeaders;
import org.jclouds.concurrent.Timeout; import org.jclouds.concurrent.Timeout;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.http.filters.BasicAuthentication;
import org.jclouds.location.Provider;
import org.jclouds.rest.RestClientTest; import org.jclouds.rest.RestClientTest;
import org.jclouds.rest.RestContextSpec; import org.jclouds.rest.RestContextSpec;
import org.jclouds.rest.annotations.Provider;
import org.jclouds.rest.internal.RestAnnotationProcessor; import org.jclouds.rest.internal.RestAnnotationProcessor;
import org.jclouds.vcloud.domain.VCloudSession; import org.jclouds.vcloud.domain.VCloudSession;
import org.jclouds.vcloud.endpoints.VCloudLogin; import org.jclouds.vcloud.endpoints.VCloudLogin;