From 3d9a4070fb99ed27454a9bac30e273a321bb3e86 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 9 Jan 2011 15:32:17 -0800 Subject: [PATCH] Issue 440: decoupled vcloudexpress from vcloud --- README.txt | 2 +- allcompute/pom.xml | 5 + apis/pom.xml | 1 + apis/vcloud/pom.xml | 17 +- .../BindCaptureVAppParamsToXmlPayload.java | 4 +- .../config/BaseVCloudRestClientModule.java | 2 +- .../jclouds/vcloud/VCloudAsyncClientTest.java | 2 - apis/vcloudexpress/pom.xml | 154 ++++++++++++++++++ .../vcloud/VCloudExpressAsyncClient.java | 0 .../jclouds/vcloud/VCloudExpressClient.java | 0 .../vcloud/VCloudExpressContextBuilder.java | 0 .../VCloudExpressLoginAsyncClient.java | 3 +- .../vcloud/VCloudExpressMediaType.java | 0 .../VCloudExpressPropertiesBuilder.java | 0 ...ExpressVAppTemplateParamsToXmlPayload.java | 0 .../compute/VCloudExpressComputeClient.java | 0 ...udExpressBindComputeStrategiesByClass.java | 0 ...oudExpressComputeServiceContextModule.java | 0 .../HardwareForVCloudExpressVApp.java | 0 .../ImageForVCloudExpressVAppTemplate.java | 0 .../functions/ImagesInVCloudExpressOrg.java | 0 .../functions/ImagesInVCloudExpressVDC.java | 0 .../ResourceAllocationsToVolumes.java | 55 +++++++ .../VCloudExpressVAppToNodeMetadata.java | 0 .../VCloudExpressComputeClientImpl.java | 0 .../VCloudExpressAddNodeWithTagStrategy.java | 0 .../VCloudExpressDestroyNodeStrategy.java | 0 .../VCloudExpressGetNodeMetadataStrategy.java | 0 .../VCloudExpressLifeCycleStrategy.java | 0 .../VCloudExpressListNodesStrategy.java | 0 .../BaseVCloudExpressRestClientModule.java | 2 +- .../config/VCloudExpressRestClientModule.java | 0 .../vcloud/domain/VCloudExpressVApp.java | 0 .../domain/VCloudExpressVAppTemplate.java | 0 .../internal/VCloudExpressVAppImpl.java | 0 .../VCloudExpressVAppTemplateImpl.java | 0 .../domain/network/VCloudExpressNetwork.java | 0 .../internal/VCloudExpressNetworkImpl.java | 0 .../VCloudExpressOrgNetworkAdapter.java | 0 ...VCloudExpressAllCatalogItemsInCatalog.java | 0 ...udExpressVAppTemplatesForCatalogItems.java | 0 ...pressVAppTemplatesForResourceEntities.java | 0 ...etworkFromVCloudExpressNetworkHandler.java | 0 .../xml/VCloudExpressNetworkHandler.java | 0 .../vcloud/xml/VCloudExpressVAppHandler.java | 0 .../xml/VCloudExpressVAppTemplateHandler.java | 0 .../vcloud/VCloudExpressAsyncClientTest.java | 12 +- .../vcloud/VCloudExpressClientLiveTest.java | 0 ...essVAppTemplateParamsToXmlPayloadTest.java | 6 +- ...ssBindCloneVAppParamsToXmlPayloadTest.java | 4 +- ...VCloudComputeServiceContextModuleTest.java | 0 ...xpressComputeServiceContextModuleTest.java | 0 .../VCloudExpressOrgNetworkAdapterTest.java | 4 +- .../xml/VCloudExpressNetworkHandlerTest.java | 6 +- .../VCloudExpressVAppTemplateHandlerTest.java | 4 +- .../xml/ovf/VCloudExpressVAppHandlerTest.java | 0 .../src/test/resources}/cloneVApp-default.xml | 0 .../src/test/resources}/cloneVApp.xml | 0 .../src/test/resources}/network-bluelock.xml | 0 .../src/test/resources}/network-hosting.xml | 0 .../src/test/resources}/network-terremark.xml | 0 .../test/resources}/newvapp-cpumemdisk.xml | 0 .../src/test/resources}/newvapp-hosting.xml | 0 .../resources}/newvapp-hostingcpumemdisk.xml | 0 ...ewvapp-hostingnetworknamedhcpfencemode.xml | 0 .../newvapp-networknamedhcpfencemode.xml | 0 .../src/test/resources}/newvapp.xml | 0 .../test/resources}/vAppTemplate-hosting.xml | 0 .../src/test/resources}/vAppTemplate-trmk.xml | 0 .../src/test/resources/vapp.xml | 0 .../src/test/resources/vapp2.xml | 0 common/vcloud/pom.xml | 85 ++++++++++ .../vcloud/CommonVCloudAsyncClient.java | 0 .../jclouds/vcloud/CommonVCloudClient.java | 0 .../vcloud}/VCloudLoginAsyncClient.java | 3 +- .../org/jclouds/vcloud/VCloudMediaType.java | 0 .../vcloud/VCloudResponseException.java | 0 .../java/org/jclouds/vcloud/VCloudToken.java | 0 .../vcloud}/VCloudVersionsAsyncClient.java | 2 +- .../BindCloneVAppParamsToXmlPayload.java | 4 +- .../compute/CommonVCloudComputeClient.java | 0 ...monVCloudBindComputeStrategiesByClass.java | 0 ...mmonVCloudBindComputeSuppliersByClass.java | 0 ...mmonVCloudComputeServiceContextModule.java | 0 .../functions/FindLocationForResource.java | 0 .../CommonVCloudComputeClientImpl.java | 0 .../OrgAndVDCToLocationSupplier.java | 0 .../suppliers/StaticHardwareSupplier.java | 0 .../suppliers/VCloudHardwareSupplier.java | 0 .../suppliers/VCloudImageSupplier.java | 0 .../config/CommonVCloudRestClientModule.java | 2 +- .../vcloud/domain/AllocationModel.java | 0 .../org/jclouds/vcloud/domain/Capacity.java | 0 .../org/jclouds/vcloud/domain/Catalog.java | 0 .../jclouds/vcloud/domain/CatalogItem.java | 0 .../java/org/jclouds/vcloud/domain/Org.java | 0 .../jclouds/vcloud/domain/ReferenceType.java | 0 .../org/jclouds/vcloud/domain/Status.java | 0 .../java/org/jclouds/vcloud/domain/Task.java | 0 .../org/jclouds/vcloud/domain/TaskStatus.java | 0 .../org/jclouds/vcloud/domain/TasksList.java | 0 .../jclouds/vcloud/domain/VCloudError.java | 0 .../jclouds/vcloud/domain/VCloudSession.java | 0 .../java/org/jclouds/vcloud/domain/VDC.java | 0 .../org/jclouds/vcloud/domain/VDCStatus.java | 0 .../vcloud/domain/internal/CatalogImpl.java | 0 .../domain/internal/CatalogItemImpl.java | 6 +- .../vcloud/domain/internal/ErrorImpl.java | 0 .../vcloud/domain/internal/OrgImpl.java | 0 .../domain/internal/ReferenceTypeImpl.java | 0 .../vcloud/domain/internal/TaskImpl.java | 0 .../vcloud/domain/internal/TasksListImpl.java | 0 .../vcloud/domain/internal/VDCImpl.java | 0 .../vcloud/domain/network/DhcpService.java | 0 .../vcloud/domain/network/Features.java | 0 .../vcloud/domain/network/FenceMode.java | 0 .../domain/network/FirewallService.java | 0 .../network/IpAddressAllocationMode.java | 0 .../vcloud/domain/network/IpRange.java | 0 .../vcloud/domain/network/IpScope.java | 0 .../vcloud/domain/network/NatService.java | 0 .../vcloud/domain/network/NetworkConfig.java | 2 - .../vcloud/domain/network/OrgNetwork.java | 0 .../network/firewall/FirewallPolicy.java | 0 .../network/firewall/FirewallProtocols.java | 0 .../domain/network/firewall/FirewallRule.java | 0 .../network/internal/OrgNetworkImpl.java | 0 .../vcloud/domain/network/nat/NatPolicy.java | 0 .../domain/network/nat/NatProtocol.java | 0 .../vcloud/domain/network/nat/NatRule.java | 0 .../vcloud/domain/network/nat/NatType.java | 0 .../network/nat/rules}/MappingMode.java | 2 +- .../network/nat/rules/OneToOneVmRule.java | 1 - .../network/nat/rules/PortForwardingRule.java | 0 .../domain/network/nat/rules/VmRule.java | 0 .../vcloud/domain/ovf/ResourceAllocation.java | 0 .../vcloud/domain/ovf/ResourceType.java | 3 - .../org/jclouds/vcloud/domain/ovf/System.java | 0 .../org/jclouds/vcloud/endpoints/Catalog.java | 0 .../org/jclouds/vcloud/endpoints/Network.java | 0 .../org/jclouds/vcloud/endpoints/Org.java | 0 .../org/jclouds/vcloud/endpoints/OrgList.java | 0 .../jclouds/vcloud/endpoints/TasksList.java | 0 .../jclouds/vcloud/endpoints/VCloudLogin.java | 0 .../org/jclouds/vcloud/endpoints/VDC.java | 0 .../vcloud/filters/SetVCloudTokenCookie.java | 0 .../functions/AllCatalogItemsInCatalog.java | 2 - .../functions/AllCatalogItemsInOrg.java | 3 - .../vcloud/functions/AllCatalogsInOrg.java | 4 +- .../vcloud/functions/AllVDCsInOrg.java | 17 +- .../OrgNameAndCatalogNameToEndpoint.java | 0 .../OrgNameAndVDCNameToEndpoint.java | 0 .../OrgNameCatalogNameItemNameToEndpoint.java | 0 ...CatalogNameVAppTemplateNameToEndpoint.java | 0 .../vcloud/functions/OrgNameToEndpoint.java | 0 .../functions/OrgNameToTasksListEndpoint.java | 0 ...meVDCNameResourceEntityNameToEndpoint.java | 0 .../vcloud/functions/OrgsForLocations.java | 2 - .../vcloud/functions/OrgsForNames.java | 2 - .../ParseLoginResponseFromHeaders.java | 0 .../ParseVCloudErrorFromHttpResponse.java | 0 .../vcloud/options/CloneVAppOptions.java | 0 .../InstantiateVAppTemplateOptions.java | 0 .../vcloud/predicates/TaskSuccess.java | 0 .../vcloud/predicates/VCloudPredicates.java | 0 .../vcloud/reference/VCloudConstants.java | 0 .../vcloud/reference/package-info.java | 0 .../java/org/jclouds/vcloud/util/Utils.java | 0 .../org/jclouds/vcloud/util/VCloudUtils.java | 0 .../jclouds/vcloud/xml/CatalogHandler.java | 0 .../vcloud/xml/CatalogItemHandler.java | 0 .../org/jclouds/vcloud/xml/ErrorHandler.java | 0 .../org/jclouds/vcloud/xml/OrgHandler.java | 0 .../jclouds/vcloud/xml/OrgListHandler.java | 0 .../jclouds/vcloud/xml/OrgNetworkHandler.java | 2 +- .../vcloud/xml/SupportedVersionsHandler.java | 0 .../org/jclouds/vcloud/xml/TaskHandler.java | 0 .../jclouds/vcloud/xml/TasksListHandler.java | 0 .../org/jclouds/vcloud/xml/VDCHandler.java | 0 .../xml/ovf/ResourceAllocationHandler.java | 0 .../jclouds/vcloud/xml/ovf/SystemHandler.java | 0 .../vcloud/CommonVCloudClientLiveTest.java | 0 .../vcloud/VCloudLoginAsyncClientTest.java | 16 +- .../vcloud/VCloudVersionsAsyncClientTest.java | 1 - .../BindCloneVAppParamsToXmlPayloadTest.java | 11 +- .../filters/SetVCloudTokenCookieTest.java | 0 .../ParseLoginResponseFromHeadersTest.java | 6 +- .../ParseVCloudErrorFromHttpResponseTest.java | 0 .../InstantiateVAppTemplateOptionsTest.java | 0 .../vcloud/xml/CatalogHandlerTest.java | 2 +- .../vcloud/xml/CatalogItemHandlerTest.java | 0 .../jclouds/vcloud/xml/OrgHandlerTest.java | 11 +- .../vcloud/xml/OrgListHandlerTest.java | 3 +- .../vcloud/xml/OrgNetworkHandlerTest.java | 0 .../xml/SupportedVersionsHandlerTest.java | 0 .../jclouds/vcloud/xml/TaskHandlerTest.java | 10 +- .../vcloud/xml/TasksListHandlerTest.java | 6 +- .../jclouds/vcloud/xml/VDCHandlerTest.java | 11 +- .../ovf/ResourceAllocationHandlerTest.java | 0 .../vcloud/xml/ovf/SystemHandlerTest.java | 0 .../test/resources/captureVApp-default.xml | 0 .../vcloud/src/test/resources/captureVApp.xml | 0 .../src/test/resources/catalog-blank.xml | 0 .../src/test/resources/catalog-hosting.xml | 0 .../vcloud/src/test/resources}/catalog.xml | 0 .../test/resources/catalogItem-hosting.xml | 0 .../test/resources/catalogItem-terremark.xml | 0 .../src/test/resources/cloneVApp-default.xml | 0 .../vcloud/src/test/resources/cloneVApp.xml | 0 .../src/test/resources/instantiatedvapp.xml | 0 .../vcloud/src/test/resources/log4j.xml | 0 .../vcloud/src/test/resources/org-1.0.xml | 0 .../src/test/resources}/org-hosting.xml | 0 .../vcloud/src/test/resources}/org.xml | 0 .../vcloud/src/test/resources/orglist.xml | 0 .../src/test/resources/orgnetwork-bridged.xml | 0 .../test/resources/orgnetwork-isolated.xml | 0 .../resources/resourceallocation-hosting.xml | 0 .../vcloud/src/test/resources/task-1.0.xml | 0 .../vcloud/src/test/resources}/task-error.xml | 0 .../src/test/resources}/task-hosting.xml | 0 .../vcloud/src/test/resources}/task-self.xml | 0 .../vcloud/src/test/resources}/task.xml | 0 .../src/test/resources/taskslist-hosting.xml | 0 .../vcloud/src/test/resources/taskslist.xml | 0 .../vcloud/src/test/resources/vdc-1.0.xml | 0 .../src/test/resources}/vdc-hosting.xml | 0 .../vcloud/src/test/resources}/vdc-nonet.xml | 0 .../vcloud/src/test/resources}/vdc.xml | 0 .../vcloud/src/test/resources/versions.xml | 0 .../test/resources/virtualsystem-hosting.xml | 0 .../src/main/clojure/org/jclouds/compute.clj | 2 +- providers/bluelock-vcdirector/pom.xml | 7 + 233 files changed, 397 insertions(+), 114 deletions(-) create mode 100644 apis/vcloudexpress/pom.xml rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/VCloudExpressAsyncClient.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/VCloudExpressClient.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/VCloudExpressContextBuilder.java (100%) rename apis/{vcloud/src/main/java/domain => vcloudexpress/src/main/java/org/jclouds/vcloud}/VCloudExpressLoginAsyncClient.java (96%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/VCloudExpressMediaType.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/VCloudExpressPropertiesBuilder.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/binders/BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/VCloudExpressComputeClient.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressBindComputeStrategiesByClass.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/functions/HardwareForVCloudExpressVApp.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/functions/ImageForVCloudExpressVAppTemplate.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressOrg.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressVDC.java (100%) create mode 100644 apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ResourceAllocationsToVolumes.java rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/functions/VCloudExpressVAppToNodeMetadata.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/internal/VCloudExpressComputeClientImpl.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressAddNodeWithTagStrategy.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressDestroyNodeStrategy.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressGetNodeMetadataStrategy.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressLifeCycleStrategy.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressListNodesStrategy.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java (98%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/config/VCloudExpressRestClientModule.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVApp.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVAppTemplate.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppImpl.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppTemplateImpl.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/network/VCloudExpressNetwork.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressNetworkImpl.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapter.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/functions/VCloudExpressAllCatalogItemsInCatalog.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForCatalogItems.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForResourceEntities.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/xml/OrgNetworkFromVCloudExpressNetworkHandler.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandler.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppHandler.java (100%) rename apis/{vcloud => vcloudexpress}/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandler.java (100%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java (98%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/VCloudExpressClientLiveTest.java (100%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/binders/BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayloadTest.java (97%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java (97%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/compute/config/VCloudComputeServiceContextModuleTest.java (100%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModuleTest.java (100%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java (96%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java (93%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java (93%) rename apis/{vcloud => vcloudexpress}/src/test/java/org/jclouds/vcloud/xml/ovf/VCloudExpressVAppHandlerTest.java (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/cloneVApp-default.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/cloneVApp.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/network-bluelock.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/network-hosting.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/network-terremark.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/newvapp-cpumemdisk.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/newvapp-hosting.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/newvapp-hostingcpumemdisk.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/newvapp-hostingnetworknamedhcpfencemode.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/newvapp-networknamedhcpfencemode.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/newvapp.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/vAppTemplate-hosting.xml (100%) rename apis/{vcloud/src/test/resources/express => vcloudexpress/src/test/resources}/vAppTemplate-trmk.xml (100%) rename apis/{vcloud => vcloudexpress}/src/test/resources/vapp.xml (100%) rename apis/{vcloud => vcloudexpress}/src/test/resources/vapp2.xml (100%) create mode 100644 common/vcloud/pom.xml rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudAsyncClient.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudClient.java (100%) rename {apis/vcloud/src/main/java/domain => common/vcloud/src/main/java/org/jclouds/vcloud}/VCloudLoginAsyncClient.java (96%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/VCloudMediaType.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/VCloudResponseException.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/VCloudToken.java (100%) rename {apis/vcloud/src/main/java/domain => common/vcloud/src/main/java/org/jclouds/vcloud}/VCloudVersionsAsyncClient.java (98%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java (97%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/CommonVCloudComputeClient.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeStrategiesByClass.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeSuppliersByClass.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudComputeServiceContextModule.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/FindLocationForResource.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/CommonVCloudComputeClientImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/OrgAndVDCToLocationSupplier.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/StaticHardwareSupplier.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudHardwareSupplier.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudImageSupplier.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java (99%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/AllocationModel.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/Capacity.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/Catalog.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/CatalogItem.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/Org.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/ReferenceType.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/Status.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/Task.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/TaskStatus.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/TasksList.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudError.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudSession.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/VDC.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/VDCStatus.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java (95%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ErrorImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/OrgImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ReferenceTypeImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TaskImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TasksListImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VDCImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/DhcpService.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/Features.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FenceMode.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FirewallService.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpAddressAllocationMode.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpRange.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpScope.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java (98%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/OrgNetwork.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallPolicy.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallProtocols.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallRule.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/OrgNetworkImpl.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatPolicy.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatProtocol.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatRule.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatType.java (100%) rename {apis/vcloud/src/main/java/org/jclouds/vcloud/domain => common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules}/MappingMode.java (96%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java (98%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/PortForwardingRule.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/VmRule.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceAllocation.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java (96%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/System.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Catalog.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Network.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Org.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/OrgList.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/TasksList.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VCloudLogin.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VDC.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/filters/SetVCloudTokenCookie.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java (96%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java (94%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java (95%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java (80%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndCatalogNameToEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndVDCNameToEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameItemNameToEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameVAppTemplateNameToEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToTasksListEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameVDCNameResourceEntityNameToEndpoint.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java (96%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java (95%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponse.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/options/CloneVAppOptions.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/predicates/VCloudPredicates.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/util/Utils.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/ErrorHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java (99%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/TasksListHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/VDCHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandler.java (100%) rename {apis => common}/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/SystemHandler.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/CommonVCloudClientLiveTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java (85%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java (98%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java (91%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/filters/SetVCloudTokenCookieTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java (91%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponseTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptionsTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java (99%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogItemHandlerTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java (94%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java (91%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgNetworkHandlerTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/SupportedVersionsHandlerTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java (94%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java (95%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java (95%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandlerTest.java (100%) rename {apis => common}/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/SystemHandlerTest.java (100%) rename {apis => common}/vcloud/src/test/resources/captureVApp-default.xml (100%) rename {apis => common}/vcloud/src/test/resources/captureVApp.xml (100%) rename {apis => common}/vcloud/src/test/resources/catalog-blank.xml (100%) rename {apis => common}/vcloud/src/test/resources/catalog-hosting.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/catalog.xml (100%) rename {apis => common}/vcloud/src/test/resources/catalogItem-hosting.xml (100%) rename {apis => common}/vcloud/src/test/resources/catalogItem-terremark.xml (100%) rename {apis => common}/vcloud/src/test/resources/cloneVApp-default.xml (100%) rename {apis => common}/vcloud/src/test/resources/cloneVApp.xml (100%) rename {apis => common}/vcloud/src/test/resources/instantiatedvapp.xml (100%) rename {apis => common}/vcloud/src/test/resources/log4j.xml (100%) rename apis/vcloud/src/test/resources/org.xml => common/vcloud/src/test/resources/org-1.0.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/org-hosting.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/org.xml (100%) rename {apis => common}/vcloud/src/test/resources/orglist.xml (100%) rename {apis => common}/vcloud/src/test/resources/orgnetwork-bridged.xml (100%) rename {apis => common}/vcloud/src/test/resources/orgnetwork-isolated.xml (100%) rename {apis => common}/vcloud/src/test/resources/resourceallocation-hosting.xml (100%) rename apis/vcloud/src/test/resources/task.xml => common/vcloud/src/test/resources/task-1.0.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/task-error.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/task-hosting.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/task-self.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/task.xml (100%) rename {apis => common}/vcloud/src/test/resources/taskslist-hosting.xml (100%) rename {apis => common}/vcloud/src/test/resources/taskslist.xml (100%) rename apis/vcloud/src/test/resources/vdc.xml => common/vcloud/src/test/resources/vdc-1.0.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/vdc-hosting.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/vdc-nonet.xml (100%) rename {apis/vcloud/src/test/resources/express => common/vcloud/src/test/resources}/vdc.xml (100%) rename {apis => common}/vcloud/src/test/resources/versions.xml (100%) rename {apis => common}/vcloud/src/test/resources/virtualsystem-hosting.xml (100%) diff --git a/README.txt b/README.txt index c722d5d8c7..03d8ea512a 100644 --- a/README.txt +++ b/README.txt @@ -35,7 +35,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers (generic), cloudservers- cloudsigma, elasticstack(generic), bluelock-vclouddirector, slicehost, ecc-ec2, elastichosts-lon-p (Peer 1), elastichosts-sat-p (Peer 1), elastichosts-lon-b (BlueSquare), - stub (in-memory) + vcloudexpress (generic), stub (in-memory) * note * the pom dependency org.jclouds/jclouds-allcompute gives you access to to all of these providers diff --git a/allcompute/pom.xml b/allcompute/pom.xml index 19f9652df6..2ae4b3f130 100644 --- a/allcompute/pom.xml +++ b/allcompute/pom.xml @@ -64,6 +64,11 @@ vcloud ${project.version} + + org.jclouds.api + vcloudexpress + ${project.version} + org.jclouds.provider bluelock-vcdirector diff --git a/apis/pom.xml b/apis/pom.xml index 6fd1c3f99b..40fbc1678c 100644 --- a/apis/pom.xml +++ b/apis/pom.xml @@ -43,5 +43,6 @@ cloudfiles cloudservers vcloud + vcloudexpress diff --git a/apis/vcloud/pom.xml b/apis/vcloud/pom.xml index a88900e88a..cd54c77918 100644 --- a/apis/vcloud/pom.xml +++ b/apis/vcloud/pom.xml @@ -41,13 +41,20 @@ FIXME FIXME - - scm:svn:http://jclouds.googlecode.com/svn/trunk/vcloud/core - scm:svn:https://jclouds.googlecode.com/svn/trunk/vcloud/core - http://jclouds.googlecode.com/svn/trunk/vcloud/core - + + org.jclouds.common + vcloud-common + ${project.version} + test-jar + test + + + org.jclouds.common + vcloud-common + ${project.version} + org.jclouds jclouds-core diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCaptureVAppParamsToXmlPayload.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCaptureVAppParamsToXmlPayload.java index adf55a9e9c..db0039012e 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCaptureVAppParamsToXmlPayload.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCaptureVAppParamsToXmlPayload.java @@ -38,7 +38,7 @@ import org.jclouds.http.HttpRequest; import org.jclouds.rest.MapBinder; import org.jclouds.rest.binders.BindToStringPayload; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.vcloud.VCloudExpressMediaType; +import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.options.CaptureVAppOptions; import com.google.inject.Inject; @@ -94,7 +94,7 @@ public class BindCaptureVAppParamsToXmlPayload implements MapBinder { XMLBuilder rootBuilder = buildRoot(templateName); if (options.getDescription() != null) rootBuilder.e("Description").text(options.getDescription()); - rootBuilder.e("Source").a("href", vApp).a("type", VCloudExpressMediaType.VAPP_XML); + rootBuilder.e("Source").a("href", vApp).a("type", VCloudMediaType.VAPP_XML); Properties outputProperties = new Properties(); outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes"); return rootBuilder.asString(outputProperties); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java index f04f44ea33..ef13919798 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudRestClientModule.java @@ -33,6 +33,7 @@ import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.suppliers.RetryOnTimeOutButNotOnAuthorizationExceptionSupplier; import org.jclouds.vcloud.VCloudAsyncClient; import org.jclouds.vcloud.VCloudClient; +import org.jclouds.vcloud.VCloudLoginAsyncClient; import org.jclouds.vcloud.domain.CatalogItem; import org.jclouds.vcloud.domain.VAppTemplate; import org.jclouds.vcloud.domain.VCloudSession; @@ -43,7 +44,6 @@ import com.google.common.base.Supplier; import com.google.inject.Provides; import com.google.inject.TypeLiteral; -import domain.VCloudLoginAsyncClient; /** * Configures the VCloud authentication service connection, including logging diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java index be86cd37a5..9dfdf129ee 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudAsyncClientTest.java @@ -93,8 +93,6 @@ import com.google.inject.Injector; import com.google.inject.Module; import com.google.inject.TypeLiteral; -import domain.VCloudLoginAsyncClient; -import domain.VCloudVersionsAsyncClient; /** * Tests behavior of {@code VCloudAsyncClient} diff --git a/apis/vcloudexpress/pom.xml b/apis/vcloudexpress/pom.xml new file mode 100644 index 0000000000..e2e19791fa --- /dev/null +++ b/apis/vcloudexpress/pom.xml @@ -0,0 +1,154 @@ + + + + + 4.0.0 + + org.jclouds + jclouds-project + 1.0-SNAPSHOT + ../../project/pom.xml + + org.jclouds.api + vcloudexpress + jcloud vcloudexpress api + jclouds components to access an implementation of VMWare vCloud Express + + + + trmkrun-ccc,test.trmk-924 + FIXME + 1.0 + FIXME + FIXME + + + + + org.jclouds.common + vcloud-common + ${project.version} + + + org.jclouds.common + vcloud-common + ${project.version} + test-jar + test + + + org.jclouds + jclouds-core + ${project.version} + test-jar + test + + + org.jclouds + jclouds-compute + ${project.version} + + + org.jclouds + jclouds-compute + ${project.version} + test-jar + test + + + org.jclouds + jclouds-jsch + ${project.version} + test + + + log4j + log4j + 1.2.14 + test + + + org.jclouds + jclouds-log4j + ${project.version} + test + + + com.jamesmurty.utils + java-xmlbuilder + 0.3 + + + org.jclouds + jclouds-core + ${project.version} + + + + + + live + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration + integration-test + + test + + + + + test.vcloudexpress.endpoint + ${test.vcloudexpress.endpoint} + + + test.vcloudexpress.apiversion + ${test.vcloudexpress.apiversion} + + + test.vcloudexpress.identity + ${test.vcloudexpress.identity} + + + test.vcloudexpress.credential + ${test.vcloudexpress.credential} + + + jclouds.compute.blacklist-nodes + ${jclouds.compute.blacklist-nodes} + + + + + + + + + + + + diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressAsyncClient.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressAsyncClient.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressAsyncClient.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressAsyncClient.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressClient.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressClient.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressClient.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressClient.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressContextBuilder.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressContextBuilder.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressContextBuilder.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressContextBuilder.java diff --git a/apis/vcloud/src/main/java/domain/VCloudExpressLoginAsyncClient.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressLoginAsyncClient.java similarity index 96% rename from apis/vcloud/src/main/java/domain/VCloudExpressLoginAsyncClient.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressLoginAsyncClient.java index 5e93911639..4154411768 100755 --- a/apis/vcloud/src/main/java/domain/VCloudExpressLoginAsyncClient.java +++ b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressLoginAsyncClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package domain; +package org.jclouds.vcloud; import javax.ws.rs.Consumes; import javax.ws.rs.POST; @@ -26,7 +26,6 @@ import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.rest.annotations.Endpoint; import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.ResponseParser; -import org.jclouds.vcloud.VCloudExpressMediaType; import org.jclouds.vcloud.domain.VCloudSession; import org.jclouds.vcloud.functions.ParseLoginResponseFromHeaders; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressMediaType.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressMediaType.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressMediaType.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressMediaType.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressPropertiesBuilder.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressPropertiesBuilder.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudExpressPropertiesBuilder.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/VCloudExpressPropertiesBuilder.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/binders/BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/binders/BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/VCloudExpressComputeClient.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/VCloudExpressComputeClient.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/VCloudExpressComputeClient.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/VCloudExpressComputeClient.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressBindComputeStrategiesByClass.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressBindComputeStrategiesByClass.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressBindComputeStrategiesByClass.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressBindComputeStrategiesByClass.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/HardwareForVCloudExpressVApp.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/HardwareForVCloudExpressVApp.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/HardwareForVCloudExpressVApp.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/HardwareForVCloudExpressVApp.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/ImageForVCloudExpressVAppTemplate.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ImageForVCloudExpressVAppTemplate.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/ImageForVCloudExpressVAppTemplate.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ImageForVCloudExpressVAppTemplate.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressOrg.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressOrg.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressOrg.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressOrg.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressVDC.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressVDC.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressVDC.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ImagesInVCloudExpressVDC.java diff --git a/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ResourceAllocationsToVolumes.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ResourceAllocationsToVolumes.java new file mode 100644 index 0000000000..55198ab74a --- /dev/null +++ b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/ResourceAllocationsToVolumes.java @@ -0,0 +1,55 @@ +/** + * + * 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.vcloud.compute.functions; + +import static com.google.common.collect.Iterables.filter; +import static com.google.common.collect.Iterables.transform; +import static org.jclouds.vcloud.predicates.VCloudPredicates.resourceType; + +import javax.inject.Singleton; + +import org.jclouds.compute.domain.Volume; +import org.jclouds.compute.domain.internal.VolumeImpl; +import org.jclouds.vcloud.domain.ovf.ResourceAllocation; +import org.jclouds.vcloud.domain.ovf.ResourceType; + +import com.google.common.base.Function; + +/** + * @author Adrian Cole + */ +@Singleton +public class ResourceAllocationsToVolumes implements Function, Iterable> { + @Override + public Iterable apply(Iterable resourceAllocations) { + Iterable volumes = transform(filter(resourceAllocations, resourceType(ResourceType.DISK_DRIVE)), + new Function() { + + @Override + public Volume apply(ResourceAllocation from) { + return new VolumeImpl(from.getAddressOnParent() + "", Volume.Type.LOCAL, + from.getVirtualQuantity() / 1024 / 1024f, null, from.getAddressOnParent() == 0, true); + + } + + }); + return volumes; + } +} \ No newline at end of file diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/VCloudExpressVAppToNodeMetadata.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/VCloudExpressVAppToNodeMetadata.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/VCloudExpressVAppToNodeMetadata.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/functions/VCloudExpressVAppToNodeMetadata.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/VCloudExpressComputeClientImpl.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/internal/VCloudExpressComputeClientImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/VCloudExpressComputeClientImpl.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/internal/VCloudExpressComputeClientImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressAddNodeWithTagStrategy.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressAddNodeWithTagStrategy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressAddNodeWithTagStrategy.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressAddNodeWithTagStrategy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressDestroyNodeStrategy.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressDestroyNodeStrategy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressDestroyNodeStrategy.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressDestroyNodeStrategy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressGetNodeMetadataStrategy.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressGetNodeMetadataStrategy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressGetNodeMetadataStrategy.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressGetNodeMetadataStrategy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressLifeCycleStrategy.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressLifeCycleStrategy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressLifeCycleStrategy.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressLifeCycleStrategy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressListNodesStrategy.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressListNodesStrategy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressListNodesStrategy.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudExpressListNodesStrategy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java similarity index 98% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java index 45e6e82b20..37bdd3025d 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java +++ b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/config/BaseVCloudExpressRestClientModule.java @@ -33,6 +33,7 @@ import org.jclouds.rest.ConfiguresRestClient; import org.jclouds.rest.suppliers.RetryOnTimeOutButNotOnAuthorizationExceptionSupplier; import org.jclouds.vcloud.VCloudExpressAsyncClient; import org.jclouds.vcloud.VCloudExpressClient; +import org.jclouds.vcloud.VCloudExpressLoginAsyncClient; import org.jclouds.vcloud.domain.CatalogItem; import org.jclouds.vcloud.domain.VCloudExpressVAppTemplate; import org.jclouds.vcloud.domain.VCloudSession; @@ -43,7 +44,6 @@ import com.google.common.base.Supplier; import com.google.inject.Provides; import com.google.inject.TypeLiteral; -import domain.VCloudExpressLoginAsyncClient; /** * Configures the VCloud authentication service connection, including logging diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/VCloudExpressRestClientModule.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/config/VCloudExpressRestClientModule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/config/VCloudExpressRestClientModule.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/config/VCloudExpressRestClientModule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVApp.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVApp.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVApp.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVApp.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVAppTemplate.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVAppTemplate.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVAppTemplate.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/VCloudExpressVAppTemplate.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppImpl.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppImpl.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppTemplateImpl.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppTemplateImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppTemplateImpl.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/internal/VCloudExpressVAppTemplateImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/VCloudExpressNetwork.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/network/VCloudExpressNetwork.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/VCloudExpressNetwork.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/network/VCloudExpressNetwork.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressNetworkImpl.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressNetworkImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressNetworkImpl.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressNetworkImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapter.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapter.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapter.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapter.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VCloudExpressAllCatalogItemsInCatalog.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/functions/VCloudExpressAllCatalogItemsInCatalog.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VCloudExpressAllCatalogItemsInCatalog.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/functions/VCloudExpressAllCatalogItemsInCatalog.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForCatalogItems.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForCatalogItems.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForCatalogItems.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForCatalogItems.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForResourceEntities.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForResourceEntities.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForResourceEntities.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/functions/VCloudExpressVAppTemplatesForResourceEntities.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkFromVCloudExpressNetworkHandler.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/OrgNetworkFromVCloudExpressNetworkHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkFromVCloudExpressNetworkHandler.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/OrgNetworkFromVCloudExpressNetworkHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandler.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandler.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppHandler.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppHandler.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandler.java b/apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandler.java rename to apis/vcloudexpress/src/main/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandler.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java similarity index 98% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java index 6c0bafc28e..4a6b1cc663 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java +++ b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/VCloudExpressAsyncClientTest.java @@ -82,8 +82,6 @@ import com.google.inject.Injector; import com.google.inject.Module; import com.google.inject.TypeLiteral; -import domain.VCloudExpressLoginAsyncClient; -import domain.VCloudVersionsAsyncClient; /** * Tests behavior of {@code VCloudExpressAsyncClient} @@ -105,7 +103,7 @@ public class VCloudExpressAsyncClientTest extends RestClientTest request = createMock(GeneratedHttpRequest.class); expect(request.getEndpoint()).andReturn(URI.create("http://localhost/key")).anyTimes(); expect(request.getArgs()).andReturn(ImmutableList.of()).atLeastOnce(); @@ -96,7 +96,7 @@ public class BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayloadTest { options.processorCount(1).memory(512).disk(1024); String expected = Strings2 - .toStringAndClose(getClass().getResourceAsStream("/express/newvapp-hostingcpumemdisk.xml")); + .toStringAndClose(getClass().getResourceAsStream("/newvapp-hostingcpumemdisk.xml")); GeneratedHttpRequest request = createMock(GeneratedHttpRequest.class); expect(request.getEndpoint()).andReturn(URI.create("http://localhost/key")).anyTimes(); expect(request.getArgs()).andReturn(ImmutableList.of( options)).atLeastOnce(); @@ -118,7 +118,7 @@ public class BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayloadTest { public void testWithNetworkNameDhcpFenceMode() throws IOException { String expected = Strings2.toStringAndClose(getClass().getResourceAsStream( - "/express/newvapp-hostingnetworknamedhcpfencemode.xml")); + "/newvapp-hostingnetworknamedhcpfencemode.xml")); GeneratedHttpRequest request = createMock(GeneratedHttpRequest.class); expect(request.getEndpoint()).andReturn(URI.create("http://localhost/key")).anyTimes(); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java similarity index 97% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java index 0e5c88ce0a..9ffd0aaef7 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java +++ b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/binders/VCloudExpressBindCloneVAppParamsToXmlPayloadTest.java @@ -60,7 +60,7 @@ public class VCloudExpressBindCloneVAppParamsToXmlPayloadTest { }); public void testWithDescriptionDeployOn() throws IOException { - String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/express/cloneVApp.xml")); + String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp.xml")); CloneVAppOptions options = new CloneVAppOptions().deploy().powerOn().withDescription( "The description of the new vApp"); @@ -80,7 +80,7 @@ public class VCloudExpressBindCloneVAppParamsToXmlPayloadTest { } public void testDefault() throws IOException { - String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/express/cloneVApp-default.xml")); + String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp-default.xml")); GeneratedHttpRequest request = createMock(GeneratedHttpRequest.class); expect(request.getEndpoint()).andReturn(URI.create("http://localhost/key")).anyTimes(); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/compute/config/VCloudComputeServiceContextModuleTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/compute/config/VCloudComputeServiceContextModuleTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/compute/config/VCloudComputeServiceContextModuleTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/compute/config/VCloudComputeServiceContextModuleTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModuleTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModuleTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModuleTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/compute/config/VCloudExpressComputeServiceContextModuleTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java similarity index 96% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java index ab0c9b47ab..5b9555e1b9 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java +++ b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/domain/network/internal/VCloudExpressOrgNetworkAdapterTest.java @@ -49,7 +49,7 @@ import com.google.inject.Injector; public class VCloudExpressOrgNetworkAdapterTest { public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/network-terremark.xml"); + InputStream is = getClass().getResourceAsStream("/network-terremark.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressNetwork in = factory.create(injector.getInstance(VCloudExpressNetworkHandler.class)).parse(is); @@ -79,7 +79,7 @@ public class VCloudExpressOrgNetworkAdapterTest { } public void testBluelock() { - InputStream is = getClass().getResourceAsStream("/express/network-bluelock.xml"); + InputStream is = getClass().getResourceAsStream("/network-bluelock.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressNetwork in = factory.create(injector.getInstance(VCloudExpressNetworkHandler.class)).parse(is); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java similarity index 93% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java index 9772529650..0bccc268cf 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java +++ b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/VCloudExpressNetworkHandlerTest.java @@ -51,7 +51,7 @@ public class VCloudExpressNetworkHandlerTest { private Factory factory; public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/network-terremark.xml"); + InputStream is = getClass().getResourceAsStream("/network-terremark.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressNetwork result = factory.create(injector.getInstance(VCloudExpressNetworkHandler.class)).parse(is); @@ -64,7 +64,7 @@ public class VCloudExpressNetworkHandlerTest { } public void testHosting() { - InputStream is = getClass().getResourceAsStream("/express/network-hosting.xml"); + InputStream is = getClass().getResourceAsStream("/network-hosting.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressNetwork result = (VCloudExpressNetwork) factory.create( @@ -76,7 +76,7 @@ public class VCloudExpressNetworkHandlerTest { } public void testBluelock() { - InputStream is = getClass().getResourceAsStream("/express/network-bluelock.xml"); + InputStream is = getClass().getResourceAsStream("/network-bluelock.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressNetwork result = (VCloudExpressNetwork) factory.create( diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java similarity index 93% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java index 5411d2ca62..fb13f6b587 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java +++ b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/VCloudExpressVAppTemplateHandlerTest.java @@ -48,7 +48,7 @@ public class VCloudExpressVAppTemplateHandlerTest { private Factory factory; public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/vAppTemplate-trmk.xml"); + InputStream is = getClass().getResourceAsStream("/vAppTemplate-trmk.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressVAppTemplate result = factory.create(injector.getInstance(VCloudExpressVAppTemplateHandler.class)).parse(is); @@ -58,7 +58,7 @@ public class VCloudExpressVAppTemplateHandlerTest { } public void testHosting() { - InputStream is = getClass().getResourceAsStream("/express/vAppTemplate-hosting.xml"); + InputStream is = getClass().getResourceAsStream("/vAppTemplate-hosting.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); VCloudExpressVAppTemplate result = (VCloudExpressVAppTemplate) factory.create(injector.getInstance(VCloudExpressVAppTemplateHandler.class)).parse(is); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/VCloudExpressVAppHandlerTest.java b/apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/ovf/VCloudExpressVAppHandlerTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/VCloudExpressVAppHandlerTest.java rename to apis/vcloudexpress/src/test/java/org/jclouds/vcloud/xml/ovf/VCloudExpressVAppHandlerTest.java diff --git a/apis/vcloud/src/test/resources/express/cloneVApp-default.xml b/apis/vcloudexpress/src/test/resources/cloneVApp-default.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/cloneVApp-default.xml rename to apis/vcloudexpress/src/test/resources/cloneVApp-default.xml diff --git a/apis/vcloud/src/test/resources/express/cloneVApp.xml b/apis/vcloudexpress/src/test/resources/cloneVApp.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/cloneVApp.xml rename to apis/vcloudexpress/src/test/resources/cloneVApp.xml diff --git a/apis/vcloud/src/test/resources/express/network-bluelock.xml b/apis/vcloudexpress/src/test/resources/network-bluelock.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/network-bluelock.xml rename to apis/vcloudexpress/src/test/resources/network-bluelock.xml diff --git a/apis/vcloud/src/test/resources/express/network-hosting.xml b/apis/vcloudexpress/src/test/resources/network-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/network-hosting.xml rename to apis/vcloudexpress/src/test/resources/network-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/network-terremark.xml b/apis/vcloudexpress/src/test/resources/network-terremark.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/network-terremark.xml rename to apis/vcloudexpress/src/test/resources/network-terremark.xml diff --git a/apis/vcloud/src/test/resources/express/newvapp-cpumemdisk.xml b/apis/vcloudexpress/src/test/resources/newvapp-cpumemdisk.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/newvapp-cpumemdisk.xml rename to apis/vcloudexpress/src/test/resources/newvapp-cpumemdisk.xml diff --git a/apis/vcloud/src/test/resources/express/newvapp-hosting.xml b/apis/vcloudexpress/src/test/resources/newvapp-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/newvapp-hosting.xml rename to apis/vcloudexpress/src/test/resources/newvapp-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/newvapp-hostingcpumemdisk.xml b/apis/vcloudexpress/src/test/resources/newvapp-hostingcpumemdisk.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/newvapp-hostingcpumemdisk.xml rename to apis/vcloudexpress/src/test/resources/newvapp-hostingcpumemdisk.xml diff --git a/apis/vcloud/src/test/resources/express/newvapp-hostingnetworknamedhcpfencemode.xml b/apis/vcloudexpress/src/test/resources/newvapp-hostingnetworknamedhcpfencemode.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/newvapp-hostingnetworknamedhcpfencemode.xml rename to apis/vcloudexpress/src/test/resources/newvapp-hostingnetworknamedhcpfencemode.xml diff --git a/apis/vcloud/src/test/resources/express/newvapp-networknamedhcpfencemode.xml b/apis/vcloudexpress/src/test/resources/newvapp-networknamedhcpfencemode.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/newvapp-networknamedhcpfencemode.xml rename to apis/vcloudexpress/src/test/resources/newvapp-networknamedhcpfencemode.xml diff --git a/apis/vcloud/src/test/resources/express/newvapp.xml b/apis/vcloudexpress/src/test/resources/newvapp.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/newvapp.xml rename to apis/vcloudexpress/src/test/resources/newvapp.xml diff --git a/apis/vcloud/src/test/resources/express/vAppTemplate-hosting.xml b/apis/vcloudexpress/src/test/resources/vAppTemplate-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/vAppTemplate-hosting.xml rename to apis/vcloudexpress/src/test/resources/vAppTemplate-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/vAppTemplate-trmk.xml b/apis/vcloudexpress/src/test/resources/vAppTemplate-trmk.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/vAppTemplate-trmk.xml rename to apis/vcloudexpress/src/test/resources/vAppTemplate-trmk.xml diff --git a/apis/vcloud/src/test/resources/vapp.xml b/apis/vcloudexpress/src/test/resources/vapp.xml similarity index 100% rename from apis/vcloud/src/test/resources/vapp.xml rename to apis/vcloudexpress/src/test/resources/vapp.xml diff --git a/apis/vcloud/src/test/resources/vapp2.xml b/apis/vcloudexpress/src/test/resources/vapp2.xml similarity index 100% rename from apis/vcloud/src/test/resources/vapp2.xml rename to apis/vcloudexpress/src/test/resources/vapp2.xml diff --git a/common/vcloud/pom.xml b/common/vcloud/pom.xml new file mode 100644 index 0000000000..39843935c4 --- /dev/null +++ b/common/vcloud/pom.xml @@ -0,0 +1,85 @@ + + + + + 4.0.0 + + org.jclouds + jclouds-project + 1.0-SNAPSHOT + ../../project/pom.xml + + org.jclouds.common + vcloud-common + common vCloud components + common vCloud components + + + com.jamesmurty.utils + java-xmlbuilder + 0.3 + + + org.jclouds + jclouds-core + ${project.version} + + + org.jclouds + jclouds-core + ${project.version} + test-jar + test + + + org.jclouds + jclouds-compute + ${project.version} + + + org.jclouds + jclouds-compute + ${project.version} + test-jar + test + + + org.jclouds + jclouds-log4j + ${project.version} + test + + + org.jclouds + jclouds-jsch + ${project.version} + test + + + log4j + log4j + 1.2.16 + test + + + + diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudAsyncClient.java b/common/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudAsyncClient.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudAsyncClient.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudAsyncClient.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudClient.java b/common/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudClient.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudClient.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/CommonVCloudClient.java diff --git a/apis/vcloud/src/main/java/domain/VCloudLoginAsyncClient.java b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudLoginAsyncClient.java similarity index 96% rename from apis/vcloud/src/main/java/domain/VCloudLoginAsyncClient.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/VCloudLoginAsyncClient.java index 0e7401ddb6..0e64ff1fcf 100644 --- a/apis/vcloud/src/main/java/domain/VCloudLoginAsyncClient.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudLoginAsyncClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package domain; +package org.jclouds.vcloud; import javax.ws.rs.Consumes; import javax.ws.rs.POST; @@ -26,7 +26,6 @@ import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.rest.annotations.Endpoint; import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.ResponseParser; -import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.VCloudSession; import org.jclouds.vcloud.functions.ParseLoginResponseFromHeaders; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudMediaType.java b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudMediaType.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudMediaType.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/VCloudMediaType.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudResponseException.java b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudResponseException.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudResponseException.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/VCloudResponseException.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudToken.java b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudToken.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudToken.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/VCloudToken.java diff --git a/apis/vcloud/src/main/java/domain/VCloudVersionsAsyncClient.java b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsAsyncClient.java similarity index 98% rename from apis/vcloud/src/main/java/domain/VCloudVersionsAsyncClient.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsAsyncClient.java index 3c7ff7e1b2..7fa0e60056 100644 --- a/apis/vcloud/src/main/java/domain/VCloudVersionsAsyncClient.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsAsyncClient.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package domain; +package org.jclouds.vcloud; import java.net.URI; import java.util.SortedMap; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java b/common/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java similarity index 97% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java index df4e924601..fa460fd7e3 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayload.java @@ -38,7 +38,7 @@ import org.jclouds.http.HttpRequest; import org.jclouds.rest.MapBinder; import org.jclouds.rest.binders.BindToStringPayload; import org.jclouds.rest.internal.GeneratedHttpRequest; -import org.jclouds.vcloud.VCloudExpressMediaType; +import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.options.CloneVAppOptions; import com.google.inject.Inject; @@ -94,7 +94,7 @@ public class BindCloneVAppParamsToXmlPayload implements MapBinder { XMLBuilder rootBuilder = buildRoot(newName, options.isDeploy(), options.isPowerOn()); if (options.getDescription() != null) rootBuilder.e("Description").text(options.getDescription()); - rootBuilder.e("VApp").a("href", vApp).a("type", VCloudExpressMediaType.VAPP_XML); + rootBuilder.e("VApp").a("href", vApp).a("type", VCloudMediaType.VAPP_XML); Properties outputProperties = new Properties(); outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes"); return rootBuilder.asString(outputProperties); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/CommonVCloudComputeClient.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/CommonVCloudComputeClient.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/CommonVCloudComputeClient.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/CommonVCloudComputeClient.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeStrategiesByClass.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeStrategiesByClass.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeStrategiesByClass.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeStrategiesByClass.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeSuppliersByClass.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeSuppliersByClass.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeSuppliersByClass.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudBindComputeSuppliersByClass.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudComputeServiceContextModule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudComputeServiceContextModule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudComputeServiceContextModule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/config/CommonVCloudComputeServiceContextModule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/FindLocationForResource.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/FindLocationForResource.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/FindLocationForResource.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/functions/FindLocationForResource.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/CommonVCloudComputeClientImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/CommonVCloudComputeClientImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/CommonVCloudComputeClientImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/internal/CommonVCloudComputeClientImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/OrgAndVDCToLocationSupplier.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/OrgAndVDCToLocationSupplier.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/OrgAndVDCToLocationSupplier.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/OrgAndVDCToLocationSupplier.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/StaticHardwareSupplier.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/StaticHardwareSupplier.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/StaticHardwareSupplier.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/StaticHardwareSupplier.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudHardwareSupplier.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudHardwareSupplier.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudHardwareSupplier.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudHardwareSupplier.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudImageSupplier.java b/common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudImageSupplier.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudImageSupplier.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/compute/suppliers/VCloudImageSupplier.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java similarity index 99% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java index 61706360af..b0da952d99 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/config/CommonVCloudRestClientModule.java @@ -64,6 +64,7 @@ import org.jclouds.rest.suppliers.RetryOnTimeOutButNotOnAuthorizationExceptionSu import org.jclouds.vcloud.CommonVCloudAsyncClient; import org.jclouds.vcloud.CommonVCloudClient; import org.jclouds.vcloud.VCloudToken; +import org.jclouds.vcloud.VCloudVersionsAsyncClient; import org.jclouds.vcloud.domain.Catalog; import org.jclouds.vcloud.domain.CatalogItem; import org.jclouds.vcloud.domain.Org; @@ -92,7 +93,6 @@ import com.google.inject.Provides; import com.google.inject.TypeLiteral; import com.google.inject.name.Names; -import domain.VCloudVersionsAsyncClient; /** * Configures the VCloud authentication service connection, including logging and http transport. diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/AllocationModel.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/AllocationModel.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/AllocationModel.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/AllocationModel.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Capacity.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/Capacity.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Capacity.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/Capacity.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Catalog.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/Catalog.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Catalog.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/Catalog.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/CatalogItem.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/CatalogItem.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/CatalogItem.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/CatalogItem.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Org.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/Org.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Org.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/Org.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ReferenceType.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/ReferenceType.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ReferenceType.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/ReferenceType.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Status.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/Status.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Status.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/Status.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Task.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/Task.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/Task.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/Task.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/TaskStatus.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/TaskStatus.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/TaskStatus.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/TaskStatus.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/TasksList.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/TasksList.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/TasksList.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/TasksList.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudError.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudError.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudError.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudError.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudSession.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudSession.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudSession.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/VCloudSession.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VDC.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/VDC.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VDC.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/VDC.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VDCStatus.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/VDCStatus.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/VDCStatus.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/VDCStatus.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java similarity index 95% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java index 437cd10138..18adc77146 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/CatalogItemImpl.java @@ -26,7 +26,7 @@ import java.util.Map; import javax.annotation.Nullable; -import org.jclouds.vcloud.VCloudExpressMediaType; +import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.CatalogItem; import org.jclouds.vcloud.domain.ReferenceType; @@ -47,7 +47,7 @@ public class CatalogItemImpl extends ReferenceTypeImpl implements CatalogItem { public CatalogItemImpl(String name, URI id, @Nullable String description, ReferenceType entity, Map properties) { - super(name, VCloudExpressMediaType.CATALOGITEM_XML, id); + super(name, VCloudMediaType.CATALOGITEM_XML, id); this.description = description; this.entity = checkNotNull(entity, "entity"); this.properties.putAll(checkNotNull(properties, "properties")); @@ -55,7 +55,7 @@ public class CatalogItemImpl extends ReferenceTypeImpl implements CatalogItem { @Override public String getType() { - return VCloudExpressMediaType.CATALOGITEM_XML; + return VCloudMediaType.CATALOGITEM_XML; } public ReferenceType getEntity() { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ErrorImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ErrorImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ErrorImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ErrorImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/OrgImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/OrgImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/OrgImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/OrgImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ReferenceTypeImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ReferenceTypeImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ReferenceTypeImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/ReferenceTypeImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TaskImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TaskImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TaskImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TaskImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TasksListImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TasksListImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TasksListImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/TasksListImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VDCImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VDCImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VDCImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/internal/VDCImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/DhcpService.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/DhcpService.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/DhcpService.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/DhcpService.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/Features.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/Features.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/Features.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/Features.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FenceMode.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FenceMode.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FenceMode.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FenceMode.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FirewallService.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FirewallService.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FirewallService.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/FirewallService.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpAddressAllocationMode.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpAddressAllocationMode.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpAddressAllocationMode.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpAddressAllocationMode.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpRange.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpRange.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpRange.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpRange.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpScope.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpScope.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpScope.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/IpScope.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java similarity index 98% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java index 15bb848e77..8c942bc5ac 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NetworkConfig.java @@ -25,8 +25,6 @@ import java.net.URI; import javax.annotation.Nullable; -import org.jclouds.vcloud.domain.ovf.NetworkSection; - /** * * @author Adrian Cole diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/OrgNetwork.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/OrgNetwork.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/OrgNetwork.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/OrgNetwork.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallPolicy.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallPolicy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallPolicy.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallPolicy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallProtocols.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallProtocols.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallProtocols.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallProtocols.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallRule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallRule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallRule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/firewall/FirewallRule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/OrgNetworkImpl.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/OrgNetworkImpl.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/OrgNetworkImpl.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/internal/OrgNetworkImpl.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatPolicy.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatPolicy.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatPolicy.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatPolicy.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatProtocol.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatProtocol.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatProtocol.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatProtocol.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatRule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatRule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatRule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatRule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatType.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatType.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatType.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/NatType.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/MappingMode.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/MappingMode.java similarity index 96% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/MappingMode.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/MappingMode.java index 9ddb937d6a..c4efe3c6cb 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/MappingMode.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/MappingMode.java @@ -17,7 +17,7 @@ * ==================================================================== */ -package org.jclouds.vcloud.domain; +package org.jclouds.vcloud.domain.network.nat.rules; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java similarity index 98% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java index 7f229bc955..244549c1d9 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/OneToOneVmRule.java @@ -23,7 +23,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import javax.annotation.Nullable; -import org.jclouds.vcloud.domain.MappingMode; import org.jclouds.vcloud.domain.network.nat.NatRule; /** diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/PortForwardingRule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/PortForwardingRule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/PortForwardingRule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/PortForwardingRule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/VmRule.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/VmRule.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/VmRule.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/network/nat/rules/VmRule.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceAllocation.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceAllocation.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceAllocation.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceAllocation.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java similarity index 96% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java index 8551c41e5a..8fb4134482 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/ResourceType.java @@ -21,14 +21,11 @@ package org.jclouds.vcloud.domain.ovf; import static com.google.common.base.Preconditions.checkNotNull; -import org.jclouds.vcloud.VCloudExpressAsyncClient; - /** * * VirtualResource such as disks or CPU * * @author Adrian Cole - * @see VCloudExpressAsyncClient#getVApp * @see * */ diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/System.java b/common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/System.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/System.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/domain/ovf/System.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Catalog.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Catalog.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Catalog.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Catalog.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Network.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Network.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Network.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Network.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Org.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Org.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Org.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/Org.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/OrgList.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/OrgList.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/OrgList.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/OrgList.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/TasksList.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/TasksList.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/TasksList.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/TasksList.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VCloudLogin.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VCloudLogin.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VCloudLogin.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VCloudLogin.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VDC.java b/common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VDC.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VDC.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/endpoints/VDC.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/filters/SetVCloudTokenCookie.java b/common/vcloud/src/main/java/org/jclouds/vcloud/filters/SetVCloudTokenCookie.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/filters/SetVCloudTokenCookie.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/filters/SetVCloudTokenCookie.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java similarity index 96% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java index 546b082167..4076ddce5f 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInCatalog.java @@ -31,7 +31,6 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; import org.jclouds.vcloud.CommonVCloudAsyncClient; import org.jclouds.vcloud.VCloudMediaType; @@ -48,7 +47,6 @@ import com.google.common.base.Predicate; @Singleton public class AllCatalogItemsInCatalog implements Function> { @Resource - @Named(ComputeServiceConstants.COMPUTE_LOGGER) public Logger logger = Logger.NULL; private final CommonVCloudAsyncClient aclient; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java similarity index 94% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java index 13970d8c6d..c2754cfaa2 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogItemsInOrg.java @@ -21,10 +21,8 @@ package org.jclouds.vcloud.functions; import javax.annotation.Resource; import javax.inject.Inject; -import javax.inject.Named; import javax.inject.Singleton; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; import org.jclouds.vcloud.domain.Catalog; import org.jclouds.vcloud.domain.CatalogItem; @@ -40,7 +38,6 @@ import com.google.common.collect.Iterables; public class AllCatalogItemsInOrg implements Function> { @Resource - @Named(ComputeServiceConstants.COMPUTE_LOGGER) public Logger logger = Logger.NULL; private final Function> allCatalogsInOrg; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java similarity index 95% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java index 8b7579699f..fee38cfaee 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllCatalogsInOrg.java @@ -30,12 +30,11 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; import org.jclouds.vcloud.CommonVCloudAsyncClient; import org.jclouds.vcloud.domain.Catalog; -import org.jclouds.vcloud.domain.ReferenceType; import org.jclouds.vcloud.domain.Org; +import org.jclouds.vcloud.domain.ReferenceType; import com.google.common.base.Function; @@ -45,7 +44,6 @@ import com.google.common.base.Function; @Singleton public class AllCatalogsInOrg implements Function> { @Resource - @Named(ComputeServiceConstants.COMPUTE_LOGGER) public Logger logger = Logger.NULL; private final CommonVCloudAsyncClient aclient; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java similarity index 80% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java index 65b06b06a2..362bbf0226 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/AllVDCsInOrg.java @@ -30,12 +30,10 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; import org.jclouds.vcloud.CommonVCloudAsyncClient; -import org.jclouds.vcloud.domain.ReferenceType; import org.jclouds.vcloud.domain.Org; -import org.jclouds.vcloud.domain.VDC; +import org.jclouds.vcloud.domain.ReferenceType; import com.google.common.base.Function; @@ -43,9 +41,8 @@ import com.google.common.base.Function; * @author Adrian Cole */ @Singleton -public class AllVDCsInOrg implements Function> { +public class AllVDCsInOrg implements Function> { @Resource - @Named(ComputeServiceConstants.COMPUTE_LOGGER) public Logger logger = Logger.NULL; private final CommonVCloudAsyncClient aclient; @@ -58,14 +55,14 @@ public class AllVDCsInOrg implements Function> { } @Override - public Iterable apply(final Org org) { + public Iterable apply(final Org org) { - Iterable catalogItems = transformParallel(org.getVDCs().values(), - new Function>() { + Iterable catalogItems = transformParallel(org.getVDCs().values(), + new Function>() { @SuppressWarnings("unchecked") @Override - public Future apply(ReferenceType from) { - return (Future) aclient.getVDC(from.getHref()); + public Future apply(ReferenceType from) { + return (Future) aclient.getVDC(from.getHref()); } }, executor, null, logger, "vdcs in org " + org.getName()); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndCatalogNameToEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndCatalogNameToEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndCatalogNameToEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndCatalogNameToEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndVDCNameToEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndVDCNameToEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndVDCNameToEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameAndVDCNameToEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameItemNameToEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameItemNameToEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameItemNameToEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameItemNameToEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameVAppTemplateNameToEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameVAppTemplateNameToEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameVAppTemplateNameToEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameCatalogNameVAppTemplateNameToEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToTasksListEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToTasksListEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToTasksListEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameToTasksListEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameVDCNameResourceEntityNameToEndpoint.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameVDCNameResourceEntityNameToEndpoint.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameVDCNameResourceEntityNameToEndpoint.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgNameVDCNameResourceEntityNameToEndpoint.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java similarity index 96% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java index 08d38ea7cc..ea6a17476a 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForLocations.java @@ -33,7 +33,6 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.domain.Location; import org.jclouds.domain.LocationScope; import org.jclouds.logging.Logger; @@ -50,7 +49,6 @@ import com.google.common.collect.Sets; @Singleton public class OrgsForLocations implements Function, Iterable> { @Resource - @Named(ComputeServiceConstants.COMPUTE_LOGGER) public Logger logger = Logger.NULL; private final CommonVCloudAsyncClient aclient; private final ExecutorService executor; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java similarity index 95% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java index cb86e576e5..f61e391714 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/OrgsForNames.java @@ -30,7 +30,6 @@ import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.Constants; -import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.logging.Logger; import org.jclouds.vcloud.CommonVCloudAsyncClient; import org.jclouds.vcloud.domain.Org; @@ -43,7 +42,6 @@ import com.google.common.base.Function; @Singleton public class OrgsForNames implements Function, Iterable> { @Resource - @Named(ComputeServiceConstants.COMPUTE_LOGGER) public Logger logger = Logger.NULL; private final CommonVCloudAsyncClient aclient; private final ExecutorService executor; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java b/common/vcloud/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeaders.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponse.java b/common/vcloud/src/main/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponse.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponse.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponse.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/options/CloneVAppOptions.java b/common/vcloud/src/main/java/org/jclouds/vcloud/options/CloneVAppOptions.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/options/CloneVAppOptions.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/options/CloneVAppOptions.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java b/common/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java b/common/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/predicates/TaskSuccess.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/predicates/VCloudPredicates.java b/common/vcloud/src/main/java/org/jclouds/vcloud/predicates/VCloudPredicates.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/predicates/VCloudPredicates.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/predicates/VCloudPredicates.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java b/common/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java b/common/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/reference/package-info.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/util/Utils.java b/common/vcloud/src/main/java/org/jclouds/vcloud/util/Utils.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/util/Utils.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/util/Utils.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java b/common/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ErrorHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/ErrorHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ErrorHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/ErrorHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgListHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java similarity index 99% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java index ffbbb68145..5cb0211afa 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java +++ b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java @@ -29,7 +29,6 @@ import java.util.Set; import javax.inject.Inject; import org.jclouds.http.functions.ParseSax; -import org.jclouds.vcloud.domain.MappingMode; import org.jclouds.vcloud.domain.ReferenceType; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.network.DhcpService; @@ -48,6 +47,7 @@ import org.jclouds.vcloud.domain.network.nat.NatPolicy; import org.jclouds.vcloud.domain.network.nat.NatProtocol; import org.jclouds.vcloud.domain.network.nat.NatRule; import org.jclouds.vcloud.domain.network.nat.NatType; +import org.jclouds.vcloud.domain.network.nat.rules.MappingMode; import org.jclouds.vcloud.domain.network.nat.rules.OneToOneVmRule; import org.jclouds.vcloud.domain.network.nat.rules.PortForwardingRule; import org.jclouds.vcloud.domain.network.nat.rules.VmRule; diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/TaskHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/TasksListHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/TasksListHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/TasksListHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/TasksListHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VDCHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/VDCHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VDCHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/VDCHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandler.java diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/SystemHandler.java b/common/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/SystemHandler.java similarity index 100% rename from apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/SystemHandler.java rename to common/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/SystemHandler.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/CommonVCloudClientLiveTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/CommonVCloudClientLiveTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/CommonVCloudClientLiveTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/CommonVCloudClientLiveTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java similarity index 85% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java index 8cb8916f54..74dc73a6da 100755 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/VCloudLoginAsyncClientTest.java @@ -46,8 +46,6 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.TypeLiteral; -import domain.VCloudExpressLoginAsyncClient; - /** * Tests behavior of {@code VCloudLoginAsyncClient} * @@ -55,15 +53,15 @@ import domain.VCloudExpressLoginAsyncClient; */ // NOTE:without testName, this will not call @Before* and fail w/NPE during surefire @Test(groups = "unit", testName = "VCloudLoginAsyncClientTest") -public class VCloudLoginAsyncClientTest extends RestClientTest { +public class VCloudLoginAsyncClientTest extends RestClientTest { public void testLogin() throws SecurityException, NoSuchMethodException, IOException { - Method method = VCloudExpressLoginAsyncClient.class.getMethod("login"); + Method method = VCloudLoginAsyncClient.class.getMethod("login"); HttpRequest request = processor.createRequest(method); assertEquals(request.getRequestLine(), "POST http://localhost:8080/login HTTP/1.1"); assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT - + ": application/vnd.vmware.vcloud.organizationList+xml\n"); + + ": application/vnd.vmware.vcloud.orgList+xml\n"); assertPayloadEquals(request, null, null, false); assertResponseParserClassEquals(method, request, ParseLoginResponseFromHeaders.class); @@ -80,8 +78,8 @@ public class VCloudLoginAsyncClientTest extends RestClientTest> createTypeLiteral() { - return new TypeLiteral>() { + protected TypeLiteral> createTypeLiteral() { + return new TypeLiteral>() { }; } @@ -110,8 +108,8 @@ public class VCloudLoginAsyncClientTest extends RestClientTest createContextSpec() { + public RestContextSpec createContextSpec() { return contextSpec("test", "http://localhost:8080/login", "1", "identity", "credential", VCloudLoginClient.class, - VCloudExpressLoginAsyncClient.class); + VCloudLoginAsyncClient.class); } } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java similarity index 98% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java index 4e5cf774ac..d7a3e70971 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/VCloudVersionsAsyncClientTest.java @@ -39,7 +39,6 @@ import org.testng.annotations.Test; import com.google.inject.TypeLiteral; -import domain.VCloudVersionsAsyncClient; /** * Tests behavior of {@code VCloudVersionsAsyncClient} diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java similarity index 91% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java index df666cd9ea..9c3321e213 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/binders/BindCloneVAppParamsToXmlPayloadTest.java @@ -19,7 +19,6 @@ package org.jclouds.vcloud.binders; -import static com.google.common.base.Preconditions.checkNotNull; import static org.easymock.EasyMock.expect; import static org.easymock.classextension.EasyMock.createMock; import static org.easymock.classextension.EasyMock.replay; @@ -30,9 +29,9 @@ import java.net.URI; import java.util.Map; import java.util.Properties; +import org.jclouds.PropertiesBuilder; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.util.Strings2; -import org.jclouds.vcloud.VCloudPropertiesBuilder; import org.jclouds.vcloud.options.CloneVAppOptions; import org.testng.annotations.Test; @@ -55,7 +54,9 @@ public class BindCloneVAppParamsToXmlPayloadTest { @Override protected void configure() { Properties props = new Properties(); - Names.bindProperties(binder(), checkNotNull(new VCloudPropertiesBuilder(props).build(), "properties")); + props.setProperty("jclouds.vcloud.xml.ns", "http://www.vmware.com/vcloud/v1"); + props.setProperty("jclouds.vcloud.xml.schema", "http://vcloud.safesecureweb.com/ns/vcloud.xsd"); + Names.bindProperties(binder(), new PropertiesBuilder(props).build()); } }); @@ -66,7 +67,7 @@ public class BindCloneVAppParamsToXmlPayloadTest { "The description of the new vApp"); GeneratedHttpRequest request = createMock(GeneratedHttpRequest.class); expect(request.getEndpoint()).andReturn(URI.create("http://localhost/key")).anyTimes(); - expect(request.getArgs()).andReturn(ImmutableList.of( options)).atLeastOnce(); + expect(request.getArgs()).andReturn(ImmutableList. of(options)).atLeastOnce(); request.setPayload(expected); replay(request); @@ -84,7 +85,7 @@ public class BindCloneVAppParamsToXmlPayloadTest { GeneratedHttpRequest request = createMock(GeneratedHttpRequest.class); expect(request.getEndpoint()).andReturn(URI.create("http://localhost/key")).anyTimes(); - expect(request.getArgs()).andReturn(ImmutableList.of()).atLeastOnce(); + expect(request.getArgs()).andReturn(ImmutableList. of()).atLeastOnce(); request.setPayload(expected); replay(request); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/filters/SetVCloudTokenCookieTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/filters/SetVCloudTokenCookieTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/filters/SetVCloudTokenCookieTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/filters/SetVCloudTokenCookieTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java similarity index 91% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java index a931812cd1..0fb800d41c 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/functions/ParseLoginResponseFromHeadersTest.java @@ -28,7 +28,7 @@ import javax.ws.rs.core.HttpHeaders; import org.jclouds.http.HttpResponse; import org.jclouds.http.functions.BaseHandlerTest; import org.jclouds.io.Payloads; -import org.jclouds.vcloud.VCloudExpressMediaType; +import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.VCloudSession; import org.jclouds.vcloud.domain.internal.ReferenceTypeImpl; import org.testng.annotations.BeforeTest; @@ -63,7 +63,7 @@ public class ParseLoginResponseFromHeadersTest extends BaseHandlerTest { VCloudSession reply = parser.apply(response); assertEquals(reply.getVCloudToken(), "9er4d061-4bff-48fa-84b1-5da7166764d2"); assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudExpressMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } @@ -77,7 +77,7 @@ public class ParseLoginResponseFromHeadersTest extends BaseHandlerTest { VCloudSession reply = parser.apply(response); assertEquals(reply.getVCloudToken(), "c9f232506df9b65d7b7d97b7499eddd7"); assertEquals(reply.getOrgs(), ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudExpressMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + VCloudMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponseTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponseTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponseTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/handlers/ParseVCloudErrorFromHttpResponseTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptionsTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptionsTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptionsTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptionsTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java similarity index 99% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java index 9d4e5c932f..de095ed3ef 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java @@ -65,7 +65,7 @@ public class CatalogHandlerTest { } public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/catalog.xml"); + InputStream is = getClass().getResourceAsStream("/catalog.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); Catalog result = (Catalog) factory.create(injector.getInstance(CatalogHandler.class)).parse(is); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogItemHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogItemHandlerTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogItemHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogItemHandlerTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java similarity index 94% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java index d94506263a..fdf2fdafe7 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java @@ -29,7 +29,6 @@ import java.net.URI; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.Factory; import org.jclouds.http.functions.config.SaxParserModule; -import org.jclouds.vcloud.VCloudExpressMediaType; import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.Org; import org.jclouds.vcloud.domain.internal.ReferenceTypeImpl; @@ -48,7 +47,7 @@ import com.google.inject.Injector; public class OrgHandlerTest { public void testApplyInputStream() { - InputStream is = getClass().getResourceAsStream("/org.xml"); + InputStream is = getClass().getResourceAsStream("/org-1.0.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); @@ -73,7 +72,7 @@ public class OrgHandlerTest { } public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/org.xml"); + InputStream is = getClass().getResourceAsStream("/org.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); @@ -86,14 +85,14 @@ public class OrgHandlerTest { "Miami Environment 1 Catalog", CATALOG_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32/catalog")))); assertEquals(result.getVDCs(), ImmutableMap.of("Miami Environment 1", new ReferenceTypeImpl( - "Miami Environment 1", VCloudExpressMediaType.VDC_XML, URI + "Miami Environment 1", VCloudMediaType.VDC_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32")))); assertEquals(result.getTasksList(), new ReferenceTypeImpl("Miami Environment 1 Tasks List", TASKSLIST_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/tasksList/32"))); } public void testHosting() { - InputStream is = getClass().getResourceAsStream("/express/org-hosting.xml"); + InputStream is = getClass().getResourceAsStream("/org-hosting.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); Org result = (Org) factory.create(injector.getInstance(OrgHandler.class)).parse(is); @@ -103,7 +102,7 @@ public class OrgHandlerTest { assertEquals(result.getCatalogs(), ImmutableMap.of("HMS Shared Catalog", new ReferenceTypeImpl( "HMS Shared Catalog", CATALOG_XML, URI.create("https://vcloud.safesecureweb.com/api/v0.8/catalog/1")))); assertEquals(result.getVDCs(), ImmutableMap.of("188849 Virtual DataCenter", new ReferenceTypeImpl( - "188849 Virtual DataCenter", VCloudExpressMediaType.VDC_XML, URI + "188849 Virtual DataCenter", VCloudMediaType.VDC_XML, URI .create("https://vcloud.safesecureweb.com/api/v0.8/vdc/188849")))); assertEquals(result.getTasksList(), new ReferenceTypeImpl("188849 Task List", TASKSLIST_XML, URI .create("https://vcloud.safesecureweb.com/api/v0.8/tasksList/188849"))); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java similarity index 91% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java index 12eeeee9f3..7cdf3fb7f0 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgListHandlerTest.java @@ -26,7 +26,6 @@ import java.net.URI; import java.util.Map; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.vcloud.VCloudExpressMediaType; import org.jclouds.vcloud.domain.ReferenceType; import org.jclouds.vcloud.domain.internal.ReferenceTypeImpl; import org.testng.annotations.Test; @@ -47,6 +46,6 @@ public class OrgListHandlerTest extends BaseHandlerTest { Map result = factory.create(injector.getInstance(OrgListHandler.class)).parse(is); assertEquals(result, ImmutableMap.of("adrian@jclouds.org", new ReferenceTypeImpl("adrian@jclouds.org", - VCloudExpressMediaType.ORG_XML, URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); + "application/vnd.vmware.vcloud.org+xml", URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")))); } } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgNetworkHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgNetworkHandlerTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgNetworkHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgNetworkHandlerTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/SupportedVersionsHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/SupportedVersionsHandlerTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/SupportedVersionsHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/SupportedVersionsHandlerTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java similarity index 94% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java index 76aa8e518e..53f3edc73d 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/TaskHandlerTest.java @@ -55,7 +55,7 @@ public class TaskHandlerTest extends BaseHandlerTest { } public void test() { - InputStream is = getClass().getResourceAsStream("/task.xml"); + InputStream is = getClass().getResourceAsStream("/task-1.0.xml"); Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is); @@ -75,7 +75,7 @@ public class TaskHandlerTest extends BaseHandlerTest { } public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/task.xml"); + InputStream is = getClass().getResourceAsStream("/task.xml"); Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is); Task expects = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3299"), null, @@ -90,7 +90,7 @@ public class TaskHandlerTest extends BaseHandlerTest { } public void testSelf() { - InputStream is = getClass().getResourceAsStream("/express/task-self.xml"); + InputStream is = getClass().getResourceAsStream("/task-self.xml"); Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is); @@ -101,7 +101,7 @@ public class TaskHandlerTest extends BaseHandlerTest { } public void testApplyInputStream2() { - InputStream is = getClass().getResourceAsStream("/express/task-hosting.xml"); + InputStream is = getClass().getResourceAsStream("/task-hosting.xml"); Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is); @@ -116,7 +116,7 @@ public class TaskHandlerTest extends BaseHandlerTest { } public void testError() { - InputStream is = getClass().getResourceAsStream("/express/task-error.xml"); + InputStream is = getClass().getResourceAsStream("/task-error.xml"); Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java similarity index 95% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java index 37e375bc48..a206484ee2 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/TasksListHandlerTest.java @@ -26,7 +26,7 @@ import java.net.URI; import org.jclouds.date.DateService; import org.jclouds.http.functions.BaseHandlerTest; -import org.jclouds.vcloud.VCloudExpressMediaType; +import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.TaskStatus; import org.jclouds.vcloud.domain.TasksList; @@ -64,12 +64,12 @@ public class TasksListHandlerTest extends BaseHandlerTest { Task task1 = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3300"), null, TaskStatus.SUCCESS, dateService.iso8601DateParse("2009-08-24T21:30:19.587Z"), dateService .iso8601DateParse("2009-08-24T21:30:32.63Z"), null, new ReferenceTypeImpl("Server1", - VCloudExpressMediaType.VAPP_XML, URI + VCloudMediaType.VAPP_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null); Task task2 = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3299"), null, TaskStatus.SUCCESS, dateService.iso8601DateParse("2009-08-24T21:29:32.983Z"), dateService .iso8601DateParse("2009-08-24T21:29:44.65Z"), null, new ReferenceTypeImpl("Server1", - VCloudExpressMediaType.VAPP_XML, URI + VCloudMediaType.VAPP_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null); assertEquals(result.getTasks(), ImmutableSortedSet.of(task1, task2)); } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java similarity index 95% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java index 75e9541389..8fb58173e3 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java +++ b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/VDCHandlerTest.java @@ -27,7 +27,6 @@ import java.net.URI; import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.Factory; import org.jclouds.http.functions.config.SaxParserModule; -import org.jclouds.vcloud.VCloudExpressMediaType; import org.jclouds.vcloud.VCloudMediaType; import org.jclouds.vcloud.domain.AllocationModel; import org.jclouds.vcloud.domain.Capacity; @@ -50,7 +49,7 @@ import com.google.inject.Injector; @Test(groups = "unit") public class VDCHandlerTest { public void testVCloud1_0() { - InputStream is = getClass().getResourceAsStream("/vdc.xml"); + InputStream is = getClass().getResourceAsStream("/vdc-1.0.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); VDC result = factory.create(injector.getInstance(VDCHandler.class)).parse(is); @@ -79,7 +78,7 @@ public class VDCHandlerTest { } public void testTerremark() { - InputStream is = getClass().getResourceAsStream("/express/vdc.xml"); + InputStream is = getClass().getResourceAsStream("/vdc.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); VDC result = factory.create(injector.getInstance(VDCHandler.class)).parse(is); @@ -91,9 +90,9 @@ public class VDCHandlerTest { assertEquals(result.getMemoryCapacity(), new Capacity("bytes * 2^20", 10240, 0, 0, 0)); assertEquals(result.getVmQuota(), 0); assertEquals(result.getResourceEntities(), ImmutableMap. of("adriantest", - new ReferenceTypeImpl("adriantest", VCloudExpressMediaType.VAPP_XML, URI + new ReferenceTypeImpl("adriantest", VCloudMediaType.VAPP_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/15124")), "centos-53", - new ReferenceTypeImpl("centos-53", VCloudExpressMediaType.VAPP_XML, URI + new ReferenceTypeImpl("centos-53", VCloudMediaType.VAPP_XML, URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/15120")))); assertEquals(result.getAvailableNetworks(), ImmutableMap.of("10.114.34.128/26", new ReferenceTypeImpl( "10.114.34.128/26", "application/vnd.vmware.vcloud.network+xml", URI @@ -101,7 +100,7 @@ public class VDCHandlerTest { } public void testHostingDotCom() { - InputStream is = getClass().getResourceAsStream("/express/vdc-hosting.xml"); + InputStream is = getClass().getResourceAsStream("/vdc-hosting.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); VDC result = factory.create(injector.getInstance(VDCHandler.class)).parse(is); diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandlerTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/ResourceAllocationHandlerTest.java diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/SystemHandlerTest.java b/common/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/SystemHandlerTest.java similarity index 100% rename from apis/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/SystemHandlerTest.java rename to common/vcloud/src/test/java/org/jclouds/vcloud/xml/ovf/SystemHandlerTest.java diff --git a/apis/vcloud/src/test/resources/captureVApp-default.xml b/common/vcloud/src/test/resources/captureVApp-default.xml similarity index 100% rename from apis/vcloud/src/test/resources/captureVApp-default.xml rename to common/vcloud/src/test/resources/captureVApp-default.xml diff --git a/apis/vcloud/src/test/resources/captureVApp.xml b/common/vcloud/src/test/resources/captureVApp.xml similarity index 100% rename from apis/vcloud/src/test/resources/captureVApp.xml rename to common/vcloud/src/test/resources/captureVApp.xml diff --git a/apis/vcloud/src/test/resources/catalog-blank.xml b/common/vcloud/src/test/resources/catalog-blank.xml similarity index 100% rename from apis/vcloud/src/test/resources/catalog-blank.xml rename to common/vcloud/src/test/resources/catalog-blank.xml diff --git a/apis/vcloud/src/test/resources/catalog-hosting.xml b/common/vcloud/src/test/resources/catalog-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/catalog-hosting.xml rename to common/vcloud/src/test/resources/catalog-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/catalog.xml b/common/vcloud/src/test/resources/catalog.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/catalog.xml rename to common/vcloud/src/test/resources/catalog.xml diff --git a/apis/vcloud/src/test/resources/catalogItem-hosting.xml b/common/vcloud/src/test/resources/catalogItem-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/catalogItem-hosting.xml rename to common/vcloud/src/test/resources/catalogItem-hosting.xml diff --git a/apis/vcloud/src/test/resources/catalogItem-terremark.xml b/common/vcloud/src/test/resources/catalogItem-terremark.xml similarity index 100% rename from apis/vcloud/src/test/resources/catalogItem-terremark.xml rename to common/vcloud/src/test/resources/catalogItem-terremark.xml diff --git a/apis/vcloud/src/test/resources/cloneVApp-default.xml b/common/vcloud/src/test/resources/cloneVApp-default.xml similarity index 100% rename from apis/vcloud/src/test/resources/cloneVApp-default.xml rename to common/vcloud/src/test/resources/cloneVApp-default.xml diff --git a/apis/vcloud/src/test/resources/cloneVApp.xml b/common/vcloud/src/test/resources/cloneVApp.xml similarity index 100% rename from apis/vcloud/src/test/resources/cloneVApp.xml rename to common/vcloud/src/test/resources/cloneVApp.xml diff --git a/apis/vcloud/src/test/resources/instantiatedvapp.xml b/common/vcloud/src/test/resources/instantiatedvapp.xml similarity index 100% rename from apis/vcloud/src/test/resources/instantiatedvapp.xml rename to common/vcloud/src/test/resources/instantiatedvapp.xml diff --git a/apis/vcloud/src/test/resources/log4j.xml b/common/vcloud/src/test/resources/log4j.xml similarity index 100% rename from apis/vcloud/src/test/resources/log4j.xml rename to common/vcloud/src/test/resources/log4j.xml diff --git a/apis/vcloud/src/test/resources/org.xml b/common/vcloud/src/test/resources/org-1.0.xml similarity index 100% rename from apis/vcloud/src/test/resources/org.xml rename to common/vcloud/src/test/resources/org-1.0.xml diff --git a/apis/vcloud/src/test/resources/express/org-hosting.xml b/common/vcloud/src/test/resources/org-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/org-hosting.xml rename to common/vcloud/src/test/resources/org-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/org.xml b/common/vcloud/src/test/resources/org.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/org.xml rename to common/vcloud/src/test/resources/org.xml diff --git a/apis/vcloud/src/test/resources/orglist.xml b/common/vcloud/src/test/resources/orglist.xml similarity index 100% rename from apis/vcloud/src/test/resources/orglist.xml rename to common/vcloud/src/test/resources/orglist.xml diff --git a/apis/vcloud/src/test/resources/orgnetwork-bridged.xml b/common/vcloud/src/test/resources/orgnetwork-bridged.xml similarity index 100% rename from apis/vcloud/src/test/resources/orgnetwork-bridged.xml rename to common/vcloud/src/test/resources/orgnetwork-bridged.xml diff --git a/apis/vcloud/src/test/resources/orgnetwork-isolated.xml b/common/vcloud/src/test/resources/orgnetwork-isolated.xml similarity index 100% rename from apis/vcloud/src/test/resources/orgnetwork-isolated.xml rename to common/vcloud/src/test/resources/orgnetwork-isolated.xml diff --git a/apis/vcloud/src/test/resources/resourceallocation-hosting.xml b/common/vcloud/src/test/resources/resourceallocation-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/resourceallocation-hosting.xml rename to common/vcloud/src/test/resources/resourceallocation-hosting.xml diff --git a/apis/vcloud/src/test/resources/task.xml b/common/vcloud/src/test/resources/task-1.0.xml similarity index 100% rename from apis/vcloud/src/test/resources/task.xml rename to common/vcloud/src/test/resources/task-1.0.xml diff --git a/apis/vcloud/src/test/resources/express/task-error.xml b/common/vcloud/src/test/resources/task-error.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/task-error.xml rename to common/vcloud/src/test/resources/task-error.xml diff --git a/apis/vcloud/src/test/resources/express/task-hosting.xml b/common/vcloud/src/test/resources/task-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/task-hosting.xml rename to common/vcloud/src/test/resources/task-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/task-self.xml b/common/vcloud/src/test/resources/task-self.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/task-self.xml rename to common/vcloud/src/test/resources/task-self.xml diff --git a/apis/vcloud/src/test/resources/express/task.xml b/common/vcloud/src/test/resources/task.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/task.xml rename to common/vcloud/src/test/resources/task.xml diff --git a/apis/vcloud/src/test/resources/taskslist-hosting.xml b/common/vcloud/src/test/resources/taskslist-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/taskslist-hosting.xml rename to common/vcloud/src/test/resources/taskslist-hosting.xml diff --git a/apis/vcloud/src/test/resources/taskslist.xml b/common/vcloud/src/test/resources/taskslist.xml similarity index 100% rename from apis/vcloud/src/test/resources/taskslist.xml rename to common/vcloud/src/test/resources/taskslist.xml diff --git a/apis/vcloud/src/test/resources/vdc.xml b/common/vcloud/src/test/resources/vdc-1.0.xml similarity index 100% rename from apis/vcloud/src/test/resources/vdc.xml rename to common/vcloud/src/test/resources/vdc-1.0.xml diff --git a/apis/vcloud/src/test/resources/express/vdc-hosting.xml b/common/vcloud/src/test/resources/vdc-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/vdc-hosting.xml rename to common/vcloud/src/test/resources/vdc-hosting.xml diff --git a/apis/vcloud/src/test/resources/express/vdc-nonet.xml b/common/vcloud/src/test/resources/vdc-nonet.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/vdc-nonet.xml rename to common/vcloud/src/test/resources/vdc-nonet.xml diff --git a/apis/vcloud/src/test/resources/express/vdc.xml b/common/vcloud/src/test/resources/vdc.xml similarity index 100% rename from apis/vcloud/src/test/resources/express/vdc.xml rename to common/vcloud/src/test/resources/vdc.xml diff --git a/apis/vcloud/src/test/resources/versions.xml b/common/vcloud/src/test/resources/versions.xml similarity index 100% rename from apis/vcloud/src/test/resources/versions.xml rename to common/vcloud/src/test/resources/versions.xml diff --git a/apis/vcloud/src/test/resources/virtualsystem-hosting.xml b/common/vcloud/src/test/resources/virtualsystem-hosting.xml similarity index 100% rename from apis/vcloud/src/test/resources/virtualsystem-hosting.xml rename to common/vcloud/src/test/resources/virtualsystem-hosting.xml diff --git a/compute/src/main/clojure/org/jclouds/compute.clj b/compute/src/main/clojure/org/jclouds/compute.clj index 2b30af6b05..9b528894c4 100644 --- a/compute/src/main/clojure/org/jclouds/compute.clj +++ b/compute/src/main/clojure/org/jclouds/compute.clj @@ -24,7 +24,7 @@ Current supported providers are: [ec2, aws-ec2, ecc-ec2, cloudservers, cloudservers-uk, cloudservers-us, trmk-ecloud, trmk-vcloudexpress, vcloud, bluelock, eucalyptus, slicehost, elastichosts-lon-p, elastichosts-sat-p, elastichosts, - elastichosts-lon-b, cloudsigma, stub] + elastichosts-lon-b, cloudsigma, vcloudexpress, stub] Here's an example of getting some compute configuration from rackspace: diff --git a/providers/bluelock-vcdirector/pom.xml b/providers/bluelock-vcdirector/pom.xml index aad8ea4284..d99419d133 100644 --- a/providers/bluelock-vcdirector/pom.xml +++ b/providers/bluelock-vcdirector/pom.xml @@ -47,6 +47,13 @@ vcloud ${project.version} + + org.jclouds.common + vcloud-common + ${project.version} + test-jar + test + org.jclouds.api vcloud