From eedc94948e354f1e8b6d90981598aec677cdb741 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 5 Jan 2011 21:42:34 +0100 Subject: [PATCH] Issue 440: moved ec2 into its own api module --- allcompute/pom.xml | 4 +- apis/ec2/pom.xml | 6 + .../src/main/clojure/org/jclouds/ec2}/ebs.clj | 2 +- .../clojure/org/jclouds/ec2}/elastic_ip.clj | 2 +- .../java/org/jclouds}/ec2/EC2AsyncClient.java | 22 +- .../main/java/org/jclouds}/ec2/EC2Client.java | 22 +- .../org/jclouds}/ec2/EC2ContextBuilder.java | 8 +- .../jclouds}/ec2/EC2PropertiesBuilder.java | 8 +- .../ec2/EucalyptusPropertiesBuilder.java | 6 +- .../jclouds}/ec2/NovaPropertiesBuilder.java | 6 +- ...BlockDeviceMappingToIndexedFormParams.java | 6 +- .../BindBundleIdsToIndexedFormParams.java | 9 +- .../BindGroupNamesToIndexedFormParams.java | 9 +- .../BindInstanceIdsToIndexedFormParams.java | 9 +- .../BindKeyNamesToIndexedFormParams.java | 9 +- .../BindProductCodesToIndexedFormParams.java | 9 +- .../BindPublicIpsToIndexedFormParams.java | 8 +- .../BindS3UploadPolicyAndSignature.java | 4 +- .../BindUserGroupsToIndexedFormParams.java | 8 +- ...upPairToSourceSecurityGroupFormParams.java | 6 +- .../BindUserIdsToIndexedFormParams.java | 9 +- .../BindVolumeIdsToIndexedFormParams.java | 9 +- ...otNullBindAvailabilityZoneToFormParam.java | 4 +- .../ec2/compute/EC2ComputeService.java | 22 +- .../EC2BindComputeStrategiesByClass.java | 18 +- .../EC2BindComputeSuppliersByClass.java | 8 +- .../EC2ComputeServiceContextModule.java | 10 +- .../EC2ComputeServiceDependenciesModule.java | 44 ++-- .../config/EC2ResolveImagesModule.java | 4 +- .../compute/domain/EC2HardwareBuilder.java | 6 +- .../ec2/compute/domain/RegionAndName.java | 2 +- .../domain/RegionNameAndIngressRules.java | 4 +- .../CreatePlacementGroupIfNeeded.java | 10 +- .../CreateSecurityGroupIfNeeded.java | 10 +- .../functions/CreateUniqueKeyPair.java | 8 +- .../functions/CredentialsForInstance.java | 10 +- .../ec2/compute/functions/ImageParser.java | 12 +- .../compute/functions/RegionAndIdToImage.java | 12 +- .../RunningInstanceToNodeMetadata.java | 12 +- .../internal/EC2TemplateBuilderImpl.java | 6 +- .../compute/options/EC2TemplateOptions.java | 4 +- ...rityGroupsAsNeededAndReturnRunOptions.java | 22 +- .../strategy/DescribeImagesParallel.java | 26 +-- .../strategy/EC2DestroyNodeStrategy.java | 11 +- .../strategy/EC2GetNodeMetadataStrategy.java | 14 +- .../strategy/EC2ListNodesStrategy.java | 10 +- ...faultLoginCredentialsForImageStrategy.java | 6 +- .../strategy/EC2RebootNodeStrategy.java | 13 +- .../strategy/EC2ResumeNodeStrategy.java | 13 +- .../EC2RunNodesAndAddToSetStrategy.java | 22 +- .../strategy/EC2SuspendNodeStrategy.java | 13 +- .../suppliers/EC2HardwareSupplier.java | 26 +-- .../compute/suppliers/EC2ImageSupplier.java | 6 +- .../RegionAndNameToImageSupplier.java | 20 +- .../ec2/compute/util/EC2ComputeUtils.java | 11 +- .../ec2/config/EC2RestClientModule.java | 50 ++--- .../org/jclouds}/ec2/domain/Attachment.java | 2 +- .../jclouds}/ec2/domain/AvailabilityZone.java | 4 +- .../ec2/domain/AvailabilityZoneInfo.java | 4 +- .../ec2/domain/BlockDeviceMapping.java | 4 +- .../ec2/domain/BundleInstanceS3Storage.java | 18 +- .../org/jclouds}/ec2/domain/BundleTask.java | 2 +- .../java/org/jclouds}/ec2/domain/Image.java | 4 +- .../jclouds}/ec2/domain/ImageAttribute.java | 6 +- .../jclouds}/ec2/domain/InstanceState.java | 6 +- .../ec2/domain/InstanceStateChange.java | 4 +- .../org/jclouds}/ec2/domain/InstanceType.java | 6 +- .../org/jclouds}/ec2/domain/IpPermission.java | 4 +- .../org/jclouds}/ec2/domain/IpProtocol.java | 4 +- .../java/org/jclouds}/ec2/domain/KeyPair.java | 4 +- .../jclouds}/ec2/domain/MonitoringState.java | 8 +- .../org/jclouds}/ec2/domain/Permission.java | 4 +- .../jclouds}/ec2/domain/PlacementGroup.java | 2 +- .../ec2/domain/PublicIpInstanceIdPair.java | 4 +- .../org/jclouds}/ec2/domain/Reservation.java | 4 +- .../ec2/domain/ReservedInstancesOffering.java | 2 +- .../jclouds}/ec2/domain/RootDeviceType.java | 4 +- .../jclouds}/ec2/domain/RunningInstance.java | 6 +- .../jclouds}/ec2/domain/SecurityGroup.java | 4 +- .../org/jclouds}/ec2/domain/Snapshot.java | 2 +- .../jclouds}/ec2/domain/UserIdGroupPair.java | 4 +- .../java/org/jclouds}/ec2/domain/Volume.java | 4 +- ...rtUnencodedBytesToBase64EncodedString.java | 4 +- .../ReturnVoidOnVolumeAvailable.java | 4 +- .../BundleInstanceS3StorageOptions.java | 18 +- .../ec2/options/CreateImageOptions.java | 6 +- .../ec2/options/CreateSnapshotOptions.java | 6 +- .../DescribeAvailabilityZonesOptions.java | 6 +- .../ec2/options/DescribeImagesOptions.java | 6 +- .../ec2/options/DescribeRegionsOptions.java | 6 +- .../ec2/options/DescribeSnapshotsOptions.java | 6 +- .../ec2/options/DetachVolumeOptions.java | 6 +- .../RegisterImageBackedByEbsOptions.java | 6 +- .../ec2/options/RegisterImageOptions.java | 8 +- .../ec2/options/RunInstancesOptions.java | 8 +- .../internal/BaseEC2RequestOptions.java | 4 +- .../ec2/predicates/InstanceHasIpAddress.java | 6 +- .../ec2/predicates/InstancePresent.java | 6 +- .../ec2/predicates/InstanceStateRunning.java | 8 +- .../ec2/predicates/InstanceStateStopped.java | 8 +- .../predicates/InstanceStateTerminated.java | 8 +- .../predicates/PlacementGroupAvailable.java | 6 +- .../ec2/predicates/PlacementGroupDeleted.java | 6 +- .../ec2/predicates/SnapshotCompleted.java | 8 +- .../ec2/predicates/VolumeAttached.java | 8 +- .../ec2/predicates/VolumeAvailable.java | 6 +- .../jclouds}/ec2/reference/EC2Constants.java | 2 +- .../jclouds}/ec2/services/AMIAsyncClient.java | 41 ++-- .../org/jclouds}/ec2/services/AMIClient.java | 16 +- .../AvailabilityZoneAndRegionAsyncClient.java | 18 +- .../AvailabilityZoneAndRegionClient.java | 8 +- .../ElasticBlockStoreAsyncClient.java | 42 ++-- .../ec2/services/ElasticBlockStoreClient.java | 16 +- .../services/ElasticIPAddressAsyncClient.java | 16 +- .../ec2/services/ElasticIPAddressClient.java | 6 +- .../ec2/services/InstanceAsyncClient.java | 49 ++--- .../jclouds}/ec2/services/InstanceClient.java | 10 +- .../ec2/services/KeyPairAsyncClient.java | 16 +- .../jclouds}/ec2/services/KeyPairClient.java | 4 +- .../ec2/services/MonitoringAsyncClient.java | 14 +- .../ec2/services/MonitoringClient.java | 4 +- .../services/PlacementGroupAsyncClient.java | 14 +- .../ec2/services/PlacementGroupClient.java | 6 +- .../services/SecurityGroupAsyncClient.java | 20 +- .../ec2/services/SecurityGroupClient.java | 8 +- .../ec2/services/WindowsAsyncClient.java | 20 +- .../jclouds}/ec2/services/WindowsClient.java | 8 +- .../java/org/jclouds/ec2/util/EC2Utils.java | 83 ++++++++ .../xml/AllocateAddressResponseHandler.java | 4 +- .../jclouds}/ec2/xml/AttachmentHandler.java | 8 +- .../ec2/xml/BaseReservationHandler.java | 22 +- .../ec2/xml/BlockDeviceMappingHandler.java | 6 +- .../jclouds}/ec2/xml/BooleanValueHandler.java | 2 +- .../jclouds}/ec2/xml/BundleTaskHandler.java | 8 +- .../ec2/xml/CreateVolumeResponseHandler.java | 11 +- .../xml/DescribeAddressesResponseHandler.java | 10 +- ...cribeAvailabilityZonesResponseHandler.java | 4 +- .../DescribeBundleTasksResponseHandler.java | 4 +- .../xml/DescribeImagesResponseHandler.java | 18 +- .../xml/DescribeInstancesResponseHandler.java | 6 +- .../xml/DescribeKeyPairsResponseHandler.java | 8 +- ...escribePlacementGroupsResponseHandler.java | 4 +- .../xml/DescribeRegionsResponseHandler.java | 2 +- ...ervedInstancesOfferingResponseHandler.java | 4 +- ...DescribeSecurityGroupsResponseHandler.java | 14 +- .../xml/DescribeSnapshotsResponseHandler.java | 4 +- .../xml/DescribeVolumesResponseHandler.java | 4 +- .../org/jclouds}/ec2/xml/ImageIdHandler.java | 2 +- ...tanceInitiatedShutdownBehaviorHandler.java | 4 +- .../ec2/xml/InstanceStateChangeHandler.java | 10 +- .../jclouds}/ec2/xml/InstanceTypeHandler.java | 2 +- .../ec2/xml/KeyPairResponseHandler.java | 8 +- .../ec2/xml/MonitoringStateHandler.java | 4 +- .../jclouds}/ec2/xml/PermissionHandler.java | 4 +- .../ec2/xml/PlacementGroupHandler.java | 10 +- .../jclouds}/ec2/xml/ProductCodesHandler.java | 2 +- .../xml/ReservedInstancesOfferingHandler.java | 8 +- .../ec2/xml/RunInstancesResponseHandler.java | 6 +- .../org/jclouds}/ec2/xml/SnapshotHandler.java | 10 +- .../jclouds}/ec2/xml/StringValueHandler.java | 2 +- .../ec2/xml/UnencodeStringValueHandler.java | 2 +- ...icationArchitecturesEC2ClientLiveTest.java | 28 +-- .../ec2/EBSBootEC2ClientLiveTest.java | 54 ++--- .../org/jclouds}/ec2/EC2AsyncClientTest.java | 6 +- ...kDeviceMappingToIndexedFormParamsTest.java | 8 +- .../BindBundleIdsToIndexedFormParamsTest.java | 2 +- ...BindGroupNamesToIndexedFormParamsTest.java | 2 +- ...indInstanceIdsToIndexedFormParamsTest.java | 2 +- .../BindKeyNamesToIndexedFormParamsTest.java | 2 +- ...ndProductCodesToIndexedFormParamsTest.java | 2 +- .../BindPublicIpsToIndexedFormParamsTest.java | 2 +- .../BindS3UploadPolicyAndSignatureTest.java | 6 +- ...BindUserGroupsToIndexedFormParamsTest.java | 2 +- ...irToSourceSecurityGroupFormParamsTest.java | 4 +- .../BindUserIdsToIndexedFormParamsTest.java | 2 +- .../BindVolumeIdsToIndexedFormParamsTest.java | 2 +- ...llBindAvailabilityZoneToFormParamTest.java | 2 +- .../compute/EC2ComputeServiceLiveTest.java | 23 ++- .../ec2/compute/EC2ComputeServiceTest.java | 6 +- .../compute/EC2TemplateBuilderLiveTest.java | 8 +- .../ec2/compute/EC2TemplateBuilderTest.java | 22 +- ...alyptusComputeServiceLiveTestDisabled.java | 2 +- .../NovaComputeServiceLiveTestDisabled.java | 2 +- .../NovaTemplateBuilderLiveTestDisabled.java | 4 +- .../compute/TestCanRecreateTagLiveTest.java | 2 +- .../functions/CreateUniqueKeyPairTest.java | 8 +- .../functions/CredentialsForInstanceTest.java | 2 +- .../compute/functions/ImageParserTest.java | 22 +- .../functions/RegionAndIdToImageTest.java | 28 +-- .../RunningInstanceToNodeMetadataTest.java | 30 +-- .../internal/EC2TemplateBuilderImplTest.java | 8 +- .../options/EC2TemplateOptionsTest.java | 18 +- ...GroupsAsNeededAndReturnRunOptionsTest.java | 24 +-- .../EC2RunNodesAndAddToSetStrategyTest.java | 18 +- ...encodedBytesToBase64EncodedStringTest.java | 2 +- .../BundleInstanceS3StorageOptionsTest.java | 4 +- .../ec2/options/CreateImageOptionsTest.java | 6 +- .../options/CreateSnapshotOptionsTest.java | 4 +- .../options/DescribeImagesOptionsTest.java | 8 +- .../options/DescribeSnapshotsOptionsTest.java | 8 +- .../ec2/options/DetachVolumeOptionsTest.java | 6 +- .../RegisterImageBackedByEbsOptionsTest.java | 20 +- .../ec2/options/RegisterImageOptionsTest.java | 12 +- .../ec2/options/RunInstancesOptionsTest.java | 24 +-- .../ec2/services/AMIAsyncClientTest.java | 22 +- .../ec2/services/AMIClientLiveTest.java | 18 +- ...ilabilityZoneAndRegionAsyncClientTest.java | 16 +- ...ailabilityZoneAndRegionClientLiveTest.java | 12 +- .../ec2/services/BaseEC2AsyncClientTest.java | 8 +- .../ElasticBlockStoreAsyncClientTest.java | 28 +-- .../ElasticBlockStoreClientLiveTest.java | 18 +- .../ElasticIPAddressAsyncClientTest.java | 6 +- .../ElasticIPAddressClientLiveTest.java | 8 +- .../ec2/services/InstanceAsyncClientTest.java | 32 +-- .../ec2/services/InstanceClientLiveTest.java | 10 +- .../ec2/services/KeyPairAsyncClientTest.java | 4 +- .../ec2/services/KeyPairClientLiveTest.java | 8 +- .../services/MonitoringAsyncClientTest.java | 4 +- .../services/MonitoringClientLiveTest.java | 8 +- .../PlacementGroupAsyncClientTest.java | 4 +- .../PlacementGroupClientLiveTest.java | 14 +- .../SecurityGroupAsyncClientTest.java | 8 +- .../services/SecurityGroupClientLiveTest.java | 14 +- .../ec2/services/WindowsAsyncClientTest.java | 8 +- .../ec2/services/WindowsClientLiveTest.java | 6 +- .../org/jclouds}/ec2/utils/EC2UtilsTest.java | 4 +- .../AllocateAddressResponseHandlerTest.java | 4 +- .../ec2/xml/AttachmentHandlerTest.java | 8 +- .../jclouds}/ec2/xml/BaseEC2HandlerTest.java | 6 +- .../xml/BlockDeviceMappingHandlerTest.java | 8 +- .../ec2/xml/BundleTaskHandlerTest.java | 10 +- .../xml/CreateVolumeResponseHandlerTest.java | 10 +- .../DescribeAddressesResponseHandlerTest.java | 6 +- ...eAvailabilityZonesResponseHandlerTest.java | 10 +- ...escribeBundleTasksResponseHandlerTest.java | 8 +- .../DescribeImagesResponseHandlerTest.java | 22 +- .../xml/DescribeInstanceAttributeTest.java | 18 +- .../DescribeInstancesResponseHandlerTest.java | 30 +-- .../DescribeKeyPairsResponseHandlerTest.java | 6 +- ...ibePlacementGroupsResponseHandlerTest.java | 8 +- .../DescribeRegionsResponseHandlerTest.java | 6 +- ...dInstancesOfferingResponseHandlerTest.java | 8 +- ...ribeSecurityGroupsResponseHandlerTest.java | 12 +- .../DescribeSnapshotsResponseHandlerTest.java | 8 +- .../DescribeVolumesResponseHandlerTest.java | 12 +- .../xml/InstanceStateChangeHandlerTest.java | 12 +- .../ec2/xml/KeyPairResponseHandlerTest.java | 6 +- .../ec2/xml/MonitoringStateHandlerTest.java | 6 +- .../ec2/xml/PermissionHandlerTest.java | 6 +- .../ec2/xml/ProductCodesHandlerTest.java | 4 +- .../xml/RunInstancesResponseHandlerTest.java | 20 +- .../jclouds}/ec2/xml/SnapshotHandlerTest.java | 8 +- .../src/test/resources}/alestic_canonical.xml | 0 .../src/test/resources}/allocate_address.xml | 0 .../ec2/src/test/resources}/amzn_images.xml | 0 .../ec2/src/test/resources}/attach.xml | 0 .../src/test/resources}/availabilityZones.xml | 0 .../src/test/resources}/bundle_instance.xml | 0 .../test/resources}/cancel_bundle_task.xml | 0 .../src/test/resources}/create_keypair.xml | 0 .../src/test/resources}/created_snapshot.xml | 0 .../src/test/resources}/created_volume.xml | 0 .../test/resources}/describe_addresses.xml | 0 .../test/resources}/describe_bundle_tasks.xml | 0 ...ibe_image_attribute_blockDeviceMapping.xml | 0 ...cribe_image_attribute_launchPermission.xml | 0 .../describe_image_attribute_productCodes.xml | 0 .../src/test/resources}/describe_images.xml | 0 .../test/resources}/describe_images_cc.xml | 0 .../test/resources}/describe_images_ebs.xml | 0 .../resources}/describe_images_windows.xml | 0 .../test/resources}/describe_instances.xml | 0 .../resources}/describe_instances_ebs.xml | 0 .../resources}/describe_instances_euc.xml | 0 .../resources}/describe_instances_nova.xml | 0 .../resources}/describe_instances_running.xml | 0 .../src/test/resources}/describe_keypairs.xml | 0 .../resources}/describe_placement_groups.xml | 0 .../describe_reserved_instances_offerings.xml | 0 .../resources}/describe_securitygroups.xml | 0 .../test/resources}/describe_snapshots.xml | 0 .../src/test/resources}/describe_volumes.xml | 0 .../test/resources}/disableApiTermination.xml | 0 .../src/test/resources}/eucalyptus_images.xml | 0 .../instanceInitiatedShutdownBehavior.xml | 0 .../ec2/src/test/resources}/instanceType.xml | 0 .../ec2}/src/test/resources/log4j.xml | 0 .../ec2/src/test/resources}/monitoring.xml | 0 .../ec2/src/test/resources}/nova_images.xml | 0 .../ec2/src/test/resources}/ramdisk.xml | 0 .../resources}/regionEndpoints-additional.xml | 0 .../src/test/resources}/regionEndpoints.xml | 0 .../src/test/resources}/rightscale_images.xml | 0 .../ec2/src/test/resources}/run_instances.xml | 0 .../src/test/resources}/start_instances.xml | 0 .../src/test/resources}/stop_instances.xml | 0 .../test/resources}/terminate_instances.xml | 0 .../ec2/src/test/resources}/userData.xml | 0 .../ec2/src/test/resources}/vostok.xml | 0 .../java/org/jclouds/elb/ELBAsyncClient.java | 4 +- ...dAvailabilityZonesToIndexedFormParams.java | 2 +- .../BindInstanceIdsToIndexedFormParams.java | 2 +- ...dLoadBalancerNamesToIndexedFormParams.java | 2 +- .../ELBDestroyLoadBalancerStrategy.java | 2 +- .../ELBGetLoadBalancerMetadataStrategy.java | 2 +- .../strategy/ELBLoadBalanceNodesStrategy.java | 2 +- .../DescribeLoadBalancersResponseHandler.java | 4 +- aws/{core => }/README.txt | 0 aws/core/pom.xml | 34 ---- .../java/org/jclouds/aws/util/AWSUtils.java | 87 -------- .../aws/ProvidersInPropertiesTest.java | 52 ----- aws/demos/pom.xml | 55 ----- aws/pom.xml | 182 +---------------- .../org/jclouds/aws/AWSResponseException.java | 0 .../aws/config/AWSRestClientModule.java | 0 .../config/FormSigningRestClientModule.java | 0 .../WithZonesFormSigningRestClientModule.java | 0 .../java/org/jclouds/aws/domain/AWSError.java | 0 .../java/org/jclouds/aws/domain/Region.java | 0 .../org/jclouds/aws/filters/FormSigner.java | 14 +- .../handlers/AWSClientErrorRetryHandler.java | 0 .../handlers/AWSRedirectionRetryHandler.java | 0 .../handlers/ParseAWSErrorFromXmlContent.java | 0 .../jclouds/aws/handlers/package-info.java | 0 .../jclouds/aws/reference/AWSConstants.java | 0 .../aws/reference/FormParameters.java} | 4 +- .../java/org/jclouds/aws/util/AWSUtils.java} | 191 ++++++++++-------- .../org/jclouds/aws/xml/ErrorHandler.java | 0 ...hZonesFormSigningRestClientModuleTest.java | 10 +- .../jclouds/aws/filters/FormSignerTest.java | 42 +++- .../AWSClientErrorRetryHandlerTest.java | 0 .../ParseAWSErrorFromXmlContentTest.java | 0 .../org/jclouds/aws/util/AWSUtilsTest.java | 8 +- .../org/jclouds/aws/xml/ErrorHandlerTest.java | 0 aws/{core => }/src/test/resources/error.xml | 0 aws/src/test/resources/log4j.xml | 185 +++++++++++++++++ core/src/main/resources/rest.properties | 16 +- .../createandlistbuckets/README.txt | 0 .../createandlistbuckets/pom.xml | 0 .../org/jclouds/aws/s3/samples/MainApp.java | 0 {aws/demos => demos}/createlamp/README.txt | 0 {aws/demos => demos}/createlamp/pom.xml | 0 .../aws/ec2/demos/createlamp/MainApp.java | 0 .../googleappengine/README.txt | 0 {aws/demos => demos}/googleappengine/pom.xml | 0 .../src/main/appengine/appengine-web.xml | 0 .../src/main/appengine/logging.properties | 0 .../GetAllStatusController.java | 0 .../config/GuiceServletConfig.java | 0 .../googleappengine/domain/StatusResult.java | 0 .../BlobStoreContextToStatusResult.java | 0 .../ComputeServiceContextToStatusResult.java | 0 .../src/main/webapp/WEB-INF/jsp/status.jsp | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../googleappengine/src/main/webapp/index.jsp | 0 .../functest/GoogleAppEngineLiveTest.java | 0 .../functest/GoogleDevServer.java | 0 357 files changed, 1668 insertions(+), 1773 deletions(-) rename {aws/core/src/main/clojure/org/jclouds/aws => apis/ec2/src/main/clojure/org/jclouds/ec2}/ebs.clj (99%) rename {aws/core/src/main/clojure/org/jclouds/aws => apis/ec2/src/main/clojure/org/jclouds/ec2}/elastic_ip.clj (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/EC2AsyncClient.java (79%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/EC2Client.java (80%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/EC2ContextBuilder.java (91%) mode change 100755 => 100644 rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/EC2PropertiesBuilder.java (91%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/EucalyptusPropertiesBuilder.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/NovaPropertiesBuilder.java (88%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindBundleIdsToIndexedFormParams.java (84%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindGroupNamesToIndexedFormParams.java (84%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindInstanceIdsToIndexedFormParams.java (84%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindKeyNamesToIndexedFormParams.java (84%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindProductCodesToIndexedFormParams.java (85%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindPublicIpsToIndexedFormParams.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindS3UploadPolicyAndSignature.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindUserGroupsToIndexedFormParams.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindUserIdsToIndexedFormParams.java (85%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/BindVolumeIdsToIndexedFormParams.java (84%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/EC2ComputeService.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/config/EC2BindComputeStrategiesByClass.java (84%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/config/EC2BindComputeSuppliersByClass.java (91%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/config/EC2ComputeServiceContextModule.java (91%) mode change 100755 => 100644 rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/config/EC2ComputeServiceDependenciesModule.java (82%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/config/EC2ResolveImagesModule.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/domain/EC2HardwareBuilder.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/domain/RegionAndName.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/domain/RegionNameAndIngressRules.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/CreatePlacementGroupIfNeeded.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/CreateSecurityGroupIfNeeded.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/CreateUniqueKeyPair.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/CredentialsForInstance.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/ImageParser.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/RegionAndIdToImage.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/functions/RunningInstanceToNodeMetadata.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/internal/EC2TemplateBuilderImpl.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/options/EC2TemplateOptions.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/DescribeImagesParallel.java (74%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2DestroyNodeStrategy.java (91%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java (86%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2ListNodesStrategy.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2RebootNodeStrategy.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2ResumeNodeStrategy.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java (89%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/strategy/EC2SuspendNodeStrategy.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/suppliers/EC2HardwareSupplier.java (77%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/suppliers/EC2ImageSupplier.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/suppliers/RegionAndNameToImageSupplier.java (89%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/compute/util/EC2ComputeUtils.java (82%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/config/EC2RestClientModule.java (74%) mode change 100755 => 100644 rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/Attachment.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/AvailabilityZone.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/AvailabilityZoneInfo.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/BlockDeviceMapping.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/BundleInstanceS3Storage.java (89%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/BundleTask.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/Image.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/ImageAttribute.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/InstanceState.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/InstanceStateChange.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/InstanceType.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/IpPermission.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/IpProtocol.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/KeyPair.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/MonitoringState.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/Permission.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/PlacementGroup.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/PublicIpInstanceIdPair.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/Reservation.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/ReservedInstancesOffering.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/RootDeviceType.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/RunningInstance.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/SecurityGroup.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/Snapshot.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/UserIdGroupPair.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/domain/Volume.java (99%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/functions/ReturnVoidOnVolumeAvailable.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/BundleInstanceS3StorageOptions.java (85%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/CreateImageOptions.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/CreateSnapshotOptions.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/DescribeAvailabilityZonesOptions.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/DescribeImagesOptions.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/DescribeRegionsOptions.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/DescribeSnapshotsOptions.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/DetachVolumeOptions.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/RegisterImageBackedByEbsOptions.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/RegisterImageOptions.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/RunInstancesOptions.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/options/internal/BaseEC2RequestOptions.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/InstanceHasIpAddress.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/InstancePresent.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/InstanceStateRunning.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/InstanceStateStopped.java (91%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/InstanceStateTerminated.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/PlacementGroupAvailable.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/PlacementGroupDeleted.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/SnapshotCompleted.java (89%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/VolumeAttached.java (91%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/predicates/VolumeAvailable.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/reference/EC2Constants.java (97%) mode change 100755 => 100644 rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/AMIAsyncClient.java (88%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/AMIClient.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/AvailabilityZoneAndRegionAsyncClient.java (83%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/AvailabilityZoneAndRegionClient.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/ElasticBlockStoreAsyncClient.java (88%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/ElasticBlockStoreClient.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/ElasticIPAddressAsyncClient.java (89%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/ElasticIPAddressClient.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/InstanceAsyncClient.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/InstanceClient.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/KeyPairAsyncClient.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/KeyPairClient.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/MonitoringAsyncClient.java (87%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/MonitoringClient.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/PlacementGroupAsyncClient.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/PlacementGroupClient.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/SecurityGroupAsyncClient.java (90%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/SecurityGroupClient.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/WindowsAsyncClient.java (85%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/services/WindowsClient.java (96%) create mode 100644 apis/ec2/src/main/java/org/jclouds/ec2/util/EC2Utils.java rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/AllocateAddressResponseHandler.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/AttachmentHandler.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/BaseReservationHandler.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/BlockDeviceMappingHandler.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/BooleanValueHandler.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/BundleTaskHandler.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/CreateVolumeResponseHandler.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeAddressesResponseHandler.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeAvailabilityZonesResponseHandler.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeBundleTasksResponseHandler.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeImagesResponseHandler.java (94%) mode change 100755 => 100644 rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeInstancesResponseHandler.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeKeyPairsResponseHandler.java (92%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribePlacementGroupsResponseHandler.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeRegionsResponseHandler.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeSecurityGroupsResponseHandler.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeSnapshotsResponseHandler.java (96%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/DescribeVolumesResponseHandler.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/ImageIdHandler.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/InstanceStateChangeHandler.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/InstanceTypeHandler.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/KeyPairResponseHandler.java (91%) mode change 100755 => 100644 rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/MonitoringStateHandler.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/PermissionHandler.java (95%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/PlacementGroupHandler.java (89%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/ProductCodesHandler.java (98%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/ReservedInstancesOfferingHandler.java (94%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/RunInstancesResponseHandler.java (91%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/SnapshotHandler.java (93%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/StringValueHandler.java (97%) rename {aws/core/src/main/java/org/jclouds/aws => apis/ec2/src/main/java/org/jclouds}/ec2/xml/UnencodeStringValueHandler.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/EBSBootEC2ClientLiveTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/EC2AsyncClientTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindProductCodesToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindS3UploadPolicyAndSignatureTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindUserIdsToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/EC2ComputeServiceLiveTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/EC2ComputeServiceTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/EC2TemplateBuilderLiveTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/EC2TemplateBuilderTest.java (89%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/NovaComputeServiceLiveTestDisabled.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/TestCanRecreateTagLiveTest.java (99%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/functions/CreateUniqueKeyPairTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/functions/CredentialsForInstanceTest.java (99%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/functions/ImageParserTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/functions/RegionAndIdToImageTest.java (80%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/internal/EC2TemplateBuilderImplTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/options/EC2TemplateOptionsTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/BundleInstanceS3StorageOptionsTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/CreateImageOptionsTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/CreateSnapshotOptionsTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/DescribeImagesOptionsTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/DescribeSnapshotsOptionsTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/DetachVolumeOptionsTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/RegisterImageBackedByEbsOptionsTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/RegisterImageOptionsTest.java (91%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/options/RunInstancesOptionsTest.java (91%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/AMIAsyncClientTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/AMIClientLiveTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java (91%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/BaseEC2AsyncClientTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/ElasticBlockStoreAsyncClientTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/ElasticBlockStoreClientLiveTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/ElasticIPAddressAsyncClientTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/ElasticIPAddressClientLiveTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/InstanceAsyncClientTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/InstanceClientLiveTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/KeyPairAsyncClientTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/KeyPairClientLiveTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/MonitoringAsyncClientTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/MonitoringClientLiveTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/PlacementGroupAsyncClientTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/PlacementGroupClientLiveTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/SecurityGroupAsyncClientTest.java (98%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/SecurityGroupClientLiveTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/WindowsAsyncClientTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/services/WindowsClientLiveTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/utils/EC2UtilsTest.java (95%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/AllocateAddressResponseHandlerTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/AttachmentHandlerTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/BaseEC2HandlerTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/BlockDeviceMappingHandlerTest.java (90%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/BundleTaskHandlerTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/CreateVolumeResponseHandlerTest.java (91%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeAddressesResponseHandlerTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeBundleTasksResponseHandlerTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeImagesResponseHandlerTest.java (86%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeInstanceAttributeTest.java (81%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeInstancesResponseHandlerTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeKeyPairsResponseHandlerTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java (93%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeRegionsResponseHandlerTest.java (97%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java (90%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeSnapshotsResponseHandlerTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/DescribeVolumesResponseHandlerTest.java (92%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/InstanceStateChangeHandlerTest.java (90%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/KeyPairResponseHandlerTest.java (96%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/MonitoringStateHandlerTest.java (91%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/PermissionHandlerTest.java (91%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/ProductCodesHandlerTest.java (94%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/RunInstancesResponseHandlerTest.java (89%) rename {aws/core/src/test/java/org/jclouds/aws => apis/ec2/src/test/java/org/jclouds}/ec2/xml/SnapshotHandlerTest.java (93%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/alestic_canonical.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/allocate_address.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/amzn_images.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/attach.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/availabilityZones.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/bundle_instance.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/cancel_bundle_task.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/create_keypair.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/created_snapshot.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/created_volume.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_addresses.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_bundle_tasks.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_image_attribute_blockDeviceMapping.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_image_attribute_launchPermission.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_image_attribute_productCodes.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_images.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_images_cc.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_images_ebs.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_images_windows.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_instances.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_instances_ebs.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_instances_euc.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_instances_nova.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_instances_running.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_keypairs.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_placement_groups.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_reserved_instances_offerings.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_securitygroups.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_snapshots.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/describe_volumes.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/disableApiTermination.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/eucalyptus_images.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/instanceInitiatedShutdownBehavior.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/instanceType.xml (100%) rename {aws/core => apis/ec2}/src/test/resources/log4j.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/monitoring.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/nova_images.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/ramdisk.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/regionEndpoints-additional.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/regionEndpoints.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/rightscale_images.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/run_instances.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/start_instances.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/stop_instances.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/terminate_instances.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/userData.xml (100%) rename {aws/core/src/test/resources/ec2 => apis/ec2/src/test/resources}/vostok.xml (100%) rename aws/{core => }/README.txt (100%) delete mode 100644 aws/core/pom.xml delete mode 100644 aws/core/src/main/java/org/jclouds/aws/util/AWSUtils.java delete mode 100644 aws/core/src/test/java/org/jclouds/aws/ProvidersInPropertiesTest.java delete mode 100644 aws/demos/pom.xml rename aws/{core => }/src/main/java/org/jclouds/aws/AWSResponseException.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/config/FormSigningRestClientModule.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/config/WithZonesFormSigningRestClientModule.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/domain/AWSError.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/domain/Region.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/filters/FormSigner.java (94%) rename aws/{core => }/src/main/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandler.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/handlers/AWSRedirectionRetryHandler.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/handlers/package-info.java (100%) rename aws/{core => }/src/main/java/org/jclouds/aws/reference/AWSConstants.java (100%) rename aws/{core/src/main/java/org/jclouds/aws/ec2/reference/EC2Parameters.java => src/main/java/org/jclouds/aws/reference/FormParameters.java} (97%) mode change 100755 => 100644 rename aws/{core/src/main/java/org/jclouds/aws/ec2/util/EC2Utils.java => src/main/java/org/jclouds/aws/util/AWSUtils.java} (64%) rename aws/{core => }/src/main/java/org/jclouds/aws/xml/ErrorHandler.java (100%) rename aws/{core => }/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java (80%) rename aws/{core => }/src/test/java/org/jclouds/aws/filters/FormSignerTest.java (52%) rename aws/{core => }/src/test/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandlerTest.java (100%) rename aws/{core => }/src/test/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContentTest.java (100%) rename aws/{core => }/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java (89%) rename aws/{core => }/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java (100%) rename aws/{core => }/src/test/resources/error.xml (100%) create mode 100644 aws/src/test/resources/log4j.xml rename {aws/demos => demos}/createandlistbuckets/README.txt (100%) rename {aws/demos => demos}/createandlistbuckets/pom.xml (100%) rename {aws/demos => demos}/createandlistbuckets/src/main/java/org/jclouds/aws/s3/samples/MainApp.java (100%) rename {aws/demos => demos}/createlamp/README.txt (100%) rename {aws/demos => demos}/createlamp/pom.xml (100%) rename {aws/demos => demos}/createlamp/src/main/java/org/jclouds/aws/ec2/demos/createlamp/MainApp.java (100%) rename {aws/demos => demos}/googleappengine/README.txt (100%) rename {aws/demos => demos}/googleappengine/pom.xml (100%) rename {aws/demos => demos}/googleappengine/src/main/appengine/appengine-web.xml (100%) rename {aws/demos => demos}/googleappengine/src/main/appengine/logging.properties (100%) rename {aws/demos => demos}/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java (100%) rename {aws/demos => demos}/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java (100%) rename {aws/demos => demos}/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java (100%) rename {aws/demos => demos}/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java (100%) rename {aws/demos => demos}/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/ComputeServiceContextToStatusResult.java (100%) rename {aws/demos => demos}/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp (100%) rename {aws/demos => demos}/googleappengine/src/main/webapp/WEB-INF/web.xml (100%) rename {aws/demos => demos}/googleappengine/src/main/webapp/index.jsp (100%) rename {aws/demos => demos}/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java (100%) rename {aws/demos => demos}/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java (100%) diff --git a/allcompute/pom.xml b/allcompute/pom.xml index 14b531754e..6b3c6e66ec 100644 --- a/allcompute/pom.xml +++ b/allcompute/pom.xml @@ -30,8 +30,8 @@ allcompute - ${project.groupId} - jclouds-aws + org.jclouds.api + ec2 ${project.version} diff --git a/apis/ec2/pom.xml b/apis/ec2/pom.xml index ac9ed1536b..8bf5d0572f 100644 --- a/apis/ec2/pom.xml +++ b/apis/ec2/pom.xml @@ -75,6 +75,12 @@ ${project.version} test + + org.jclouds + jclouds-jsch + ${project.version} + test + diff --git a/aws/core/src/main/clojure/org/jclouds/aws/ebs.clj b/apis/ec2/src/main/clojure/org/jclouds/ec2/ebs.clj similarity index 99% rename from aws/core/src/main/clojure/org/jclouds/aws/ebs.clj rename to apis/ec2/src/main/clojure/org/jclouds/ec2/ebs.clj index 2fc1c9ea87..f0fcebc5f5 100644 --- a/aws/core/src/main/clojure/org/jclouds/aws/ebs.clj +++ b/apis/ec2/src/main/clojure/org/jclouds/ec2/ebs.clj @@ -20,7 +20,7 @@ (ns #^{:author "Chas Emerick, cemerick@snowtide.com" :doc "A clojure binding to the jclouds EBS service interface."} - org.jclouds.aws.ebs + org.jclouds.ec2.ebs (:require (org.jclouds [compute :as compute])) (:use (clojure.contrib def core)) (:import org.jclouds.aws.domain.Region diff --git a/aws/core/src/main/clojure/org/jclouds/aws/elastic_ip.clj b/apis/ec2/src/main/clojure/org/jclouds/ec2/elastic_ip.clj similarity index 99% rename from aws/core/src/main/clojure/org/jclouds/aws/elastic_ip.clj rename to apis/ec2/src/main/clojure/org/jclouds/ec2/elastic_ip.clj index 0e5b217e80..7970bd6462 100644 --- a/aws/core/src/main/clojure/org/jclouds/aws/elastic_ip.clj +++ b/apis/ec2/src/main/clojure/org/jclouds/ec2/elastic_ip.clj @@ -20,7 +20,7 @@ (ns #^{:author "Chas Emerick, cemerick@snowtide.com" :doc "A clojure binding for the jclouds AWS elastic IP address interface."} - org.jclouds.aws.elastic-ip + org.jclouds.ec2.elastic-ip (:require (org.jclouds [compute :as compute]) [org.jclouds.aws.ebs :as ebs]) (:use (clojure.contrib def core)) diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2AsyncClient.java similarity index 79% rename from aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/EC2AsyncClient.java index 46e65e1c20..b35b176d6a 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2AsyncClient.java @@ -17,18 +17,18 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; -import org.jclouds.aws.ec2.services.AMIAsyncClient; -import org.jclouds.aws.ec2.services.AvailabilityZoneAndRegionAsyncClient; -import org.jclouds.aws.ec2.services.ElasticBlockStoreAsyncClient; -import org.jclouds.aws.ec2.services.ElasticIPAddressAsyncClient; -import org.jclouds.aws.ec2.services.InstanceAsyncClient; -import org.jclouds.aws.ec2.services.KeyPairAsyncClient; -import org.jclouds.aws.ec2.services.MonitoringAsyncClient; -import org.jclouds.aws.ec2.services.PlacementGroupAsyncClient; -import org.jclouds.aws.ec2.services.SecurityGroupAsyncClient; -import org.jclouds.aws.ec2.services.WindowsAsyncClient; +import org.jclouds.ec2.services.AMIAsyncClient; +import org.jclouds.ec2.services.AvailabilityZoneAndRegionAsyncClient; +import org.jclouds.ec2.services.ElasticBlockStoreAsyncClient; +import org.jclouds.ec2.services.ElasticIPAddressAsyncClient; +import org.jclouds.ec2.services.InstanceAsyncClient; +import org.jclouds.ec2.services.KeyPairAsyncClient; +import org.jclouds.ec2.services.MonitoringAsyncClient; +import org.jclouds.ec2.services.PlacementGroupAsyncClient; +import org.jclouds.ec2.services.SecurityGroupAsyncClient; +import org.jclouds.ec2.services.WindowsAsyncClient; import org.jclouds.rest.annotations.Delegate; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2Client.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java similarity index 80% rename from aws/core/src/main/java/org/jclouds/aws/ec2/EC2Client.java rename to apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java index 13976a675a..f02e5cf528 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2Client.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java @@ -17,20 +17,20 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import java.util.concurrent.TimeUnit; -import org.jclouds.aws.ec2.services.AMIClient; -import org.jclouds.aws.ec2.services.AvailabilityZoneAndRegionClient; -import org.jclouds.aws.ec2.services.ElasticBlockStoreClient; -import org.jclouds.aws.ec2.services.ElasticIPAddressClient; -import org.jclouds.aws.ec2.services.InstanceClient; -import org.jclouds.aws.ec2.services.KeyPairClient; -import org.jclouds.aws.ec2.services.MonitoringClient; -import org.jclouds.aws.ec2.services.PlacementGroupClient; -import org.jclouds.aws.ec2.services.SecurityGroupClient; -import org.jclouds.aws.ec2.services.WindowsClient; +import org.jclouds.ec2.services.AMIClient; +import org.jclouds.ec2.services.AvailabilityZoneAndRegionClient; +import org.jclouds.ec2.services.ElasticBlockStoreClient; +import org.jclouds.ec2.services.ElasticIPAddressClient; +import org.jclouds.ec2.services.InstanceClient; +import org.jclouds.ec2.services.KeyPairClient; +import org.jclouds.ec2.services.MonitoringClient; +import org.jclouds.ec2.services.PlacementGroupClient; +import org.jclouds.ec2.services.SecurityGroupClient; +import org.jclouds.ec2.services.WindowsClient; import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2ContextBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ContextBuilder.java old mode 100755 new mode 100644 similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/EC2ContextBuilder.java rename to apis/ec2/src/main/java/org/jclouds/ec2/EC2ContextBuilder.java index fb75dd57a2..1237e31c11 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2ContextBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ContextBuilder.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import java.util.List; import java.util.Properties; -import org.jclouds.aws.ec2.compute.config.EC2ComputeServiceContextModule; -import org.jclouds.aws.ec2.compute.config.EC2ResolveImagesModule; -import org.jclouds.aws.ec2.config.EC2RestClientModule; +import org.jclouds.ec2.compute.config.EC2ComputeServiceContextModule; +import org.jclouds.ec2.compute.config.EC2ResolveImagesModule; +import org.jclouds.ec2.config.EC2RestClientModule; import org.jclouds.compute.ComputeServiceContextBuilder; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.logging.jdk.config.JDKLoggingModule; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2PropertiesBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2PropertiesBuilder.java similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/EC2PropertiesBuilder.java rename to apis/ec2/src/main/java/org/jclouds/ec2/EC2PropertiesBuilder.java index 67dcdf98e5..e3241f916c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2PropertiesBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2PropertiesBuilder.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_ENDPOINT; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_ELB_ENDPOINT; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; import static org.jclouds.compute.reference.ComputeServiceConstants.PROPERTY_TIMEOUT_NODE_SUSPENDED; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_ELB_ENDPOINT; import java.util.Properties; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/EucalyptusPropertiesBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/EucalyptusPropertiesBuilder.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/EucalyptusPropertiesBuilder.java rename to apis/ec2/src/main/java/org/jclouds/ec2/EucalyptusPropertiesBuilder.java index f8c65efd13..9228e51810 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/EucalyptusPropertiesBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EucalyptusPropertiesBuilder.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import static org.jclouds.Constants.PROPERTY_ENDPOINT; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; import static org.jclouds.compute.reference.ComputeServiceConstants.PROPERTY_TIMEOUT_PORT_OPEN; import java.util.Properties; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/NovaPropertiesBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/NovaPropertiesBuilder.java similarity index 88% rename from aws/core/src/main/java/org/jclouds/aws/ec2/NovaPropertiesBuilder.java rename to apis/ec2/src/main/java/org/jclouds/ec2/NovaPropertiesBuilder.java index 83b60f77a7..cf874f6454 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/NovaPropertiesBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/NovaPropertiesBuilder.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import static org.jclouds.Constants.PROPERTY_ENDPOINT; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; import java.util.Properties; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java index 25b5f0d33d..7b51ed85a1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindBlockDeviceMappingToIndexedFormParams.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static java.lang.String.format; -import org.jclouds.aws.ec2.domain.BlockDeviceMapping; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.BlockDeviceMapping; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.http.HttpRequest; import org.jclouds.http.utils.ModifyRequest; import org.jclouds.rest.Binder; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindBundleIdsToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindBundleIdsToIndexedFormParams.java similarity index 84% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindBundleIdsToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindBundleIdsToIndexedFormParams.java index 87fe77b612..9fd07b3836 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindBundleIdsToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindBundleIdsToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindBundleIdsToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexStringArrayToFormValuesWithPrefix(request, "BundleId", input); + return AWSUtils.indexStringArrayToFormValuesWithPrefix(request, "BundleId", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindGroupNamesToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindGroupNamesToIndexedFormParams.java similarity index 84% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindGroupNamesToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindGroupNamesToIndexedFormParams.java index 732785c043..db1d0ffa27 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindGroupNamesToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindGroupNamesToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindGroupNamesToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexStringArrayToFormValuesWithPrefix(request, "GroupName", input); + return AWSUtils.indexStringArrayToFormValuesWithPrefix(request, "GroupName", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindInstanceIdsToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindInstanceIdsToIndexedFormParams.java similarity index 84% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindInstanceIdsToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindInstanceIdsToIndexedFormParams.java index 64e3b91241..fc01a90dab 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindInstanceIdsToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindInstanceIdsToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindInstanceIdsToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexStringArrayToFormValuesWithPrefix(request, "InstanceId", input); + return AWSUtils.indexStringArrayToFormValuesWithPrefix(request, "InstanceId", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindKeyNamesToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindKeyNamesToIndexedFormParams.java similarity index 84% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindKeyNamesToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindKeyNamesToIndexedFormParams.java index ac9a6c2011..925e59031f 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindKeyNamesToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindKeyNamesToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindKeyNamesToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexStringArrayToFormValuesWithPrefix(request, "KeyName", input); + return AWSUtils.indexStringArrayToFormValuesWithPrefix(request, "KeyName", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindProductCodesToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindProductCodesToIndexedFormParams.java similarity index 85% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindProductCodesToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindProductCodesToIndexedFormParams.java index 4495a0861e..1731a39a91 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindProductCodesToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindProductCodesToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexIterableToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindProductCodesToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexIterableToFormValuesWithPrefix(request, "ProductCode", input); + return AWSUtils.indexIterableToFormValuesWithPrefix(request, "ProductCode", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindPublicIpsToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindPublicIpsToIndexedFormParams.java similarity index 87% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindPublicIpsToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindPublicIpsToIndexedFormParams.java index 2cb6570687..c43cdf1992 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindPublicIpsToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindPublicIpsToIndexedFormParams.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithPrefix; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -40,6 +40,6 @@ public class BindPublicIpsToIndexedFormParams implements Binder { checkArgument(checkNotNull(input, "input") instanceof String[], "this binder is only valid for String[] : " + input.getClass()); String[] addressStrings = (String[]) input; - return indexStringArrayToFormValuesWithPrefix(request, "PublicIp", addressStrings); + return AWSUtils.indexStringArrayToFormValuesWithPrefix(request, "PublicIp", addressStrings); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindS3UploadPolicyAndSignature.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindS3UploadPolicyAndSignature.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindS3UploadPolicyAndSignature.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindS3UploadPolicyAndSignature.java index be6a4c5485..a2af25916b 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindS3UploadPolicyAndSignature.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindS3UploadPolicyAndSignature.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static com.google.common.base.Preconditions.checkNotNull; @@ -57,4 +57,4 @@ public class BindS3UploadPolicyAndSignature implements Binder { return ModifyRequest.putFormParams(request, builder.build()); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserGroupsToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParams.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserGroupsToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParams.java index a02af141f8..a9e908a6cf 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserGroupsToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParams.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.util.EC2Utils.indexIterableToFormValuesWithPrefix; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -42,7 +42,7 @@ public class BindUserGroupsToIndexedFormParams implements Binder { checkArgument(checkNotNull(input, "input") instanceof Iterable, "this binder is only valid for Iterable: " + input.getClass()); checkValidUserGroup(input); - return indexIterableToFormValuesWithPrefix(request, "UserGroup", input); + return AWSUtils.indexIterableToFormValuesWithPrefix(request, "UserGroup", input); } private void checkValidUserGroup(Object input) { @@ -52,4 +52,4 @@ public class BindUserGroupsToIndexedFormParams implements Binder { "only supported UserGroup is 'all'"); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java index d80e0925d0..82455fde15 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParams.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import javax.inject.Singleton; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.http.HttpRequest; import org.jclouds.http.utils.ModifyRequest; import org.jclouds.rest.Binder; @@ -50,4 +50,4 @@ public class BindUserIdGroupPairToSourceSecurityGroupFormParams implements Binde return ModifyRequest.putFormParams(request, builder.build()); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserIdsToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserIdsToIndexedFormParams.java similarity index 85% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserIdsToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserIdsToIndexedFormParams.java index e20283813d..de1dfa2751 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindUserIdsToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserIdsToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexIterableToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindUserIdsToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexIterableToFormValuesWithPrefix(request, "UserId", input); + return AWSUtils.indexIterableToFormValuesWithPrefix(request, "UserId", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindVolumeIdsToIndexedFormParams.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindVolumeIdsToIndexedFormParams.java similarity index 84% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindVolumeIdsToIndexedFormParams.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/BindVolumeIdsToIndexedFormParams.java index ac73d5b27e..a623802300 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/BindVolumeIdsToIndexedFormParams.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/BindVolumeIdsToIndexedFormParams.java @@ -17,12 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; - -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithPrefix; +package org.jclouds.ec2.binders; import javax.inject.Singleton; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; @@ -35,7 +34,7 @@ import org.jclouds.rest.Binder; public class BindVolumeIdsToIndexedFormParams implements Binder { @Override public R bindToRequest(R request, Object input) { - return indexStringArrayToFormValuesWithPrefix(request, "VolumeId", input); + return AWSUtils.indexStringArrayToFormValuesWithPrefix(request, "VolumeId", input); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java b/apis/ec2/src/main/java/org/jclouds/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java rename to apis/ec2/src/main/java/org/jclouds/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java index dd7fee8844..1a2084fc4f 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/binders/IfNotNullBindAvailabilityZoneToFormParam.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static com.google.common.base.Preconditions.checkArgument; @@ -43,4 +43,4 @@ public class IfNotNullBindAvailabilityZoneToFormParam implements Binder { return request; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java index 1fc4d5cb29..cb3b852b77 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java @@ -17,10 +17,9 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static com.google.common.base.Preconditions.checkState; -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; import java.util.Map; import java.util.Map.Entry; @@ -34,13 +33,7 @@ import javax.inject.Singleton; import org.jclouds.Constants; import org.jclouds.aws.AWSResponseException; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.domain.RegionNameAndIngressRules; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.domain.PlacementGroup.State; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.collect.Memoized; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.domain.Hardware; @@ -60,6 +53,13 @@ import org.jclouds.compute.strategy.SuspendNodeStrategy; import org.jclouds.compute.util.ComputeUtils; import org.jclouds.domain.Credentials; import org.jclouds.domain.Location; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.domain.RegionNameAndIngressRules; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup.State; import org.jclouds.http.HttpResponseException; import org.jclouds.util.Preconditions2; @@ -171,7 +171,7 @@ public class EC2ComputeService extends BaseComputeService { Map regionTags = Maps.newHashMap(); for (NodeMetadata nodeMetadata : deadOnes) { if (nodeMetadata.getTag() != null) - regionTags.put(parseHandle(nodeMetadata.getId())[0], nodeMetadata.getTag()); + regionTags.put(AWSUtils.parseHandle(nodeMetadata.getId())[0], nodeMetadata.getTag()); } for (Entry regionTag : regionTags.entrySet()) { deleteKeyPair(regionTag.getKey(), regionTag.getValue()); @@ -189,4 +189,4 @@ public class EC2ComputeService extends BaseComputeService { return EC2TemplateOptions.class.cast(super.templateOptions()); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2BindComputeStrategiesByClass.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2BindComputeStrategiesByClass.java similarity index 84% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2BindComputeStrategiesByClass.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2BindComputeStrategiesByClass.java index 3f59584b6f..ae05dedee9 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2BindComputeStrategiesByClass.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2BindComputeStrategiesByClass.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.config; +package org.jclouds.ec2.compute.config; -import org.jclouds.aws.ec2.compute.strategy.EC2DestroyNodeStrategy; -import org.jclouds.aws.ec2.compute.strategy.EC2GetNodeMetadataStrategy; -import org.jclouds.aws.ec2.compute.strategy.EC2ListNodesStrategy; -import org.jclouds.aws.ec2.compute.strategy.EC2RebootNodeStrategy; -import org.jclouds.aws.ec2.compute.strategy.EC2RunNodesAndAddToSetStrategy; -import org.jclouds.aws.ec2.compute.strategy.EC2ResumeNodeStrategy; -import org.jclouds.aws.ec2.compute.strategy.EC2SuspendNodeStrategy; +import org.jclouds.ec2.compute.strategy.EC2DestroyNodeStrategy; +import org.jclouds.ec2.compute.strategy.EC2GetNodeMetadataStrategy; +import org.jclouds.ec2.compute.strategy.EC2ListNodesStrategy; +import org.jclouds.ec2.compute.strategy.EC2RebootNodeStrategy; +import org.jclouds.ec2.compute.strategy.EC2RunNodesAndAddToSetStrategy; +import org.jclouds.ec2.compute.strategy.EC2ResumeNodeStrategy; +import org.jclouds.ec2.compute.strategy.EC2SuspendNodeStrategy; import org.jclouds.compute.config.BindComputeStrategiesByClass; import org.jclouds.compute.strategy.AddNodeWithTagStrategy; import org.jclouds.compute.strategy.DestroyNodeStrategy; @@ -90,4 +90,4 @@ public class EC2BindComputeStrategiesByClass extends BindComputeStrategiesByClas return EC2SuspendNodeStrategy.class; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2BindComputeSuppliersByClass.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2BindComputeSuppliersByClass.java similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2BindComputeSuppliersByClass.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2BindComputeSuppliersByClass.java index b6c9cd80d7..a88ecff308 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2BindComputeSuppliersByClass.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2BindComputeSuppliersByClass.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.config; +package org.jclouds.ec2.compute.config; import java.util.Set; -import org.jclouds.aws.ec2.compute.suppliers.EC2HardwareSupplier; -import org.jclouds.aws.ec2.compute.suppliers.EC2ImageSupplier; +import org.jclouds.ec2.compute.suppliers.EC2HardwareSupplier; +import org.jclouds.ec2.compute.suppliers.EC2ImageSupplier; import org.jclouds.compute.config.BindComputeSuppliersByClass; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Image; @@ -54,4 +54,4 @@ public class EC2BindComputeSuppliersByClass extends BindComputeSuppliersByClass protected Class>> defineLocationSupplier() { return ZoneToRegionToProviderOrJustProvider.class; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceContextModule.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java old mode 100755 new mode 100644 similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceContextModule.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java index 9b035186f9..dcf9d10519 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceContextModule.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.config; +package org.jclouds.ec2.compute.config; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; import static org.jclouds.compute.domain.OsFamily.AMZN_LINUX; @@ -28,9 +28,9 @@ import java.util.Map; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.compute.EC2ComputeService; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.suppliers.RegionAndNameToImageSupplier; +import org.jclouds.ec2.compute.EC2ComputeService; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.suppliers.RegionAndNameToImageSupplier; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.config.BaseComputeServiceContextModule; import org.jclouds.compute.domain.Image; @@ -60,7 +60,7 @@ public class EC2ComputeServiceContextModule extends BaseComputeServiceContextMod @Override protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { String provider = injector.getInstance(Key.get(String.class, Provider.class)); - if ("ec2".equals(provider) || "aws-ec2".equals(provider)) + if ("ec2".equals(provider) || "ec2".equals(provider)) return template.osFamily(AMZN_LINUX).os64Bit(true); else if ("nova".equals(provider)) return super.provideTemplate(injector, template); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceDependenciesModule.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceDependenciesModule.java similarity index 82% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceDependenciesModule.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceDependenciesModule.java index 0438d500fc..175270982a 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ComputeServiceDependenciesModule.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceDependenciesModule.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.config; +package org.jclouds.ec2.compute.config; import static com.google.common.collect.Iterables.toArray; import static com.google.common.collect.Maps.newLinkedHashMap; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; import java.security.SecureRandom; import java.util.Map; @@ -31,25 +31,25 @@ import java.util.concurrent.TimeUnit; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.EC2ComputeService; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.functions.CreatePlacementGroupIfNeeded; -import org.jclouds.aws.ec2.compute.functions.CreateSecurityGroupIfNeeded; -import org.jclouds.aws.ec2.compute.functions.CreateUniqueKeyPair; -import org.jclouds.aws.ec2.compute.functions.CredentialsForInstance; -import org.jclouds.aws.ec2.compute.functions.RegionAndIdToImage; -import org.jclouds.aws.ec2.compute.functions.RunningInstanceToNodeMetadata; -import org.jclouds.aws.ec2.compute.internal.EC2TemplateBuilderImpl; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.predicates.InstancePresent; -import org.jclouds.aws.ec2.predicates.PlacementGroupAvailable; -import org.jclouds.aws.ec2.predicates.PlacementGroupDeleted; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.EC2ComputeService; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.functions.CreatePlacementGroupIfNeeded; +import org.jclouds.ec2.compute.functions.CreateSecurityGroupIfNeeded; +import org.jclouds.ec2.compute.functions.CreateUniqueKeyPair; +import org.jclouds.ec2.compute.functions.CredentialsForInstance; +import org.jclouds.ec2.compute.functions.RegionAndIdToImage; +import org.jclouds.ec2.compute.functions.RunningInstanceToNodeMetadata; +import org.jclouds.ec2.compute.internal.EC2TemplateBuilderImpl; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.predicates.InstancePresent; +import org.jclouds.ec2.predicates.PlacementGroupAvailable; +import org.jclouds.ec2.predicates.PlacementGroupDeleted; import org.jclouds.compute.ComputeService; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.domain.Image; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ResolveImagesModule.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ResolveImagesModule.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ResolveImagesModule.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ResolveImagesModule.java index b1e70a9878..920aa5a26f 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/config/EC2ResolveImagesModule.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ResolveImagesModule.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.config; +package org.jclouds.ec2.compute.config; import com.google.inject.AbstractModule; -import org.jclouds.aws.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy; +import org.jclouds.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy; import org.jclouds.compute.config.ResolvesImages; import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/EC2HardwareBuilder.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/EC2HardwareBuilder.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java index a234c39968..ed8b6873bf 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/EC2HardwareBuilder.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.domain; +package org.jclouds.ec2.compute.domain; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -28,8 +28,8 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.RootDeviceType; import org.jclouds.compute.domain.HardwareBuilder; import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.Processor; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/RegionAndName.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/RegionAndName.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/RegionAndName.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/RegionAndName.java index 68af20d1a6..05497bfdab 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/RegionAndName.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/RegionAndName.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.domain; +package org.jclouds.ec2.compute.domain; /** * diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/RegionNameAndIngressRules.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/RegionNameAndIngressRules.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/RegionNameAndIngressRules.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/RegionNameAndIngressRules.java index c9b4e75640..276c078a68 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/domain/RegionNameAndIngressRules.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/RegionNameAndIngressRules.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.domain; +package org.jclouds.ec2.compute.domain; /** * @@ -44,4 +44,4 @@ public class RegionNameAndIngressRules extends RegionAndName { return authorizeSelf; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreatePlacementGroupIfNeeded.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreatePlacementGroupIfNeeded.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreatePlacementGroupIfNeeded.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreatePlacementGroupIfNeeded.java index 45da9a3c2e..549582a5c1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreatePlacementGroupIfNeeded.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreatePlacementGroupIfNeeded.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; @@ -28,11 +28,11 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.aws.AWSResponseException; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.domain.PlacementGroup.State; import org.jclouds.compute.reference.ComputeServiceConstants; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup.State; import org.jclouds.logging.Logger; import com.google.common.base.Function; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreateSecurityGroupIfNeeded.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreateSecurityGroupIfNeeded.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreateSecurityGroupIfNeeded.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreateSecurityGroupIfNeeded.java index aac80ecade..4807b21d97 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreateSecurityGroupIfNeeded.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreateSecurityGroupIfNeeded.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static com.google.common.base.Preconditions.checkNotNull; @@ -26,10 +26,10 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.domain.RegionNameAndIngressRules; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.domain.RegionNameAndIngressRules; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreateUniqueKeyPair.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreateUniqueKeyPair.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreateUniqueKeyPair.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreateUniqueKeyPair.java index ce833df985..7c3b0ad11d 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CreateUniqueKeyPair.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CreateUniqueKeyPair.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static com.google.common.base.Preconditions.checkNotNull; @@ -26,9 +26,9 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.domain.KeyPair; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CredentialsForInstance.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CredentialsForInstance.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CredentialsForInstance.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CredentialsForInstance.java index 4206ba5a89..c80bea4c56 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/CredentialsForInstance.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/CredentialsForInstance.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static com.google.common.base.Preconditions.checkNotNull; @@ -26,9 +26,9 @@ import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.compute.domain.Image; import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy; import org.jclouds.domain.Credentials; @@ -76,4 +76,4 @@ public class CredentialsForInstance implements Function { +public class ImageParser implements Function { @Resource @Named(ComputeServiceConstants.COMPUTE_LOGGER) protected Logger logger = Logger.NULL; @@ -105,7 +105,7 @@ public class ImageParser implements Function public Image apply(RegionAndName key) { try { - org.jclouds.aws.ec2.domain.Image image = Iterables.getOnlyElement(sync.getAMIServices() + org.jclouds.ec2.domain.Image image = Iterables.getOnlyElement(sync.getAMIServices() .describeImagesInRegion(key.getRegion(), imageIds(key.getName()))); return parser.apply(image); } catch (NoSuchElementException e) { @@ -74,4 +74,4 @@ public final class RegionAndIdToImage implements Function public static String message(RegionAndName key, Exception e) { return String.format("could not find image %s/%s: %s", key.getRegion(), key.getName(), e.getMessage()); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/RunningInstanceToNodeMetadata.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadata.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/RunningInstanceToNodeMetadata.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadata.java index 78b5d5c878..9b4547cb6e 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/functions/RunningInstanceToNodeMetadata.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadata.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static com.google.common.base.Preconditions.checkNotNull; @@ -31,11 +31,11 @@ import javax.annotation.Resource; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.RootDeviceType; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.RunningInstance.EbsBlockDevice; import org.jclouds.collect.Memoized; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.HardwareBuilder; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/internal/EC2TemplateBuilderImpl.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImpl.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/internal/EC2TemplateBuilderImpl.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImpl.java index 1ff9e5f044..d7b709631f 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/internal/EC2TemplateBuilderImpl.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImpl.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.internal; +package org.jclouds.ec2.compute.internal; import static com.google.common.base.Preconditions.checkArgument; @@ -29,8 +29,8 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; import org.jclouds.collect.Memoized; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Image; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/options/EC2TemplateOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/options/EC2TemplateOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java index 78ec726d85..f869a757fd 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/options/EC2TemplateOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.options; +package org.jclouds.ec2.compute.options; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -43,7 +43,7 @@ import com.google.common.collect.Iterables; * needed): *

* - * import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.*; + * import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.*; *

* ComputeService client = // get connection * templateBuilder.options(inboundPorts(22, 80, 8080, 443)); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java index ffb44676cb..e33fa87190 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java @@ -17,9 +17,9 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.asType; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.asType; import java.util.Map; import java.util.Set; @@ -29,14 +29,14 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.domain.RegionNameAndIngressRules; -import org.jclouds.aws.ec2.compute.functions.CreatePlacementGroupIfNeeded; -import org.jclouds.aws.ec2.compute.functions.CreateSecurityGroupIfNeeded; -import org.jclouds.aws.ec2.compute.functions.CreateUniqueKeyPair; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.options.RunInstancesOptions; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.domain.RegionNameAndIngressRules; +import org.jclouds.ec2.compute.functions.CreatePlacementGroupIfNeeded; +import org.jclouds.ec2.compute.functions.CreateSecurityGroupIfNeeded; +import org.jclouds.ec2.compute.functions.CreateUniqueKeyPair; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.options.RunInstancesOptions; import org.jclouds.compute.domain.Template; import org.jclouds.compute.options.TemplateOptions; import org.jclouds.location.Provider; @@ -189,4 +189,4 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions } return groups; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/DescribeImagesParallel.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/DescribeImagesParallel.java similarity index 74% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/DescribeImagesParallel.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/DescribeImagesParallel.java index 11087ac0b1..41d2259ab4 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/DescribeImagesParallel.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/DescribeImagesParallel.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static com.google.common.collect.Iterables.concat; import static org.jclouds.concurrent.FutureIterables.transformParallel; -import java.util.Set; import java.util.Map.Entry; +import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; @@ -33,9 +33,9 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.options.DescribeImagesOptions; import org.jclouds.compute.reference.ComputeServiceConstants; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.options.DescribeImagesOptions; import org.jclouds.logging.Logger; import com.google.common.base.Function; @@ -46,35 +46,35 @@ import com.google.common.base.Function; */ @Singleton public class DescribeImagesParallel implements - Function>, Iterable> { + Function>, Iterable> { @Resource @Named(ComputeServiceConstants.COMPUTE_LOGGER) protected Logger logger = Logger.NULL; - protected final EC2AsyncClient sync; + protected final EC2AsyncClient async; final ExecutorService executor; @Inject - public DescribeImagesParallel(EC2AsyncClient sync, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService executor) { + public DescribeImagesParallel(EC2AsyncClient async, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService executor) { super(); - this.sync = sync; + this.async = async; this.executor = executor; } @Override - public Iterable apply( + public Iterable apply( Iterable> queries) { return concat(transformParallel( queries, - new Function, Future>>() { + new Function, Future>>() { @Override - public Future> apply( + public Future> apply( Entry from) { - return sync.getAMIServices().describeImagesInRegion(from.getKey(), from.getValue()); + return async.getAMIServices().describeImagesInRegion(from.getKey(), from.getValue()); } }, executor, null, logger, "amis")); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2DestroyNodeStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2DestroyNodeStrategy.java similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2DestroyNodeStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2DestroyNodeStrategy.java index cae1d54ef1..59063c7127 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2DestroyNodeStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2DestroyNodeStrategy.java @@ -17,20 +17,19 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; - -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +package org.jclouds.ec2.compute.strategy; import javax.annotation.Resource; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.strategy.DestroyNodeStrategy; import org.jclouds.compute.strategy.GetNodeMetadataStrategy; +import org.jclouds.ec2.EC2Client; import org.jclouds.logging.Logger; /** @@ -54,11 +53,11 @@ public class EC2DestroyNodeStrategy implements DestroyNodeStrategy { @Override public NodeMetadata destroyNode(String id) { - String[] parts = parseHandle(id); + String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; ec2Client.getInstanceServices().terminateInstancesInRegion(region, instanceId); return getNode.getNode(id); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java similarity index 86% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java index 394a18a6cf..32125eed9b 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2GetNodeMetadataStrategy.java @@ -17,21 +17,21 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static com.google.common.collect.Iterables.getOnlyElement; -import static org.jclouds.aws.ec2.util.EC2Utils.getAllRunningInstancesInRegion; -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +import static org.jclouds.ec2.util.EC2Utils.getAllRunningInstancesInRegion; import java.util.NoSuchElementException; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.strategy.GetNodeMetadataStrategy; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.RunningInstance; import com.google.common.base.Function; @@ -54,7 +54,7 @@ public class EC2GetNodeMetadataStrategy implements GetNodeMetadataStrategy { @Override public NodeMetadata getNode(String id) { - String[] parts = parseHandle(id); + String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; try { @@ -66,4 +66,4 @@ public class EC2GetNodeMetadataStrategy implements GetNodeMetadataStrategy { } } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2ListNodesStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2ListNodesStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java index 58ba65fa23..6c2efe2617 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2ListNodesStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Iterables.filter; @@ -35,9 +35,9 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.compute.domain.ComputeMetadata; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.predicates.NodePredicates; @@ -95,4 +95,4 @@ public class EC2ListNodesStrategy implements ListNodesStrategy { Iterable nodes = filter(transform(instances, runningInstanceToNodeMetadata), filter); return newLinkedHashSet(nodes); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java index dbbdbe0824..57680534bd 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2PopulateDefaultLoginCredentialsForImageStrategy.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static com.google.common.base.Preconditions.checkArgument; import javax.inject.Singleton; -import org.jclouds.aws.ec2.domain.Image; +import org.jclouds.ec2.domain.Image; import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy; import org.jclouds.domain.Credentials; @@ -48,7 +48,7 @@ public class EC2PopulateDefaultLoginCredentialsForImageStrategy implements // canonical/alestic images use the ubuntu user to login if (owner.matches("063491364108|099720109477")) { credentials = new Credentials("ubuntu", null); - // http://aws.typepad.com/aws/2010/09/introducing-amazon-linux-ami.html + // http://typepad.com/2010/09/introducing-amazon-linux-ami.html } else if (owner.equals("137112412989")) { credentials = new Credentials("ec2-user", null); } diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2RebootNodeStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2RebootNodeStrategy.java similarity index 87% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2RebootNodeStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2RebootNodeStrategy.java index bfa3a879c6..cbea03db48 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2RebootNodeStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2RebootNodeStrategy.java @@ -17,18 +17,17 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; - -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +package org.jclouds.ec2.compute.strategy; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.services.InstanceClient; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.strategy.GetNodeMetadataStrategy; import org.jclouds.compute.strategy.RebootNodeStrategy; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.services.InstanceClient; /** * @@ -47,11 +46,11 @@ public class EC2RebootNodeStrategy implements RebootNodeStrategy { @Override public NodeMetadata rebootNode(String id) { - String[] parts = parseHandle(id); + String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; client.rebootInstancesInRegion(region, instanceId); return getNode.getNode(id); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2ResumeNodeStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ResumeNodeStrategy.java similarity index 87% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2ResumeNodeStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ResumeNodeStrategy.java index 52fbbab170..f1125abb8b 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2ResumeNodeStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ResumeNodeStrategy.java @@ -17,18 +17,17 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; - -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +package org.jclouds.ec2.compute.strategy; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.services.InstanceClient; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.strategy.GetNodeMetadataStrategy; import org.jclouds.compute.strategy.ResumeNodeStrategy; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.services.InstanceClient; /** * @@ -47,11 +46,11 @@ public class EC2ResumeNodeStrategy implements ResumeNodeStrategy { @Override public NodeMetadata resumeNode(String id) { - String[] parts = parseHandle(id); + String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; client.startInstancesInRegion(region, instanceId); return getNode.getNode(id); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java similarity index 89% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java index 6f1ef6c8ac..5bb4731bd8 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategy.java @@ -17,13 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static com.google.common.collect.Iterables.all; import static com.google.common.collect.Iterables.transform; -import static org.jclouds.aws.ec2.compute.util.EC2ComputeUtils.getRegionFromLocationOrNull; -import static org.jclouds.aws.ec2.compute.util.EC2ComputeUtils.getZoneFromLocationOrNull; -import static org.jclouds.aws.ec2.compute.util.EC2ComputeUtils.instanceToId; +import static org.jclouds.ec2.compute.util.EC2ComputeUtils.getZoneFromLocationOrNull; +import static org.jclouds.ec2.compute.util.EC2ComputeUtils.instanceToId; import java.util.Map; import java.util.Set; @@ -34,17 +33,18 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.options.RunInstancesOptions; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.Template; import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.strategy.RunNodesAndAddToSetStrategy; import org.jclouds.compute.util.ComputeUtils; import org.jclouds.domain.Credentials; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.options.RunInstancesOptions; import org.jclouds.logging.Logger; import com.google.common.annotations.VisibleForTesting; @@ -126,7 +126,7 @@ public class EC2RunNodesAndAddToSetStrategy implements RunNodesAndAddToSetStrate @VisibleForTesting Reservation createKeyPairAndSecurityGroupsAsNeededThenRunInstances(String tag, int count, Template template) { - String region = getRegionFromLocationOrNull(template.getLocation()); + String region = AWSUtils.getRegionFromLocationOrNull(template.getLocation()); String zone = getZoneFromLocationOrNull(template.getLocation()); RunInstancesOptions instanceOptions = createKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.execute(region, @@ -143,4 +143,4 @@ public class EC2RunNodesAndAddToSetStrategy implements RunNodesAndAddToSetStrate count, instanceOptions); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2SuspendNodeStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2SuspendNodeStrategy.java similarity index 87% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2SuspendNodeStrategy.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2SuspendNodeStrategy.java index ff37501253..d09d0c29c0 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/strategy/EC2SuspendNodeStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2SuspendNodeStrategy.java @@ -17,18 +17,17 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; - -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +package org.jclouds.ec2.compute.strategy; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.services.InstanceClient; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.strategy.GetNodeMetadataStrategy; import org.jclouds.compute.strategy.SuspendNodeStrategy; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.services.InstanceClient; /** * @@ -47,11 +46,11 @@ public class EC2SuspendNodeStrategy implements SuspendNodeStrategy { @Override public NodeMetadata suspendNode(String id) { - String[] parts = parseHandle(id); + String[] parts = AWSUtils.parseHandle(id); String region = parts[0]; String instanceId = parts[1]; client.stopInstancesInRegion(region, true, instanceId); return getNode.getNode(id); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/EC2HardwareSupplier.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java similarity index 77% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/EC2HardwareSupplier.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java index 7ad73f262f..76bc4ccdf2 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/EC2HardwareSupplier.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2HardwareSupplier.java @@ -17,21 +17,21 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.suppliers; +package org.jclouds.ec2.compute.suppliers; import static com.google.common.collect.Iterables.find; import static com.google.common.collect.Sets.newLinkedHashSet; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.c1_medium; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_large; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_small; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m2_xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.t1_micro; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.t1_micro; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; import static org.jclouds.compute.predicates.ImagePredicates.any; import java.util.Set; @@ -94,4 +94,4 @@ public class EC2HardwareSupplier implements Supplier> { m1_xlarge().build(), m2_xlarge().build(), m2_2xlarge().build(), m2_4xlarge().build())); return sizes; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/EC2ImageSupplier.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2ImageSupplier.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/EC2ImageSupplier.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2ImageSupplier.java index ee6fe4c0bd..5a34da5b34 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/EC2ImageSupplier.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/EC2ImageSupplier.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.suppliers; +package org.jclouds.ec2.compute.suppliers; import java.util.Map; import java.util.Set; @@ -25,7 +25,7 @@ import java.util.Set; import javax.inject.Inject; import javax.inject.Singleton; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.domain.RegionAndName; import org.jclouds.compute.domain.Image; import com.google.common.base.Supplier; @@ -49,4 +49,4 @@ public class EC2ImageSupplier implements Supplier> { return Sets.newLinkedHashSet(map.get().values()); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/RegionAndNameToImageSupplier.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/RegionAndNameToImageSupplier.java similarity index 89% rename from aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/RegionAndNameToImageSupplier.java rename to apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/RegionAndNameToImageSupplier.java index f19e540ca3..0380e6993f 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/suppliers/RegionAndNameToImageSupplier.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/suppliers/RegionAndNameToImageSupplier.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.suppliers; +package org.jclouds.ec2.compute.suppliers; /** * @@ -43,10 +43,10 @@ import static com.google.common.collect.Iterables.filter; import static com.google.common.collect.Iterables.transform; import static com.google.common.collect.Maps.newLinkedHashMap; import static com.google.common.collect.Maps.uniqueIndex; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.imageIds; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.ownedBy; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; -import static org.jclouds.aws.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.imageIds; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.ownedBy; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; +import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_CC_AMIs; import java.util.Map; import java.util.Map.Entry; @@ -57,10 +57,10 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.functions.ImageParser; -import org.jclouds.aws.ec2.compute.strategy.DescribeImagesParallel; -import org.jclouds.aws.ec2.options.DescribeImagesOptions; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.functions.ImageParser; +import org.jclouds.ec2.compute.strategy.DescribeImagesParallel; +import org.jclouds.ec2.options.DescribeImagesOptions; import org.jclouds.compute.domain.Image; import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.location.Region; @@ -154,4 +154,4 @@ public class RegionAndNameToImageSupplier implements Supplier{ return zone.compareTo(that.zone); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/BlockDeviceMapping.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/BlockDeviceMapping.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java index 7cb5a0b81a..ca25406513 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/BlockDeviceMapping.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -29,7 +29,7 @@ import com.google.common.collect.Multimap; /** * Defines the mapping of volumes for - * {@link org.jclouds.aws.ec2.services.InstanceClient#setBlockDeviceMappingForInstanceInRegion}. + * {@link org.jclouds.ec2.services.InstanceClient#setBlockDeviceMappingForInstanceInRegion}. * * @author Oleksiy Yarmula */ diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/BundleInstanceS3Storage.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BundleInstanceS3Storage.java similarity index 89% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/BundleInstanceS3Storage.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/BundleInstanceS3Storage.java index 8f6bc7e41e..8ab3b190c7 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/BundleInstanceS3Storage.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BundleInstanceS3Storage.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -30,16 +30,16 @@ import javax.annotation.Nullable; * @author Adrian Cole */ public class BundleInstanceS3Storage { - private final String awsAccessKeyId; + private final String ccessKeyId; private final String bucket; private final String prefix; private final String secretAccessKey; private final String uploadPolicy; private final String uploadPolicySignature; - public BundleInstanceS3Storage(@Nullable String awsAccessKeyId, String bucket, String prefix, + public BundleInstanceS3Storage(@Nullable String ccessKeyId, String bucket, String prefix, @Nullable String secretAccessKey, @Nullable String uploadPolicy, @Nullable String uploadPolicySignature) { - this.awsAccessKeyId = awsAccessKeyId; + this.ccessKeyId = ccessKeyId; this.bucket = checkNotNull(bucket, "bucket"); this.prefix = checkNotNull(prefix, "prefix"); this.secretAccessKey = secretAccessKey; @@ -51,7 +51,7 @@ public class BundleInstanceS3Storage { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((awsAccessKeyId == null) ? 0 : awsAccessKeyId.hashCode()); + result = prime * result + ((ccessKeyId == null) ? 0 : ccessKeyId.hashCode()); result = prime * result + ((bucket == null) ? 0 : bucket.hashCode()); result = prime * result + ((prefix == null) ? 0 : prefix.hashCode()); result = prime * result + ((secretAccessKey == null) ? 0 : secretAccessKey.hashCode()); @@ -69,10 +69,10 @@ public class BundleInstanceS3Storage { if (getClass() != obj.getClass()) return false; BundleInstanceS3Storage other = (BundleInstanceS3Storage) obj; - if (awsAccessKeyId == null) { - if (other.awsAccessKeyId != null) + if (ccessKeyId == null) { + if (other.ccessKeyId != null) return false; - } else if (!awsAccessKeyId.equals(other.awsAccessKeyId)) + } else if (!ccessKeyId.equals(other.ccessKeyId)) return false; if (bucket == null) { if (other.bucket != null) @@ -104,7 +104,7 @@ public class BundleInstanceS3Storage { @Override public String toString() { - return "[awsAccessKeyId=" + awsAccessKeyId + ", bucket=" + bucket + ", prefix=" + prefix + ", secreAccessKey=" + return "[ccessKeyId=" + ccessKeyId + ", bucket=" + bucket + ", prefix=" + prefix + ", secreAccessKey=" + secretAccessKey + ", uploadPolicy=" + uploadPolicy + ", uploadPolicySignature=" + uploadPolicySignature + "]"; } diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/BundleTask.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BundleTask.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/BundleTask.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/BundleTask.java index b7556256b0..6399d631ab 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/BundleTask.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BundleTask.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Image.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Image.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/Image.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/Image.java index 11f3ab00ec..5fe7f539dd 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Image.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Image.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -467,4 +467,4 @@ public class Image implements Comparable { + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/ImageAttribute.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/ImageAttribute.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java index 7fd5b1958a..ad6acd1387 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/ImageAttribute.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ImageAttribute.java @@ -17,9 +17,9 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; -import org.jclouds.aws.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2AsyncClient; /** * @@ -100,4 +100,4 @@ public enum ImageAttribute { return UNRECOGNIZED; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceState.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceState.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java index e1aa283d54..ef32c636e1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceState.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceState.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2AsyncClient; import com.google.common.base.CaseFormat; @@ -99,4 +99,4 @@ public enum InstanceState { return UNRECOGNIZED; } } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceStateChange.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceStateChange.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceStateChange.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceStateChange.java index 9f2b122027..99864621d9 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceStateChange.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceStateChange.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -115,4 +115,4 @@ public class InstanceStateChange implements Comparable { + ", previousState=" + previousState + ", region=" + region + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceType.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceType.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java index 6c7e203e5c..24f4e72da5 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/InstanceType.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java @@ -17,9 +17,9 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; -import org.jclouds.aws.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2AsyncClient; /** * @@ -149,4 +149,4 @@ public class InstanceType { */ public static final String CC1_4XLARGE = "cc1.4xlarge"; -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/IpPermission.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/IpPermission.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/IpPermission.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/IpPermission.java index 38ad842593..daed4e8f92 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/IpPermission.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/IpPermission.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import java.util.Set; @@ -136,4 +136,4 @@ public class IpPermission implements Comparable { + ipProtocol + ", ipRanges=" + ipRanges + ", toPort=" + toPort + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/IpProtocol.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/IpProtocol.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/IpProtocol.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/IpProtocol.java index a39af7ef26..4b34fea78a 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/IpProtocol.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/IpProtocol.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -46,4 +46,4 @@ public enum IpProtocol { } } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/KeyPair.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/KeyPair.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/KeyPair.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/KeyPair.java index 1c572c144c..7da0ee3cdf 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/KeyPair.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/KeyPair.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -122,4 +122,4 @@ public class KeyPair implements Comparable { return true; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/MonitoringState.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/MonitoringState.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/MonitoringState.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/MonitoringState.java index 2647716577..cdf7a2a669 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/MonitoringState.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/MonitoringState.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.services.InstanceClient; -import org.jclouds.aws.ec2.services.MonitoringClient; +import org.jclouds.ec2.services.InstanceClient; +import org.jclouds.ec2.services.MonitoringClient; /** * @@ -60,4 +60,4 @@ public enum MonitoringState { return UNRECOGNIZED; } } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Permission.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Permission.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/Permission.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/Permission.java index cceab38347..349654cc9d 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Permission.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Permission.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -93,4 +93,4 @@ public class Permission { return "LaunchPermission [groups=" + groups + ", userIds=" + userIds + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/PlacementGroup.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/PlacementGroup.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/PlacementGroup.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/PlacementGroup.java index 467b8a6498..2d2f5cd6cd 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/PlacementGroup.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/PlacementGroup.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/PublicIpInstanceIdPair.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/PublicIpInstanceIdPair.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/PublicIpInstanceIdPair.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/PublicIpInstanceIdPair.java index 1a947a7dcf..93c88e7f42 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/PublicIpInstanceIdPair.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/PublicIpInstanceIdPair.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -107,4 +107,4 @@ public class PublicIpInstanceIdPair implements Comparable extends LinkedHashSet imp return true; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/ReservedInstancesOffering.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/ReservedInstancesOffering.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java index bf6345fc2a..46c8bd320c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/ReservedInstancesOffering.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; /** * diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/RootDeviceType.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/RootDeviceType.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/RootDeviceType.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/RootDeviceType.java index c79c04a8e1..da6227ac79 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/RootDeviceType.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/RootDeviceType.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import com.google.common.base.CaseFormat; @@ -48,4 +48,4 @@ public enum RootDeviceType { return UNRECOGNIZED; } } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/RunningInstance.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/RunningInstance.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/RunningInstance.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/RunningInstance.java index ed4ed62499..7fde17c36d 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/RunningInstance.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/RunningInstance.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -27,7 +27,7 @@ import java.util.Set; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.Attachment.Status; +import org.jclouds.ec2.domain.Attachment.Status; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; @@ -595,4 +595,4 @@ public class RunningInstance implements Comparable { + spotInstanceRequestId + ", subnetId=" + subnetId + ", vpcId=" + vpcId + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/SecurityGroup.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/SecurityGroup.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/SecurityGroup.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/SecurityGroup.java index d0a5af2672..35e685b1eb 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/SecurityGroup.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/SecurityGroup.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -144,4 +144,4 @@ public class SecurityGroup implements Comparable { return "SecurityGroup [description=" + description + ", ipPermissions=" + ipPermissions + ", name=" + name + ", ownerId=" + ownerId + ", region=" + region + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Snapshot.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Snapshot.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/Snapshot.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/Snapshot.java index 4a5984877e..b70f140bb8 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Snapshot.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Snapshot.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/UserIdGroupPair.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/UserIdGroupPair.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/UserIdGroupPair.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/UserIdGroupPair.java index 1d88e02189..bc699814c7 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/UserIdGroupPair.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/UserIdGroupPair.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -94,4 +94,4 @@ public class UserIdGroupPair implements Comparable { return true; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Volume.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Volume.java similarity index 99% rename from aws/core/src/main/java/org/jclouds/aws/ec2/domain/Volume.java rename to apis/ec2/src/main/java/org/jclouds/ec2/domain/Volume.java index ca2e292a8d..142a55c21b 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/domain/Volume.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Volume.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.domain; +package org.jclouds.ec2.domain; import static com.google.common.base.Preconditions.checkNotNull; @@ -218,4 +218,4 @@ public class Volume implements Comparable { + createTime + ", id=" + id + ", region=" + region + ", size=" + size + ", snapshotId=" + snapshotId + ", status=" + status + "]"; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java b/apis/ec2/src/main/java/org/jclouds/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java rename to apis/ec2/src/main/java/org/jclouds/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java index a151c2b158..4f9ab3d2de 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/functions/ConvertUnencodedBytesToBase64EncodedString.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.functions; +package org.jclouds.ec2.functions; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -45,4 +45,4 @@ public class ConvertUnencodedBytesToBase64EncodedString implements Function { return Void.class.cast(propagateOrNull(from)); } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/BundleInstanceS3StorageOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/BundleInstanceS3StorageOptions.java similarity index 85% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/BundleInstanceS3StorageOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/BundleInstanceS3StorageOptions.java index 28d33f3704..7f25f2aa60 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/BundleInstanceS3StorageOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/BundleInstanceS3StorageOptions.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; @@ -25,7 +25,7 @@ import static org.jclouds.Constants.PROPERTY_IDENTITY; import javax.inject.Named; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; import com.google.common.collect.Multimap; import com.google.inject.Inject; @@ -39,7 +39,7 @@ import com.google.inject.Inject; * followed by an instance mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.BundleInstanceS3StorageOptions.Builder.* + * import static org.jclouds.ec2.options.BundleInstanceS3StorageOptions.Builder.* *

* EC2Client connection = // get connection * String imageId = connection.getWindowsServices().bundleInstanceInRegion(...bucketOwnedBy(anotherAccessKey)); @@ -67,11 +67,11 @@ public class BundleInstanceS3StorageOptions extends BaseEC2RequestOptions { /** * - * @param awsAccessKeyId + * @param ccessKeyId * The Access Key ID of the owner of the Amazon S3 bucket. */ - public BundleInstanceS3StorageOptions bucketOwnedBy(String awsAccessKeyId) { - formParameters.put("Storage.S3.AWSAccessKeyId", checkNotNull(awsAccessKeyId, "awsAccessKeyId")); + public BundleInstanceS3StorageOptions bucketOwnedBy(String ccessKeyId) { + formParameters.put("Storage.S3.AWSAccessKeyId", checkNotNull(ccessKeyId, "ccessKeyId")); return this; } @@ -85,11 +85,11 @@ public class BundleInstanceS3StorageOptions extends BaseEC2RequestOptions { public static class Builder { /** - * @see BundleInstanceS3StorageOptions#bucketOwnedBy(awsAccessKeyId) + * @see BundleInstanceS3StorageOptions#bucketOwnedBy(ccessKeyId) */ - public static BundleInstanceS3StorageOptions bucketOwnedBy(String awsAccessKeyId) { + public static BundleInstanceS3StorageOptions bucketOwnedBy(String ccessKeyId) { BundleInstanceS3StorageOptions options = new BundleInstanceS3StorageOptions(); - return options.bucketOwnedBy(awsAccessKeyId); + return options.bucketOwnedBy(ccessKeyId); } } diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/CreateImageOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/CreateImageOptions.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/CreateImageOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/CreateImageOptions.java index b87f321c4d..c43df277b6 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/CreateImageOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/CreateImageOptions.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the CreateImage operation.

@@ -30,7 +30,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * (if needed): *

* - * import static org.jclouds.aws.ec2.options.CreateImageOptions.Builder.* + * import static org.jclouds.ec2.options.CreateImageOptions.Builder.* *

* EC2Client connection = // get connection * Future> images = connection.getAMIServices().createImage(withDescription("123125").noReboot()); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/CreateSnapshotOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/CreateSnapshotOptions.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/CreateSnapshotOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/CreateSnapshotOptions.java index edfd49d42a..4d28437bba 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/CreateSnapshotOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/CreateSnapshotOptions.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the CreateSnapshot operation.

@@ -30,7 +30,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * instance mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.CreateSnapshotOptions.Builder.* + * import static org.jclouds.ec2.options.CreateSnapshotOptions.Builder.* *

* EC2Client connection = // get connection * Snapshot snapshot = connection.getElasticBlockStoreServices().createSnapshotInRegion(volumeId, withDescription("123125")); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeAvailabilityZonesOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeAvailabilityZonesOptions.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeAvailabilityZonesOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeAvailabilityZonesOptions.java index 7a9943f22f..804dced681 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeAvailabilityZonesOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeAvailabilityZonesOptions.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import java.util.Arrays; import java.util.Set; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the DescribeAvailabilityZones operation.

@@ -31,7 +31,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * followed by an instance mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.DescribeAvailabilityZonesOptions.Builder.* + * import static org.jclouds.ec2.options.DescribeAvailabilityZonesOptions.Builder.* *

* EC2Client connection = // get connection * Future> images = connection.getAvailabilityZoneAndRegionServices().describeAvailabilityZones(zones("us-east-1a", "us-east-1b")); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeImagesOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeImagesOptions.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeImagesOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeImagesOptions.java index 6e834ea187..a78f381d18 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeImagesOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeImagesOptions.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkNotNull; import java.util.Set; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the DescribeImages operation.

@@ -32,7 +32,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * instance mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.* + * import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.* *

* EC2Client connection = // get connection * Future> images = connection.getAMIServices().describeImages(executableBy("123125").imageIds(1000, 1004)); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeRegionsOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeRegionsOptions.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeRegionsOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeRegionsOptions.java index 41ece10158..27aefe9ad1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeRegionsOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeRegionsOptions.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import java.util.Arrays; import java.util.Set; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the DescribeRegions operation.

@@ -32,7 +32,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * instance mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.DescribeRegionsOptions.Builder.* + * import static org.jclouds.ec2.options.DescribeRegionsOptions.Builder.* *

* EC2Client connection = // get connection * Future> images = connection.getRegionsAndRegionsServices().describeRegions(regions("us-east-1a", "us-east-1b")); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeSnapshotsOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeSnapshotsOptions.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeSnapshotsOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeSnapshotsOptions.java index 4cb459fa23..a84c3a8920 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DescribeSnapshotsOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/DescribeSnapshotsOptions.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import java.util.Set; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the DescribeSnapshots operation.

@@ -30,7 +30,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * instance mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.* + * import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.* *

* EC2Client connection = // get connection * Set snapshots = connection.getElasticBlockStoreServices().describeSnapshots(restorableBy("123125").snapshotIds(1000, 1004)); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DetachVolumeOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/DetachVolumeOptions.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/DetachVolumeOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/DetachVolumeOptions.java index 837242895c..ebe24b1586 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/DetachVolumeOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/DetachVolumeOptions.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the DetachVolume operation.

@@ -30,7 +30,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.DetachVolumeOptions.Builder.* + * import static org.jclouds.ec2.options.DetachVolumeOptions.Builder.* *

* EC2Client client = // get connection * client.getElasticBlockStoreServices().detachVolumeInRegion(null, id, fromDevice("123125").force()); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/RegisterImageBackedByEbsOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/RegisterImageBackedByEbsOptions.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/RegisterImageBackedByEbsOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/RegisterImageBackedByEbsOptions.java index 75b6c37bfb..fd9b0f64ec 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/RegisterImageBackedByEbsOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/RegisterImageBackedByEbsOptions.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.Image.Architecture; +import org.jclouds.ec2.domain.Image.Architecture; /** * Contains options supported in the Form API for the RegisterImage operation.

@@ -33,7 +33,7 @@ import org.jclouds.aws.ec2.domain.Image.Architecture; * mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.* + * import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.* *

* EC2Client connection = // get connection * String imageId = connection.getImageServices().registerImageBackedByEbs(...addEphemeralBlockDeviceFromSnapshot("/dev/sda2","virtual-1","snapshot-id")); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/RegisterImageOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/RegisterImageOptions.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/RegisterImageOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/RegisterImageOptions.java index 6874dc9aa8..eea55d0e4b 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/RegisterImageOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/RegisterImageOptions.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.domain.Image.Architecture; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.domain.Image.Architecture; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; /** * Contains options supported in the Form API for the RegisterImage operation.

@@ -31,7 +31,7 @@ import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; * mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.RegisterImageOptions.Builder.* + * import static org.jclouds.ec2.options.RegisterImageOptions.Builder.* *

* EC2Client connection = // get connection * String imageId = connection.getImageServices().registerImageFromManifest(...withArchitecture(Architecture.I386).withDescription("description")); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/RunInstancesOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/RunInstancesOptions.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/RunInstancesOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/RunInstancesOptions.java index 0701fe43ba..d17211567a 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/RunInstancesOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/RunInstancesOptions.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.options.internal.BaseEC2RequestOptions; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.options.internal.BaseEC2RequestOptions; import org.jclouds.encryption.internal.Base64; /** @@ -33,7 +33,7 @@ import org.jclouds.encryption.internal.Base64; * mutator (if needed): *

* - * import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.* + * import static org.jclouds.ec2.options.RunInstancesOptions.Builder.* *

* EC2Client connection = // get connection * Future instances = connection.runInstances(executableBy("123125").imageIds(1000, 1004)); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/options/internal/BaseEC2RequestOptions.java b/apis/ec2/src/main/java/org/jclouds/ec2/options/internal/BaseEC2RequestOptions.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/options/internal/BaseEC2RequestOptions.java rename to apis/ec2/src/main/java/org/jclouds/ec2/options/internal/BaseEC2RequestOptions.java index 2b22898d13..dd79c47635 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/options/internal/BaseEC2RequestOptions.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/options/internal/BaseEC2RequestOptions.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options.internal; +package org.jclouds.ec2.options.internal; import static com.google.common.base.Preconditions.checkNotNull; @@ -65,4 +65,4 @@ public class BaseEC2RequestOptions extends BaseHttpRequestOptions { return values; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceHasIpAddress.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceHasIpAddress.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceHasIpAddress.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceHasIpAddress.java index 0f036b230e..1ddd454adf 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceHasIpAddress.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceHasIpAddress.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import javax.annotation.Resource; import javax.inject.Singleton; import org.jclouds.aws.AWSResponseException; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstancePresent.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstancePresent.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstancePresent.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstancePresent.java index f95f289a59..03d1fc8cff 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstancePresent.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstancePresent.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import java.util.NoSuchElementException; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.logging.Logger; import org.jclouds.rest.ResourceNotFoundException; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateRunning.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateRunning.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateRunning.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateRunning.java index 691b3f55ca..6808f747dc 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateRunning.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateRunning.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.logging.Logger; import org.jclouds.rest.ResourceNotFoundException; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateStopped.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateStopped.java similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateStopped.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateStopped.java index 821bcfdcdc..7137518946 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateStopped.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateStopped.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.services.InstanceClient; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.services.InstanceClient; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateTerminated.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateTerminated.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateTerminated.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateTerminated.java index 6cf00d6027..4dad1afbe5 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/InstanceStateTerminated.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/InstanceStateTerminated.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import java.util.NoSuchElementException; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/PlacementGroupAvailable.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/PlacementGroupAvailable.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/PlacementGroupAvailable.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/PlacementGroupAvailable.java index 74b77b7551..21ebc2057c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/PlacementGroupAvailable.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/PlacementGroupAvailable.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import java.util.NoSuchElementException; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.PlacementGroup; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.PlacementGroup; import org.jclouds.logging.Logger; import org.jclouds.rest.ResourceNotFoundException; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/PlacementGroupDeleted.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/PlacementGroupDeleted.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/PlacementGroupDeleted.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/PlacementGroupDeleted.java index dc2de66331..e3cfa0bfdd 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/PlacementGroupDeleted.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/PlacementGroupDeleted.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import java.util.NoSuchElementException; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.PlacementGroup; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.PlacementGroup; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/SnapshotCompleted.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/SnapshotCompleted.java similarity index 89% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/SnapshotCompleted.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/SnapshotCompleted.java index fb2eee1a74..ab38068e68 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/SnapshotCompleted.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/SnapshotCompleted.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; -import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.snapshotIds; +import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.snapshotIds; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.domain.Snapshot; -import org.jclouds.aws.ec2.services.ElasticBlockStoreClient; +import org.jclouds.ec2.domain.Snapshot; +import org.jclouds.ec2.services.ElasticBlockStoreClient; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/VolumeAttached.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/VolumeAttached.java similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/VolumeAttached.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/VolumeAttached.java index e4ea60660d..035b8697df 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/VolumeAttached.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/VolumeAttached.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.services.ElasticBlockStoreClient; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.services.ElasticBlockStoreClient; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/VolumeAvailable.java b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/VolumeAvailable.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/predicates/VolumeAvailable.java rename to apis/ec2/src/main/java/org/jclouds/ec2/predicates/VolumeAvailable.java index 3a9f04a863..99b6a19ea9 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/predicates/VolumeAvailable.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/predicates/VolumeAvailable.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.predicates; +package org.jclouds.ec2.predicates; import javax.annotation.Resource; import javax.inject.Singleton; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.services.ElasticBlockStoreClient; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.services.ElasticBlockStoreClient; import org.jclouds.logging.Logger; import com.google.common.base.Predicate; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/reference/EC2Constants.java b/apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java old mode 100755 new mode 100644 similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/reference/EC2Constants.java rename to apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java index 9a22fed12e..f54a5d63f1 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/reference/EC2Constants.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.reference; +package org.jclouds.ec2.reference; import org.jclouds.compute.ComputeService; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AMIAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIAsyncClient.java similarity index 88% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/AMIAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/AMIAsyncClient.java index 7d3b12e7cb..39253ff9ee 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AMIAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIAsyncClient.java @@ -17,37 +17,36 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Map; import java.util.Set; -import com.google.common.util.concurrent.ListenableFuture; import javax.annotation.Nullable; import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindProductCodesToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindUserGroupsToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindUserIdsToIndexedFormParams; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.Permission; -import org.jclouds.aws.ec2.domain.Image.EbsBlockDevice; -import org.jclouds.aws.ec2.options.CreateImageOptions; -import org.jclouds.aws.ec2.options.DescribeImagesOptions; -import org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions; -import org.jclouds.aws.ec2.options.RegisterImageOptions; -import org.jclouds.aws.ec2.xml.BlockDeviceMappingHandler; -import org.jclouds.aws.ec2.xml.DescribeImagesResponseHandler; -import org.jclouds.aws.ec2.xml.ImageIdHandler; -import org.jclouds.aws.ec2.xml.PermissionHandler; -import org.jclouds.aws.ec2.xml.ProductCodesHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindProductCodesToIndexedFormParams; +import org.jclouds.ec2.binders.BindUserGroupsToIndexedFormParams; +import org.jclouds.ec2.binders.BindUserIdsToIndexedFormParams; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.domain.Image.EbsBlockDevice; +import org.jclouds.ec2.domain.Permission; +import org.jclouds.ec2.options.CreateImageOptions; +import org.jclouds.ec2.options.DescribeImagesOptions; +import org.jclouds.ec2.options.RegisterImageBackedByEbsOptions; +import org.jclouds.ec2.options.RegisterImageOptions; +import org.jclouds.ec2.xml.BlockDeviceMappingHandler; +import org.jclouds.ec2.xml.DescribeImagesResponseHandler; +import org.jclouds.ec2.xml.ImageIdHandler; +import org.jclouds.ec2.xml.PermissionHandler; +import org.jclouds.ec2.xml.ProductCodesHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; @@ -58,6 +57,8 @@ import org.jclouds.rest.annotations.VirtualHost; import org.jclouds.rest.annotations.XMLResponseParser; import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404; +import com.google.common.util.concurrent.ListenableFuture; + /** * Provides access to AMI Services. *

diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AMIClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/AMIClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java index 526d7ad0da..9e621fcbc2 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AMIClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Map; import java.util.Set; @@ -25,13 +25,13 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.Permission; -import org.jclouds.aws.ec2.domain.Image.EbsBlockDevice; -import org.jclouds.aws.ec2.options.CreateImageOptions; -import org.jclouds.aws.ec2.options.DescribeImagesOptions; -import org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions; -import org.jclouds.aws.ec2.options.RegisterImageOptions; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.domain.Permission; +import org.jclouds.ec2.domain.Image.EbsBlockDevice; +import org.jclouds.ec2.options.CreateImageOptions; +import org.jclouds.ec2.options.DescribeImagesOptions; +import org.jclouds.ec2.options.RegisterImageBackedByEbsOptions; +import org.jclouds.ec2.options.RegisterImageOptions; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionAsyncClient.java similarity index 83% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionAsyncClient.java index 0684fda90d..461a5dc574 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.net.URI; import java.util.Map; @@ -30,13 +30,13 @@ import javax.annotation.Nullable; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo; -import org.jclouds.aws.ec2.options.DescribeAvailabilityZonesOptions; -import org.jclouds.aws.ec2.options.DescribeRegionsOptions; -import org.jclouds.aws.ec2.xml.DescribeAvailabilityZonesResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeRegionsResponseHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.domain.AvailabilityZoneInfo; +import org.jclouds.ec2.options.DescribeAvailabilityZonesOptions; +import org.jclouds.ec2.options.DescribeRegionsOptions; +import org.jclouds.ec2.xml.DescribeAvailabilityZonesResponseHandler; +import org.jclouds.ec2.xml.DescribeRegionsResponseHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.rest.annotations.ExceptionParser; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java index be921398a4..1bab270604 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.net.URI; import java.util.Map; @@ -26,9 +26,9 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo; -import org.jclouds.aws.ec2.options.DescribeAvailabilityZonesOptions; -import org.jclouds.aws.ec2.options.DescribeRegionsOptions; +import org.jclouds.ec2.domain.AvailabilityZoneInfo; +import org.jclouds.ec2.options.DescribeAvailabilityZonesOptions; +import org.jclouds.ec2.options.DescribeRegionsOptions; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticBlockStoreAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreAsyncClient.java similarity index 88% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticBlockStoreAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreAsyncClient.java index 4edb7be69d..bcbb2289fa 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticBlockStoreAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; @@ -29,25 +29,25 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindUserGroupsToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindUserIdsToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindVolumeIdsToIndexedFormParams; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.Permission; -import org.jclouds.aws.ec2.domain.Snapshot; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.functions.ReturnVoidOnVolumeAvailable; -import org.jclouds.aws.ec2.options.CreateSnapshotOptions; -import org.jclouds.aws.ec2.options.DescribeSnapshotsOptions; -import org.jclouds.aws.ec2.options.DetachVolumeOptions; -import org.jclouds.aws.ec2.xml.AttachmentHandler; -import org.jclouds.aws.ec2.xml.CreateVolumeResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeSnapshotsResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeVolumesResponseHandler; -import org.jclouds.aws.ec2.xml.PermissionHandler; -import org.jclouds.aws.ec2.xml.SnapshotHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindUserGroupsToIndexedFormParams; +import org.jclouds.ec2.binders.BindUserIdsToIndexedFormParams; +import org.jclouds.ec2.binders.BindVolumeIdsToIndexedFormParams; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.Permission; +import org.jclouds.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.functions.ReturnVoidOnVolumeAvailable; +import org.jclouds.ec2.options.CreateSnapshotOptions; +import org.jclouds.ec2.options.DescribeSnapshotsOptions; +import org.jclouds.ec2.options.DetachVolumeOptions; +import org.jclouds.ec2.xml.AttachmentHandler; +import org.jclouds.ec2.xml.CreateVolumeResponseHandler; +import org.jclouds.ec2.xml.DescribeSnapshotsResponseHandler; +import org.jclouds.ec2.xml.DescribeVolumesResponseHandler; +import org.jclouds.ec2.xml.PermissionHandler; +import org.jclouds.ec2.xml.SnapshotHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.location.functions.ZoneToEndpoint; import org.jclouds.rest.annotations.BinderParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticBlockStoreClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticBlockStoreClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java index df7131aecc..a7e695a04d 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticBlockStoreClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java @@ -17,20 +17,20 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.Permission; -import org.jclouds.aws.ec2.domain.Snapshot; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.options.CreateSnapshotOptions; -import org.jclouds.aws.ec2.options.DescribeSnapshotsOptions; -import org.jclouds.aws.ec2.options.DetachVolumeOptions; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.Permission; +import org.jclouds.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.options.CreateSnapshotOptions; +import org.jclouds.ec2.options.DescribeSnapshotsOptions; +import org.jclouds.ec2.options.DetachVolumeOptions; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticIPAddressAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressAsyncClient.java similarity index 89% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticIPAddressAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressAsyncClient.java index f3bac7ad08..c1590cdc9d 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticIPAddressAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; @@ -29,12 +29,12 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindPublicIpsToIndexedFormParams; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; -import org.jclouds.aws.ec2.xml.AllocateAddressResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeAddressesResponseHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindPublicIpsToIndexedFormParams; +import org.jclouds.ec2.domain.PublicIpInstanceIdPair; +import org.jclouds.ec2.xml.AllocateAddressResponseHandler; +import org.jclouds.ec2.xml.DescribeAddressesResponseHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticIPAddressClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticIPAddressClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java index 39e27243b8..598feaec3f 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/ElasticIPAddressClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Set; import java.util.concurrent.TimeUnit; @@ -25,8 +25,8 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; import org.jclouds.aws.AWSResponseException; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.concurrent.Timeout; +import org.jclouds.ec2.domain.PublicIpInstanceIdPair; /** * Provides access to EC2 via their REST API. @@ -123,4 +123,4 @@ public interface ElasticIPAddressClient { Set describeAddressesInRegion(@Nullable String region, String... publicIps); -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/InstanceAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/InstanceAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java index bce92c0962..79fcb436b3 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/InstanceAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java @@ -17,41 +17,40 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Map; import java.util.Set; -import com.google.common.util.concurrent.ListenableFuture; import javax.annotation.Nullable; import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindBlockDeviceMappingToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindInstanceIdsToIndexedFormParams; -import org.jclouds.aws.ec2.binders.IfNotNullBindAvailabilityZoneToFormParam; -import org.jclouds.aws.ec2.domain.BlockDeviceMapping; -import org.jclouds.aws.ec2.domain.InstanceStateChange; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; -import org.jclouds.aws.ec2.functions.ConvertUnencodedBytesToBase64EncodedString; -import org.jclouds.aws.ec2.options.RunInstancesOptions; -import org.jclouds.aws.ec2.xml.BlockDeviceMappingHandler; -import org.jclouds.aws.ec2.xml.BooleanValueHandler; -import org.jclouds.aws.ec2.xml.DescribeInstancesResponseHandler; -import org.jclouds.aws.ec2.xml.InstanceInitiatedShutdownBehaviorHandler; -import org.jclouds.aws.ec2.xml.InstanceStateChangeHandler; -import org.jclouds.aws.ec2.xml.InstanceTypeHandler; -import org.jclouds.aws.ec2.xml.RunInstancesResponseHandler; -import org.jclouds.aws.ec2.xml.StringValueHandler; -import org.jclouds.aws.ec2.xml.UnencodeStringValueHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindBlockDeviceMappingToIndexedFormParams; +import org.jclouds.ec2.binders.BindInstanceIdsToIndexedFormParams; +import org.jclouds.ec2.binders.IfNotNullBindAvailabilityZoneToFormParam; +import org.jclouds.ec2.domain.BlockDeviceMapping; +import org.jclouds.ec2.domain.InstanceStateChange; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.functions.ConvertUnencodedBytesToBase64EncodedString; +import org.jclouds.ec2.options.RunInstancesOptions; +import org.jclouds.ec2.xml.BlockDeviceMappingHandler; +import org.jclouds.ec2.xml.BooleanValueHandler; +import org.jclouds.ec2.xml.DescribeInstancesResponseHandler; +import org.jclouds.ec2.xml.InstanceInitiatedShutdownBehaviorHandler; +import org.jclouds.ec2.xml.InstanceStateChangeHandler; +import org.jclouds.ec2.xml.InstanceTypeHandler; +import org.jclouds.ec2.xml.RunInstancesResponseHandler; +import org.jclouds.ec2.xml.StringValueHandler; +import org.jclouds.ec2.xml.UnencodeStringValueHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; @@ -63,6 +62,8 @@ import org.jclouds.rest.annotations.VirtualHost; import org.jclouds.rest.annotations.XMLResponseParser; import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404; +import com.google.common.util.concurrent.ListenableFuture; + /** * Provides access to EC2 Instance Services via their REST API. *

diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/InstanceClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/InstanceClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java index 00b465db4d..b7fcdbc1f1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/InstanceClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Map; import java.util.Set; @@ -25,10 +25,10 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.*; -import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; -import org.jclouds.aws.ec2.options.RunInstancesOptions; +import org.jclouds.ec2.domain.*; +import org.jclouds.ec2.domain.RunningInstance.EbsBlockDevice; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.options.RunInstancesOptions; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/KeyPairAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java similarity index 87% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/KeyPairAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java index 6be04ec18c..4a3d2b5c3b 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/KeyPairAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; @@ -29,12 +29,12 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindKeyNamesToIndexedFormParams; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.xml.DescribeKeyPairsResponseHandler; -import org.jclouds.aws.ec2.xml.KeyPairResponseHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindKeyNamesToIndexedFormParams; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.xml.DescribeKeyPairsResponseHandler; +import org.jclouds.ec2.xml.KeyPairResponseHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/KeyPairClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/KeyPairClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java index cfe9d36857..40fd79dfa4 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/KeyPairClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/MonitoringAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/MonitoringAsyncClient.java similarity index 87% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/MonitoringAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/MonitoringAsyncClient.java index 805d9d5fdc..6e3264d3c1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/MonitoringAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/MonitoringAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Map; @@ -29,11 +29,11 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindInstanceIdsToIndexedFormParams; -import org.jclouds.aws.ec2.domain.MonitoringState; -import org.jclouds.aws.ec2.xml.MonitoringStateHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindInstanceIdsToIndexedFormParams; +import org.jclouds.ec2.domain.MonitoringState; +import org.jclouds.ec2.xml.MonitoringStateHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/MonitoringClient.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/MonitoringClient.java index 7a9f5d6057..a9b11bfae5 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/MonitoringClient.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.MonitoringState; +import org.jclouds.ec2.domain.MonitoringState; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/PlacementGroupAsyncClient.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/PlacementGroupAsyncClient.java index 0e6f3547b1..a5f431cf88 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/PlacementGroupAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; @@ -29,11 +29,11 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindGroupNamesToIndexedFormParams; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.xml.DescribePlacementGroupsResponseHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindGroupNamesToIndexedFormParams; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.xml.DescribePlacementGroupsResponseHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/PlacementGroupClient.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/PlacementGroupClient.java index ff0f47d84b..4e07ee137c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/PlacementGroupClient.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup; import org.jclouds.concurrent.Timeout; /** @@ -94,4 +94,4 @@ public interface PlacementGroupClient { */ Set describePlacementGroupsInRegion(@Nullable String region, String... groupNames); -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/SecurityGroupAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java similarity index 90% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/SecurityGroupAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java index 94020ef73a..e690603d34 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/SecurityGroupAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; @@ -29,14 +29,14 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindGroupNamesToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindUserIdGroupPairToSourceSecurityGroupFormParams; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; -import org.jclouds.aws.ec2.xml.DescribeSecurityGroupsResponseHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindGroupNamesToIndexedFormParams; +import org.jclouds.ec2.binders.BindUserIdGroupPairToSourceSecurityGroupFormParams; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.SecurityGroup; +import org.jclouds.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.xml.DescribeSecurityGroupsResponseHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/SecurityGroupClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/SecurityGroupClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java index 1bcb95c024..f0482620d8 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/SecurityGroupClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.SecurityGroup; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.concurrent.Timeout; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/WindowsAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java similarity index 85% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/WindowsAsyncClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java index 59bda662a3..a7c602faad 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/WindowsAsyncClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; @@ -29,14 +29,14 @@ import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.binders.BindBundleIdsToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindS3UploadPolicyAndSignature; -import org.jclouds.aws.ec2.domain.BundleTask; -import org.jclouds.aws.ec2.options.BundleInstanceS3StorageOptions; -import org.jclouds.aws.ec2.xml.BundleTaskHandler; -import org.jclouds.aws.ec2.xml.DescribeBundleTasksResponseHandler; import org.jclouds.aws.filters.FormSigner; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.binders.BindBundleIdsToIndexedFormParams; +import org.jclouds.ec2.binders.BindS3UploadPolicyAndSignature; +import org.jclouds.ec2.domain.BundleTask; +import org.jclouds.ec2.options.BundleInstanceS3StorageOptions; +import org.jclouds.ec2.xml.BundleTaskHandler; +import org.jclouds.ec2.xml.DescribeBundleTasksResponseHandler; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; import org.jclouds.rest.annotations.BinderParam; import org.jclouds.rest.annotations.EndpointParam; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/services/WindowsClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/services/WindowsClient.java rename to apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java index ec5b24a141..8b9a7a62f0 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/services/WindowsClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.util.Set; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; -import org.jclouds.aws.ec2.domain.BundleTask; -import org.jclouds.aws.ec2.options.BundleInstanceS3StorageOptions; +import org.jclouds.ec2.domain.BundleTask; +import org.jclouds.ec2.options.BundleInstanceS3StorageOptions; import org.jclouds.concurrent.Timeout; /** @@ -110,4 +110,4 @@ public interface WindowsClient { * /> */ Set describeBundleTasksInRegion(@Nullable String region, String... bundleTaskIds); -} \ No newline at end of file +} diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/util/EC2Utils.java b/apis/ec2/src/main/java/org/jclouds/ec2/util/EC2Utils.java new file mode 100644 index 0000000000..7e5c6e6117 --- /dev/null +++ b/apis/ec2/src/main/java/org/jclouds/ec2/util/EC2Utils.java @@ -0,0 +1,83 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * 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.ec2.util; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.services.InstanceClient; +import org.jclouds.rest.internal.GeneratedHttpRequest; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Iterables; + +/** + * + * @author Adrian Cole + */ +public class EC2Utils { + public static String[] getAvailabilityZonesForRegion(String region) { + Set availabilityZones = new HashSet(); + for (String az : AvailabilityZone.zones) { + if (az.startsWith(region)) + availabilityZones.add(az); + } + + return (String[]) availabilityZones.toArray(new String[availabilityZones.size()]); + } + + public static Iterable getAllRunningInstancesInRegion(InstanceClient client, String region, + String id) { + return Iterables.concat(client.describeInstancesInRegion(region, id)); + } + + public static String findAvailabilityZoneInArgsOrNull(GeneratedHttpRequest gRequest) { + for (Object arg : gRequest.getArgs()) { + if (arg instanceof String) { + String zone = (String) arg; + if (AvailabilityZone.zones.contains(zone)) + return zone; + } + } + return null; + } + + private static final Pattern ELB_PATTERN = Pattern.compile("([^.]+)-[^.]+\\.([^.]+)\\.elb\\.amazonaws\\.com"); + + public static Map getLoadBalancerNameAndRegionFromDnsName(String dnsName) { + Matcher matcher = ELB_PATTERN.matcher(checkNotNull(dnsName, "dnsName")); + checkArgument(matcher.find(), "dnsName syntax is " + ELB_PATTERN + " didn't match: " + dnsName); + String loadBalancerName = matcher.group(1); + String regionName = matcher.group(2); + checkArgument((AWSUtils.isRegion(regionName)), + String.format("Region (%s) parsed from (%s) is not a valid region", regionName, dnsName)); + return ImmutableMap. of(regionName, loadBalancerName); + } +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/AllocateAddressResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/AllocateAddressResponseHandler.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/AllocateAddressResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/AllocateAddressResponseHandler.java index 8e68d7edb6..632e0e661c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/AllocateAddressResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/AllocateAddressResponseHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import javax.annotation.Resource; @@ -56,4 +56,4 @@ public class AllocateAddressResponseHandler extends HandlerWithResult { return ipAddress; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/AttachmentHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/AttachmentHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java index f21a6fe4d0..d6fb0b9566 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/AttachmentHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Date; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -57,7 +57,7 @@ public class AttachmentHandler extends ParseSax.HandlerForGeneratedRequestWithRe private Date attachTime; public Attachment getResult() { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; return new Attachment(region, volumeId, instanceId, device, attachmentStatus, attachTime); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java index 7cbec53912..84c5181ab6 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BaseReservationHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Date; import java.util.Map; @@ -26,13 +26,13 @@ import java.util.Set; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.MonitoringState; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RootDeviceType; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.MonitoringState; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult; import org.jclouds.location.Region; @@ -237,7 +237,7 @@ public abstract class BaseReservationHandler extends HandlerForGeneratedReque this.attachTime = null; this.deleteOnTermination = true; } else if (inInstances && !inProductCodes && !inBlockDeviceMapping) { - String region = getRequest() != null ? EC2Utils.findRegionInArgsOrNull(getRequest()) : null; + String region = getRequest() != null ? AWSUtils.findRegionInArgsOrNull(getRequest()) : null; // Eucalyptus if (ipAddress == null && dnsName != null && dnsName.matches(".*[0-9]$")) { @@ -290,7 +290,7 @@ public abstract class BaseReservationHandler extends HandlerForGeneratedReque } protected Reservation newReservation() { - String region = getRequest() != null ? EC2Utils.findRegionInArgsOrNull(getRequest()) : null; + String region = getRequest() != null ? AWSUtils.findRegionInArgsOrNull(getRequest()) : null; if (region == null) region = defaultRegion; Reservation info = new Reservation(region, groupIds, instances, @@ -303,4 +303,4 @@ public abstract class BaseReservationHandler extends HandlerForGeneratedReque return info; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BlockDeviceMappingHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/BlockDeviceMappingHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java index e0eddaa6db..350d362203 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BlockDeviceMappingHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Date; import java.util.Map; import com.google.inject.Inject; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.RunningInstance.EbsBlockDevice; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BooleanValueHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/BooleanValueHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java index 91d714de8d..fd663c21b0 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BooleanValueHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import org.jclouds.http.functions.ParseSax; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BundleTaskHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/BundleTaskHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java index 906c0593a5..088c68a8f8 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/BundleTaskHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Date; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.BundleTask; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.domain.BundleTask; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -54,7 +54,7 @@ public class BundleTaskHandler extends ParseSax.HandlerForGeneratedRequestWithRe private Date updateTime; public BundleTask getResult() { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; BundleTask.Error error = null; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/CreateVolumeResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/CreateVolumeResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java index 0c84290150..30594e0ad8 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/CreateVolumeResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static com.google.common.base.Preconditions.checkNotNull; @@ -28,9 +28,10 @@ import java.util.Set; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; @@ -160,7 +161,7 @@ public class CreateVolumeResponseHandler extends @Override public CreateVolumeResponseHandler setContext(HttpRequest request) { super.setContext(request); - region = EC2Utils.findRegionInArgsOrNull(getRequest()); + region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) { String zone = EC2Utils.findAvailabilityZoneInArgsOrNull(getRequest()); if (zone != null) { diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeAddressesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeAddressesResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java index 9a13385f82..f9d168e6e5 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeAddressesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult; import org.jclouds.location.Region; import org.jclouds.logging.Logger; @@ -60,7 +60,7 @@ public class DescribeAddressesResponseHandler extends } else if (qName.equals("instanceId")) { instanceId = currentOrNull(); } else if (qName.equals("item")) { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; pairs.add(new PublicIpInstanceIdPair(region, ipAddress, instanceId)); @@ -79,4 +79,4 @@ public class DescribeAddressesResponseHandler extends return pairs; } -} \ No newline at end of file +} diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeAvailabilityZonesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeAvailabilityZonesResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java index 10e20eebc6..3d583b310d 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeAvailabilityZonesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo; +import org.jclouds.ec2.domain.AvailabilityZoneInfo; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; import org.jclouds.logging.Logger; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeBundleTasksResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandler.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeBundleTasksResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandler.java index 5d108e71b0..15a92f21f1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeBundleTasksResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandler.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.BundleTask; +import org.jclouds.ec2.domain.BundleTask; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.HandlerWithResult; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeImagesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java old mode 100755 new mode 100644 similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeImagesResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java index 44e6f154be..44cd74eab2 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeImagesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Map; import java.util.Set; @@ -25,13 +25,13 @@ import java.util.Set; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.RootDeviceType; -import org.jclouds.aws.ec2.domain.Image.Architecture; -import org.jclouds.aws.ec2.domain.Image.EbsBlockDevice; -import org.jclouds.aws.ec2.domain.Image.ImageState; -import org.jclouds.aws.ec2.domain.Image.ImageType; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.Image.Architecture; +import org.jclouds.ec2.domain.Image.EbsBlockDevice; +import org.jclouds.ec2.domain.Image.ImageState; +import org.jclouds.ec2.domain.Image.ImageType; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; import org.jclouds.logging.Logger; @@ -160,7 +160,7 @@ public class DescribeImagesResponseHandler extends ParseSax.HandlerForGeneratedR this.deleteOnTermination = true; } else if (!inProductCodes) { try { - String region = getRequest() != null ? EC2Utils.findRegionInArgsOrNull(getRequest()) : null; + String region = getRequest() != null ? AWSUtils.findRegionInArgsOrNull(getRequest()) : null; if (region == null) region = defaultRegion; contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation, diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandler.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandler.java index 266b599a5b..57fc65e789 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandler.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.date.DateService; import org.jclouds.location.Region; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeKeyPairsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java similarity index 92% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeKeyPairsResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java index 719b359ba5..4a4d74de7c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeKeyPairsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -57,7 +57,7 @@ public class DescribeKeyPairsResponseHandler extends if (qName.equals("keyFingerprint")) { this.keyFingerprint = currentText.toString().trim(); } else if (qName.equals("item")) { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; keyPairs.add(new KeyPair(region, keyName, keyFingerprint, null)); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribePlacementGroupsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribePlacementGroupsResponseHandler.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribePlacementGroupsResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribePlacementGroupsResponseHandler.java index 7596b05957..38f6484a45 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribePlacementGroupsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribePlacementGroupsResponseHandler.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.HandlerWithResult; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeRegionsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeRegionsResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java index 6d956ca5ed..ca3f8db3f0 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeRegionsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.net.URI; import java.util.Map; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java index 9aca21989f..9b3f2b1590 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeReservedInstancesOfferingResponseHandler.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.ReservedInstancesOffering; +import org.jclouds.ec2.domain.ReservedInstancesOffering; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.HandlerWithResult; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeSecurityGroupsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandler.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeSecurityGroupsResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandler.java index c4e0e6f3db..a3dba9d8d4 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeSecurityGroupsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandler.java @@ -17,17 +17,17 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.IpPermission; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.IpPermission; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.SecurityGroup; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; import org.xml.sax.Attributes; @@ -118,7 +118,7 @@ public class DescribeSecurityGroupsResponseHandler extends this.userId = null; this.userIdGroupName = null; } else if (!inIpPermissions && !inIpRanges && !inGroups) { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; securtyGroups.add(new SecurityGroup(region, groupName, ownerId, groupDescription, diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeSnapshotsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandler.java similarity index 96% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeSnapshotsResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandler.java index 6fdb5055f6..caacf65234 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeSnapshotsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandler.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Snapshot; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.xml.sax.Attributes; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeVolumesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandler.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeVolumesResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandler.java index 67687ef960..b9eac65c1a 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/DescribeVolumesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandler.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Volume; +import org.jclouds.ec2.domain.Volume; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.xml.sax.Attributes; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/ImageIdHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/ImageIdHandler.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/ImageIdHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/ImageIdHandler.java index ef7f174510..835d5fd8be 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/ImageIdHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/ImageIdHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import org.jclouds.http.functions.ParseSax; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java index b7aa37c349..10fc0a3748 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java @@ -17,9 +17,9 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; import org.jclouds.http.functions.ParseSax; /** diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceStateChangeHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceStateChangeHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java index 8e12ed0faf..ba38757fbf 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceStateChangeHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.InstanceStateChange; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.InstanceStateChange; import org.jclouds.http.functions.ParseSax.HandlerForGeneratedRequestWithResult; import org.jclouds.location.Region; import org.xml.sax.Attributes; @@ -91,7 +91,7 @@ public class InstanceStateChangeHandler extends previousState = InstanceState.fromValue(currentOrNull()); } } else if (qName.equals("item")) { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; instances.add(new InstanceStateChange(region, instanceId, shutdownState, previousState)); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceTypeHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceTypeHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java index 2c33825f75..7efe8e4aab 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/InstanceTypeHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import org.jclouds.http.functions.ParseSax; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/KeyPairResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java old mode 100755 new mode 100644 similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/KeyPairResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java index cb883ab2a6..9b2c7add67 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/KeyPairResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -43,7 +43,7 @@ public class KeyPairResponseHandler extends ParseSax.HandlerForGeneratedRequestW private String keyName; public KeyPair getResult() { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; return new KeyPair(region, keyName, keyFingerprint, keyMaterial); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/MonitoringStateHandler.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/MonitoringStateHandler.java index 9e6e6626b6..cfa7e8ec60 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/MonitoringStateHandler.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Map; -import org.jclouds.aws.ec2.domain.MonitoringState; +import org.jclouds.ec2.domain.MonitoringState; import org.jclouds.http.functions.ParseSax; import com.google.common.collect.Maps; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/PermissionHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java similarity index 95% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/PermissionHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java index e62f9f7e37..96ac76b27e 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/PermissionHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; -import org.jclouds.aws.ec2.domain.Permission; +import org.jclouds.ec2.domain.Permission; import org.jclouds.http.functions.ParseSax; import com.google.common.collect.Sets; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/PlacementGroupHandler.java similarity index 89% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/PlacementGroupHandler.java index 92179f2a83..ce2cc6cf66 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/PlacementGroupHandler.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.domain.PlacementGroup.State; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup.State; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -47,7 +47,7 @@ public class PlacementGroupHandler extends private State state; public PlacementGroup getResult() { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; PlacementGroup returnVal = new PlacementGroup(region, name, strategy, state); diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/ProductCodesHandler.java similarity index 98% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/ProductCodesHandler.java index 6f9e76722d..820fe74ad1 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/ProductCodesHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Set; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/ReservedInstancesOfferingHandler.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/ReservedInstancesOfferingHandler.java index a6a4d70b8f..f29c1fb567 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/ReservedInstancesOfferingHandler.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.ReservedInstancesOffering; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; +import org.jclouds.ec2.domain.ReservedInstancesOffering; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -49,7 +49,7 @@ public class ReservedInstancesOfferingHandler extends private float usagePrice = 0; public ReservedInstancesOffering getResult() { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/RunInstancesResponseHandler.java similarity index 91% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/RunInstancesResponseHandler.java index e0cdd9e5d8..5188ae029c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/RunInstancesResponseHandler.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.date.DateService; import org.jclouds.location.Region; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/SnapshotHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java similarity index 93% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/SnapshotHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java index 00216839d3..0515c1a5e8 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/SnapshotHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Date; import javax.inject.Inject; -import org.jclouds.aws.ec2.domain.Snapshot; -import org.jclouds.aws.ec2.domain.Snapshot.Status; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Snapshot.Status; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.location.Region; @@ -57,7 +57,7 @@ public class SnapshotHandler extends ParseSax.HandlerForGeneratedRequestWithResu } public Snapshot getResult() { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion; Snapshot snapshot = new Snapshot(region, id, volumeId, volumeSize, status, startTime, diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/StringValueHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/StringValueHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java index 88ab985780..499c0a8755 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/StringValueHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import org.jclouds.http.functions.ParseSax; diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/UnencodeStringValueHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/UnencodeStringValueHandler.java similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/xml/UnencodeStringValueHandler.java rename to apis/ec2/src/main/java/org/jclouds/ec2/xml/UnencodeStringValueHandler.java index c13893aeee..d5f906f44c 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/xml/UnencodeStringValueHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/UnencodeStringValueHandler.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import org.jclouds.crypto.CryptoStreams; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java index cd6caad098..f89a80285d 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/CloudApplicationArchitecturesEC2ClientLiveTest.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.asType; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.asType; import static org.jclouds.scriptbuilder.domain.Statements.exec; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; @@ -36,19 +36,19 @@ import java.util.concurrent.TimeoutException; import org.jclouds.Constants; import org.jclouds.aws.AWSResponseException; -import org.jclouds.aws.ec2.domain.BlockDeviceMapping; -import org.jclouds.aws.ec2.domain.Image.EbsBlockDevice; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; -import org.jclouds.aws.ec2.predicates.InstanceHasIpAddress; -import org.jclouds.aws.ec2.predicates.InstanceStateRunning; import org.jclouds.domain.Credentials; +import org.jclouds.ec2.domain.BlockDeviceMapping; +import org.jclouds.ec2.domain.Image.EbsBlockDevice; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.PublicIpInstanceIdPair; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.predicates.InstanceHasIpAddress; +import org.jclouds.ec2.predicates.InstanceStateRunning; import org.jclouds.http.HttpResponseException; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.net.IPSocket; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java index a68d783746..d8b0439a2d 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/EBSBootEC2ClientLiveTest.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.options.CreateSnapshotOptions.Builder.withDescription; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.imageIds; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.withKernelId; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withKeyName; +import static org.jclouds.ec2.options.CreateSnapshotOptions.Builder.withDescription; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.imageIds; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.withKernelId; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withKeyName; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -37,28 +37,28 @@ import java.util.concurrent.TimeoutException; import org.jclouds.Constants; import org.jclouds.aws.AWSResponseException; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.BlockDeviceMapping; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.Image.Architecture; -import org.jclouds.aws.ec2.domain.Image.ImageType; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RootDeviceType; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.Snapshot; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; -import org.jclouds.aws.ec2.predicates.InstanceStateRunning; -import org.jclouds.aws.ec2.predicates.InstanceStateStopped; -import org.jclouds.aws.ec2.predicates.InstanceStateTerminated; -import org.jclouds.aws.ec2.predicates.SnapshotCompleted; -import org.jclouds.aws.ec2.predicates.VolumeAttached; -import org.jclouds.aws.ec2.predicates.VolumeAvailable; import org.jclouds.domain.Credentials; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.BlockDeviceMapping; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.domain.Image.Architecture; +import org.jclouds.ec2.domain.Image.ImageType; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.predicates.InstanceStateRunning; +import org.jclouds.ec2.predicates.InstanceStateStopped; +import org.jclouds.ec2.predicates.InstanceStateTerminated; +import org.jclouds.ec2.predicates.SnapshotCompleted; +import org.jclouds.ec2.predicates.VolumeAttached; +import org.jclouds.ec2.predicates.VolumeAvailable; import org.jclouds.http.HttpResponseException; import org.jclouds.io.Payloads; import org.jclouds.logging.log4j.config.Log4JLoggingModule; @@ -290,7 +290,7 @@ public class EBSBootEC2ClientLiveTest { "yes| mkfs -t ext3 {varl}EBS_DEVICE{varr} 2>&-", "mount {varl}EBS_DEVICE{varr} {varl}EBS_MOUNT_POINT{varr}", "echo making a local working copy of the boot disk", - "rsync -ax --exclude /ubuntu/.bash_history --exclude /home/*/.bash_history --exclude /etc/ssh/ssh_host_* --exclude /etc/ssh/moduli --exclude /etc/udev/rules.d/*persistent-net.rules --exclude /var/lib/ec2/* --exclude=/mnt/* --exclude=/proc/* --exclude=/tmp/* --exclude=/dev/log / {varl}IMAGE_DIR{varr}", + "rsync -ax --exclude /ubuntu/.bash_history --exclude /home/*/.bash_history --exclude /etc/ssh/ssh_host_* --exclude /etc/ssh/moduli --exclude /etc/udev/rules.d/*persistent-net.rules --exclude /var/lib/* --exclude=/mnt/* --exclude=/proc/* --exclude=/tmp/* --exclude=/dev/log / {varl}IMAGE_DIR{varr}", "echo preparing the local working copy", "touch {varl}IMAGE_DIR{varr}/etc/init.d/ec2-init-user-data", "echo copying the local working copy to the ebs mount", "{cd} {varl}IMAGE_DIR{varr}", diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/EC2AsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/EC2AsyncClientTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/EC2AsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/EC2AsyncClientTest.java index 4af41c438e..52bf7daaa8 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/EC2AsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/EC2AsyncClientTest.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2; +package org.jclouds.ec2; import java.io.IOException; import java.util.concurrent.ExecutionException; -import org.jclouds.aws.ec2.services.BaseEC2AsyncClientTest; +import org.jclouds.ec2.services.BaseEC2AsyncClientTest; import org.jclouds.http.HttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.testng.annotations.BeforeClass; @@ -88,4 +88,4 @@ public class EC2AsyncClientTest extends BaseEC2AsyncClientTest { } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java index 94f659cfdf..e44b786861 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindBlockDeviceMappingToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; @@ -27,9 +27,9 @@ import java.util.Date; import javax.ws.rs.HttpMethod; -import org.jclouds.aws.ec2.domain.Attachment.Status; -import org.jclouds.aws.ec2.domain.BlockDeviceMapping; -import org.jclouds.aws.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Attachment.Status; +import org.jclouds.ec2.domain.BlockDeviceMapping; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.http.HttpRequest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java index 1710ec51dc..49a37e2c58 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindBundleIdsToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java index 12f02d9ddb..c1f7886848 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindGroupNamesToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java index a52b4f8a11..dbc1a93bd7 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindInstanceIdsToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java index 2c1ccbcccb..d3e3394781 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindKeyNamesToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindProductCodesToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindProductCodesToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindProductCodesToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindProductCodesToIndexedFormParamsTest.java index ac719871d5..25d518fae4 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindProductCodesToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindProductCodesToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java index 0753d8b30f..e566a82599 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindPublicIpsToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindS3UploadPolicyAndSignatureTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindS3UploadPolicyAndSignatureTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindS3UploadPolicyAndSignatureTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindS3UploadPolicyAndSignatureTest.java index 04f9dbdd76..dd9fef59c4 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindS3UploadPolicyAndSignatureTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindS3UploadPolicyAndSignatureTest.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; import java.io.IOException; import java.net.URI; -import org.jclouds.aws.ec2.services.BaseEC2AsyncClientTest; -import org.jclouds.aws.ec2.services.InstanceAsyncClient; +import org.jclouds.ec2.services.BaseEC2AsyncClientTest; +import org.jclouds.ec2.services.InstanceAsyncClient; import org.jclouds.http.HttpRequest; import org.jclouds.rest.internal.RestAnnotationProcessor; import org.testng.annotations.BeforeClass; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java index ee240c0da3..232c44ba78 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java index 0aedd5f6db..9880d61d80 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserIdGroupPairToSourceSecurityGroupFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; @@ -26,7 +26,7 @@ import java.net.URI; import javax.ws.rs.HttpMethod; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.http.HttpRequest; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserIdsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserIdsToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserIdsToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserIdsToIndexedFormParamsTest.java index 014e08ece9..b9fe82aff2 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindUserIdsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindUserIdsToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java index 51adc1c952..a69b54d2dc 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindVolumeIdsToIndexedFormParamsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java index ea533d551b..ae84fb41e6 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/IfNotNullBindAvailabilityZoneToFormParamTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.binders; +package org.jclouds.ec2.binders; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertSame; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2ComputeServiceLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2ComputeServiceLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java index 96ec3f041f..61d4ed91c5 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2ComputeServiceLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceLiveTest.java @@ -17,22 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; import java.util.Set; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.services.InstanceClient; -import org.jclouds.aws.ec2.services.KeyPairClient; -import org.jclouds.aws.ec2.services.SecurityGroupClient; import org.jclouds.compute.BaseComputeServiceLiveTest; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.OsFamily; @@ -40,12 +31,22 @@ import org.jclouds.compute.domain.Template; import org.jclouds.compute.options.TemplateOptions; import org.jclouds.compute.predicates.NodePredicates; import org.jclouds.domain.Credentials; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.SecurityGroup; +import org.jclouds.ec2.services.InstanceClient; +import org.jclouds.ec2.services.KeyPairClient; +import org.jclouds.ec2.services.SecurityGroupClient; import org.jclouds.ssh.jsch.config.JschSshClientModule; import org.testng.annotations.Test; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; +import com.google.inject.Module; /** * @@ -59,7 +60,7 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest { } @Override - protected JschSshClientModule getSshModule() { + protected Module getSshModule() { return new JschSshClientModule(); } diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2ComputeServiceTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2ComputeServiceTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceTest.java index d8a245d2ff..94ee391d30 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2ComputeServiceTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -29,8 +29,8 @@ import java.util.concurrent.ExecutorService; import javax.inject.Provider; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.services.PlacementGroupClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.services.PlacementGroupClient; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.reference.ComputeServiceConstants.Timeouts; import org.jclouds.compute.strategy.DestroyNodeStrategy; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2TemplateBuilderLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2TemplateBuilderLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java index faf7bbdb86..bd0a039a1b 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2TemplateBuilderLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; @@ -25,8 +25,8 @@ import static org.testng.Assert.assertEquals; import java.io.IOException; import java.util.Properties; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.reference.EC2Constants; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.reference.EC2Constants; import org.jclouds.compute.BaseTemplateBuilderLiveTest; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.ComputeServiceContextFactory; @@ -166,4 +166,4 @@ public class EC2TemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { } } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2TemplateBuilderTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java similarity index 89% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2TemplateBuilderTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java index eef51ab004..0a379d03bd 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EC2TemplateBuilderTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2TemplateBuilderTest.java @@ -17,22 +17,22 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static java.lang.String.format; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; import static org.easymock.classextension.EasyMock.replay; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.c1_medium; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_large; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_small; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m2_xlarge; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.t1_micro; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_xlarge; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.t1_micro; import static org.testng.Assert.assertEquals; import java.util.Set; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java index 48471cb0f4..874b92d828 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/EucalyptusComputeServiceLiveTestDisabled.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/NovaComputeServiceLiveTestDisabled.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/NovaComputeServiceLiveTestDisabled.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/NovaComputeServiceLiveTestDisabled.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/NovaComputeServiceLiveTestDisabled.java index c9bbf14e46..4c660c7a6b 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/NovaComputeServiceLiveTestDisabled.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/NovaComputeServiceLiveTestDisabled.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java index db4455789e..8c7d935055 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/NovaTemplateBuilderLiveTestDisabled.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static com.google.common.base.Preconditions.checkNotNull; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; @@ -27,7 +27,7 @@ import java.io.IOException; import java.util.Properties; import org.jclouds.Constants; -import org.jclouds.aws.ec2.reference.EC2Constants; +import org.jclouds.ec2.reference.EC2Constants; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.ComputeServiceContextFactory; import org.jclouds.compute.domain.OsFamily; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/TestCanRecreateTagLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateTagLiveTest.java similarity index 99% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/TestCanRecreateTagLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateTagLiveTest.java index 4aa74cc027..b60e820ea8 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/TestCanRecreateTagLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/TestCanRecreateTagLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute; +package org.jclouds.ec2.compute; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/CreateUniqueKeyPairTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/CreateUniqueKeyPairTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/CreateUniqueKeyPairTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/CreateUniqueKeyPairTest.java index b3326d18a5..368c1b2d57 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/CreateUniqueKeyPairTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/CreateUniqueKeyPairTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,9 +27,9 @@ import static org.testng.Assert.assertEquals; import java.net.UnknownHostException; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.services.KeyPairClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.services.KeyPairClient; import org.testng.annotations.Test; import com.google.common.base.Supplier; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/CredentialsForInstanceTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/CredentialsForInstanceTest.java similarity index 99% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/CredentialsForInstanceTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/CredentialsForInstanceTest.java index cac397345c..cb3963230a 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/CredentialsForInstanceTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/CredentialsForInstanceTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import org.jclouds.date.DateService; import org.jclouds.date.internal.SimpleDateFormatDateService; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/ImageParserTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/ImageParserTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/ImageParserTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/ImageParserTest.java index 37bd9e3fad..84a1389205 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/ImageParserTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/ImageParserTest.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static org.testng.Assert.assertEquals; import java.util.Map; import java.util.Set; -import org.jclouds.aws.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.xml.DescribeImagesResponseHandlerTest; +import org.jclouds.ec2.compute.strategy.EC2PopulateDefaultLoginCredentialsForImageStrategy; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.xml.DescribeImagesResponseHandlerTest; import org.jclouds.compute.config.BaseComputeServiceContextModule; import org.jclouds.compute.domain.ImageBuilder; import org.jclouds.compute.domain.OperatingSystemBuilder; @@ -56,7 +56,7 @@ import com.google.inject.Guice; public class ImageParserTest { public void testParseAlesticCanonicalImage() { - Set result = convertImages("/ec2/alestic_canonical.xml"); + Set result = convertImages("/alestic_canonical.xml"); assertEquals( Iterables.get(result, 0), @@ -97,7 +97,7 @@ public class ImageParserTest { public void testParseVostokImage() { - Set result = convertImages("/ec2/vostok.xml"); + Set result = convertImages("/vostok.xml"); assertEquals( Iterables.get(result, 0), @@ -115,7 +115,7 @@ public class ImageParserTest { public void testParseCCImage() { - Set result = convertImages("/ec2/describe_images_cc.xml"); + Set result = convertImages("/describe_images_cc.xml"); assertEquals( Iterables.get(result, 0), @@ -131,7 +131,7 @@ public class ImageParserTest { public void testParseRightScaleImage() { - Set result = convertImages("/ec2/rightscale_images.xml"); + Set result = convertImages("/rightscale_images.xml"); assertEquals( Iterables.get(result, 0), @@ -155,7 +155,7 @@ public class ImageParserTest { public void testParseEucalyptusImage() { - Set result = convertImages("/ec2/eucalyptus_images.xml"); + Set result = convertImages("/eucalyptus_images.xml"); assertEquals( Iterables.get(result, 0), @@ -171,7 +171,7 @@ public class ImageParserTest { public void testParseAmznImage() { - Set result = convertImages("/ec2/amzn_images.xml"); + Set result = convertImages("/amzn_images.xml"); assertEquals( Iterables.get(result, 0), @@ -199,7 +199,7 @@ public class ImageParserTest { public void testParseNovaImage() { - Set result = convertImages("/ec2/nova_images.xml"); + Set result = convertImages("/nova_images.xml"); assertEquals( new Gson().toJson(Iterables.get(result, 0)), diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/RegionAndIdToImageTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RegionAndIdToImageTest.java similarity index 80% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/RegionAndIdToImageTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RegionAndIdToImageTest.java index aa754ba655..5fa8aa85a5 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/RegionAndIdToImageTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RegionAndIdToImageTest.java @@ -17,22 +17,22 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; import static org.easymock.classextension.EasyMock.createNiceMock; import static org.easymock.classextension.EasyMock.replay; import static org.easymock.classextension.EasyMock.verify; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.imageIds; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.imageIds; import static org.testng.Assert.assertEquals; import java.util.NoSuchElementException; import java.util.Set; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.services.AMIClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.services.AMIClient; import org.jclouds.compute.domain.Image; import org.jclouds.rest.ResourceNotFoundException; import org.testng.annotations.Test; @@ -52,10 +52,10 @@ public class RegionAndIdToImageTest { ImageParser parser = createMock(ImageParser.class); EC2Client caller = createMock(EC2Client.class); AMIClient client = createMock(AMIClient.class); - org.jclouds.aws.ec2.domain.Image ec2Image = createMock(org.jclouds.aws.ec2.domain.Image.class); + org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class); Image image = createNiceMock(Image.class); - Set images = ImmutableSet - . of(ec2Image); + Set images = ImmutableSet + . of(ec2Image); expect(caller.getAMIServices()).andReturn(client).atLeastOnce(); expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images); @@ -84,10 +84,10 @@ public class RegionAndIdToImageTest { ImageParser parser = createMock(ImageParser.class); EC2Client caller = createMock(EC2Client.class); AMIClient client = createMock(AMIClient.class); - org.jclouds.aws.ec2.domain.Image ec2Image = createMock(org.jclouds.aws.ec2.domain.Image.class); + org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class); Image image = createNiceMock(Image.class); - Set images = ImmutableSet - . of(ec2Image); + Set images = ImmutableSet + . of(ec2Image); expect(caller.getAMIServices()).andReturn(client).atLeastOnce(); expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images); @@ -116,10 +116,10 @@ public class RegionAndIdToImageTest { ImageParser parser = createMock(ImageParser.class); EC2Client caller = createMock(EC2Client.class); AMIClient client = createMock(AMIClient.class); - org.jclouds.aws.ec2.domain.Image ec2Image = createMock(org.jclouds.aws.ec2.domain.Image.class); + org.jclouds.ec2.domain.Image ec2Image = createMock(org.jclouds.ec2.domain.Image.class); Image image = createNiceMock(Image.class); - Set images = ImmutableSet - . of(ec2Image); + Set images = ImmutableSet + . of(ec2Image); expect(caller.getAMIServices()).andReturn(client).atLeastOnce(); expect(client.describeImagesInRegion("region", imageIds("ami"))).andReturn((Set) images); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java index d4197e727a..f1406e49df 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadataTest.java @@ -17,20 +17,20 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.functions; +package org.jclouds.ec2.compute.functions; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.m1_small; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small; import static org.testng.Assert.assertEquals; import java.net.UnknownHostException; import java.util.Map; import java.util.Set; -import org.jclouds.aws.ec2.compute.config.EC2ComputeServiceDependenciesModule; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.xml.DescribeInstancesResponseHandlerTest; +import org.jclouds.ec2.compute.config.EC2ComputeServiceDependenciesModule; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.xml.DescribeInstancesResponseHandlerTest; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.NodeMetadataBuilder; @@ -80,7 +80,7 @@ public class RunningInstanceToNodeMetadataTest { . of(), ImmutableSet. of(), ImmutableMap. of( "node#us-east-1/i-9slweygo", creds)); - RunningInstance server = firstInstanceFromResource("/ec2/describe_instances_nova.xml"); + RunningInstance server = firstInstanceFromResource("/describe_instances_nova.xml"); assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.TERMINATED).publicAddresses( ImmutableSet. of()).privateAddresses(ImmutableSet.of("10.128.207.5")).tag("NOTAG-i-9slweygo") @@ -93,7 +93,7 @@ public class RunningInstanceToNodeMetadataTest { RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet. of(), ImmutableSet . of(), ImmutableSet. of(), ImmutableMap. of()); - RunningInstance server = firstInstanceFromResource("/ec2/describe_instances_nova.xml"); + RunningInstance server = firstInstanceFromResource("/describe_instances_nova.xml"); assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.TERMINATED).publicAddresses( ImmutableSet. of()).privateAddresses(ImmutableSet.of("10.128.207.5")).tag("NOTAG-i-9slweygo") @@ -105,7 +105,7 @@ public class RunningInstanceToNodeMetadataTest { RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet. of(), ImmutableSet.of(provider), ImmutableSet. of(), ImmutableMap. of()); - RunningInstance server = firstInstanceFromResource("/ec2/describe_instances_nova.xml"); + RunningInstance server = firstInstanceFromResource("/describe_instances_nova.xml"); assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.TERMINATED).privateAddresses( ImmutableSet.of("10.128.207.5")).tag("NOTAG-i-9slweygo").imageId("us-east-1/ami-25CB1213").id( @@ -115,9 +115,9 @@ public class RunningInstanceToNodeMetadataTest { @Test public void testApplyWhereTagDoesntMatchAndImageAndLocationFoundAndHardwareNotFound() throws UnknownHostException { RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet. of(), ImmutableSet.of(provider), - ImageParserTest.convertImages("/ec2/nova_images.xml"), ImmutableMap. of()); + ImageParserTest.convertImages("/nova_images.xml"), ImmutableMap. of()); - RunningInstance server = firstInstanceFromResource("/ec2/describe_instances_nova.xml"); + RunningInstance server = firstInstanceFromResource("/describe_instances_nova.xml"); assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.TERMINATED).privateAddresses( ImmutableSet.of("10.128.207.5")).tag("NOTAG-i-9slweygo").imageId("us-east-1/ami-25CB1213") @@ -130,10 +130,10 @@ public class RunningInstanceToNodeMetadataTest { @Test public void testApplyWhereTagDoesntMatchAndImageHardwareAndLocationFound() throws UnknownHostException { RunningInstanceToNodeMetadata parser = createNodeParser(ImmutableSet.of(m1_small().build()), ImmutableSet - .of(provider), ImageParserTest.convertImages("/ec2/nova_images.xml"), ImmutableMap + .of(provider), ImageParserTest.convertImages("/nova_images.xml"), ImmutableMap . of()); - RunningInstance server = firstInstanceFromResource("/ec2/describe_instances_nova.xml"); + RunningInstance server = firstInstanceFromResource("/describe_instances_nova.xml"); assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.TERMINATED).privateAddresses( ImmutableSet.of("10.128.207.5")).tag("NOTAG-i-9slweygo").imageId("us-east-1/ami-25CB1213").hardware( @@ -162,7 +162,7 @@ public class RunningInstanceToNodeMetadataTest { .of(provider), ImmutableMap .of(), EC2ComputeServiceDependenciesModule.instanceToNodeState, instanceToImage); - RunningInstance server = firstInstanceFromResource("/ec2/describe_instances_nova.xml"); + RunningInstance server = firstInstanceFromResource("/describe_instances_nova.xml"); assertEquals(parser.apply(server), new NodeMetadataBuilder().state(NodeState.TERMINATED).privateAddresses( ImmutableSet.of("10.128.207.5")).tag("NOTAG-i-9slweygo").imageId("us-east-1/ami-25CB1213").id( diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/internal/EC2TemplateBuilderImplTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImplTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/internal/EC2TemplateBuilderImplTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImplTest.java index fc1cdaa1cd..4c5b906f4c 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/internal/EC2TemplateBuilderImplTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/internal/EC2TemplateBuilderImplTest.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.internal; +package org.jclouds.ec2.compute.internal; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; import static org.easymock.classextension.EasyMock.replay; import static org.easymock.classextension.EasyMock.verify; -import static org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder.c1_medium; +import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_medium; import static org.testng.Assert.assertEquals; import java.util.NoSuchElementException; @@ -32,8 +32,8 @@ import java.util.concurrent.ConcurrentMap; import javax.inject.Provider; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; import org.jclouds.collect.Memoized; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Image; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/options/EC2TemplateOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/options/EC2TemplateOptionsTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/options/EC2TemplateOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/options/EC2TemplateOptionsTest.java index 52f9d25089..070cf275ec 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/options/EC2TemplateOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/options/EC2TemplateOptionsTest.java @@ -17,16 +17,16 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.options; +package org.jclouds.ec2.compute.options; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.authorizePublicKey; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.blockOnPort; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.enableMonitoring; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.inboundPorts; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.installPrivateKey; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.keyPair; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.noKeyPair; -import static org.jclouds.aws.ec2.compute.options.EC2TemplateOptions.Builder.securityGroups; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.authorizePublicKey; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.blockOnPort; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.enableMonitoring; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.inboundPorts; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.installPrivateKey; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.keyPair; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.noKeyPair; +import static org.jclouds.ec2.compute.options.EC2TemplateOptions.Builder.securityGroups; import static org.testng.Assert.assertEquals; import java.io.IOException; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java index dabb8d004c..0afc3b10a9 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -30,20 +30,20 @@ import java.util.Map; import java.util.Set; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.compute.EC2TemplateBuilderTest; -import org.jclouds.aws.ec2.compute.domain.EC2HardwareBuilder; -import org.jclouds.aws.ec2.compute.domain.RegionAndName; -import org.jclouds.aws.ec2.compute.domain.RegionNameAndIngressRules; -import org.jclouds.aws.ec2.compute.functions.CreatePlacementGroupIfNeeded; -import org.jclouds.aws.ec2.compute.functions.CreateSecurityGroupIfNeeded; -import org.jclouds.aws.ec2.compute.functions.CreateUniqueKeyPair; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.options.RunInstancesOptions; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Template; import org.jclouds.compute.options.TemplateOptions; +import org.jclouds.ec2.compute.EC2TemplateBuilderTest; +import org.jclouds.ec2.compute.domain.EC2HardwareBuilder; +import org.jclouds.ec2.compute.domain.RegionAndName; +import org.jclouds.ec2.compute.domain.RegionNameAndIngressRules; +import org.jclouds.ec2.compute.functions.CreatePlacementGroupIfNeeded; +import org.jclouds.ec2.compute.functions.CreateSecurityGroupIfNeeded; +import org.jclouds.ec2.compute.functions.CreateUniqueKeyPair; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.options.RunInstancesOptions; import org.jclouds.encryption.internal.Base64; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java index 4a85843df8..52b77e5c1e 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/EC2RunNodesAndAddToSetStrategyTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.compute.strategy; +package org.jclouds.ec2.compute.strategy; import static org.easymock.EasyMock.eq; import static org.easymock.EasyMock.expect; @@ -31,14 +31,6 @@ import java.util.Set; import org.easymock.IArgumentMatcher; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.compute.functions.RunningInstanceToNodeMetadata; -import org.jclouds.aws.ec2.compute.options.EC2TemplateOptions; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.options.RunInstancesOptions; -import org.jclouds.aws.ec2.services.InstanceClient; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.NodeMetadata; @@ -48,6 +40,14 @@ import org.jclouds.domain.Credentials; import org.jclouds.domain.Location; import org.jclouds.domain.LocationScope; import org.jclouds.domain.internal.LocationImpl; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.compute.functions.RunningInstanceToNodeMetadata; +import org.jclouds.ec2.compute.options.EC2TemplateOptions; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.options.RunInstancesOptions; +import org.jclouds.ec2.services.InstanceClient; import org.testng.annotations.Test; import com.google.common.base.Function; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java index 5060159891..6c19f8c2fe 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/functions/ConvertUnencodedBytesToBase64EncodedStringTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.functions; +package org.jclouds.ec2.functions; import static org.testng.Assert.assertEquals; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/BundleInstanceS3StorageOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/BundleInstanceS3StorageOptionsTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/BundleInstanceS3StorageOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/BundleInstanceS3StorageOptionsTest.java index f9b397d894..a0449dc50f 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/BundleInstanceS3StorageOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/BundleInstanceS3StorageOptionsTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; import static java.util.Collections.EMPTY_LIST; import static java.util.Collections.singleton; -import static org.jclouds.aws.ec2.options.BundleInstanceS3StorageOptions.Builder.bucketOwnedBy; +import static org.jclouds.ec2.options.BundleInstanceS3StorageOptions.Builder.bucketOwnedBy; import static org.testng.Assert.assertEquals; import org.jclouds.http.options.HttpRequestOptions; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/CreateImageOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/CreateImageOptionsTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/CreateImageOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/CreateImageOptionsTest.java index 56f3f5ea2c..09004a1741 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/CreateImageOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/CreateImageOptionsTest.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.CreateImageOptions.Builder.noReboot; -import static org.jclouds.aws.ec2.options.CreateImageOptions.Builder.withDescription; +import static org.jclouds.ec2.options.CreateImageOptions.Builder.noReboot; +import static org.jclouds.ec2.options.CreateImageOptions.Builder.withDescription; import static org.testng.Assert.assertEquals; import java.util.Collections; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/CreateSnapshotOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/CreateSnapshotOptionsTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/CreateSnapshotOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/CreateSnapshotOptionsTest.java index 517f061c5c..5defe45384 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/CreateSnapshotOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/CreateSnapshotOptionsTest.java @@ -17,9 +17,9 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.CreateSnapshotOptions.Builder.withDescription; +import static org.jclouds.ec2.options.CreateSnapshotOptions.Builder.withDescription; import static org.testng.Assert.assertEquals; import java.util.Collections; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/DescribeImagesOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/DescribeImagesOptionsTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/DescribeImagesOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/DescribeImagesOptionsTest.java index 06f240cd0b..a17bc341f1 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/DescribeImagesOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/DescribeImagesOptionsTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.executableBy; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.imageIds; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.ownedBy; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.executableBy; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.imageIds; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.ownedBy; import static org.testng.Assert.assertEquals; import java.util.Collections; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/DescribeSnapshotsOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/DescribeSnapshotsOptionsTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/DescribeSnapshotsOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/DescribeSnapshotsOptionsTest.java index 73eafb2b07..e61e4f41fe 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/DescribeSnapshotsOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/DescribeSnapshotsOptionsTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.ownedBy; -import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.restorableBy; -import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.snapshotIds; +import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.ownedBy; +import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.restorableBy; +import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.snapshotIds; import static org.testng.Assert.assertEquals; import java.util.Collections; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/DetachVolumeOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/DetachVolumeOptionsTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/DetachVolumeOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/DetachVolumeOptionsTest.java index bfc7fa3585..6d797d0778 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/DetachVolumeOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/DetachVolumeOptionsTest.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.DetachVolumeOptions.Builder.fromDevice; -import static org.jclouds.aws.ec2.options.DetachVolumeOptions.Builder.fromInstance; +import static org.jclouds.ec2.options.DetachVolumeOptions.Builder.fromDevice; +import static org.jclouds.ec2.options.DetachVolumeOptions.Builder.fromInstance; import static org.testng.Assert.assertEquals; import java.util.Collections; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RegisterImageBackedByEbsOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/RegisterImageBackedByEbsOptionsTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/RegisterImageBackedByEbsOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/RegisterImageBackedByEbsOptionsTest.java index bea38b166f..aaecfbdf65 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RegisterImageBackedByEbsOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/RegisterImageBackedByEbsOptionsTest.java @@ -17,21 +17,21 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.addBlockDeviceFromSnapshot; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.addEphemeralBlockDeviceFromSnapshot; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.addNewBlockDevice; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.addNewEphemeralBlockDevice; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.asArchitecture; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.withDescription; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.withKernelId; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.withRamdisk; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.addBlockDeviceFromSnapshot; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.addEphemeralBlockDeviceFromSnapshot; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.addNewBlockDevice; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.addNewEphemeralBlockDevice; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.asArchitecture; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.withDescription; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.withKernelId; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.withRamdisk; import static org.testng.Assert.assertEquals; import java.util.Collections; -import org.jclouds.aws.ec2.domain.Image.Architecture; +import org.jclouds.ec2.domain.Image.Architecture; import org.jclouds.http.options.HttpRequestOptions; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RegisterImageOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/RegisterImageOptionsTest.java similarity index 91% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/RegisterImageOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/RegisterImageOptionsTest.java index 9c8263e495..a32db616d2 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RegisterImageOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/RegisterImageOptionsTest.java @@ -17,17 +17,17 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.RegisterImageOptions.Builder.asArchitecture; -import static org.jclouds.aws.ec2.options.RegisterImageOptions.Builder.withDescription; -import static org.jclouds.aws.ec2.options.RegisterImageOptions.Builder.withKernelId; -import static org.jclouds.aws.ec2.options.RegisterImageOptions.Builder.withRamdisk; +import static org.jclouds.ec2.options.RegisterImageOptions.Builder.asArchitecture; +import static org.jclouds.ec2.options.RegisterImageOptions.Builder.withDescription; +import static org.jclouds.ec2.options.RegisterImageOptions.Builder.withKernelId; +import static org.jclouds.ec2.options.RegisterImageOptions.Builder.withRamdisk; import static org.testng.Assert.assertEquals; import java.util.Collections; -import org.jclouds.aws.ec2.domain.Image.Architecture; +import org.jclouds.ec2.domain.Image.Architecture; import org.jclouds.http.options.HttpRequestOptions; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/options/RunInstancesOptionsTest.java similarity index 91% rename from aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/options/RunInstancesOptionsTest.java index f29be3c5b5..829094cbb0 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/options/RunInstancesOptionsTest.java @@ -17,23 +17,23 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.options; +package org.jclouds.ec2.options; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.asType; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.enableMonitoring; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withDeviceName; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withKernelId; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withKeyName; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withRamdisk; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withSecurityGroup; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withSubnetId; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withUserData; -import static org.jclouds.aws.ec2.options.RunInstancesOptions.Builder.withVirtualName; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.asType; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.enableMonitoring; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withDeviceName; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withKernelId; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withKeyName; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withRamdisk; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withSecurityGroup; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withSubnetId; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withUserData; +import static org.jclouds.ec2.options.RunInstancesOptions.Builder.withVirtualName; import static org.testng.Assert.assertEquals; import java.util.Collections; -import org.jclouds.aws.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.InstanceType; import org.jclouds.http.options.HttpRequestOptions; import org.testng.annotations.Test; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AMIAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/AMIAsyncClientTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/AMIAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/AMIAsyncClientTest.java index 7079d4a7d5..5d5afa3766 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AMIAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/AMIAsyncClientTest.java @@ -17,23 +17,23 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.executableBy; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.executableBy; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.options.CreateImageOptions; -import org.jclouds.aws.ec2.options.DescribeImagesOptions; -import org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions; -import org.jclouds.aws.ec2.options.RegisterImageOptions; -import org.jclouds.aws.ec2.xml.BlockDeviceMappingHandler; -import org.jclouds.aws.ec2.xml.DescribeImagesResponseHandler; -import org.jclouds.aws.ec2.xml.ImageIdHandler; -import org.jclouds.aws.ec2.xml.PermissionHandler; -import org.jclouds.aws.ec2.xml.ProductCodesHandler; +import org.jclouds.ec2.options.CreateImageOptions; +import org.jclouds.ec2.options.DescribeImagesOptions; +import org.jclouds.ec2.options.RegisterImageBackedByEbsOptions; +import org.jclouds.ec2.options.RegisterImageOptions; +import org.jclouds.ec2.xml.BlockDeviceMappingHandler; +import org.jclouds.ec2.xml.DescribeImagesResponseHandler; +import org.jclouds.ec2.xml.ImageIdHandler; +import org.jclouds.ec2.xml.PermissionHandler; +import org.jclouds.ec2.xml.ProductCodesHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/AMIClientLiveTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/AMIClientLiveTest.java index 0cb4670651..4703aadc0c 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AMIClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/AMIClientLiveTest.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.options.DescribeImagesOptions.Builder.imageIds; -import static org.jclouds.aws.ec2.options.RegisterImageBackedByEbsOptions.Builder.addNewBlockDevice; -import static org.jclouds.aws.ec2.options.RegisterImageOptions.Builder.withDescription; +import static org.jclouds.ec2.options.DescribeImagesOptions.Builder.imageIds; +import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.addNewBlockDevice; +import static org.jclouds.ec2.options.RegisterImageOptions.Builder.withDescription; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -33,12 +33,12 @@ import java.util.Set; import org.jclouds.Constants; import org.jclouds.aws.AWSResponseException; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.Image.ImageType; -import org.jclouds.aws.ec2.domain.RootDeviceType; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.domain.Image.ImageType; +import org.jclouds.ec2.domain.RootDeviceType; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.testng.annotations.AfterTest; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java similarity index 91% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java index 6dab576bce..f6f3326fb6 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionAsyncClientTest.java @@ -17,21 +17,21 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.options.DescribeAvailabilityZonesOptions.Builder.availabilityZones; -import static org.jclouds.aws.ec2.options.DescribeRegionsOptions.Builder.regions; +import static org.jclouds.ec2.options.DescribeAvailabilityZonesOptions.Builder.availabilityZones; +import static org.jclouds.ec2.options.DescribeRegionsOptions.Builder.regions; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.options.DescribeAvailabilityZonesOptions; -import org.jclouds.aws.ec2.options.DescribeRegionsOptions; -import org.jclouds.aws.ec2.xml.DescribeAvailabilityZonesResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeRegionsResponseHandler; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.options.DescribeAvailabilityZonesOptions; +import org.jclouds.ec2.options.DescribeRegionsOptions; +import org.jclouds.ec2.xml.DescribeAvailabilityZonesResponseHandler; +import org.jclouds.ec2.xml.DescribeRegionsResponseHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java index 93fcf9c967..e37e6c14ec 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClientLiveTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.options.DescribeAvailabilityZonesOptions.Builder.availabilityZones; -import static org.jclouds.aws.ec2.options.DescribeRegionsOptions.Builder.regions; +import static org.jclouds.ec2.options.DescribeAvailabilityZonesOptions.Builder.availabilityZones; +import static org.jclouds.ec2.options.DescribeRegionsOptions.Builder.regions; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -34,10 +34,10 @@ import java.util.SortedMap; import org.jclouds.Constants; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.AvailabilityZoneInfo; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.testng.annotations.AfterTest; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/BaseEC2AsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/BaseEC2AsyncClientTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/BaseEC2AsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/BaseEC2AsyncClientTest.java index 313fa7a428..8fc9eb59f4 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/BaseEC2AsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/BaseEC2AsyncClientTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static org.testng.Assert.assertEquals; @@ -27,10 +27,10 @@ import java.util.Map; import java.util.Properties; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.config.EC2RestClientModule; -import org.jclouds.aws.ec2.domain.AvailabilityZone; import org.jclouds.aws.filters.FormSigner; import org.jclouds.date.DateService; +import org.jclouds.ec2.config.EC2RestClientModule; +import org.jclouds.ec2.domain.AvailabilityZone; import org.jclouds.http.HttpRequest; import org.jclouds.http.RequiresHttp; import org.jclouds.rest.ConfiguresRestClient; @@ -111,4 +111,4 @@ public abstract class BaseEC2AsyncClientTest extends RestClientTest { return new RestContextFactory().createContextSpec("ec2", "identity", "credential", new Properties()); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticBlockStoreAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreAsyncClientTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticBlockStoreAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreAsyncClientTest.java index 8ae6f5ddc3..739ac43055 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticBlockStoreAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreAsyncClientTest.java @@ -17,26 +17,26 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; -import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.ownedBy; -import static org.jclouds.aws.ec2.options.DetachVolumeOptions.Builder.fromInstance; +import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.ownedBy; +import static org.jclouds.ec2.options.DetachVolumeOptions.Builder.fromInstance; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.functions.ReturnVoidOnVolumeAvailable; -import org.jclouds.aws.ec2.options.CreateSnapshotOptions; -import org.jclouds.aws.ec2.options.DescribeSnapshotsOptions; -import org.jclouds.aws.ec2.options.DetachVolumeOptions; -import org.jclouds.aws.ec2.xml.AttachmentHandler; -import org.jclouds.aws.ec2.xml.CreateVolumeResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeSnapshotsResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeVolumesResponseHandler; -import org.jclouds.aws.ec2.xml.PermissionHandler; -import org.jclouds.aws.ec2.xml.SnapshotHandler; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.functions.ReturnVoidOnVolumeAvailable; +import org.jclouds.ec2.options.CreateSnapshotOptions; +import org.jclouds.ec2.options.DescribeSnapshotsOptions; +import org.jclouds.ec2.options.DetachVolumeOptions; +import org.jclouds.ec2.xml.AttachmentHandler; +import org.jclouds.ec2.xml.CreateVolumeResponseHandler; +import org.jclouds.ec2.xml.DescribeSnapshotsResponseHandler; +import org.jclouds.ec2.xml.DescribeVolumesResponseHandler; +import org.jclouds.ec2.xml.PermissionHandler; +import org.jclouds.ec2.xml.SnapshotHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticBlockStoreClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticBlockStoreClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java index 063d9ce34d..3916fb52db 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticBlockStoreClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticBlockStoreClientLiveTest.java @@ -17,10 +17,10 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.options.DescribeSnapshotsOptions.Builder.snapshotIds; +import static org.jclouds.ec2.options.DescribeSnapshotsOptions.Builder.snapshotIds; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -31,14 +31,14 @@ import java.util.concurrent.TimeUnit; import org.jclouds.Constants; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.Snapshot; -import org.jclouds.aws.ec2.domain.Volume; -import org.jclouds.aws.ec2.predicates.SnapshotCompleted; -import org.jclouds.aws.ec2.predicates.VolumeAvailable; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Volume; +import org.jclouds.ec2.predicates.SnapshotCompleted; +import org.jclouds.ec2.predicates.VolumeAvailable; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.predicates.RetryablePredicate; import org.jclouds.rest.RestContext; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticIPAddressAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressAsyncClientTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticIPAddressAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressAsyncClientTest.java index f468f23456..5f9bfbd124 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticIPAddressAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressAsyncClientTest.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.xml.AllocateAddressResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeAddressesResponseHandler; +import org.jclouds.ec2.xml.AllocateAddressResponseHandler; +import org.jclouds.ec2.xml.DescribeAddressesResponseHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticIPAddressClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticIPAddressClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java index 510d858b15..bfc4b20908 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/ElasticIPAddressClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/ElasticIPAddressClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertEquals; @@ -28,10 +28,10 @@ import java.util.SortedSet; import org.jclouds.Constants; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.testng.annotations.AfterTest; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/InstanceAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceAsyncClientTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/InstanceAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceAsyncClientTest.java index 4bc10f9f83..19e54b9266 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/InstanceAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceAsyncClientTest.java @@ -17,28 +17,28 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.BlockDeviceMapping; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; -import org.jclouds.aws.ec2.options.RunInstancesOptions; -import org.jclouds.aws.ec2.xml.BlockDeviceMappingHandler; -import org.jclouds.aws.ec2.xml.BooleanValueHandler; -import org.jclouds.aws.ec2.xml.DescribeInstancesResponseHandler; -import org.jclouds.aws.ec2.xml.InstanceInitiatedShutdownBehaviorHandler; -import org.jclouds.aws.ec2.xml.InstanceStateChangeHandler; -import org.jclouds.aws.ec2.xml.InstanceTypeHandler; -import org.jclouds.aws.ec2.xml.RunInstancesResponseHandler; -import org.jclouds.aws.ec2.xml.StringValueHandler; -import org.jclouds.aws.ec2.xml.UnencodeStringValueHandler; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.BlockDeviceMapping; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.options.RunInstancesOptions; +import org.jclouds.ec2.xml.BlockDeviceMappingHandler; +import org.jclouds.ec2.xml.BooleanValueHandler; +import org.jclouds.ec2.xml.DescribeInstancesResponseHandler; +import org.jclouds.ec2.xml.InstanceInitiatedShutdownBehaviorHandler; +import org.jclouds.ec2.xml.InstanceStateChangeHandler; +import org.jclouds.ec2.xml.InstanceTypeHandler; +import org.jclouds.ec2.xml.RunInstancesResponseHandler; +import org.jclouds.ec2.xml.StringValueHandler; +import org.jclouds.ec2.xml.UnencodeStringValueHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/InstanceClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/InstanceClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java index 91bf8fddc0..0925135b61 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/InstanceClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/InstanceClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertNotNull; @@ -27,11 +27,11 @@ import java.util.Set; import org.jclouds.Constants; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RunningInstance; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RunningInstance; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.testng.annotations.AfterTest; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/KeyPairAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairAsyncClientTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/KeyPairAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairAsyncClientTest.java index 1edb703530..6c27de0240 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/KeyPairAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairAsyncClientTest.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.xml.DescribeKeyPairsResponseHandler; +import org.jclouds.ec2.xml.DescribeKeyPairsResponseHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/KeyPairClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/KeyPairClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java index 7fe8f85175..8e75d7a491 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/KeyPairClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/KeyPairClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertEquals; @@ -29,10 +29,10 @@ import java.util.SortedSet; import org.jclouds.Constants; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.KeyPair; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.testng.annotations.AfterTest; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/MonitoringAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/MonitoringAsyncClientTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/MonitoringAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/MonitoringAsyncClientTest.java index 57a12df361..e3aa9399c6 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/MonitoringAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/MonitoringAsyncClientTest.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.xml.MonitoringStateHandler; +import org.jclouds.ec2.xml.MonitoringStateHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.RestAnnotationProcessor; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/MonitoringClientLiveTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/MonitoringClientLiveTest.java index b4e40b240f..b05a8b4152 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/MonitoringClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/MonitoringClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertEquals; @@ -26,9 +26,9 @@ import java.util.Map; import java.util.Properties; import org.jclouds.Constants; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.MonitoringState; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.MonitoringState; import org.jclouds.compute.ComputeServiceContextFactory; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/PlacementGroupAsyncClientTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/PlacementGroupAsyncClientTest.java index 0c7684b640..237135ffb5 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/PlacementGroupAsyncClientTest.java @@ -17,12 +17,12 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.xml.DescribePlacementGroupsResponseHandler; +import org.jclouds.ec2.xml.DescribePlacementGroupsResponseHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/PlacementGroupClientLiveTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/PlacementGroupClientLiveTest.java index acf5600fcc..cd7e5e64b4 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/PlacementGroupClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/PlacementGroupClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.any; @@ -40,12 +40,6 @@ import java.util.concurrent.TimeUnit; import org.jclouds.Constants; import org.jclouds.aws.AWSResponseException; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.aws.ec2.domain.PlacementGroup.State; -import org.jclouds.aws.ec2.predicates.PlacementGroupAvailable; -import org.jclouds.aws.ec2.predicates.PlacementGroupDeleted; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.ComputeServiceContextFactory; import org.jclouds.compute.RunNodesException; @@ -54,6 +48,12 @@ import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.Template; import org.jclouds.compute.predicates.NodePredicates; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup.State; +import org.jclouds.ec2.predicates.PlacementGroupAvailable; +import org.jclouds.ec2.predicates.PlacementGroupDeleted; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.predicates.RetryablePredicate; import org.jclouds.ssh.jsch.config.JschSshClientModule; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/SecurityGroupAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupAsyncClientTest.java similarity index 98% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/SecurityGroupAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupAsyncClientTest.java index b5c395b275..f410f239eb 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/SecurityGroupAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupAsyncClientTest.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; -import org.jclouds.aws.ec2.xml.DescribeSecurityGroupsResponseHandler; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.xml.DescribeSecurityGroupsResponseHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ReleasePayloadAndReturn; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/SecurityGroupClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/SecurityGroupClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java index 696da43e19..46b4d894db 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/SecurityGroupClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/SecurityGroupClientLiveTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertEquals; @@ -32,13 +32,13 @@ import java.util.concurrent.TimeoutException; import org.jclouds.Constants; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; -import org.jclouds.aws.ec2.domain.IpPermission; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; +import org.jclouds.ec2.domain.IpPermission; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.SecurityGroup; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.testng.annotations.AfterTest; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/WindowsAsyncClientTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsAsyncClientTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/WindowsAsyncClientTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsAsyncClientTest.java index ed9d48efd1..bd227bff0f 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/WindowsAsyncClientTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsAsyncClientTest.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import java.io.IOException; import java.lang.reflect.Method; -import org.jclouds.aws.ec2.options.BundleInstanceS3StorageOptions; -import org.jclouds.aws.ec2.xml.BundleTaskHandler; -import org.jclouds.aws.ec2.xml.DescribeBundleTasksResponseHandler; +import org.jclouds.ec2.options.BundleInstanceS3StorageOptions; +import org.jclouds.ec2.xml.BundleTaskHandler; +import org.jclouds.ec2.xml.DescribeBundleTasksResponseHandler; import org.jclouds.http.HttpRequest; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/services/WindowsClientLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/services/WindowsClientLiveTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java index 48c26ed91a..164e22d273 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/services/WindowsClientLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/services/WindowsClientLiveTest.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.services; +package org.jclouds.ec2.services; import static com.google.common.base.Preconditions.checkNotNull; import java.util.Properties; import org.jclouds.Constants; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; import org.jclouds.compute.ComputeServiceContextFactory; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/utils/EC2UtilsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/utils/EC2UtilsTest.java similarity index 95% rename from aws/core/src/test/java/org/jclouds/aws/ec2/utils/EC2UtilsTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/utils/EC2UtilsTest.java index 7179794cea..bbb8b98913 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/utils/EC2UtilsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/utils/EC2UtilsTest.java @@ -17,11 +17,11 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.utils; +package org.jclouds.ec2.utils; import static org.testng.Assert.assertEquals; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.ec2.util.EC2Utils; import org.testng.annotations.Test; import com.google.common.collect.ImmutableMap; diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/AllocateAddressResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/AllocateAddressResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java index 1da779b980..04c700a3f3 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/AllocateAddressResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/AllocateAddressResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; @@ -37,7 +37,7 @@ import org.testng.annotations.Test; public class AllocateAddressResponseHandlerTest extends BaseHandlerTest { public void testApplyInputStream() throws UnknownHostException { - InputStream is = getClass().getResourceAsStream("/ec2/allocate_address.xml"); + InputStream is = getClass().getResourceAsStream("/allocate_address.xml"); String result = factory.create(injector.getInstance(AllocateAddressResponseHandler.class)) .parse(is); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/AttachmentHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/AttachmentHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java index aab4436156..ef24d3d1d7 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/AttachmentHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/AttachmentHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.Attachment; +import org.jclouds.ec2.domain.Attachment; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -44,7 +44,7 @@ import com.google.common.collect.ImmutableList; public class AttachmentHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/attach.xml"); + InputStream is = getClass().getResourceAsStream("/attach.xml"); Attachment expected = new Attachment(defaultRegion, "vol-4d826724", "i-6058a509", "/dev/sdh", Attachment.Status.ATTACHING, dateService.iso8601DateParse("2008-05-07T11:51:50.000Z")); @@ -62,4 +62,4 @@ public class AttachmentHandlerTest extends BaseEC2HandlerTest { replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/BaseEC2HandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/BaseEC2HandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java index 25b9c0b0dc..18d9c95bba 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/BaseEC2HandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/BaseEC2HandlerTest.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import java.util.Map; import javax.inject.Singleton; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.AvailabilityZone; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.config.SaxParserModule; @@ -75,4 +75,4 @@ public abstract class BaseEC2HandlerTest extends BaseHandlerTest { assert factory != null; } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/BlockDeviceMappingHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java similarity index 90% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/BlockDeviceMappingHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java index d0c0f28674..4ac10d2924 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/BlockDeviceMappingHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/BlockDeviceMappingHandlerTest.java @@ -17,15 +17,15 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Map; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.RunningInstance.EbsBlockDevice; import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; import org.testng.annotations.Test; @@ -43,7 +43,7 @@ public class BlockDeviceMappingHandlerTest extends BaseHandlerTest { public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream( - "/ec2/describe_image_attribute_blockDeviceMapping.xml"); + "/describe_image_attribute_blockDeviceMapping.xml"); DateService dateService = injector.getInstance(DateService.class); Map expected = ImmutableMap. of("/dev/sda1", diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/BundleTaskHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/BundleTaskHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java index 5279826a6e..850578adb5 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/BundleTaskHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/BundleTaskHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.BundleTask; +import org.jclouds.ec2.domain.BundleTask; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -44,7 +44,7 @@ import com.google.common.collect.ImmutableList; public class BundleTaskHandlerTest extends BaseEC2HandlerTest { public void testBundleInstance() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/bundle_instance.xml"); + InputStream is = getClass().getResourceAsStream("/bundle_instance.xml"); BundleTask expected = new BundleTask(defaultRegion, "bun-c1a540a8", null, "i-12345678", 70, dateService .iso8601DateParse("2008-10-07T11:41:50.000Z"), "bundling", "my-bucket", "winami", dateService @@ -59,7 +59,7 @@ public class BundleTaskHandlerTest extends BaseEC2HandlerTest { public void testCancleBundleTask() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/cancel_bundle_task.xml"); + InputStream is = getClass().getResourceAsStream("/cancel_bundle_task.xml"); BundleTask expected = new BundleTask(defaultRegion, "bun-cla322b9", null, "i-12345678", 20, dateService .iso8601DateParse("2008-10-07T11:41:50.000Z"), "canceling", "my-bucket", "my-new-image", dateService .iso8601DateParse("2008-10-07T11:51:50.000Z")); @@ -77,4 +77,4 @@ public class BundleTaskHandlerTest extends BaseEC2HandlerTest { replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/CreateVolumeResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java similarity index 91% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/CreateVolumeResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java index 8bfcf9a8d9..633ddb1071 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/CreateVolumeResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/CreateVolumeResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,10 +27,10 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.Volume; import org.jclouds.date.DateService; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.Volume; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -49,7 +49,7 @@ public class CreateVolumeResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/created_volume.xml"); + InputStream is = getClass().getResourceAsStream("/created_volume.xml"); Volume expected = new Volume(Region.US_EAST_1, "vol-2a21e543", 1, null, AvailabilityZone.US_EAST_1A, Volume.Status.CREATING, dateService diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeAddressesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeAddressesResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java index 15362f5d95..f9d5f1db46 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeAddressesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -28,7 +28,7 @@ import java.io.InputStream; import java.net.UnknownHostException; import java.util.Set; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; +import org.jclouds.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -45,7 +45,7 @@ import com.google.common.collect.ImmutableList; public class DescribeAddressesResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() throws UnknownHostException { - InputStream is = getClass().getResourceAsStream("/ec2/describe_addresses.xml"); + InputStream is = getClass().getResourceAsStream("/describe_addresses.xml"); DescribeAddressesResponseHandler handler = injector .getInstance(DescribeAddressesResponseHandler.class); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java index fb116e6703..40e2ce34bb 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; @@ -25,8 +25,8 @@ import java.io.InputStream; import java.util.Set; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.AvailabilityZoneInfo; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.AvailabilityZoneInfo; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.config.SaxParserModule; @@ -62,7 +62,7 @@ public class DescribeAvailabilityZonesResponseHandlerTest extends BaseHandlerTes public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/availabilityZones.xml"); + InputStream is = getClass().getResourceAsStream("/availabilityZones.xml"); Set expected = ImmutableSet. of( @@ -81,4 +81,4 @@ public class DescribeAvailabilityZonesResponseHandlerTest extends BaseHandlerTes assertEquals(result, expected); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeBundleTasksResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeBundleTasksResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java index 76c8f97fbb..e9edfd8d5d 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeBundleTasksResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeBundleTasksResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.BundleTask; +import org.jclouds.ec2.domain.BundleTask; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -45,7 +45,7 @@ import com.google.common.collect.Iterables; public class DescribeBundleTasksResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/describe_bundle_tasks.xml"); + InputStream is = getClass().getResourceAsStream("/describe_bundle_tasks.xml"); BundleTask expected = new BundleTask(defaultRegion, "bun-c1a540a8", null, "i-12345678", 20, dateService .iso8601DateParse("2008-10-07T11:41:50.000Z"), "canceling", "my-bucket", "winami", dateService @@ -64,4 +64,4 @@ public class DescribeBundleTasksResponseHandlerTest extends BaseEC2HandlerTest { replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeImagesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java similarity index 86% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeImagesResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java index 054e98ce2d..b4dc1cf781 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeImagesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java @@ -17,20 +17,20 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.aws.ec2.compute.functions.ImageParserTest; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.Image.Architecture; -import org.jclouds.aws.ec2.domain.Image.EbsBlockDevice; -import org.jclouds.aws.ec2.domain.Image.ImageState; -import org.jclouds.aws.ec2.domain.Image.ImageType; -import org.jclouds.aws.ec2.domain.RootDeviceType; +import org.jclouds.ec2.compute.functions.ImageParserTest; +import org.jclouds.ec2.domain.Image; +import org.jclouds.ec2.domain.Image.Architecture; +import org.jclouds.ec2.domain.Image.EbsBlockDevice; +import org.jclouds.ec2.domain.Image.ImageState; +import org.jclouds.ec2.domain.Image.ImageType; +import org.jclouds.ec2.domain.RootDeviceType; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.config.SaxParserModule; import org.jclouds.location.Region; @@ -57,7 +57,7 @@ public class DescribeImagesResponseHandlerTest { ImageType.MACHINE, false, Sets. newHashSet("9961934F"), "aki-4438dd2d", null, "ari-4538dd2c", RootDeviceType.INSTANCE_STORE, null, ImmutableMap. of(), "paravirtual")); - Set result = parseImages("/ec2/describe_images.xml"); + Set result = parseImages("/describe_images.xml"); assertEquals(result, contents); } @@ -68,7 +68,7 @@ public class DescribeImagesResponseHandlerTest { ImageState.AVAILABLE, ImageType.MACHINE, true, Sets. newHashSet("5771E9A6"), null, "windows", null, RootDeviceType.INSTANCE_STORE, null, ImmutableMap. of(), "paravirtual")); - Set result = parseImages("/ec2/describe_images_windows.xml"); + Set result = parseImages("/describe_images_windows.xml"); assertEquals(result, contents); } @@ -80,7 +80,7 @@ public class DescribeImagesResponseHandlerTest { "/dev/sda1", ImmutableMap. of("/dev/sda1", new EbsBlockDevice("snap-d01272b9", 30, true), "xvdf", new EbsBlockDevice("snap-d31272ba", 250, false)), "hvm")); - Set result = parseImages("/ec2/describe_images_ebs.xml"); + Set result = parseImages("/describe_images_ebs.xml"); assertEquals(result, contents); } diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstanceAttributeTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java similarity index 81% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstanceAttributeTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java index f9cac02d8b..17e7d67502 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstanceAttributeTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstanceAttributeTest.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior; import org.jclouds.http.functions.BaseHandlerTest; import org.testng.annotations.Test; @@ -38,7 +38,7 @@ import org.testng.annotations.Test; public class DescribeInstanceAttributeTest extends BaseHandlerTest { public void testInstanceInitiatedShutdownBehaviorHandler() { - InputStream is = getClass().getResourceAsStream("/ec2/instanceInitiatedShutdownBehavior.xml"); + InputStream is = getClass().getResourceAsStream("/instanceInitiatedShutdownBehavior.xml"); InstanceInitiatedShutdownBehaviorHandler handler = injector .getInstance(InstanceInitiatedShutdownBehaviorHandler.class); @@ -48,7 +48,7 @@ public class DescribeInstanceAttributeTest extends BaseHandlerTest { } public void testInstanceTypeHandler() { - InputStream is = getClass().getResourceAsStream("/ec2/instanceType.xml"); + InputStream is = getClass().getResourceAsStream("/instanceType.xml"); InstanceTypeHandler handler = injector.getInstance(InstanceTypeHandler.class); String result = factory.create(handler).parse(is); @@ -57,7 +57,7 @@ public class DescribeInstanceAttributeTest extends BaseHandlerTest { } public void testBooleanValueHandler() { - InputStream is = getClass().getResourceAsStream("/ec2/disableApiTermination.xml"); + InputStream is = getClass().getResourceAsStream("/disableApiTermination.xml"); BooleanValueHandler handler = injector.getInstance(BooleanValueHandler.class); Boolean result = factory.create(handler).parse(is); @@ -66,7 +66,7 @@ public class DescribeInstanceAttributeTest extends BaseHandlerTest { } public void testStringValueHandler() { - InputStream is = getClass().getResourceAsStream("/ec2/ramdisk.xml"); + InputStream is = getClass().getResourceAsStream("/ramdisk.xml"); StringValueHandler handler = injector.getInstance(StringValueHandler.class); String result = factory.create(handler).parse(is); @@ -75,11 +75,11 @@ public class DescribeInstanceAttributeTest extends BaseHandlerTest { } public void testUnencodeStringValueHandler() { - InputStream is = getClass().getResourceAsStream("/ec2/userData.xml"); + InputStream is = getClass().getResourceAsStream("/userData.xml"); UnencodeStringValueHandler handler = injector.getInstance(UnencodeStringValueHandler.class); String result = factory.create(handler).parse(is); assertEquals(result, "#!/bin/bash\n"); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java index 3950e63e0d..4759ef0337 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeInstancesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; @@ -25,15 +25,15 @@ import java.io.InputStream; import java.net.UnknownHostException; import java.util.Set; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.MonitoringState; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RootDeviceType; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.MonitoringState; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.RunningInstance.EbsBlockDevice; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.config.SaxParserModule; @@ -80,7 +80,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest { RootDeviceType.INSTANCE_STORE, null, ImmutableMap. of())), "993194456877", null, "r-a3c508cb")); - Set> result = parseRunningInstances("/ec2/describe_instances_running.xml"); + Set> result = parseRunningInstances("/describe_instances_running.xml"); assertEquals(result, contents); } @@ -106,7 +106,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest { null, ImmutableMap. of())), "UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", null, "r-44a5402d")); - Set> result = parseRunningInstances("/ec2/describe_instances.xml"); + Set> result = parseRunningInstances("/describe_instances.xml"); assertEquals(result, contents); } @@ -125,7 +125,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest { null, null, null, null, RootDeviceType.INSTANCE_STORE, null, ImmutableMap . of())), "jclouds", null, "r-4D2A08AD")); - Set> result = parseRunningInstances("/ec2/describe_instances_euc.xml"); + Set> result = parseRunningInstances("/describe_instances_euc.xml"); assertEquals(result, contents); } @@ -141,7 +141,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest { RootDeviceType.INSTANCE_STORE, null, ImmutableMap. of())), "tislam1", null, "r-opqeylmj")); - Set> result = parseRunningInstances("/ec2/describe_instances_nova.xml"); + Set> result = parseRunningInstances("/describe_instances_nova.xml"); assertEquals(result, contents); } @@ -163,7 +163,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest { .iso8601DateParse("2009-12-30T04:06:29.000Z"), true)))), "993194456877", null, "r-596dd731")); - Set> result = parseRunningInstances("/ec2/describe_instances_ebs.xml"); + Set> result = parseRunningInstances("/describe_instances_ebs.xml"); assertEquals(result, contents); } diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeKeyPairsResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeKeyPairsResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java index 074b39c28e..80469deb21 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeKeyPairsResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,7 +27,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.aws.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -45,7 +45,7 @@ import com.google.common.collect.ImmutableSet; public class DescribeKeyPairsResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/describe_keypairs.xml"); + InputStream is = getClass().getResourceAsStream("/describe_keypairs.xml"); Set expected = ImmutableSet.of(new KeyPair(defaultRegion, "gsg-keypair", "1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f", null)); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java index b66792ea93..22b2c6d28b 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribePlacementGroupsResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.PlacementGroup; +import org.jclouds.ec2.domain.PlacementGroup; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -43,7 +43,7 @@ import com.google.common.collect.Iterables; @Test(groups = "unit", testName = "DescribePlacementGroupsResponseHandlerTest") public class DescribePlacementGroupsResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/describe_placement_groups.xml"); + InputStream is = getClass().getResourceAsStream("/describe_placement_groups.xml"); PlacementGroup expected = new PlacementGroup(defaultRegion, "XYZ-cluster", "cluster", PlacementGroup.State.AVAILABLE); @@ -61,4 +61,4 @@ public class DescribePlacementGroupsResponseHandlerTest extends BaseEC2HandlerTe replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeRegionsResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java similarity index 97% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeRegionsResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java index 0e98c85b68..aa83a8d28d 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeRegionsResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; @@ -65,7 +65,7 @@ public class DescribeRegionsResponseHandlerTest extends BaseHandlerTest { public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream( - "/ec2/regionEndpoints.xml"); + "/regionEndpoints.xml"); Map expected = ImmutableMap . of(Region.EU_WEST_1, URI @@ -115,7 +115,7 @@ public class DescribeRegionsResponseHandlerTest extends BaseHandlerTest { public void testUnsupportedAdditionalRegionDoesntBreak() { InputStream is = getClass().getResourceAsStream( - "/ec2/regionEndpoints-additional.xml"); + "/regionEndpoints-additional.xml"); Map expected = ImmutableMap . of("jp-west-1", URI diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java index 7aa09571b1..da9c2475c2 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeReservedInstancesOfferingResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.ReservedInstancesOffering; +import org.jclouds.ec2.domain.ReservedInstancesOffering; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -43,7 +43,7 @@ import com.google.common.collect.Iterables; @Test(groups = "unit", testName = "DescribeReservedInstancesOfferingResponseHandlerTest") public class DescribeReservedInstancesOfferingResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/describe_reserved_instances_offerings.xml"); + InputStream is = getClass().getResourceAsStream("/describe_reserved_instances_offerings.xml"); ReservedInstancesOffering expected = new ReservedInstancesOffering("us-east-1", "us-east-1a", 12, 0.0f, "m1.small", "m1.small offering in us-east-1a", "4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8", 0.0f); @@ -62,4 +62,4 @@ public class DescribeReservedInstancesOfferingResponseHandlerTest extends BaseEC replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java similarity index 90% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java index 45c2505c4e..4038310744 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeSecurityGroupsResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,10 +27,10 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.aws.ec2.domain.IpPermission; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; +import org.jclouds.ec2.domain.IpPermission; +import org.jclouds.ec2.domain.IpProtocol; +import org.jclouds.ec2.domain.SecurityGroup; +import org.jclouds.ec2.domain.UserIdGroupPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -48,7 +48,7 @@ import com.google.common.collect.ImmutableSet; public class DescribeSecurityGroupsResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/describe_securitygroups.xml"); + InputStream is = getClass().getResourceAsStream("/describe_securitygroups.xml"); Set expected = ImmutableSet.of(new SecurityGroup(defaultRegion, "WebServers", "UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM", "Web Servers", ImmutableSet diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeSnapshotsResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeSnapshotsResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java index 71f050e5b9..a47f4723cc 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeSnapshotsResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeSnapshotsResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,7 +27,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.aws.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Snapshot; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -46,7 +46,7 @@ import com.google.common.collect.Sets; public class DescribeSnapshotsResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/describe_snapshots.xml"); + InputStream is = getClass().getResourceAsStream("/describe_snapshots.xml"); Set expected = Sets.newLinkedHashSet(); expected.add(new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10, @@ -67,4 +67,4 @@ public class DescribeSnapshotsResponseHandlerTest extends BaseEC2HandlerTest { replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeVolumesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java similarity index 92% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeVolumesResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java index 0354b62057..9d0cfc0963 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/DescribeVolumesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeVolumesResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,9 +27,9 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.aws.ec2.domain.Attachment; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.Volume; +import org.jclouds.ec2.domain.Attachment; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.Volume; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -49,7 +49,7 @@ public class DescribeVolumesResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/describe_volumes.xml"); + InputStream is = getClass().getResourceAsStream("/describe_volumes.xml"); Set expected = Sets.newLinkedHashSet(); expected.add(new Volume(defaultRegion, "vol-2a21e543", 1, null, AvailabilityZone.US_EAST_1A, @@ -76,4 +76,4 @@ public class DescribeVolumesResponseHandlerTest extends BaseEC2HandlerTest { replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/InstanceStateChangeHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java similarity index 90% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/InstanceStateChangeHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java index 378f9a21d7..18068be97c 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/InstanceStateChangeHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/InstanceStateChangeHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -27,8 +27,8 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Set; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.InstanceStateChange; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.InstanceStateChange; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -59,7 +59,7 @@ public class InstanceStateChangeHandlerTest extends BaseEC2HandlerTest { public void testTerminate() { - InputStream is = getClass().getResourceAsStream("/ec2/terminate_instances.xml"); + InputStream is = getClass().getResourceAsStream("/terminate_instances.xml"); Set expected = ImmutableSet.of(new InstanceStateChange(defaultRegion, "i-3ea74257", InstanceState.SHUTTING_DOWN, InstanceState.RUNNING)); @@ -72,7 +72,7 @@ public class InstanceStateChangeHandlerTest extends BaseEC2HandlerTest { public void testStart() { - InputStream is = getClass().getResourceAsStream("/ec2/start_instances.xml"); + InputStream is = getClass().getResourceAsStream("/start_instances.xml"); Set expected = ImmutableSet.of(new InstanceStateChange(defaultRegion, "i-10a64379", InstanceState.PENDING, InstanceState.STOPPED)); @@ -84,7 +84,7 @@ public class InstanceStateChangeHandlerTest extends BaseEC2HandlerTest { public void testStop() { - InputStream is = getClass().getResourceAsStream("/ec2/stop_instances.xml"); + InputStream is = getClass().getResourceAsStream("/stop_instances.xml"); Set expected = ImmutableSet.of(new InstanceStateChange(defaultRegion, "i-10a64379", InstanceState.STOPPING, InstanceState.RUNNING)); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/KeyPairResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java similarity index 96% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/KeyPairResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java index 18376b0d68..70f7a03686 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/KeyPairResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/KeyPairResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.KeyPair; +import org.jclouds.ec2.domain.KeyPair; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.testng.annotations.Test; @@ -43,7 +43,7 @@ import com.google.common.collect.ImmutableList; public class KeyPairResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/create_keypair.xml"); + InputStream is = getClass().getResourceAsStream("/create_keypair.xml"); KeyPair expected = new KeyPair( defaultRegion, diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/MonitoringStateHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/MonitoringStateHandlerTest.java similarity index 91% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/MonitoringStateHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/MonitoringStateHandlerTest.java index 4bfeaae3b2..02fac61471 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/MonitoringStateHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/MonitoringStateHandlerTest.java @@ -17,14 +17,14 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; import java.io.InputStream; import java.util.Map; -import org.jclouds.aws.ec2.domain.MonitoringState; +import org.jclouds.ec2.domain.MonitoringState; import org.jclouds.http.functions.BaseHandlerTest; import org.testng.annotations.Test; @@ -40,7 +40,7 @@ import com.google.common.collect.ImmutableMap; public class MonitoringStateHandlerTest extends BaseHandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/monitoring.xml"); + InputStream is = getClass().getResourceAsStream("/monitoring.xml"); Map expected = ImmutableMap. of( "i-43a4412a", MonitoringState.PENDING, "i-23a3397d", MonitoringState.PENDING); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/PermissionHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java similarity index 91% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/PermissionHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java index 9f144c1232..4af687c558 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/PermissionHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/PermissionHandlerTest.java @@ -17,13 +17,13 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.Permission; +import org.jclouds.ec2.domain.Permission; import org.jclouds.http.functions.BaseHandlerTest; import org.testng.annotations.Test; @@ -40,7 +40,7 @@ public class PermissionHandlerTest extends BaseHandlerTest { public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream( - "/ec2/describe_image_attribute_launchPermission.xml"); + "/describe_image_attribute_launchPermission.xml"); Permission expected = new Permission(Sets.newHashSet("495219933132"), Sets.newHashSet("all")); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/ProductCodesHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/ProductCodesHandlerTest.java similarity index 94% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/ProductCodesHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/ProductCodesHandlerTest.java index ba2d9e5fd3..64996fa507 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/ProductCodesHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/ProductCodesHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.testng.Assert.assertEquals; @@ -40,7 +40,7 @@ public class ProductCodesHandlerTest extends BaseHandlerTest { public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream( - "/ec2/describe_image_attribute_productCodes.xml"); + "/describe_image_attribute_productCodes.xml"); Set expected = ImmutableSet.of("774F4FF8"); diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/RunInstancesResponseHandlerTest.java similarity index 89% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/RunInstancesResponseHandlerTest.java index 14da525efa..bcb60baac8 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/RunInstancesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/RunInstancesResponseHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,14 +26,14 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.InstanceState; -import org.jclouds.aws.ec2.domain.InstanceType; -import org.jclouds.aws.ec2.domain.MonitoringState; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.RootDeviceType; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.domain.RunningInstance.EbsBlockDevice; +import org.jclouds.ec2.domain.AvailabilityZone; +import org.jclouds.ec2.domain.InstanceState; +import org.jclouds.ec2.domain.InstanceType; +import org.jclouds.ec2.domain.MonitoringState; +import org.jclouds.ec2.domain.Reservation; +import org.jclouds.ec2.domain.RootDeviceType; +import org.jclouds.ec2.domain.RunningInstance; +import org.jclouds.ec2.domain.RunningInstance.EbsBlockDevice; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -66,7 +66,7 @@ public class RunInstancesResponseHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/ec2/run_instances.xml"); + InputStream is = getClass().getResourceAsStream("/run_instances.xml"); Reservation expected = new Reservation(defaultRegion, ImmutableSet .of("default"), ImmutableSet.of(new RunningInstance(defaultRegion, ImmutableSet.of("default"), "0", diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/SnapshotHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/SnapshotHandlerTest.java similarity index 93% rename from aws/core/src/test/java/org/jclouds/aws/ec2/xml/SnapshotHandlerTest.java rename to apis/ec2/src/test/java/org/jclouds/ec2/xml/SnapshotHandlerTest.java index 8f7715f1ff..b6a37f35d5 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/xml/SnapshotHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/SnapshotHandlerTest.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.xml; +package org.jclouds.ec2.xml; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; @@ -26,7 +26,7 @@ import static org.testng.Assert.assertEquals; import java.io.InputStream; -import org.jclouds.aws.ec2.domain.Snapshot; +import org.jclouds.ec2.domain.Snapshot; import org.jclouds.date.DateService; import org.jclouds.http.functions.ParseSax; import org.jclouds.rest.internal.GeneratedHttpRequest; @@ -44,7 +44,7 @@ import com.google.common.collect.ImmutableList; public class SnapshotHandlerTest extends BaseEC2HandlerTest { public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); - InputStream is = getClass().getResourceAsStream("/ec2/created_snapshot.xml"); + InputStream is = getClass().getResourceAsStream("/created_snapshot.xml"); Snapshot expected = new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10, Snapshot.Status.PENDING, dateService.iso8601DateParse("2008-05-07T12:51:50.000Z"), @@ -62,4 +62,4 @@ public class SnapshotHandlerTest extends BaseEC2HandlerTest { replay(request); handler.setContext(request); } -} \ No newline at end of file +} diff --git a/aws/core/src/test/resources/ec2/alestic_canonical.xml b/apis/ec2/src/test/resources/alestic_canonical.xml similarity index 100% rename from aws/core/src/test/resources/ec2/alestic_canonical.xml rename to apis/ec2/src/test/resources/alestic_canonical.xml diff --git a/aws/core/src/test/resources/ec2/allocate_address.xml b/apis/ec2/src/test/resources/allocate_address.xml similarity index 100% rename from aws/core/src/test/resources/ec2/allocate_address.xml rename to apis/ec2/src/test/resources/allocate_address.xml diff --git a/aws/core/src/test/resources/ec2/amzn_images.xml b/apis/ec2/src/test/resources/amzn_images.xml similarity index 100% rename from aws/core/src/test/resources/ec2/amzn_images.xml rename to apis/ec2/src/test/resources/amzn_images.xml diff --git a/aws/core/src/test/resources/ec2/attach.xml b/apis/ec2/src/test/resources/attach.xml similarity index 100% rename from aws/core/src/test/resources/ec2/attach.xml rename to apis/ec2/src/test/resources/attach.xml diff --git a/aws/core/src/test/resources/ec2/availabilityZones.xml b/apis/ec2/src/test/resources/availabilityZones.xml similarity index 100% rename from aws/core/src/test/resources/ec2/availabilityZones.xml rename to apis/ec2/src/test/resources/availabilityZones.xml diff --git a/aws/core/src/test/resources/ec2/bundle_instance.xml b/apis/ec2/src/test/resources/bundle_instance.xml similarity index 100% rename from aws/core/src/test/resources/ec2/bundle_instance.xml rename to apis/ec2/src/test/resources/bundle_instance.xml diff --git a/aws/core/src/test/resources/ec2/cancel_bundle_task.xml b/apis/ec2/src/test/resources/cancel_bundle_task.xml similarity index 100% rename from aws/core/src/test/resources/ec2/cancel_bundle_task.xml rename to apis/ec2/src/test/resources/cancel_bundle_task.xml diff --git a/aws/core/src/test/resources/ec2/create_keypair.xml b/apis/ec2/src/test/resources/create_keypair.xml similarity index 100% rename from aws/core/src/test/resources/ec2/create_keypair.xml rename to apis/ec2/src/test/resources/create_keypair.xml diff --git a/aws/core/src/test/resources/ec2/created_snapshot.xml b/apis/ec2/src/test/resources/created_snapshot.xml similarity index 100% rename from aws/core/src/test/resources/ec2/created_snapshot.xml rename to apis/ec2/src/test/resources/created_snapshot.xml diff --git a/aws/core/src/test/resources/ec2/created_volume.xml b/apis/ec2/src/test/resources/created_volume.xml similarity index 100% rename from aws/core/src/test/resources/ec2/created_volume.xml rename to apis/ec2/src/test/resources/created_volume.xml diff --git a/aws/core/src/test/resources/ec2/describe_addresses.xml b/apis/ec2/src/test/resources/describe_addresses.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_addresses.xml rename to apis/ec2/src/test/resources/describe_addresses.xml diff --git a/aws/core/src/test/resources/ec2/describe_bundle_tasks.xml b/apis/ec2/src/test/resources/describe_bundle_tasks.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_bundle_tasks.xml rename to apis/ec2/src/test/resources/describe_bundle_tasks.xml diff --git a/aws/core/src/test/resources/ec2/describe_image_attribute_blockDeviceMapping.xml b/apis/ec2/src/test/resources/describe_image_attribute_blockDeviceMapping.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_image_attribute_blockDeviceMapping.xml rename to apis/ec2/src/test/resources/describe_image_attribute_blockDeviceMapping.xml diff --git a/aws/core/src/test/resources/ec2/describe_image_attribute_launchPermission.xml b/apis/ec2/src/test/resources/describe_image_attribute_launchPermission.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_image_attribute_launchPermission.xml rename to apis/ec2/src/test/resources/describe_image_attribute_launchPermission.xml diff --git a/aws/core/src/test/resources/ec2/describe_image_attribute_productCodes.xml b/apis/ec2/src/test/resources/describe_image_attribute_productCodes.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_image_attribute_productCodes.xml rename to apis/ec2/src/test/resources/describe_image_attribute_productCodes.xml diff --git a/aws/core/src/test/resources/ec2/describe_images.xml b/apis/ec2/src/test/resources/describe_images.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_images.xml rename to apis/ec2/src/test/resources/describe_images.xml diff --git a/aws/core/src/test/resources/ec2/describe_images_cc.xml b/apis/ec2/src/test/resources/describe_images_cc.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_images_cc.xml rename to apis/ec2/src/test/resources/describe_images_cc.xml diff --git a/aws/core/src/test/resources/ec2/describe_images_ebs.xml b/apis/ec2/src/test/resources/describe_images_ebs.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_images_ebs.xml rename to apis/ec2/src/test/resources/describe_images_ebs.xml diff --git a/aws/core/src/test/resources/ec2/describe_images_windows.xml b/apis/ec2/src/test/resources/describe_images_windows.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_images_windows.xml rename to apis/ec2/src/test/resources/describe_images_windows.xml diff --git a/aws/core/src/test/resources/ec2/describe_instances.xml b/apis/ec2/src/test/resources/describe_instances.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_instances.xml rename to apis/ec2/src/test/resources/describe_instances.xml diff --git a/aws/core/src/test/resources/ec2/describe_instances_ebs.xml b/apis/ec2/src/test/resources/describe_instances_ebs.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_instances_ebs.xml rename to apis/ec2/src/test/resources/describe_instances_ebs.xml diff --git a/aws/core/src/test/resources/ec2/describe_instances_euc.xml b/apis/ec2/src/test/resources/describe_instances_euc.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_instances_euc.xml rename to apis/ec2/src/test/resources/describe_instances_euc.xml diff --git a/aws/core/src/test/resources/ec2/describe_instances_nova.xml b/apis/ec2/src/test/resources/describe_instances_nova.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_instances_nova.xml rename to apis/ec2/src/test/resources/describe_instances_nova.xml diff --git a/aws/core/src/test/resources/ec2/describe_instances_running.xml b/apis/ec2/src/test/resources/describe_instances_running.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_instances_running.xml rename to apis/ec2/src/test/resources/describe_instances_running.xml diff --git a/aws/core/src/test/resources/ec2/describe_keypairs.xml b/apis/ec2/src/test/resources/describe_keypairs.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_keypairs.xml rename to apis/ec2/src/test/resources/describe_keypairs.xml diff --git a/aws/core/src/test/resources/ec2/describe_placement_groups.xml b/apis/ec2/src/test/resources/describe_placement_groups.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_placement_groups.xml rename to apis/ec2/src/test/resources/describe_placement_groups.xml diff --git a/aws/core/src/test/resources/ec2/describe_reserved_instances_offerings.xml b/apis/ec2/src/test/resources/describe_reserved_instances_offerings.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_reserved_instances_offerings.xml rename to apis/ec2/src/test/resources/describe_reserved_instances_offerings.xml diff --git a/aws/core/src/test/resources/ec2/describe_securitygroups.xml b/apis/ec2/src/test/resources/describe_securitygroups.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_securitygroups.xml rename to apis/ec2/src/test/resources/describe_securitygroups.xml diff --git a/aws/core/src/test/resources/ec2/describe_snapshots.xml b/apis/ec2/src/test/resources/describe_snapshots.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_snapshots.xml rename to apis/ec2/src/test/resources/describe_snapshots.xml diff --git a/aws/core/src/test/resources/ec2/describe_volumes.xml b/apis/ec2/src/test/resources/describe_volumes.xml similarity index 100% rename from aws/core/src/test/resources/ec2/describe_volumes.xml rename to apis/ec2/src/test/resources/describe_volumes.xml diff --git a/aws/core/src/test/resources/ec2/disableApiTermination.xml b/apis/ec2/src/test/resources/disableApiTermination.xml similarity index 100% rename from aws/core/src/test/resources/ec2/disableApiTermination.xml rename to apis/ec2/src/test/resources/disableApiTermination.xml diff --git a/aws/core/src/test/resources/ec2/eucalyptus_images.xml b/apis/ec2/src/test/resources/eucalyptus_images.xml similarity index 100% rename from aws/core/src/test/resources/ec2/eucalyptus_images.xml rename to apis/ec2/src/test/resources/eucalyptus_images.xml diff --git a/aws/core/src/test/resources/ec2/instanceInitiatedShutdownBehavior.xml b/apis/ec2/src/test/resources/instanceInitiatedShutdownBehavior.xml similarity index 100% rename from aws/core/src/test/resources/ec2/instanceInitiatedShutdownBehavior.xml rename to apis/ec2/src/test/resources/instanceInitiatedShutdownBehavior.xml diff --git a/aws/core/src/test/resources/ec2/instanceType.xml b/apis/ec2/src/test/resources/instanceType.xml similarity index 100% rename from aws/core/src/test/resources/ec2/instanceType.xml rename to apis/ec2/src/test/resources/instanceType.xml diff --git a/aws/core/src/test/resources/log4j.xml b/apis/ec2/src/test/resources/log4j.xml similarity index 100% rename from aws/core/src/test/resources/log4j.xml rename to apis/ec2/src/test/resources/log4j.xml diff --git a/aws/core/src/test/resources/ec2/monitoring.xml b/apis/ec2/src/test/resources/monitoring.xml similarity index 100% rename from aws/core/src/test/resources/ec2/monitoring.xml rename to apis/ec2/src/test/resources/monitoring.xml diff --git a/aws/core/src/test/resources/ec2/nova_images.xml b/apis/ec2/src/test/resources/nova_images.xml similarity index 100% rename from aws/core/src/test/resources/ec2/nova_images.xml rename to apis/ec2/src/test/resources/nova_images.xml diff --git a/aws/core/src/test/resources/ec2/ramdisk.xml b/apis/ec2/src/test/resources/ramdisk.xml similarity index 100% rename from aws/core/src/test/resources/ec2/ramdisk.xml rename to apis/ec2/src/test/resources/ramdisk.xml diff --git a/aws/core/src/test/resources/ec2/regionEndpoints-additional.xml b/apis/ec2/src/test/resources/regionEndpoints-additional.xml similarity index 100% rename from aws/core/src/test/resources/ec2/regionEndpoints-additional.xml rename to apis/ec2/src/test/resources/regionEndpoints-additional.xml diff --git a/aws/core/src/test/resources/ec2/regionEndpoints.xml b/apis/ec2/src/test/resources/regionEndpoints.xml similarity index 100% rename from aws/core/src/test/resources/ec2/regionEndpoints.xml rename to apis/ec2/src/test/resources/regionEndpoints.xml diff --git a/aws/core/src/test/resources/ec2/rightscale_images.xml b/apis/ec2/src/test/resources/rightscale_images.xml similarity index 100% rename from aws/core/src/test/resources/ec2/rightscale_images.xml rename to apis/ec2/src/test/resources/rightscale_images.xml diff --git a/aws/core/src/test/resources/ec2/run_instances.xml b/apis/ec2/src/test/resources/run_instances.xml similarity index 100% rename from aws/core/src/test/resources/ec2/run_instances.xml rename to apis/ec2/src/test/resources/run_instances.xml diff --git a/aws/core/src/test/resources/ec2/start_instances.xml b/apis/ec2/src/test/resources/start_instances.xml similarity index 100% rename from aws/core/src/test/resources/ec2/start_instances.xml rename to apis/ec2/src/test/resources/start_instances.xml diff --git a/aws/core/src/test/resources/ec2/stop_instances.xml b/apis/ec2/src/test/resources/stop_instances.xml similarity index 100% rename from aws/core/src/test/resources/ec2/stop_instances.xml rename to apis/ec2/src/test/resources/stop_instances.xml diff --git a/aws/core/src/test/resources/ec2/terminate_instances.xml b/apis/ec2/src/test/resources/terminate_instances.xml similarity index 100% rename from aws/core/src/test/resources/ec2/terminate_instances.xml rename to apis/ec2/src/test/resources/terminate_instances.xml diff --git a/aws/core/src/test/resources/ec2/userData.xml b/apis/ec2/src/test/resources/userData.xml similarity index 100% rename from aws/core/src/test/resources/ec2/userData.xml rename to apis/ec2/src/test/resources/userData.xml diff --git a/aws/core/src/test/resources/ec2/vostok.xml b/apis/ec2/src/test/resources/vostok.xml similarity index 100% rename from aws/core/src/test/resources/ec2/vostok.xml rename to apis/ec2/src/test/resources/vostok.xml diff --git a/apis/elb/src/main/java/org/jclouds/elb/ELBAsyncClient.java b/apis/elb/src/main/java/org/jclouds/elb/ELBAsyncClient.java index 6bb3b8db16..b0a2c8579c 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/ELBAsyncClient.java +++ b/apis/elb/src/main/java/org/jclouds/elb/ELBAsyncClient.java @@ -19,8 +19,8 @@ package org.jclouds.elb; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Set; diff --git a/apis/elb/src/main/java/org/jclouds/elb/binders/BindAvailabilityZonesToIndexedFormParams.java b/apis/elb/src/main/java/org/jclouds/elb/binders/BindAvailabilityZonesToIndexedFormParams.java index 10c59069e5..1378f13c0a 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/binders/BindAvailabilityZonesToIndexedFormParams.java +++ b/apis/elb/src/main/java/org/jclouds/elb/binders/BindAvailabilityZonesToIndexedFormParams.java @@ -19,7 +19,7 @@ package org.jclouds.elb.binders; -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithStringFormat; +import static org.jclouds.aws.util.AWSUtils.indexStringArrayToFormValuesWithStringFormat; import javax.inject.Singleton; diff --git a/apis/elb/src/main/java/org/jclouds/elb/binders/BindInstanceIdsToIndexedFormParams.java b/apis/elb/src/main/java/org/jclouds/elb/binders/BindInstanceIdsToIndexedFormParams.java index c6a873ac42..dae79d3f4b 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/binders/BindInstanceIdsToIndexedFormParams.java +++ b/apis/elb/src/main/java/org/jclouds/elb/binders/BindInstanceIdsToIndexedFormParams.java @@ -19,7 +19,7 @@ package org.jclouds.elb.binders; -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithStringFormat; +import static org.jclouds.aws.util.AWSUtils.indexStringArrayToFormValuesWithStringFormat; import javax.inject.Singleton; diff --git a/apis/elb/src/main/java/org/jclouds/elb/binders/BindLoadBalancerNamesToIndexedFormParams.java b/apis/elb/src/main/java/org/jclouds/elb/binders/BindLoadBalancerNamesToIndexedFormParams.java index f9f4ce10ed..6862eaf4f5 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/binders/BindLoadBalancerNamesToIndexedFormParams.java +++ b/apis/elb/src/main/java/org/jclouds/elb/binders/BindLoadBalancerNamesToIndexedFormParams.java @@ -1,6 +1,6 @@ package org.jclouds.elb.binders; -import static org.jclouds.aws.ec2.util.EC2Utils.indexStringArrayToFormValuesWithStringFormat; +import static org.jclouds.aws.util.AWSUtils.indexStringArrayToFormValuesWithStringFormat; import javax.inject.Singleton; diff --git a/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBDestroyLoadBalancerStrategy.java b/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBDestroyLoadBalancerStrategy.java index 16269efca8..89ebe1edc2 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBDestroyLoadBalancerStrategy.java +++ b/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBDestroyLoadBalancerStrategy.java @@ -20,7 +20,7 @@ package org.jclouds.elb.loadbalancer.strategy; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +import static org.jclouds.aws.util.AWSUtils.parseHandle; import javax.annotation.Resource; import javax.inject.Inject; diff --git a/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBGetLoadBalancerMetadataStrategy.java b/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBGetLoadBalancerMetadataStrategy.java index 9fbb832349..05139b0123 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBGetLoadBalancerMetadataStrategy.java +++ b/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBGetLoadBalancerMetadataStrategy.java @@ -2,7 +2,7 @@ package org.jclouds.elb.loadbalancer.strategy; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.getOnlyElement; -import static org.jclouds.aws.ec2.util.EC2Utils.parseHandle; +import static org.jclouds.aws.util.AWSUtils.parseHandle; import java.util.NoSuchElementException; diff --git a/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBLoadBalanceNodesStrategy.java b/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBLoadBalanceNodesStrategy.java index cf651de1cd..c4b488bc42 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBLoadBalanceNodesStrategy.java +++ b/apis/elb/src/main/java/org/jclouds/elb/loadbalancer/strategy/ELBLoadBalanceNodesStrategy.java @@ -20,7 +20,7 @@ package org.jclouds.elb.loadbalancer.strategy; import static com.google.common.base.Preconditions.checkNotNull; -import static org.jclouds.aws.ec2.compute.util.EC2ComputeUtils.getRegionFromLocationOrNull; +import static org.jclouds.aws.util.AWSUtils.getRegionFromLocationOrNull; import java.util.ArrayList; import java.util.List; diff --git a/apis/elb/src/main/java/org/jclouds/elb/xml/DescribeLoadBalancersResponseHandler.java b/apis/elb/src/main/java/org/jclouds/elb/xml/DescribeLoadBalancersResponseHandler.java index a8ae9a800b..be81d39d49 100644 --- a/apis/elb/src/main/java/org/jclouds/elb/xml/DescribeLoadBalancersResponseHandler.java +++ b/apis/elb/src/main/java/org/jclouds/elb/xml/DescribeLoadBalancersResponseHandler.java @@ -24,7 +24,7 @@ import java.util.Set; import javax.annotation.Resource; import javax.inject.Inject; -import org.jclouds.aws.ec2.util.EC2Utils; +import org.jclouds.aws.util.AWSUtils; import org.jclouds.date.DateService; import org.jclouds.elb.domain.LoadBalancer; import org.jclouds.elb.domain.LoadBalancer.AppCookieStickinessPolicy; @@ -126,7 +126,7 @@ public class DescribeLoadBalancersResponseHandler extends } else if (!(inListenerDescriptions || inAppCookieStickinessPolicies || inInstances || inLBCookieStickinessPolicies || inAvailabilityZones)) { try { - String region = EC2Utils.findRegionInArgsOrNull(getRequest()); + String region = AWSUtils.findRegionInArgsOrNull(getRequest()); elb.setRegion(region); contents.add(elb); } catch (NullPointerException e) { diff --git a/aws/core/README.txt b/aws/README.txt similarity index 100% rename from aws/core/README.txt rename to aws/README.txt diff --git a/aws/core/pom.xml b/aws/core/pom.xml deleted file mode 100644 index 945fea9569..0000000000 --- a/aws/core/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - 4.0.0 - - org.jclouds - jclouds-aws-project - 1.0-SNAPSHOT - - jclouds-aws - jclouds Amazon AWS Components Core - jclouds Core components to access Amazon AWS - - diff --git a/aws/core/src/main/java/org/jclouds/aws/util/AWSUtils.java b/aws/core/src/main/java/org/jclouds/aws/util/AWSUtils.java deleted file mode 100644 index 030b3d2527..0000000000 --- a/aws/core/src/main/java/org/jclouds/aws/util/AWSUtils.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * Copyright (C) 2010 Cloud Conscious, LLC. - * - * ==================================================================== - * 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.aws.util; - -import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; - -import javax.annotation.Resource; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Provider; -import javax.inject.Singleton; - -import org.jclouds.aws.domain.AWSError; -import org.jclouds.aws.xml.ErrorHandler; -import org.jclouds.http.HttpRequest; -import org.jclouds.http.HttpResponse; -import org.jclouds.http.functions.ParseSax; -import org.jclouds.http.functions.ParseSax.Factory; -import org.jclouds.logging.Logger; -import org.jclouds.rest.RequestSigner; - -/** - * Needed to sign and verify requests and responses. - * - * @author Adrian Cole - */ -@Singleton -public class AWSUtils { - private final RequestSigner signer; - private final ParseSax.Factory factory; - private final Provider errorHandlerProvider; - private final String requestId; - private final String requestToken; - @Resource - protected Logger logger = Logger.NULL; - - @Inject - AWSUtils(@Named(PROPERTY_HEADER_TAG) String headerTag, RequestSigner signer, Factory factory, - Provider errorHandlerProvider) { - this.signer = signer; - this.factory = factory; - this.errorHandlerProvider = errorHandlerProvider; - this.requestId = String.format("x-%s-request-id", headerTag); - this.requestToken = String.format("x-%s-id-2", headerTag); - } - - public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) { - // HEAD has no content - if (response.getPayload() == null) - return null; - // Eucalyptus and Walrus occasionally return text/plain - if (response.getPayload().getContentMetadata().getContentType() != null - && response.getPayload().getContentMetadata().getContentType().indexOf("text/plain") != -1) - return null; - try { - AWSError error = (AWSError) factory.create(errorHandlerProvider.get()).setContext(request).apply(response); - if (error.getRequestId() == null) - error.setRequestId(response.getFirstHeaderOrNull(requestId)); - error.setRequestToken(response.getFirstHeaderOrNull(requestToken)); - if ("SignatureDoesNotMatch".equals(error.getCode())) { - error.setStringSigned(signer.createStringToSign(request)); - error.setSignature(signer.sign(error.getStringSigned())); - } - return error; - } catch (RuntimeException e) { - logger.warn(e, "error parsing error"); - return null; - } - } -} \ No newline at end of file diff --git a/aws/core/src/test/java/org/jclouds/aws/ProvidersInPropertiesTest.java b/aws/core/src/test/java/org/jclouds/aws/ProvidersInPropertiesTest.java deleted file mode 100644 index 4e8c9c2fa5..0000000000 --- a/aws/core/src/test/java/org/jclouds/aws/ProvidersInPropertiesTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Copyright (C) 2010 Cloud Conscious, LLC. - * - * ==================================================================== - * 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.aws; - -import org.jclouds.compute.util.ComputeServiceUtils; -import org.jclouds.rest.Providers; -import org.testng.annotations.Test; - -import com.google.common.collect.Iterables; - -/** - * - * @author Adrian Cole - * - */ -@Test(groups = "unit") -public class ProvidersInPropertiesTest { - - @Test - public void testSupportedComputeServiceProviders() { - Iterable providers = ComputeServiceUtils.getSupportedProviders(); - assert Iterables.contains(providers, "ec2") : providers; - assert Iterables.contains(providers, "nova") : providers; - assert Iterables.contains(providers, "eucalyptus") : providers; - } - - @Test - public void testSupportedProviders() { - Iterable providers = Providers.getSupportedProviders(); - assert Iterables.contains(providers, "ec2") : providers; - assert Iterables.contains(providers, "nova") : providers; - assert Iterables.contains(providers, "eucalyptus") : providers; - } - -} diff --git a/aws/demos/pom.xml b/aws/demos/pom.xml deleted file mode 100644 index fa9e3b1b44..0000000000 --- a/aws/demos/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 4.0.0 - - org.jclouds - jclouds-aws-project - 1.0-SNAPSHOT - - jclouds-aws-demos-project - pom - jclouds AWS demos aggregator - - - createlamp - createandlistbuckets - - - - - ${project.groupId} - jclouds-aws - ${project.version} - - - ${project.groupId} - jclouds-aws - ${project.version} - test-jar - test - - - diff --git a/aws/pom.xml b/aws/pom.xml index eb991d3c7b..de2374a8ac 100644 --- a/aws/pom.xml +++ b/aws/pom.xml @@ -21,199 +21,29 @@ --> + 4.0.0 - jclouds-project org.jclouds + jclouds-project 1.0-SNAPSHOT ../project/pom.xml - 4.0.0 - jclouds-aws-project - pom - jclouds AWS project - - core - demos - - - - FIXME - FIXME - - trmkrun-ccc,test.trmk-924 - https://ec2.us-east-1.amazonaws.com - 2010-06-15 - ${test.aws.identity} - ${test.aws.credential} - https://monitoring.us-east-1.amazonaws.com - 2009-05-15 - ${test.aws.identity} - ${test.aws.credential} - http://173.205.188.130:8773/services/Eucalyptus - 2010-06-15 - FIXME - FIXME - http://10.255.255.1:8773/services/Cloud - 2010-06-15 - FIXME - FIXME - - + jclouds-aws + jclouds Amazon AWS Components Core + jclouds Core components to access Amazon AWS ${project.groupId} jclouds-core ${project.version} - test-jar - test ${project.groupId} - jclouds-scriptbuilder - ${project.version} - - - ${project.groupId} - jclouds-enterprise - ${project.version} - test - - - ${project.groupId} - jclouds-jsch - ${project.version} - test - - - ${project.groupId} - jclouds-compute - ${project.version} - - - ${project.groupId} - jclouds-compute + jclouds-core ${project.version} test-jar test - - ${project.groupId} - jclouds-loadbalancer - ${project.version} - - - ${project.groupId} - jclouds-loadbalancer - ${project.version} - test-jar - test - - - log4j - log4j - 1.2.14 - test - - - ${project.groupId} - jclouds-log4j - ${project.version} - test - - - - live - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration - integration-test - - test - - - - - test.ec2.endpoint - ${test.ec2.endpoint} - - - test.ec2.apiversion - ${test.ec2.apiversion} - - - test.ec2.identity - ${test.ec2.identity} - - - test.ec2.credential - ${test.ec2.credential} - - - jclouds.compute.blacklist.nodes - ${jclouds.compute.blacklist.nodes} - - - test.cloudwatch.endpoint - ${test.cloudwatch.endpoint} - - - test.cloudwatch.apiversion - ${test.cloudwatch.apiversion} - - - test.cloudwatch.identity - ${test.cloudwatch.identity} - - - test.cloudwatch.credential - ${test.cloudwatch.credential} - - - test.eucalyptus.endpoint - ${test.eucalyptus.endpoint} - - - test.eucalyptus.apiversion - ${test.eucalyptus.apiversion} - - - test.eucalyptus.identity - ${test.eucalyptus.identity} - - - test.eucalyptus.credential - ${test.eucalyptus.credential} - - - test.nova.endpoint - ${test.nova.endpoint} - - - test.nova.apiversion - ${test.nova.apiversion} - - - test.nova.identity - ${test.nova.identity} - - - test.nova.credential - ${test.nova.credential} - - - - - - - - - - diff --git a/aws/core/src/main/java/org/jclouds/aws/AWSResponseException.java b/aws/src/main/java/org/jclouds/aws/AWSResponseException.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/AWSResponseException.java rename to aws/src/main/java/org/jclouds/aws/AWSResponseException.java diff --git a/aws/core/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java b/aws/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java rename to aws/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java diff --git a/aws/core/src/main/java/org/jclouds/aws/config/FormSigningRestClientModule.java b/aws/src/main/java/org/jclouds/aws/config/FormSigningRestClientModule.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/config/FormSigningRestClientModule.java rename to aws/src/main/java/org/jclouds/aws/config/FormSigningRestClientModule.java diff --git a/aws/core/src/main/java/org/jclouds/aws/config/WithZonesFormSigningRestClientModule.java b/aws/src/main/java/org/jclouds/aws/config/WithZonesFormSigningRestClientModule.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/config/WithZonesFormSigningRestClientModule.java rename to aws/src/main/java/org/jclouds/aws/config/WithZonesFormSigningRestClientModule.java diff --git a/aws/core/src/main/java/org/jclouds/aws/domain/AWSError.java b/aws/src/main/java/org/jclouds/aws/domain/AWSError.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/domain/AWSError.java rename to aws/src/main/java/org/jclouds/aws/domain/AWSError.java diff --git a/aws/core/src/main/java/org/jclouds/aws/domain/Region.java b/aws/src/main/java/org/jclouds/aws/domain/Region.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/domain/Region.java rename to aws/src/main/java/org/jclouds/aws/domain/Region.java diff --git a/aws/core/src/main/java/org/jclouds/aws/filters/FormSigner.java b/aws/src/main/java/org/jclouds/aws/filters/FormSigner.java similarity index 94% rename from aws/core/src/main/java/org/jclouds/aws/filters/FormSigner.java rename to aws/src/main/java/org/jclouds/aws/filters/FormSigner.java index fb5a8bdc99..339e7ad14b 100755 --- a/aws/core/src/main/java/org/jclouds/aws/filters/FormSigner.java +++ b/aws/src/main/java/org/jclouds/aws/filters/FormSigner.java @@ -21,13 +21,13 @@ package org.jclouds.aws.filters; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.AWS_ACCESS_KEY_ID; -import static org.jclouds.aws.ec2.reference.EC2Parameters.SIGNATURE; -import static org.jclouds.aws.ec2.reference.EC2Parameters.SIGNATURE_METHOD; -import static org.jclouds.aws.ec2.reference.EC2Parameters.SIGNATURE_VERSION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.TIMESTAMP; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import static org.jclouds.aws.reference.FormParameters.ACTION; +import static org.jclouds.aws.reference.FormParameters.AWS_ACCESS_KEY_ID; +import static org.jclouds.aws.reference.FormParameters.SIGNATURE; +import static org.jclouds.aws.reference.FormParameters.SIGNATURE_METHOD; +import static org.jclouds.aws.reference.FormParameters.SIGNATURE_VERSION; +import static org.jclouds.aws.reference.FormParameters.TIMESTAMP; +import static org.jclouds.aws.reference.FormParameters.VERSION; import java.util.Arrays; import java.util.Comparator; diff --git a/aws/core/src/main/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandler.java b/aws/src/main/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandler.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandler.java rename to aws/src/main/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandler.java diff --git a/aws/core/src/main/java/org/jclouds/aws/handlers/AWSRedirectionRetryHandler.java b/aws/src/main/java/org/jclouds/aws/handlers/AWSRedirectionRetryHandler.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/handlers/AWSRedirectionRetryHandler.java rename to aws/src/main/java/org/jclouds/aws/handlers/AWSRedirectionRetryHandler.java diff --git a/aws/core/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java b/aws/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java rename to aws/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java diff --git a/aws/core/src/main/java/org/jclouds/aws/handlers/package-info.java b/aws/src/main/java/org/jclouds/aws/handlers/package-info.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/handlers/package-info.java rename to aws/src/main/java/org/jclouds/aws/handlers/package-info.java diff --git a/aws/core/src/main/java/org/jclouds/aws/reference/AWSConstants.java b/aws/src/main/java/org/jclouds/aws/reference/AWSConstants.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/reference/AWSConstants.java rename to aws/src/main/java/org/jclouds/aws/reference/AWSConstants.java diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/reference/EC2Parameters.java b/aws/src/main/java/org/jclouds/aws/reference/FormParameters.java old mode 100755 new mode 100644 similarity index 97% rename from aws/core/src/main/java/org/jclouds/aws/ec2/reference/EC2Parameters.java rename to aws/src/main/java/org/jclouds/aws/reference/FormParameters.java index 45b2f60b4c..a50c0c67ba --- a/aws/core/src/main/java/org/jclouds/aws/ec2/reference/EC2Parameters.java +++ b/aws/src/main/java/org/jclouds/aws/reference/FormParameters.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.reference; +package org.jclouds.aws.reference; /** * Configuration properties and constants used in EC2 connections. @@ -25,7 +25,7 @@ package org.jclouds.aws.ec2.reference; * @see * @author Adrian Cole */ -public interface EC2Parameters { +public interface FormParameters { /** * Indicates the action to perform. Example: RunInstances diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/util/EC2Utils.java b/aws/src/main/java/org/jclouds/aws/util/AWSUtils.java similarity index 64% rename from aws/core/src/main/java/org/jclouds/aws/ec2/util/EC2Utils.java rename to aws/src/main/java/org/jclouds/aws/util/AWSUtils.java index 9383d96b94..0ce230422e 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/util/EC2Utils.java +++ b/aws/src/main/java/org/jclouds/aws/util/AWSUtils.java @@ -17,40 +17,43 @@ * ==================================================================== */ -package org.jclouds.aws.ec2.util; +package org.jclouds.aws.util; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - +import javax.annotation.Resource; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; import javax.inject.Singleton; +import org.jclouds.aws.domain.AWSError; import org.jclouds.aws.domain.Region; -import org.jclouds.aws.ec2.domain.AvailabilityZone; -import org.jclouds.aws.ec2.domain.RunningInstance; -import org.jclouds.aws.ec2.services.InstanceClient; +import org.jclouds.aws.xml.ErrorHandler; import org.jclouds.domain.Location; import org.jclouds.domain.LocationScope; import org.jclouds.http.HttpRequest; +import org.jclouds.http.HttpResponse; +import org.jclouds.http.functions.ParseSax; +import org.jclouds.http.functions.ParseSax.Factory; import org.jclouds.http.utils.ModifyRequest; +import org.jclouds.logging.Logger; +import org.jclouds.rest.RequestSigner; import org.jclouds.rest.internal.GeneratedHttpRequest; import com.google.common.base.Function; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap.Builder; -import com.google.common.collect.Iterables; /** + * Needed to sign and verify requests and responses. * * @author Adrian Cole */ -public class EC2Utils { +@Singleton +public class AWSUtils { @Singleton public static class GetRegionFromLocation implements Function { public String apply(Location location) { @@ -59,78 +62,46 @@ public class EC2Utils { } } - public static String[] getAvailabilityZonesForRegion(String region) { - Set availabilityZones = new HashSet(); - for (String az : AvailabilityZone.zones) { - if (az.startsWith(region)) - availabilityZones.add(az); - } + private final RequestSigner signer; + private final ParseSax.Factory factory; + private final Provider errorHandlerProvider; + private final String requestId; + private final String requestToken; + @Resource + protected Logger logger = Logger.NULL; - return (String[]) availabilityZones.toArray(new String[availabilityZones.size()]); + @Inject + AWSUtils(@Named(PROPERTY_HEADER_TAG) String headerTag, RequestSigner signer, Factory factory, + Provider errorHandlerProvider) { + this.signer = signer; + this.factory = factory; + this.errorHandlerProvider = errorHandlerProvider; + this.requestId = String.format("x-%s-request-id", headerTag); + this.requestToken = String.format("x-%s-id-2", headerTag); } - public static R indexStringArrayToFormValuesWithPrefix(R request, String prefix, Object input) { - checkArgument(checkNotNull(input, "input") instanceof String[], "this binder is only valid for String[] : " - + input.getClass()); - String[] values = (String[]) input; - Builder builder = ImmutableMultimap. builder(); - for (int i = 0; i < values.length; i++) { - builder.put(prefix + "." + (i + 1), checkNotNull(values[i], prefix.toLowerCase() + "s[" + i + "]")); - } - ImmutableMultimap forms = builder.build(); - return forms.size() == 0 ? request : ModifyRequest.putFormParams(request, forms); - } - - public static Iterable getAllRunningInstancesInRegion(InstanceClient client, String region, - String id) { - return Iterables.concat(client.describeInstancesInRegion(region, id)); - } - - // there may not be a region, and in this case we do-not encode it into the string - public static String[] parseHandle(String id) { - String[] parts = checkNotNull(id, "id").split("/"); - return (parts.length == 1) ? new String[] { null, id } : parts; - } - - public static R indexIterableToFormValuesWithPrefix(R request, String prefix, Object input) { - checkArgument(checkNotNull(input, "input") instanceof Iterable, "this binder is only valid for Iterable: " - + input.getClass()); - Iterable values = (Iterable) input; - Builder builder = ImmutableMultimap. builder(); - int i = 0; - for (Object o : values) { - builder.put(prefix + "." + (i++ + 1), checkNotNull(o.toString(), prefix.toLowerCase() + "s[" + i + "]")); - } - ImmutableMultimap forms = builder.build(); - return forms.size() == 0 ? request : ModifyRequest.putFormParams(request, forms); - } - - public static String findRegionInArgsOrNull(GeneratedHttpRequest gRequest) { - for (Object arg : gRequest.getArgs()) { - if (arg instanceof String) { - String regionName = (String) arg; - if (isRegion(regionName)) - return regionName; + public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) { + // HEAD has no content + if (response.getPayload() == null) + return null; + // Eucalyptus and Walrus occasionally return text/plain + if (response.getPayload().getContentMetadata().getContentType() != null + && response.getPayload().getContentMetadata().getContentType().indexOf("text/plain") != -1) + return null; + try { + AWSError error = (AWSError) factory.create(errorHandlerProvider.get()).setContext(request).apply(response); + if (error.getRequestId() == null) + error.setRequestId(response.getFirstHeaderOrNull(requestId)); + error.setRequestToken(response.getFirstHeaderOrNull(requestToken)); + if ("SignatureDoesNotMatch".equals(error.getCode())) { + error.setStringSigned(signer.createStringToSign(request)); + error.setSignature(signer.sign(error.getStringSigned())); } + return error; + } catch (RuntimeException e) { + logger.warn(e, "error parsing error"); + return null; } - return null; - } - - public static boolean isRegion(String regionName) { - return Region.EU_WEST_1.equals(regionName) || Region.US_WEST_1.equals(regionName) - || Region.US_EAST_1.equals(regionName) || Region.US_STANDARD.equals(regionName) - || Region.AP_SOUTHEAST_1.equals(regionName); - } - - public static String findAvailabilityZoneInArgsOrNull(GeneratedHttpRequest gRequest) { - for (Object arg : gRequest.getArgs()) { - if (arg instanceof String) { - String zone = (String) arg; - if (AvailabilityZone.zones.contains(zone)) - return zone; - } - } - return null; } public static R indexStringArrayToFormValuesWithStringFormat(R request, String format, @@ -146,15 +117,57 @@ public class EC2Utils { return forms.size() == 0 ? request : ModifyRequest.putFormParams(request, forms); } - private static final Pattern ELB_PATTERN = Pattern.compile("([^.]+)-[^.]+\\.([^.]+)\\.elb\\.amazonaws\\.com"); + public static boolean isRegion(String regionName) { + return Region.EU_WEST_1.equals(regionName) || Region.US_WEST_1.equals(regionName) + || Region.US_EAST_1.equals(regionName) || Region.US_STANDARD.equals(regionName) + || Region.AP_SOUTHEAST_1.equals(regionName); + } - public static Map getLoadBalancerNameAndRegionFromDnsName(String dnsName) { - Matcher matcher = ELB_PATTERN.matcher(checkNotNull(dnsName, "dnsName")); - checkArgument(matcher.find(), "dnsName syntax is " + ELB_PATTERN + " didn't match: " + dnsName); - String loadBalancerName = matcher.group(1); - String regionName = matcher.group(2); - checkArgument((isRegion(regionName)), - String.format("Region (%s) parsed from (%s) is not a valid region", regionName, dnsName)); - return ImmutableMap. of(regionName, loadBalancerName); + public static R indexIterableToFormValuesWithPrefix(R request, String prefix, Object input) { + checkArgument(checkNotNull(input, "input") instanceof Iterable, "this binder is only valid for Iterable: " + + input.getClass()); + Iterable values = (Iterable) input; + Builder builder = ImmutableMultimap. builder(); + int i = 0; + for (Object o : values) { + builder.put(prefix + "." + (i++ + 1), checkNotNull(o.toString(), prefix.toLowerCase() + "s[" + i + "]")); + } + ImmutableMultimap forms = builder.build(); + return forms.size() == 0 ? request : ModifyRequest.putFormParams(request, forms); + } + + public static R indexStringArrayToFormValuesWithPrefix(R request, String prefix, Object input) { + checkArgument(checkNotNull(input, "input") instanceof String[], "this binder is only valid for String[] : " + + input.getClass()); + String[] values = (String[]) input; + Builder builder = ImmutableMultimap. builder(); + for (int i = 0; i < values.length; i++) { + builder.put(prefix + "." + (i + 1), checkNotNull(values[i], prefix.toLowerCase() + "s[" + i + "]")); + } + ImmutableMultimap forms = builder.build(); + return forms.size() == 0 ? request : ModifyRequest.putFormParams(request, forms); + } + + public static String getRegionFromLocationOrNull(Location location) { + return location.getScope() == LocationScope.ZONE ? location.getParent().getId() : location.getId(); + } + + // there may not be a region, and in this case we do-not encode it into the string + public static String[] parseHandle(String id) { + String[] parts = checkNotNull(id, "id").split("/"); + return (parts.length == 1) ? new String[] { null, id } : parts; + } + + public static String findRegionInArgsOrNull(GeneratedHttpRequest gRequest) { + for (Object arg : gRequest.getArgs()) { + if (arg instanceof String) { + String regionName = (String) arg; + //TODO regions may not be amazon regions! + // take from a configured value + if (isRegion(regionName)) + return regionName; + } + } + return null; } } \ No newline at end of file diff --git a/aws/core/src/main/java/org/jclouds/aws/xml/ErrorHandler.java b/aws/src/main/java/org/jclouds/aws/xml/ErrorHandler.java similarity index 100% rename from aws/core/src/main/java/org/jclouds/aws/xml/ErrorHandler.java rename to aws/src/main/java/org/jclouds/aws/xml/ErrorHandler.java diff --git a/aws/core/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java b/aws/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java similarity index 80% rename from aws/core/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java rename to aws/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java index 6826ad564f..66734094e8 100644 --- a/aws/core/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java +++ b/aws/src/test/java/org/jclouds/aws/config/AWSWithZonesFormSigningRestClientModuleTest.java @@ -24,8 +24,6 @@ import static org.testng.Assert.assertEquals; import java.net.URI; import java.util.Map; -import org.jclouds.aws.ec2.EC2AsyncClient; -import org.jclouds.aws.ec2.EC2Client; import org.jclouds.logging.jdk.JDKLogger; import org.testng.annotations.Test; @@ -40,8 +38,8 @@ public class AWSWithZonesFormSigningRestClientModuleTest { @Test public void testDefaultRegionWhenThereIsAMatch() { - AWSRestClientModule module = new WithZonesFormSigningRestClientModule( - EC2Client.class, EC2AsyncClient.class); + AWSRestClientModule module = new WithZonesFormSigningRestClientModule( + String.class, String.class); URI currentEndpoint = URI.create("http://region1"); Map map = ImmutableMap.of("region1", currentEndpoint, "region2", URI.create("http://region2")); @@ -51,8 +49,8 @@ public class AWSWithZonesFormSigningRestClientModuleTest { @Test public void testDefaultRegionWhenThereIsNoMatch() { - AWSRestClientModule module = new WithZonesFormSigningRestClientModule( - EC2Client.class, EC2AsyncClient.class); + AWSRestClientModule module = new WithZonesFormSigningRestClientModule( + String.class, String.class); URI currentEndpoint = URI.create("http://region3"); Map map = ImmutableMap.of("region1", currentEndpoint, "region2", URI.create("http://region2")); diff --git a/aws/core/src/test/java/org/jclouds/aws/filters/FormSignerTest.java b/aws/src/test/java/org/jclouds/aws/filters/FormSignerTest.java similarity index 52% rename from aws/core/src/test/java/org/jclouds/aws/filters/FormSignerTest.java rename to aws/src/test/java/org/jclouds/aws/filters/FormSignerTest.java index 92a1099ce4..2e09c48f98 100644 --- a/aws/core/src/test/java/org/jclouds/aws/filters/FormSignerTest.java +++ b/aws/src/test/java/org/jclouds/aws/filters/FormSignerTest.java @@ -19,14 +19,27 @@ package org.jclouds.aws.filters; +import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; import static org.testng.Assert.assertEquals; -import org.jclouds.aws.ec2.services.BaseEC2AsyncClientTest; -import org.jclouds.rest.internal.RestAnnotationProcessor; +import java.util.List; +import java.util.Map; + +import org.jclouds.PropertiesBuilder; +import org.jclouds.date.TimeStamp; +import org.jclouds.logging.config.NullLoggingModule; +import org.jclouds.rest.BaseRestClientTest.MockModule; +import org.jclouds.rest.RequestSigner; +import org.jclouds.rest.RestContextBuilder; +import org.jclouds.rest.RestContextFactory; +import org.jclouds.rest.RestContextSpec; import org.testng.annotations.Test; +import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMultimap; -import com.google.inject.TypeLiteral; +import com.google.inject.AbstractModule; +import com.google.inject.Module; +import com.google.inject.name.Names; /** * Tests behavior of {@code FormSigner} @@ -35,10 +48,26 @@ import com.google.inject.TypeLiteral; */ // NOTE:without testName, this will not call @Before* and fail w/NPE during surefire @Test(groups = "unit", testName = "FormSignerTest") -public class FormSignerTest extends BaseEC2AsyncClientTest { +public class FormSignerTest { + @SuppressWarnings({ "unchecked", "rawtypes" }) + public static final RestContextSpec DUMMY_SPEC = new RestContextSpec("provider", "endpoint", + "apiVersion", "identity", "credential", Map.class, List.class, PropertiesBuilder.class, + (Class) RestContextBuilder.class, ImmutableList. of(new MockModule(), new NullLoggingModule(), + new AbstractModule() { + @Override + protected void configure() { + bind(RequestSigner.class).to(FormSigner.class); + bind(String.class).annotatedWith(Names.named(PROPERTY_HEADER_TAG)).toInstance("amz"); + bind(String.class).annotatedWith(TimeStamp.class).toInstance("2009-11-08T15:54:08.897Z"); + } + + })); @Test void testBuildCanonicalizedString() { + FormSigner filter = RestContextFactory.createContextBuilder(DUMMY_SPEC).buildInjector() + .getInstance(FormSigner.class); + assertEquals( filter.buildCanonicalizedString(new ImmutableMultimap.Builder() .put("AWSAccessKeyId", "foo").put("Action", "DescribeImages").put("Expires", "2008-02-10T12:00:00Z") @@ -47,9 +76,4 @@ public class FormSignerTest extends BaseEC2AsyncClientTest { "AWSAccessKeyId=foo&Action=DescribeImages&Expires=2008-02-10T12%3A00%3A00Z&ImageId.1=ami-2bb65342&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2010-06-15"); } - @Override - protected TypeLiteral> createTypeLiteral() { - return new TypeLiteral>() { - }; - } } \ No newline at end of file diff --git a/aws/core/src/test/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandlerTest.java b/aws/src/test/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandlerTest.java similarity index 100% rename from aws/core/src/test/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandlerTest.java rename to aws/src/test/java/org/jclouds/aws/handlers/AWSClientErrorRetryHandlerTest.java diff --git a/aws/core/src/test/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContentTest.java b/aws/src/test/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContentTest.java similarity index 100% rename from aws/core/src/test/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContentTest.java rename to aws/src/test/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContentTest.java diff --git a/aws/core/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java b/aws/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java similarity index 89% rename from aws/core/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java rename to aws/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java index f61463b6db..e838e88aa7 100644 --- a/aws/core/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java +++ b/aws/src/test/java/org/jclouds/aws/util/AWSUtilsTest.java @@ -26,22 +26,19 @@ import static org.testng.Assert.assertEquals; import java.io.IOException; import java.io.InputStream; -import java.util.Properties; import org.jclouds.aws.domain.AWSError; +import org.jclouds.aws.filters.FormSignerTest; import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.jclouds.io.Payloads; -import org.jclouds.logging.config.NullLoggingModule; -import org.jclouds.rest.BaseRestClientTest.MockModule; import org.jclouds.rest.RestContextFactory; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import com.google.common.collect.ImmutableMultimap; -import com.google.common.collect.ImmutableSet; import com.google.inject.Injector; /** @@ -57,8 +54,7 @@ public class AWSUtilsTest { @BeforeTest protected void setUpInjector() throws IOException { - Injector injector = new RestContextFactory().createContextBuilder("ec2", "foo", "bar", - ImmutableSet.of(new MockModule(), new NullLoggingModule()), new Properties()).buildInjector(); + Injector injector = RestContextFactory.createContextBuilder(FormSignerTest.DUMMY_SPEC).buildInjector(); utils = injector.getInstance(AWSUtils.class); diff --git a/aws/core/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java b/aws/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java similarity index 100% rename from aws/core/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java rename to aws/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java diff --git a/aws/core/src/test/resources/error.xml b/aws/src/test/resources/error.xml similarity index 100% rename from aws/core/src/test/resources/error.xml rename to aws/src/test/resources/error.xml diff --git a/aws/src/test/resources/log4j.xml b/aws/src/test/resources/log4j.xml new file mode 100644 index 0000000000..5b548a0f48 --- /dev/null +++ b/aws/src/test/resources/log4j.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties index 31226100e0..24ec2ecec7 100644 --- a/core/src/main/resources/rest.properties +++ b/core/src/main/resources/rest.properties @@ -56,11 +56,11 @@ s3.propertiesbuilder=org.jclouds.s3.S3PropertiesBuilder aws-s3.contextbuilder=org.jclouds.s3.S3ContextBuilder aws-s3.propertiesbuilder=org.jclouds.aws.s3.AWSS3PropertiesBuilder -ec2.contextbuilder=org.jclouds.aws.ec2.EC2ContextBuilder -ec2.propertiesbuilder=org.jclouds.aws.ec2.EC2PropertiesBuilder +ec2.contextbuilder=org.jclouds.ec2.EC2ContextBuilder +ec2.propertiesbuilder=org.jclouds.ec2.EC2PropertiesBuilder -aws-ec2.contextbuilder=org.jclouds.aws.ec2.EC2ContextBuilder -aws-ec2.propertiesbuilder=org.jclouds.aws.ec2.EC2PropertiesBuilder +aws-ec2.contextbuilder=org.jclouds.ec2.EC2ContextBuilder +aws-ec2.propertiesbuilder=org.jclouds.ec2.EC2PropertiesBuilder rimuhosting.contextbuilder=org.jclouds.rimuhosting.miro.RimuHostingContextBuilder rimuhosting.propertiesbuilder=org.jclouds.rimuhosting.miro.RimuHostingPropertiesBuilder @@ -89,11 +89,11 @@ vcloud.propertiesbuilder=org.jclouds.vcloud.VCloudPropertiesBuilder vcloudexpress.contextbuilder=org.jclouds.vcloud.VCloudExpressContextBuilder vcloudexpress.propertiesbuilder=org.jclouds.vcloud.VCloudExpressPropertiesBuilder -eucalyptus.contextbuilder=org.jclouds.aws.ec2.EC2ContextBuilder -eucalyptus.propertiesbuilder=org.jclouds.aws.ec2.EucalyptusPropertiesBuilder +eucalyptus.contextbuilder=org.jclouds.ec2.EC2ContextBuilder +eucalyptus.propertiesbuilder=org.jclouds.ec2.EucalyptusPropertiesBuilder -nova.contextbuilder=org.jclouds.aws.ec2.EC2ContextBuilder -nova.propertiesbuilder=org.jclouds.aws.ec2.NovaPropertiesBuilder +nova.contextbuilder=org.jclouds.ec2.EC2ContextBuilder +nova.propertiesbuilder=org.jclouds.ec2.NovaPropertiesBuilder cloudservers.contextbuilder=org.jclouds.rackspace.cloudservers.CloudServersContextBuilder cloudservers.propertiesbuilder=org.jclouds.rackspace.RackspacePropertiesBuilder diff --git a/aws/demos/createandlistbuckets/README.txt b/demos/createandlistbuckets/README.txt similarity index 100% rename from aws/demos/createandlistbuckets/README.txt rename to demos/createandlistbuckets/README.txt diff --git a/aws/demos/createandlistbuckets/pom.xml b/demos/createandlistbuckets/pom.xml similarity index 100% rename from aws/demos/createandlistbuckets/pom.xml rename to demos/createandlistbuckets/pom.xml diff --git a/aws/demos/createandlistbuckets/src/main/java/org/jclouds/aws/s3/samples/MainApp.java b/demos/createandlistbuckets/src/main/java/org/jclouds/aws/s3/samples/MainApp.java similarity index 100% rename from aws/demos/createandlistbuckets/src/main/java/org/jclouds/aws/s3/samples/MainApp.java rename to demos/createandlistbuckets/src/main/java/org/jclouds/aws/s3/samples/MainApp.java diff --git a/aws/demos/createlamp/README.txt b/demos/createlamp/README.txt similarity index 100% rename from aws/demos/createlamp/README.txt rename to demos/createlamp/README.txt diff --git a/aws/demos/createlamp/pom.xml b/demos/createlamp/pom.xml similarity index 100% rename from aws/demos/createlamp/pom.xml rename to demos/createlamp/pom.xml diff --git a/aws/demos/createlamp/src/main/java/org/jclouds/aws/ec2/demos/createlamp/MainApp.java b/demos/createlamp/src/main/java/org/jclouds/aws/ec2/demos/createlamp/MainApp.java similarity index 100% rename from aws/demos/createlamp/src/main/java/org/jclouds/aws/ec2/demos/createlamp/MainApp.java rename to demos/createlamp/src/main/java/org/jclouds/aws/ec2/demos/createlamp/MainApp.java diff --git a/aws/demos/googleappengine/README.txt b/demos/googleappengine/README.txt similarity index 100% rename from aws/demos/googleappengine/README.txt rename to demos/googleappengine/README.txt diff --git a/aws/demos/googleappengine/pom.xml b/demos/googleappengine/pom.xml similarity index 100% rename from aws/demos/googleappengine/pom.xml rename to demos/googleappengine/pom.xml diff --git a/aws/demos/googleappengine/src/main/appengine/appengine-web.xml b/demos/googleappengine/src/main/appengine/appengine-web.xml similarity index 100% rename from aws/demos/googleappengine/src/main/appengine/appengine-web.xml rename to demos/googleappengine/src/main/appengine/appengine-web.xml diff --git a/aws/demos/googleappengine/src/main/appengine/logging.properties b/demos/googleappengine/src/main/appengine/logging.properties similarity index 100% rename from aws/demos/googleappengine/src/main/appengine/logging.properties rename to demos/googleappengine/src/main/appengine/logging.properties diff --git a/aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java similarity index 100% rename from aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java rename to demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllStatusController.java diff --git a/aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java similarity index 100% rename from aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java rename to demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java diff --git a/aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java similarity index 100% rename from aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java rename to demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/domain/StatusResult.java diff --git a/aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java similarity index 100% rename from aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java rename to demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/BlobStoreContextToStatusResult.java diff --git a/aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/ComputeServiceContextToStatusResult.java b/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/ComputeServiceContextToStatusResult.java similarity index 100% rename from aws/demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/ComputeServiceContextToStatusResult.java rename to demos/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/ComputeServiceContextToStatusResult.java diff --git a/aws/demos/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp b/demos/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp similarity index 100% rename from aws/demos/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp rename to demos/googleappengine/src/main/webapp/WEB-INF/jsp/status.jsp diff --git a/aws/demos/googleappengine/src/main/webapp/WEB-INF/web.xml b/demos/googleappengine/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from aws/demos/googleappengine/src/main/webapp/WEB-INF/web.xml rename to demos/googleappengine/src/main/webapp/WEB-INF/web.xml diff --git a/aws/demos/googleappengine/src/main/webapp/index.jsp b/demos/googleappengine/src/main/webapp/index.jsp similarity index 100% rename from aws/demos/googleappengine/src/main/webapp/index.jsp rename to demos/googleappengine/src/main/webapp/index.jsp diff --git a/aws/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java b/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java similarity index 100% rename from aws/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java rename to demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleAppEngineLiveTest.java diff --git a/aws/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java b/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java similarity index 100% rename from aws/demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java rename to demos/googleappengine/src/test/java/org/jclouds/samples/googleappengine/functest/GoogleDevServer.java