From 708b06545410b2835f82625d12ed2fa614a5e75d Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Tue, 27 Mar 2012 17:49:22 +0100 Subject: [PATCH] Issue 830: Method name tidying --- .../v1_5/features/VAppAsyncClient.java | 23 +- .../director/v1_5/features/VAppClient.java | 32 +-- .../features/VAppTemplateAsyncClient.java | 90 +++---- .../v1_5/features/VAppTemplateClient.java | 222 +++++++++--------- .../director/v1_5/features/VdcClient.java | 104 ++++---- .../v1_5/features/VAppClientExpectTest.java | 8 +- .../v1_5/features/VAppClientLiveTest.java | 10 +- .../VAppTemplateClientExpectTest.java | 52 ++-- .../features/VAppTemplateClientLiveTest.java | 64 ++--- 9 files changed, 304 insertions(+), 301 deletions(-) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java index 24686545cf..208a10e034 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppAsyncClient.java @@ -123,24 +123,25 @@ public interface VAppAsyncClient { ListenableFuture deleteVApp(@EndpointParam URI vAppURI); /** - * @see VAppClient#consolidateVApp(URI) + * @see VAppClient#consolidateVm(URI) */ @POST @Path("/action/consolidate") @Consumes(TASK) @JAXBResponseParser - ListenableFuture consolidateVApp(@EndpointParam URI vAppURI); + ListenableFuture consolidateVm(@EndpointParam URI vAppURI); /** - * @see VAppClient#controlAccess(URI, ControlAccessParams) + * @see VAppClient#modifyControlAccess(URI, ControlAccessParams) */ @POST @Path("/action/controlAccess") @Produces(CONTROL_ACCESS) @Consumes(CONTROL_ACCESS) @JAXBResponseParser - ListenableFuture controlAccess(@EndpointParam URI vAppURI, - @BinderParam(BindToXMLPayload.class) ControlAccessParams params); + @ExceptionParser(ThrowVCloudErrorOn4xx.class) + ListenableFuture modifyControlAccess(@EndpointParam URI vAppURI, + @BinderParam(BindToXMLPayload.class) ControlAccessParams params); /** * @see VAppClient#deploy(URI, DeployVAppParams) @@ -190,26 +191,26 @@ public interface VAppAsyncClient { ListenableFuture installVMwareTools(@EndpointParam URI vAppURI); /** - * @see VAppClient#recomposeVApp(URI, RecomposeVAppParams) + * @see VAppClient#recompose(URI, RecomposeVAppParams) */ @POST @Path("/action/recomposeVApp") @Produces(RECOMPOSE_VAPP_PARAMS) @Consumes(TASK) @JAXBResponseParser - ListenableFuture recomposeVApp(@EndpointParam URI vAppURI, - @BinderParam(BindToXMLPayload.class) RecomposeVAppParams params); + ListenableFuture recompose(@EndpointParam URI vAppURI, + @BinderParam(BindToXMLPayload.class) RecomposeVAppParams params); /** - * @see VAppClient#relocate(URI, RelocateParams) + * @see VAppClient#relocateVm(URI, RelocateParams) */ @POST @Path("/action/relocate") @Produces(RELOCATE_VM_PARAMS) @Consumes(TASK) @JAXBResponseParser - ListenableFuture relocate(@EndpointParam URI vAppURI, - @BinderParam(BindToXMLPayload.class) RelocateParams params); + ListenableFuture relocateVm(@EndpointParam URI vAppURI, + @BinderParam(BindToXMLPayload.class) RelocateParams params); /** * @see VAppClient#undeploy(URI, UndeployVAppParams) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java index 2509e2f5df..eec10c496e 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppClient.java @@ -63,32 +63,32 @@ public interface VAppClient { * * The vApp/VM could be in one of these statuses: *
    - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION FAILED_CREATION(-1)} - * Transient entity state, e.g., model object is created but the corresponding VC backing does not * exist yet. This is further sub-categorized in the respective entities. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - * Entity is whole, e.g., VM creation is complete and all the required model objects and VC backings are * created. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED RESOLVED(1)} - * Entity is resolved. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#DEPLOYED} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#DEPLOYED DEPLOYED(2)} - * Entity is deployed. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#SUSPENDED} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#SUSPENDED SUSPENDED(3)} - * All VMs of the vApp are suspended. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_ON} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_ON POWERED_ON(4)} - * All VMs of the vApp are powered on. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#WAITING_FOR_INPUT} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#WAITING_FOR_INPUT WAITING_FOR_INPUT(5)} - * VM is pending response on a question. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN UNKNOWN(6)} - * Entity state could not be retrieved from the inventory, e.g., VM power state is null. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRECOGNIZED} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRECOGNIZED UNRECOGNIZED(7)} - * Entity state was retrieved from the inventory but could not be mapped to an internal state. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF POWERED_OFF(8)} - * All VMs of the vApp are powered off. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#INCONSISTENT_STATE} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#INCONSISTENT_STATE INCONSISTENT_STATE(9)} - * Apply to VM status, if a vm is {@code POWERED_ON}, or {@code WAITING_FOR_INPUT}, but is * undeployed, it is in an inconsistent state. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED} - + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED MIXED(10)} - * vApp status is set to {@code MIXED} when the VMs in the vApp are in different power states *
* @@ -131,7 +131,7 @@ public interface VAppClient { * * @since 1.5 */ - Task consolidateVApp(URI vAppURI); + Task consolidateVm(URI vAppURI); /** * Modifies the control access of a vApp. @@ -142,7 +142,7 @@ public interface VAppClient { * * @since 0.9 */ - ControlAccessParams controlAccess(URI vAppURI, ControlAccessParams params); + ControlAccessParams modifyControlAccess(URI vAppURI, ControlAccessParams params); /** * Deploys a vApp/VM. @@ -231,7 +231,7 @@ public interface VAppClient { * * @since 1.0 */ - Task recomposeVApp(URI vAppURI, RecomposeVAppParams params); + Task recompose(URI vAppURI, RecomposeVAppParams params); /** * Relocates a vm. @@ -242,7 +242,7 @@ public interface VAppClient { * * @since 1.5 */ - Task relocate(URI vAppURI, RelocateParams params); + Task relocateVm(URI vAppURI, RelocateParams params); /** * Undeploy a vApp/VM. diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java index 25e45683c8..213bfff88c 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateAsyncClient.java @@ -73,7 +73,7 @@ import com.google.common.util.concurrent.ListenableFuture; public interface VAppTemplateAsyncClient { /** - * @see org.jclouds.vcloud.director.v1_5.features.VAppTemplateClient#getVAppTemplate(URI) + * @see VAppTemplateClient#getVAppTemplate(URI) */ @GET @Consumes(VAPP_TEMPLATE) @@ -83,14 +83,14 @@ public interface VAppTemplateAsyncClient { /** - * @see org.jclouds.vcloud.director.v1_5.features.VAppTemplateClient#editVAppTemplate(URI, org.jclouds.vcloud.director.v1_5.domain.VAppTemplate) + * @see VAppTemplateClient#modifyVAppTemplate(URI, VAppTemplate) */ @PUT @Produces(VAPP_TEMPLATE) @Consumes(TASK) @JAXBResponseParser - ListenableFuture editVAppTemplate(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) VAppTemplate template); + ListenableFuture modifyVAppTemplate(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) VAppTemplate template); /** * @see VAppTemplateClient#deleteVappTemplate(URI) @@ -101,21 +101,21 @@ public interface VAppTemplateAsyncClient { ListenableFuture deleteVappTemplate(@EndpointParam URI templateUri); /** - * @see VAppTemplateClient#consolidateVappTemplate(URI) + * @see VAppTemplateClient#consolidateVm(URI) */ @POST @Consumes(TASK) @Path("/action/consolidate") @JAXBResponseParser - ListenableFuture consolidateVappTemplate(@EndpointParam URI templateURI); + ListenableFuture consolidateVm(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#disableDownloadVappTemplate(URI) + * @see VAppTemplateClient#disableDownload(URI) */ @POST @Path("/action/disableDownload") @JAXBResponseParser - ListenableFuture disableDownloadVappTemplate(@EndpointParam URI templateURI); + ListenableFuture disableDownload(@EndpointParam URI templateURI); /** * @see VAppTemplateClient#enableDownloadVappTemplate(URI) @@ -124,105 +124,105 @@ public interface VAppTemplateAsyncClient { @Consumes(TASK) @Path("/action/enableDownload") @JAXBResponseParser - ListenableFuture enableDownloadVappTemplate(@EndpointParam URI templateURI); + ListenableFuture enableDownload(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#relocateVappTemplate(URI, org.jclouds.vcloud.director.v1_5.domain.RelocateParams) + * @see VAppTemplateClient#relocateVm(URI, RelocateParams) */ @POST @Produces(RELOCATE_TEMPLATE) @Consumes(TASK) @Path("/action/relocate") @JAXBResponseParser - ListenableFuture relocateVappTemplate(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) RelocateParams params); + ListenableFuture relocateVm(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) RelocateParams params); /** - * @see VAppTemplateClient#getVAppTemplateCustomizationSection(URI) + * @see VAppTemplateClient#getCustomizationSection(URI) */ @GET @Consumes(CUSTOMIZATION_SECTION) @Path("/customizationSection") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getVAppTemplateCustomizationSection(@EndpointParam URI templateURI); + ListenableFuture getCustomizationSection(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#editVAppTemplateCustomizationSection(URI, org.jclouds.vcloud.director.v1_5.domain.CustomizationSection) + * @see VAppTemplateClient#modifyCustomizationSection(URI, CustomizationSection) */ @PUT @Produces(CUSTOMIZATION_SECTION) @Consumes(TASK) @Path("/customizationSection") @JAXBResponseParser - ListenableFuture editVAppTemplateCustomizationSection(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) CustomizationSection sectionType); + ListenableFuture modifyCustomizationSection(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) CustomizationSection sectionType); /** - * @see VAppTemplateClient#getVAppTemplateGuestCustomizationSection(URI) + * @see VAppTemplateClient#getGuestCustomizationSection(URI) */ @GET @Consumes(GUEST_CUSTOMIZATION_SECTION) @Path("/guestCustomizationSection") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getVAppTemplateGuestCustomizationSection(@EndpointParam URI templateURI); + ListenableFuture getGuestCustomizationSection(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#editVAppTemplateGuestCustomizationSection(URI, org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection) + * @see VAppTemplateClient#modifyGuestCustomizationSection(URI, org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection) */ @PUT @Produces(GUEST_CUSTOMIZATION_SECTION) @Consumes(TASK) @Path("/guestCustomizationSection") @JAXBResponseParser - ListenableFuture editVAppTemplateGuestCustomizationSection(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) GuestCustomizationSection section); + ListenableFuture modifyGuestCustomizationSection(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) GuestCustomizationSection section); /** - * @see VAppTemplateClient#getVappTemplateLeaseSettingsSection(URI) + * @see VAppTemplateClient#getLeaseSettingsSection(URI) */ @GET @Consumes(LEASE_SETTINGS_SECTION) @Path("/leaseSettingsSection") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getVappTemplateLeaseSettingsSection(@EndpointParam URI templateURI); + ListenableFuture getLeaseSettingsSection(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#editVappTemplateLeaseSettingsSection(URI, org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection) + * @see VAppTemplateClient#modifyLeaseSettingsSection(URI, LeaseSettingsSection) */ @PUT @Produces(LEASE_SETTINGS_SECTION) @Consumes(TASK) @Path("/leaseSettingsSection") @JAXBResponseParser - ListenableFuture editVappTemplateLeaseSettingsSection(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) LeaseSettingsSection settingsSection); + ListenableFuture modifyLeaseSettingsSection(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) LeaseSettingsSection settingsSection); /** - * @see VAppTemplateClient#getVAppTemplateNetworkConfigSection(URI) + * @see VAppTemplateClient#getNetworkConfigSection(URI) */ @GET @Consumes(NETWORK_CONFIG_SECTION) @Path("/networkConfigSection") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getVAppTemplateNetworkConfigSection(@EndpointParam URI templateURI); + ListenableFuture getNetworkConfigSection(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#editVAppTemplateNetworkConfigSection(URI, org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection) + * @see VAppTemplateClient#modifyNetworkConfigSection(URI, NetworkConfigSection) */ @PUT @Produces(NETWORK_CONFIG_SECTION) @Consumes(TASK) @Path("/networkConfigSection") @JAXBResponseParser - ListenableFuture editVAppTemplateNetworkConfigSection(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) NetworkConfigSection section); + ListenableFuture modifyNetworkConfigSection(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) NetworkConfigSection section); /** - * @see VAppTemplateClient#getVAppTemplateNetworkConnectionSection(URI) + * @see VAppTemplateClient#getNetworkConnectionSection(URI) */ @GET @Consumes(NETWORK_CONNECTION_SECTION) @@ -232,35 +232,35 @@ public interface VAppTemplateAsyncClient { ListenableFuture getVAppTemplateNetworkConnectionSection(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#editVAppTemplateNetworkConnectionSection(URI, org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection) + * @see VAppTemplateClient#modifyNetworkConnectionSection(URI, NetworkConnectionSection) */ @PUT @Produces(NETWORK_CONNECTION_SECTION) @Consumes(TASK) @Path("/networkConnectionSection") @JAXBResponseParser - ListenableFuture editVAppTemplateNetworkConnectionSection(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) NetworkConnectionSection section); + ListenableFuture modifyNetworkConnectionSection(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) NetworkConnectionSection section); /** - * @see VAppTemplateClient#getVAppTemplateNetworkSection(URI) + * @see VAppTemplateClient#getNetworkSection(URI) */ @GET @Consumes(NETWORK_SECTION) @Path("/networkSection") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getVAppTemplateNetworkSection(@EndpointParam URI templateURI); + ListenableFuture getNetworkSection(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#getVAppTemplateOvf(URI) + * @see VAppTemplateClient#getOvf(URI) */ @GET @Consumes @Path("/ovf") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getVAppTemplateOvf(@EndpointParam URI templateURI); + ListenableFuture getOvf(@EndpointParam URI templateURI); /** * @see VAppTemplateClient#getOwnerOfVAppTemplate(URI) @@ -270,7 +270,7 @@ public interface VAppTemplateAsyncClient { @Path("/owner") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getOwnerOfVAppTemplate(@EndpointParam URI templateURI); + ListenableFuture getOwner(@EndpointParam URI templateURI); /** * @see VAppTemplateClient#getProductSectionsForVAppTemplate(URI) @@ -280,18 +280,18 @@ public interface VAppTemplateAsyncClient { @Path("/productSections") @JAXBResponseParser @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getProductSectionsForVAppTemplate(@EndpointParam URI templateURI); + ListenableFuture getProductSections(@EndpointParam URI templateURI); /** - * @see VAppTemplateClient#editProductSectionsForVAppTemplate(URI, org.jclouds.vcloud.director.v1_5.domain.ProductSectionList) + * @see VAppTemplateClient#modifyProductSections(URI, ProductSectionList) */ @PUT @Produces(PRODUCT_SECTION_LIST) @Consumes(TASK) @Path("/productSections") @JAXBResponseParser - ListenableFuture editProductSectionsForVAppTemplate(@EndpointParam URI templateURI, - @BinderParam(BindToXMLPayload.class) ProductSectionList sections); + ListenableFuture modifyProductSections(@EndpointParam URI templateURI, + @BinderParam(BindToXMLPayload.class) ProductSectionList sections); /** * @see VAppTemplateClient#getShadowVms(URI) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java index 7e6d72949d..bdc154750a 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClient.java @@ -39,7 +39,7 @@ import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection; /** * Provides synchronous access to {@link VAppTemplate} objects. - * + * * @author Adam Lowe * @see org.jclouds.vcloud.director.v1_5.features.VAppTemplateAsyncClient */ @@ -51,25 +51,25 @@ public interface VAppTemplateClient { * * The vApp could be in one of these statues: *
    - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION} - - * Transient entity state, e.g., model object is created but the corresponding VC backing - * does not exist yet. This is further sub-categorized in the respective entities. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED} - - * Entity is whole, e.g., VM creation is complete and all the required model objects and VC backings are created. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED} - - * Entity is resolved. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN} - - * Entity state could not be retrieved from the inventory, e.g., VM power state is null. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF} - - * All VMs of the vApp template - * are powered off. - *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED} - - * vApp template status is set to MIXED when the VMs in the vApp are in different power states. + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION FAILED_CREATION(-1)} - + * Transient entity state, e.g., model object is created but the corresponding VC backing does not exist yet. This + * is further sub-categorized in the respective entities. + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - + * Entity is whole, e.g., VM creation is complete and all the required model objects and VC backings are created. + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED RESOLVED(1)} - + * Entity is resolved. + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN UNKNOWN(6)} - + * Entity state could not be retrieved from the inventory, e.g., VM power state is null. + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF POWERED_OFF(8)} - + * All VMs of the vApp template are powered off. + *
  • {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED MIXED(10)} - + * vApp template status is set to {@code MIXED} when the VMs in the vApp are in different power states. *
+ * *
     * GET /vAppTemplate/{id}
     * 
- * + * * @param templateUri the URI of the template * @return the requested template */ @@ -77,159 +77,159 @@ public interface VAppTemplateClient { /** * Modifies only the name/description of a vApp template. - * + * *
     * PUT /vAppTemplate/{id}
     * 
* * @param templateUri the URI of the template - * @param template the template containing the new name and/or description - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param template the template containing the new name and/or description + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editVAppTemplate(URI templateUri, VAppTemplate template); + Task modifyVAppTemplate(URI templateUri, VAppTemplate template); /** * Deletes a vApp template. - * + * *
     * DELETE /vAppTemplate/{id}
     * 
- * + * * @param templateUri the URI of the template - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ Task deleteVappTemplate(URI templateUri); /** * Consolidates a VM - * + * *
     * POST /vAppTemplate/{id}/action/consolidate
     * 
- * + * * @param templateUri the URI of the template - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task consolidateVappTemplate(URI templateUri); + Task consolidateVm(URI templateUri); /** * Disables the download link to the ovf of a vApp template. - * + * *
     * POST /vAppTemplate/{id}/action/disableDownload
     * 
- * + * * @param templateUri the URI of the template */ - void disableDownloadVappTemplate(URI templateUri); + void disableDownload(URI templateUri); /** * Enables downloading of the ovf of a vApp template. - * + * *
     * POST /vAppTemplate/{id}/action/enableDownload
     * 
- * + * * @param templateUri the URI of the template - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task enableDownloadVappTemplate(URI templateUri); + Task enableDownload(URI templateUri); /** * Relocates a virtual machine in a vApp template to a different datastore. - * + * *
     * POST /vAppTemplate/{id}/action/relocate
     * 
- * + * * @param templateUri the URI of the template - * @param params contains the reference to the new datastore - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param params contains the reference to the new datastore + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task relocateVappTemplate(URI templateUri, RelocateParams params); + Task relocateVm(URI templateUri, RelocateParams params); /** * Retrieves the customization section of a vApp template. - * + * *
     * GET /vAppTemplate/{id}/customizationSection
     * 
- * + * * @param templateUri the URI of the template * @return the customization section */ - CustomizationSection getVAppTemplateCustomizationSection(URI templateUri); + CustomizationSection getCustomizationSection(URI templateUri); /** * Modifies the vApp template customization information. - * + * *
     * PUT /vAppTemplate/{id}/customizationSection
     * 
- * + * * @param templateUri the URI of the template - * @param section the new configuration to apply - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param section the new configuration to apply + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editVAppTemplateCustomizationSection(URI templateUri, CustomizationSection section); + Task modifyCustomizationSection(URI templateUri, CustomizationSection section); /** * Retrieves the Guest Customization Section of a VM - * + * *
     * GET /vAppTemplate/{id}/guestCustomizationSection
     * 
- * + * * @param templateUri the URI of the template * @return the guest customization section */ - GuestCustomizationSection getVAppTemplateGuestCustomizationSection(URI templateUri); + GuestCustomizationSection getGuestCustomizationSection(URI templateUri); /** * Modifies the guest customization options of a VM. - * + * *
     * PUT /vAppTemplate/{id}/guestCustomizationSection
     * 
- * + * * @param templateUri the URI of the template - * @param section the new configuration to apply - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param section the new configuration to apply + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editVAppTemplateGuestCustomizationSection(URI templateUri, GuestCustomizationSection section); + Task modifyGuestCustomizationSection(URI templateUri, GuestCustomizationSection section); /** * Retrieves the lease settings section of a vApp or vApp template - * + * *
     * GET /vAppTemplate/{id}/leaseSettingsSection
     * 
- * + * * @param templateUri the URI of the template * @return the lease settings */ - LeaseSettingsSection getVappTemplateLeaseSettingsSection(URI templateUri); + LeaseSettingsSection getLeaseSettingsSection(URI templateUri); /** * Modifies the lease settings section of a vApp or vApp template. - * + * *
     * PUT /vAppTemplate/{id}/leaseSettingsSection
     * 
- * + * * @param templateUri the URI of the template - * @param section the new configuration to apply - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param section the new configuration to apply + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editVappTemplateLeaseSettingsSection(URI templateUri, LeaseSettingsSection section); + Task modifyLeaseSettingsSection(URI templateUri, LeaseSettingsSection section); /** * Retrieves the network config section of a vApp or vApp template. @@ -237,122 +237,122 @@ public interface VAppTemplateClient { *
     * GET /vAppTemplate/{id}/networkConfigSection
     * 
- * + * * @param templateUri the URI of the template * @return the network config section requested */ - NetworkConfigSection getVAppTemplateNetworkConfigSection(URI templateUri); + NetworkConfigSection getNetworkConfigSection(URI templateUri); /** * Modifies the network config section of a vApp. - * + * *
     * PUT /vAppTemplate/{id}/networkConfigSection
     * 
- * + * * @param templateUri the URI of the template - * @param section the new configuration to apply - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param section the new configuration to apply + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editVAppTemplateNetworkConfigSection(URI templateUri, NetworkConfigSection section); + Task modifyNetworkConfigSection(URI templateUri, NetworkConfigSection section); /** * Retrieves the network connection section of a VM - * + * *
     * GET /vAppTemplate/{id}/networkConnectionSection
     * 
- * + * * @param templateUri the URI of the template * @return the network connection section requested */ - NetworkConnectionSection getVAppTemplateNetworkConnectionSection(URI templateUri); + NetworkConnectionSection getNetworkConnectionSection(URI templateUri); /** * Modifies the network connection section of a VM. - * + * *
     * PUT /vAppTemplate/{id}/networkConnectionSection
     * 
- * + * * @param templateUri the URI of the template - * @param section the new configuration to apply - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @param section the new configuration to apply + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editVAppTemplateNetworkConnectionSection(URI templateUri, NetworkConnectionSection section); + Task modifyNetworkConnectionSection(URI templateUri, NetworkConnectionSection section); /** * Retrieves the network section of a vApp or vApp template. - * + * *
     * GET /vAppTemplate/{id}/networkSection
     * 
- * + * * @param templateUri the URI of the template * @return the network section requested */ - NetworkSection getVAppTemplateNetworkSection(URI templateUri); + NetworkSection getNetworkSection(URI templateUri); /** - * Retrieves an OVF descriptor of a vApp template. This OVF represents the vApp - * template as it is, with all vCloud specific information (like mac address, - * parent networks, etc). The OVF which could be downloaded by enabling for - * download will not contain this information. There no specific states bound - * to this entity. + * Retrieves an OVF descriptor of a vApp template. * + * This OVF represents the vApp template as it is, with all vCloud specific information (like mac address, parent + * networks, etc). The OVF which could be downloaded by enabling for download will not contain this information. + * There are no specific states bound to this entity. + * *
     * GET /vAppTemplate/{id}/ovf
     * 
- * + * * @param templateUri the URI of the template * @return the ovf envelope */ - Envelope getVAppTemplateOvf(URI templateUri); + Envelope getOvf(URI templateUri); /** * Retrieves vApp template owner. - * + * *
     * GET /vAppTemplate/{id}/owner
     * 
- * + * * @param templateUri the URI of the template * @return the owner of the vApp template */ - Owner getOwnerOfVAppTemplate(URI templateUri); + Owner getOwner(URI templateUri); /** * Retrieves VAppTemplate/VM product sections - * + * *
     * GET /vAppTemplate/{id}/productSections
     * 
- * + * * @param templateUri the URI of the template * @return the product sections */ - ProductSectionList getProductSectionsForVAppTemplate(URI templateUri); + ProductSectionList getProductSections(URI templateUri); /** * Modifies the product sections of a vApp or vApp template. - * + * *
     * PUT /vAppTemplate/{id}/productSections
     * 
- * + * * @param templateUri the URI of the template - * @return the task performing the action. This operation is asynchronous and the user - * should monitor the returned task status in order to check when it is completed. + * @return the task performing the action. This operation is asynchronous and the user should monitor the returned + * task status in order to check when it is completed. */ - Task editProductSectionsForVAppTemplate(URI templateUri, ProductSectionList sections); - + Task modifyProductSections(URI templateUri, ProductSectionList sections); + /** *
     * GET /vAppTemplate/{id}/shadowVms
     * 
- * + * * @param templateUri the URI of the template * @return shadowVM references */ diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java index 8ea71aec0c..236eb3072a 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcClient.java @@ -56,30 +56,34 @@ public interface VdcClient { * Captures a vApp into vApp template. * * The status of vApp template will be in - * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - * until the capture task is finished. + * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the + * capture task is finished. * - * @return a VApp resource which will contain a task. - * The user should should wait for this task to finish to be able to use the vApp. + * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able + * to use the vApp. */ VAppTemplate captureVApp(URI vdcUri, CaptureVAppParams params); /** - * Clones a media into new one. + * Clones a media into new one. + * * The status of the returned media is - * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - * until the task for cloning finish. + * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the task + * for cloning finish. * - * @return a Media resource which will contain a task. - * The user should monitor the contained task status in order to check when it is completed. + * @return a Media resource which will contain a task. The user should monitor the contained task status in order to + * check when it is completed. */ Media cloneMedia(URI vdcUri, CloneMediaParams params); /** - * Clones a vApp into new one. The status of vApp will be in UNRESOLVED(0) until the clone task is finished. + * Clones a vApp into new one. + * + * The status of vApp will be in {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED + * UNRESOLVED(0)} until the clone task is finished. * - * @return a VApp resource which will contain a task. - * The user should should wait for this task to finish to be able to use the vApp. + * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able + * to use the vApp. */ VApp cloneVApp(URI vdcUri, CloneVAppParams params); @@ -87,11 +91,11 @@ public interface VdcClient { * Clones a vApp template into new one. * * The status of vApp template will be in - * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - * until the clone task is finished. + * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the clone + * task is finished. * - * @return a VAppTemplate resource which will contain a task. - * The user should should wait for this task to finish to be able to use the VAppTemplate. + * @return a VAppTemplate resource which will contain a task. The user should should wait for this task to finish to + * be able to use the VAppTemplate. */ VAppTemplate cloneVAppTemplate(URI vdcUri, CloneVAppTemplateParams params); @@ -102,45 +106,43 @@ public interface VdcClient { * or virtual machines. When you compose a vApp, all children of each composition source * become peers in the Children collection of the composed vApp. To compose a vApp, a client * makes a compose vApp request whose body is a ComposeVAppParams element, includes the - * following information: + * following information: *
    - *
  • An InstantiationParams element that applies to the composed vApp itself and any vApp - * templates referenced in Item elements. - *
  • A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in - * the composition. Each SourcedItem can contain the following elements: + *
  • An InstantiationParams element that applies to the composed vApp itself and any vApp templates referenced in + * Item elements. + *
  • A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in the composition. Each + * SourcedItem can contain the following elements: *
      - *
    • A required Source element whose href attribute value is a reference - * to a vApp template, vApp, or VM to include in the composition. If the Source element - * references a VM, the Item must also include an InstantiationParams element specific to - * that VM. - *
    • An optional NetworkAssignment element that specifies how the network connections - * of child VM elements are mapped to vApp networks in the parent. + *
    • A required Source element whose href attribute value is a reference to a vApp template, vApp, or VM to include + * in the composition. If the Source element references a VM, the Item must also include an InstantiationParams + * element specific to that VM. + *
    • An optional NetworkAssignment element that specifies how the network connections of child VM elements are + * mapped to vApp networks in the parent. *
    - *
  • If any of the composition items is subject to a EULA, the ComposeVAppParams element - * must include an AllEULAsAccepted element that has a value of true, indicating that you - * accept the EULA. Otherwise, composition fails. The composed vApp must be deployed and - * powered on before it can be used. The status of vApp will be - * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - * until the compose task is finished. + *
+ * If any of the composition items is subject to a EULA, the ComposeVAppParams element must include an + * AllEULAsAccepted element that has a value of true, indicating that you accept the EULA. Otherwise, composition + * fails. The composed vApp must be deployed and powered on before it can be used. The status of vApp will be + * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the + * compose task is finished. * - * @return a VApp resource which will contain a task. - * The user should should wait for this task to finish to be able to use the vApp. + * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able + * to use the vApp. */ VApp composeVApp(URI vdcUri, ComposeVAppParams params); /** - * Instantiate a vApp template into a new vApp. - * - * The status of vApp will be in - * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} - * until the instantiate task is finished. + * Instantiate a vApp template into a new vApp. * + * The status of vApp will be in {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED + * UNRESOLVED(0)} until the instantiate task is finished. + * *
     * POST /vdc/{id}/action/instantiateVAppTemplate
     * 
* - * @return a VApp resource which will contain a task. - * The user should should wait for this task to finish to be able to use the vApp. + * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able + * to use the vApp. */ VApp instantiateVApp(URI vdcUri, InstantiateVAppParamsType params); @@ -149,19 +151,19 @@ public interface VdcClient { * * The operation is separate on several steps: *
    - *
  1. creating empty vApp template entity - *
  2. uploading an OVF of vApp template - *
  3. uploading disks described from the OVF + *
  4. creating empty vApp template entity + *
  5. uploading an OVF of vApp template + *
  6. uploading disks described from the OVF *
  7. finishing task for uploading *
- * The status of vApp template will be {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#NOT_READY NOT_READY(0)} - * until the ovf and all disks are uploaded to the transfer site. After this a task will run on the vApp template uploading. - * - * Note that the empty vApp template's getFiles() returns a file of size -1 after step one above, + * The status of vApp template will be + * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#NOT_READY NOT_READY(0)} until the ovf and + * all disks are uploaded to the transfer site. After this a task will run on the vApp template uploading. + * Note that the empty vApp template's getFiles() returns a file of size -1 after step one above, * because the descriptor.ovf does not yet exist. * - * @return a VAppTemplate resource which will contain a task. - * The user should should wait for this task to finish to be able to use the VAppTemplate. + * @return a VAppTemplate resource which will contain a task. The user should should wait for this task to finish to + * be able to use the VAppTemplate. */ VAppTemplate uploadVAppTemplate(URI vdcUri, UploadVAppTemplateParams params); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java index 612f913b0e..27125baf03 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientExpectTest.java @@ -140,7 +140,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest Task expected = consolidateVAppTask(); - assertEquals(client.getVAppClient().consolidateVApp(vAppURI), expected); + assertEquals(client.getVAppClient().consolidateVm(vAppURI), expected); } @Test(enabled = false) @@ -159,7 +159,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest ControlAccessParams expected = controlAccessParams(); - assertEquals(client.getVAppClient().controlAccess(vAppURI, params), expected); + assertEquals(client.getVAppClient().modifyControlAccess(vAppURI, params), expected); } @Test(enabled = false) @@ -259,7 +259,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest Task expected = recomposeVAppTask(); - assertEquals(client.getVAppClient().recomposeVApp(vAppURI, params), expected); + assertEquals(client.getVAppClient().recompose(vAppURI, params), expected); } @Test(enabled = false) @@ -279,7 +279,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest Task expected = relocateTask(); - assertEquals(client.getVAppClient().relocate(vAppURI, params), expected); + assertEquals(client.getVAppClient().relocateVm(vAppURI, params), expected); } @Test(enabled = false) diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java index dd8406b2b6..c2bb9bed70 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java @@ -316,7 +316,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { vApp = powerOn(vApp); // The method under test - Task consolidateVApp = vAppClient.consolidateVApp(vApp.getHref()); + Task consolidateVApp = vAppClient.consolidateVm(vApp.getHref()); assertTrue(retryTaskSuccess.apply(consolidateVApp), String.format(TASK_COMPLETE_TIMELY, "consolidateVApp")); } @@ -331,7 +331,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { .build(); // The method under test - ControlAccessParams modified = vAppClient.controlAccess(vApp.getHref(), params); + ControlAccessParams modified = vAppClient.modifyControlAccess(vApp.getHref(), params); // Check the retrieved object is well formed checkControlAccessParams(modified); @@ -347,7 +347,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { .build(); // The method under test - ControlAccessParams modified = vAppClient.controlAccess(vApp.getHref(), params); + ControlAccessParams modified = vAppClient.modifyControlAccess(vApp.getHref(), params); // Check the retrieved object is well formed checkControlAccessParams(modified); @@ -436,7 +436,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { RecomposeVAppParams params = RecomposeVAppParams.builder().build(); // The method under test - Task recomposeVApp = vAppClient.recomposeVApp(vApp.getHref(), params); + Task recomposeVApp = vAppClient.recompose(vApp.getHref(), params); assertTrue(retryTaskSuccess.apply(recomposeVApp), String.format(TASK_COMPLETE_TIMELY, "recomposeVApp")); } @@ -449,7 +449,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { RelocateParams params = RelocateParams.builder().datastore(Reference.builder().href(datastore.getHref()).build()).build(); // The method under test - Task relocate = vAppClient.relocate(vApp.getHref(), params); + Task relocate = vAppClient.relocateVm(vApp.getHref(), params); assertTrue(retryTaskSuccess.apply(relocate), String.format(TASK_COMPLETE_TIMELY, "relocate")); } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java index 5719ce6d8c..41d2d08f78 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java @@ -102,7 +102,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx assertEquals(template, exampleTemplate()); - Task task = client.editVAppTemplate(uri, exampleTemplate()); + Task task = client.modifyVAppTemplate(uri, exampleTemplate()); assertNotNull(task); task = client.deleteVappTemplate(uri); @@ -130,7 +130,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("PUT", templateId).xmlFilePayload("/vapptemplate/vAppTemplate.xml", VAPP_TEMPLATE).acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - client.editVAppTemplate(uri, exampleTemplate()); + client.modifyVAppTemplate(uri, exampleTemplate()); } @Test(expectedExceptions = VCloudDirectorException.class) @@ -155,7 +155,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx ).getVAppTemplateClient(); assertNotNull(client); - Task task = client.consolidateVappTemplate(uri); + Task task = client.consolidateVm(uri); assertNotNull(task); } @@ -168,7 +168,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/consolidate").acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - client.consolidateVappTemplate(uri); + client.consolidateVm(uri); } public void testDisableDownloadVAppTemplate() { @@ -181,7 +181,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx ).getVAppTemplateClient(); assertNotNull(client); - client.disableDownloadVappTemplate(uri); + client.disableDownload(uri); } @Test(expectedExceptions = VCloudDirectorException.class) @@ -193,7 +193,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/disableDownload").httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); - client.disableDownloadVappTemplate(uri); + client.disableDownload(uri); } public void testEnableDownloadVAppTemplate() { @@ -206,7 +206,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx ).getVAppTemplateClient(); assertNotNull(client); - Task task = client.enableDownloadVappTemplate(uri); + Task task = client.enableDownload(uri); assertNotNull(task); } @@ -219,7 +219,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/enableDownload").acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - client.enableDownloadVappTemplate(uri); + client.enableDownload(uri); } public void testRelocateVAppTemplate() { @@ -236,7 +236,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx Reference datastore = Reference.builder().href(URI.create("https://vcloud.example.com/api/admin/extension/datastore/607")).build(); RelocateParams params = RelocateParams.builder().datastore(datastore).build(); - Task task = client.relocateVappTemplate(uri, params); + Task task = client.relocateVm(uri, params); assertNotNull(task); } @@ -252,7 +252,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx Reference datastore = Reference.builder().href(URI.create("https://vcloud.example.com/api/admin/extension/datastore/607")).build(); RelocateParams params = RelocateParams.builder().datastore(datastore).build(); - client.relocateVappTemplate(uri, params); + client.relocateVm(uri, params); } @Test @@ -268,11 +268,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx ).getVAppTemplateClient(); assertNotNull(client); - CustomizationSection section = client.getVAppTemplateCustomizationSection(uri); + CustomizationSection section = client.getCustomizationSection(uri); assertEquals(section, exampleCustomizationSection()); - Task task = client.editVAppTemplateCustomizationSection(uri, exampleCustomizationSection()); + Task task = client.modifyCustomizationSection(uri, exampleCustomizationSection()); assertNotNull(task); } @@ -284,7 +284,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/customizationSection").acceptMedia(CUSTOMIZATION_SECTION).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - assertNull(client.getVAppTemplateCustomizationSection(uri)); + assertNull(client.getCustomizationSection(uri)); } @Test(expectedExceptions = ResourceNotFoundException.class) @@ -296,7 +296,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("PUT", templateId + "/customizationSection").xmlFilePayload("/vapptemplate/customizationSection.xml", CUSTOMIZATION_SECTION).acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - client.editVAppTemplateCustomizationSection(uri, exampleCustomizationSection()); + client.modifyCustomizationSection(uri, exampleCustomizationSection()); } public void testGuestCustomizationSection() { @@ -311,11 +311,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx ).getVAppTemplateClient(); assertNotNull(client); - GuestCustomizationSection section = client.getVAppTemplateGuestCustomizationSection(uri); + GuestCustomizationSection section = client.getGuestCustomizationSection(uri); assertEquals(section, exampleGuestCustomizationSection()); - Task task = client.editVAppTemplateGuestCustomizationSection(uri, exampleGuestCustomizationSection()); + Task task = client.modifyGuestCustomizationSection(uri, exampleGuestCustomizationSection()); assertNotNull(task); } @@ -328,7 +328,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/guestCustomizationSection").acceptMedia(GUEST_CUSTOMIZATION_SECTION).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); - client.getVAppTemplateGuestCustomizationSection(uri); + client.getGuestCustomizationSection(uri); } @Test(expectedExceptions = VCloudDirectorException.class) @@ -340,7 +340,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("PUT", templateId + "/guestCustomizationSection").xmlFilePayload("/vapptemplate/guestCustomizationSection.xml", GUEST_CUSTOMIZATION_SECTION).acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); - client.editVAppTemplateGuestCustomizationSection(uri, exampleGuestCustomizationSection()); + client.modifyGuestCustomizationSection(uri, exampleGuestCustomizationSection()); } public void testLeaseSettingsSection() throws ParseException { @@ -355,11 +355,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx ).getVAppTemplateClient(); assertNotNull(client); - LeaseSettingsSection section = client.getVappTemplateLeaseSettingsSection(uri); + LeaseSettingsSection section = client.getLeaseSettingsSection(uri); assertEquals(section, exampleLeaseSettingsSection()); - Task task = client.editVappTemplateLeaseSettingsSection(uri, exampleLeaseSettingsSection()); + Task task = client.modifyLeaseSettingsSection(uri, exampleLeaseSettingsSection()); assertNotNull(task); } @@ -371,7 +371,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/leaseSettingsSection").acceptMedia(LEASE_SETTINGS_SECTION).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - assertNull(client.getVappTemplateLeaseSettingsSection(uri)); + assertNull(client.getLeaseSettingsSection(uri)); } @Test(expectedExceptions = ResourceNotFoundException.class) @@ -383,7 +383,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("PUT", templateId + "/leaseSettingsSection").xmlFilePayload("/vapptemplate/leaseSettingsSection.xml", LEASE_SETTINGS_SECTION).acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); - client.editVappTemplateLeaseSettingsSection(uri, exampleLeaseSettingsSection()); + client.modifyLeaseSettingsSection(uri, exampleLeaseSettingsSection()); } public void testVappTemplateMetadata() { @@ -503,11 +503,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx assertNotNull(client); - NetworkConfigSection section = client.getVAppTemplateNetworkConfigSection(uri); + NetworkConfigSection section = client.getNetworkConfigSection(uri); assertEquals(section, exampleNetworkConfigSection()); - Task task = client.editVAppTemplateNetworkConfigSection(uri, exampleNetworkConfigSection()); + Task task = client.modifyNetworkConfigSection(uri, exampleNetworkConfigSection()); assertNotNull(task); } @@ -520,7 +520,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/networkConfigSection").acceptMedia(NETWORK_CONFIG_SECTION).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); - client.getVAppTemplateNetworkConfigSection(uri); + client.getNetworkConfigSection(uri); } @Test(expectedExceptions = VCloudDirectorException.class) @@ -532,7 +532,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx new VcloudHttpRequestPrimer().apiCommand("PUT", templateId + "/networkConfigSection").xmlFilePayload("/vapptemplate/networkConfigSection.xml", NETWORK_CONFIG_SECTION).acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); - client.editVAppTemplateNetworkConfigSection(uri, exampleNetworkConfigSection()); + client.modifyNetworkConfigSection(uri, exampleNetworkConfigSection()); } private VAppTemplate exampleTemplate() { diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java index a6bd4ffe15..1630dd3c5d 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java @@ -106,7 +106,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "GET /vAppTemplate/{id}/owner") public void testGetVAppTemplateOwner() { - Owner owner = vAppTemplateClient.getOwnerOfVAppTemplate(vAppTemplateURI); + Owner owner = vAppTemplateClient.getOwner(vAppTemplateURI); checkOwner(owner); assertEquals(owner.getUser(), vAppTemplateClient.getVAppTemplate(vAppTemplateURI).getOwner().getUser()); @@ -114,14 +114,14 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "GET /vAppTemplate/{id}/customizationSection") public void testGetCustomizationSection() { - CustomizationSection customizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI); + CustomizationSection customizationSection = vAppTemplateClient.getCustomizationSection(vAppTemplateURI); checkCustomizationSection(customizationSection); } @Test(description = "GET /vAppTemplate/{id}/productSections") public void testGetProductSections() { - ProductSectionList productSectionList = vAppTemplateClient.getProductSectionsForVAppTemplate(vAppTemplateURI); + ProductSectionList productSectionList = vAppTemplateClient.getProductSections(vAppTemplateURI); checkProductSectionList(productSectionList); } @@ -130,13 +130,13 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { public void testEditProductSections() { // TODO make a real modification - ProductSectionList origSections = vAppTemplateClient.getProductSectionsForVAppTemplate(vApp.getHref()); + ProductSectionList origSections = vAppTemplateClient.getProductSections(vApp.getHref()); ProductSectionList newSections = origSections.toBuilder().build(); - Task task = vAppTemplateClient.editProductSectionsForVAppTemplate(vApp.getHref(), newSections); + Task task = vAppTemplateClient.modifyProductSections(vApp.getHref(), newSections); assertTaskSucceeds(task); - ProductSectionList modified = vAppTemplateClient.getProductSectionsForVAppTemplate(vApp.getHref()); + ProductSectionList modified = vAppTemplateClient.getProductSections(vApp.getHref()); checkProductSectionList(modified); } @@ -145,7 +145,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { getGuestCustomizationSection(new Function() { @Override public GuestCustomizationSection apply(URI uri) { - return vAppTemplateClient.getVAppTemplateGuestCustomizationSection(uri); + return vAppTemplateClient.getGuestCustomizationSection(uri); } }); } @@ -153,7 +153,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "GET /vAppTemplate/{id}/leaseSettingsSection") public void testGetLeaseSettingsSection() { // FIXME Wrong case for Vapp - LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI); + LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getLeaseSettingsSection(vAppTemplateURI); checkLeaseSettingsSection(leaseSettingsSection); } @@ -179,7 +179,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "GET /vAppTemplate/{id}/networkConfigSection") public void testGetVAppTemplateNetworkConfigSection() { - NetworkConfigSection networkConfigSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI); + NetworkConfigSection networkConfigSection = vAppTemplateClient.getNetworkConfigSection(vAppTemplateURI); checkNetworkConfigSection(networkConfigSection); } @@ -189,21 +189,21 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { getNetworkConnectionSection(new Function() { @Override public NetworkConnectionSection apply(URI uri) { - return vAppTemplateClient.getVAppTemplateNetworkConnectionSection(uri); + return vAppTemplateClient.getNetworkConnectionSection(uri); } }); } @Test(description = "GET /vAppTemplate/{id}/networkSection") public void testGetVAppTemplateNetworkSection() { - NetworkSection networkSection = vAppTemplateClient.getVAppTemplateNetworkSection(vAppTemplateURI); + NetworkSection networkSection = vAppTemplateClient.getNetworkSection(vAppTemplateURI); checkOvfNetworkSection(networkSection); } @Test(description = "GET /vAppTemplate/{id}/ovf") public void testGetVAppTemplateOvf() { - Envelope envelope = vAppTemplateClient.getVAppTemplateOvf(vAppTemplateURI); + Envelope envelope = vAppTemplateClient.getOvf(vAppTemplateURI); checkOvfEnvelope(envelope); } @@ -217,7 +217,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { .description(description) .build(); - final Task task = vAppTemplateClient.editVAppTemplate(vAppTemplateURI, template); + final Task task = vAppTemplateClient.modifyVAppTemplate(vAppTemplateURI, template); retryTaskSuccess.apply(task); VAppTemplate newTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI); @@ -288,10 +288,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { .computerName(computerName) .build(); - final Task task = vAppTemplateClient.editVAppTemplateGuestCustomizationSection(vm.getHref(), newSection); + final Task task = vAppTemplateClient.modifyGuestCustomizationSection(vm.getHref(), newSection); assertTaskSucceeds(task); - GuestCustomizationSection modified = vAppTemplateClient.getVAppTemplateGuestCustomizationSection(vm.getHref()); + GuestCustomizationSection modified = vAppTemplateClient.getGuestCustomizationSection(vm.getHref()); checkGuestCustomizationSection(modified); assertEquals(modified.getComputerName(), computerName); @@ -299,7 +299,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "PUT /vAppTemplate/{id}/customizationSection") public void testEditCustomizationSection() { - boolean oldVal = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate(); + boolean oldVal = vAppTemplateClient.getCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate(); boolean newVal = !oldVal; CustomizationSection customizationSection = CustomizationSection.builder() @@ -307,10 +307,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { .customizeOnInstantiate(newVal) .build(); - final Task task = vAppTemplateClient.editVAppTemplateCustomizationSection(vAppTemplateURI, customizationSection); + final Task task = vAppTemplateClient.modifyCustomizationSection(vAppTemplateURI, customizationSection); retryTaskSuccess.apply(task); - CustomizationSection newCustomizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI); + CustomizationSection newCustomizationSection = vAppTemplateClient.getCustomizationSection(vAppTemplateURI); assertEquals(newCustomizationSection.isCustomizeOnInstantiate(), newVal); } @@ -327,10 +327,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { .deploymentLeaseInSeconds(deploymentLeaseInSeconds) .build(); - final Task task = vAppTemplateClient.editVappTemplateLeaseSettingsSection(vAppTemplateURI, leaseSettingSection); + final Task task = vAppTemplateClient.modifyLeaseSettingsSection(vAppTemplateURI, leaseSettingSection); retryTaskSuccess.apply(task); - LeaseSettingsSection newLeaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI); + LeaseSettingsSection newLeaseSettingsSection = vAppTemplateClient.getLeaseSettingsSection(vAppTemplateURI); assertEquals(newLeaseSettingsSection.getStorageLeaseInSeconds(), (Integer) storageLeaseInSeconds); assertEquals(newLeaseSettingsSection.getDeploymentLeaseInSeconds(), (Integer) deploymentLeaseInSeconds); } @@ -339,7 +339,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { public void testEditNetworkConfigSection() { // TODO What to modify? - NetworkConfigSection oldSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vApp.getHref()); + NetworkConfigSection oldSection = vAppTemplateClient.getNetworkConfigSection(vApp.getHref()); NetworkConfigSection newSection = oldSection.toBuilder().build(); // String networkName = ""+random.nextInt(); @@ -356,10 +356,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { // .networkConfigs(vappNetworkConfigurations) // .build(); - final Task task = vAppTemplateClient.editVAppTemplateNetworkConfigSection(vApp.getHref(), newSection); + final Task task = vAppTemplateClient.modifyNetworkConfigSection(vApp.getHref(), newSection); assertTaskSucceeds(task); - NetworkConfigSection modified = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI); + NetworkConfigSection modified = vAppTemplateClient.getNetworkConfigSection(vAppTemplateURI); checkNetworkConfigSection(modified); // assertEquals(modifiedĀ§.getNetworkConfigs().size(), 1); @@ -383,10 +383,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { .build()) .build(); - Task task = vAppTemplateClient.editVAppTemplateNetworkConnectionSection(vm.getHref(), newSection); + Task task = vAppTemplateClient.modifyNetworkConnectionSection(vm.getHref(), newSection); assertTaskSucceeds(task); - NetworkConnectionSection modified = vAppTemplateClient.getVAppTemplateNetworkConnectionSection(vm.getHref()); + NetworkConnectionSection modified = vAppTemplateClient.getNetworkConnectionSection(vm.getHref()); checkNetworkConnectionSection(modified); } @@ -413,7 +413,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "POST /vAppTemplate/{id}/action/disableDownload") public void testDisableVAppTemplateDownload() throws Exception { - vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); + vAppTemplateClient.disableDownload(vAppTemplateURI); // TODO Check that it really is disabled. The only thing I can see for determining this // is the undocumented "download" link in the VAppTemplate. But that is brittle and we @@ -428,8 +428,8 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "POST /vAppTemplate/{id}/action/enableDownload") public void testEnableVAppTemplateDownload() throws Exception { // First disable so that enable really has some work to do... - vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); - final Task task = vAppTemplateClient.enableDownloadVappTemplate(vAppTemplateURI); + vAppTemplateClient.disableDownload(vAppTemplateURI); + final Task task = vAppTemplateClient.enableDownload(vAppTemplateURI); retryTaskSuccess.apply(task); // TODO Check that it really is enabled. The only thing I can see for determining this @@ -454,7 +454,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "POST /vAppTemplate/{id}/action/consolidate") public void testConsolidateVAppTemplate() throws Exception { - final Task task = vAppTemplateClient.consolidateVappTemplate(vm.getHref()); + final Task task = vAppTemplateClient.consolidateVm(vm.getHref()); assertTaskSucceedsLong(task); // TODO Need assertion that command had effect @@ -468,7 +468,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { .datastore(dataStore) .build(); - final Task task = vAppTemplateClient.relocateVappTemplate(vAppTemplateURI, relocateParams); + final Task task = vAppTemplateClient.relocateVm(vAppTemplateURI, relocateParams); assertTaskSucceedsLong(task); } @@ -484,8 +484,8 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { @Test(description = "test completed task not included in vAppTemplate") public void testCompletedTaskNotIncludedInVAppTemplate() throws Exception { // Kick off a task, and wait for it to complete - vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); - final Task task = vAppTemplateClient.enableDownloadVappTemplate(vAppTemplateURI); + vAppTemplateClient.disableDownload(vAppTemplateURI); + final Task task = vAppTemplateClient.enableDownload(vAppTemplateURI); assertTaskDoneEventually(task); // Ask the VAppTemplate for its tasks, and the status of the matching task if it exists