Merge pull request #524 from grkvlt/rename

Issue 830: Method name tidying
This commit is contained in:
Adrian Cole 2012-03-30 08:49:02 -07:00
commit fc6f5ffd2f
9 changed files with 304 additions and 301 deletions

View File

@ -123,23 +123,24 @@ public interface VAppAsyncClient {
ListenableFuture<Task> deleteVApp(@EndpointParam URI vAppURI); ListenableFuture<Task> deleteVApp(@EndpointParam URI vAppURI);
/** /**
* @see VAppClient#consolidateVApp(URI) * @see VAppClient#consolidateVm(URI)
*/ */
@POST @POST
@Path("/action/consolidate") @Path("/action/consolidate")
@Consumes(TASK) @Consumes(TASK)
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> consolidateVApp(@EndpointParam URI vAppURI); ListenableFuture<Task> consolidateVm(@EndpointParam URI vAppURI);
/** /**
* @see VAppClient#controlAccess(URI, ControlAccessParams) * @see VAppClient#modifyControlAccess(URI, ControlAccessParams)
*/ */
@POST @POST
@Path("/action/controlAccess") @Path("/action/controlAccess")
@Produces(CONTROL_ACCESS) @Produces(CONTROL_ACCESS)
@Consumes(CONTROL_ACCESS) @Consumes(CONTROL_ACCESS)
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<ControlAccessParams> controlAccess(@EndpointParam URI vAppURI, @ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<ControlAccessParams> modifyControlAccess(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) ControlAccessParams params); @BinderParam(BindToXMLPayload.class) ControlAccessParams params);
/** /**
@ -190,25 +191,25 @@ public interface VAppAsyncClient {
ListenableFuture<Task> installVMwareTools(@EndpointParam URI vAppURI); ListenableFuture<Task> installVMwareTools(@EndpointParam URI vAppURI);
/** /**
* @see VAppClient#recomposeVApp(URI, RecomposeVAppParams) * @see VAppClient#recompose(URI, RecomposeVAppParams)
*/ */
@POST @POST
@Path("/action/recomposeVApp") @Path("/action/recomposeVApp")
@Produces(RECOMPOSE_VAPP_PARAMS) @Produces(RECOMPOSE_VAPP_PARAMS)
@Consumes(TASK) @Consumes(TASK)
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> recomposeVApp(@EndpointParam URI vAppURI, ListenableFuture<Task> recompose(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) RecomposeVAppParams params); @BinderParam(BindToXMLPayload.class) RecomposeVAppParams params);
/** /**
* @see VAppClient#relocate(URI, RelocateParams) * @see VAppClient#relocateVm(URI, RelocateParams)
*/ */
@POST @POST
@Path("/action/relocate") @Path("/action/relocate")
@Produces(RELOCATE_VM_PARAMS) @Produces(RELOCATE_VM_PARAMS)
@Consumes(TASK) @Consumes(TASK)
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> relocate(@EndpointParam URI vAppURI, ListenableFuture<Task> relocateVm(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) RelocateParams params); @BinderParam(BindToXMLPayload.class) RelocateParams params);
/** /**

View File

@ -63,32 +63,32 @@ public interface VAppClient {
* *
* The vApp/VM could be in one of these statuses: * The vApp/VM could be in one of these statuses:
* <ul> * <ul>
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION} - * <li>{@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 * 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. * exist yet. This is further sub-categorized in the respective entities.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED} - * <li>{@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 * Entity is whole, e.g., VM creation is complete and all the required model objects and VC backings are
* created. * created.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED RESOLVED(1)} -
* Entity is resolved. * Entity is resolved.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#DEPLOYED} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#DEPLOYED DEPLOYED(2)} -
* Entity is deployed. * Entity is deployed.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#SUSPENDED} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#SUSPENDED SUSPENDED(3)} -
* All VMs of the vApp are suspended. * All VMs of the vApp are suspended.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_ON} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_ON POWERED_ON(4)} -
* All VMs of the vApp are powered on. * All VMs of the vApp are powered on.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#WAITING_FOR_INPUT} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#WAITING_FOR_INPUT WAITING_FOR_INPUT(5)} -
* VM is pending response on a question. * VM is pending response on a question.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN} - * <li>{@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. * Entity state could not be retrieved from the inventory, e.g., VM power state is null.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRECOGNIZED} - * <li>{@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. * Entity state was retrieved from the inventory but could not be mapped to an internal state.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF POWERED_OFF(8)} -
* All VMs of the vApp are powered off. * All VMs of the vApp are powered off.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#INCONSISTENT_STATE} - * <li>{@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 * 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. * undeployed, it is in an inconsistent state.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED} - * <li>{@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 * vApp status is set to {@code MIXED} when the VMs in the vApp are in different power states
* </ul> * </ul>
* *
@ -131,7 +131,7 @@ public interface VAppClient {
* *
* @since 1.5 * @since 1.5
*/ */
Task consolidateVApp(URI vAppURI); Task consolidateVm(URI vAppURI);
/** /**
* Modifies the control access of a vApp. * Modifies the control access of a vApp.
@ -142,7 +142,7 @@ public interface VAppClient {
* *
* @since 0.9 * @since 0.9
*/ */
ControlAccessParams controlAccess(URI vAppURI, ControlAccessParams params); ControlAccessParams modifyControlAccess(URI vAppURI, ControlAccessParams params);
/** /**
* Deploys a vApp/VM. * Deploys a vApp/VM.
@ -231,7 +231,7 @@ public interface VAppClient {
* *
* @since 1.0 * @since 1.0
*/ */
Task recomposeVApp(URI vAppURI, RecomposeVAppParams params); Task recompose(URI vAppURI, RecomposeVAppParams params);
/** /**
* Relocates a vm. * Relocates a vm.
@ -242,7 +242,7 @@ public interface VAppClient {
* *
* @since 1.5 * @since 1.5
*/ */
Task relocate(URI vAppURI, RelocateParams params); Task relocateVm(URI vAppURI, RelocateParams params);
/** /**
* Undeploy a vApp/VM. * Undeploy a vApp/VM.

View File

@ -73,7 +73,7 @@ import com.google.common.util.concurrent.ListenableFuture;
public interface VAppTemplateAsyncClient { public interface VAppTemplateAsyncClient {
/** /**
* @see org.jclouds.vcloud.director.v1_5.features.VAppTemplateClient#getVAppTemplate(URI) * @see VAppTemplateClient#getVAppTemplate(URI)
*/ */
@GET @GET
@Consumes(VAPP_TEMPLATE) @Consumes(VAPP_TEMPLATE)
@ -83,13 +83,13 @@ 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 @PUT
@Produces(VAPP_TEMPLATE) @Produces(VAPP_TEMPLATE)
@Consumes(TASK) @Consumes(TASK)
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editVAppTemplate(@EndpointParam URI templateURI, ListenableFuture<Task> modifyVAppTemplate(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) VAppTemplate template); @BinderParam(BindToXMLPayload.class) VAppTemplate template);
/** /**
@ -101,21 +101,21 @@ public interface VAppTemplateAsyncClient {
ListenableFuture<Task> deleteVappTemplate(@EndpointParam URI templateUri); ListenableFuture<Task> deleteVappTemplate(@EndpointParam URI templateUri);
/** /**
* @see VAppTemplateClient#consolidateVappTemplate(URI) * @see VAppTemplateClient#consolidateVm(URI)
*/ */
@POST @POST
@Consumes(TASK) @Consumes(TASK)
@Path("/action/consolidate") @Path("/action/consolidate")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> consolidateVappTemplate(@EndpointParam URI templateURI); ListenableFuture<Task> consolidateVm(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#disableDownloadVappTemplate(URI) * @see VAppTemplateClient#disableDownload(URI)
*/ */
@POST @POST
@Path("/action/disableDownload") @Path("/action/disableDownload")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Void> disableDownloadVappTemplate(@EndpointParam URI templateURI); ListenableFuture<Void> disableDownload(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#enableDownloadVappTemplate(URI) * @see VAppTemplateClient#enableDownloadVappTemplate(URI)
@ -124,105 +124,105 @@ public interface VAppTemplateAsyncClient {
@Consumes(TASK) @Consumes(TASK)
@Path("/action/enableDownload") @Path("/action/enableDownload")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> enableDownloadVappTemplate(@EndpointParam URI templateURI); ListenableFuture<Task> enableDownload(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#relocateVappTemplate(URI, org.jclouds.vcloud.director.v1_5.domain.RelocateParams) * @see VAppTemplateClient#relocateVm(URI, RelocateParams)
*/ */
@POST @POST
@Produces(RELOCATE_TEMPLATE) @Produces(RELOCATE_TEMPLATE)
@Consumes(TASK) @Consumes(TASK)
@Path("/action/relocate") @Path("/action/relocate")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> relocateVappTemplate(@EndpointParam URI templateURI, ListenableFuture<Task> relocateVm(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) RelocateParams params); @BinderParam(BindToXMLPayload.class) RelocateParams params);
/** /**
* @see VAppTemplateClient#getVAppTemplateCustomizationSection(URI) * @see VAppTemplateClient#getCustomizationSection(URI)
*/ */
@GET @GET
@Consumes(CUSTOMIZATION_SECTION) @Consumes(CUSTOMIZATION_SECTION)
@Path("/customizationSection") @Path("/customizationSection")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<CustomizationSection> getVAppTemplateCustomizationSection(@EndpointParam URI templateURI); ListenableFuture<CustomizationSection> getCustomizationSection(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#editVAppTemplateCustomizationSection(URI, org.jclouds.vcloud.director.v1_5.domain.CustomizationSection) * @see VAppTemplateClient#modifyCustomizationSection(URI, CustomizationSection)
*/ */
@PUT @PUT
@Produces(CUSTOMIZATION_SECTION) @Produces(CUSTOMIZATION_SECTION)
@Consumes(TASK) @Consumes(TASK)
@Path("/customizationSection") @Path("/customizationSection")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editVAppTemplateCustomizationSection(@EndpointParam URI templateURI, ListenableFuture<Task> modifyCustomizationSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) CustomizationSection sectionType); @BinderParam(BindToXMLPayload.class) CustomizationSection sectionType);
/** /**
* @see VAppTemplateClient#getVAppTemplateGuestCustomizationSection(URI) * @see VAppTemplateClient#getGuestCustomizationSection(URI)
*/ */
@GET @GET
@Consumes(GUEST_CUSTOMIZATION_SECTION) @Consumes(GUEST_CUSTOMIZATION_SECTION)
@Path("/guestCustomizationSection") @Path("/guestCustomizationSection")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<GuestCustomizationSection> getVAppTemplateGuestCustomizationSection(@EndpointParam URI templateURI); ListenableFuture<GuestCustomizationSection> 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 @PUT
@Produces(GUEST_CUSTOMIZATION_SECTION) @Produces(GUEST_CUSTOMIZATION_SECTION)
@Consumes(TASK) @Consumes(TASK)
@Path("/guestCustomizationSection") @Path("/guestCustomizationSection")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editVAppTemplateGuestCustomizationSection(@EndpointParam URI templateURI, ListenableFuture<Task> modifyGuestCustomizationSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) GuestCustomizationSection section); @BinderParam(BindToXMLPayload.class) GuestCustomizationSection section);
/** /**
* @see VAppTemplateClient#getVappTemplateLeaseSettingsSection(URI) * @see VAppTemplateClient#getLeaseSettingsSection(URI)
*/ */
@GET @GET
@Consumes(LEASE_SETTINGS_SECTION) @Consumes(LEASE_SETTINGS_SECTION)
@Path("/leaseSettingsSection") @Path("/leaseSettingsSection")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<LeaseSettingsSection> getVappTemplateLeaseSettingsSection(@EndpointParam URI templateURI); ListenableFuture<LeaseSettingsSection> getLeaseSettingsSection(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#editVappTemplateLeaseSettingsSection(URI, org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection) * @see VAppTemplateClient#modifyLeaseSettingsSection(URI, LeaseSettingsSection)
*/ */
@PUT @PUT
@Produces(LEASE_SETTINGS_SECTION) @Produces(LEASE_SETTINGS_SECTION)
@Consumes(TASK) @Consumes(TASK)
@Path("/leaseSettingsSection") @Path("/leaseSettingsSection")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editVappTemplateLeaseSettingsSection(@EndpointParam URI templateURI, ListenableFuture<Task> modifyLeaseSettingsSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) LeaseSettingsSection settingsSection); @BinderParam(BindToXMLPayload.class) LeaseSettingsSection settingsSection);
/** /**
* @see VAppTemplateClient#getVAppTemplateNetworkConfigSection(URI) * @see VAppTemplateClient#getNetworkConfigSection(URI)
*/ */
@GET @GET
@Consumes(NETWORK_CONFIG_SECTION) @Consumes(NETWORK_CONFIG_SECTION)
@Path("/networkConfigSection") @Path("/networkConfigSection")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<NetworkConfigSection> getVAppTemplateNetworkConfigSection(@EndpointParam URI templateURI); ListenableFuture<NetworkConfigSection> getNetworkConfigSection(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#editVAppTemplateNetworkConfigSection(URI, org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection) * @see VAppTemplateClient#modifyNetworkConfigSection(URI, NetworkConfigSection)
*/ */
@PUT @PUT
@Produces(NETWORK_CONFIG_SECTION) @Produces(NETWORK_CONFIG_SECTION)
@Consumes(TASK) @Consumes(TASK)
@Path("/networkConfigSection") @Path("/networkConfigSection")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editVAppTemplateNetworkConfigSection(@EndpointParam URI templateURI, ListenableFuture<Task> modifyNetworkConfigSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) NetworkConfigSection section); @BinderParam(BindToXMLPayload.class) NetworkConfigSection section);
/** /**
* @see VAppTemplateClient#getVAppTemplateNetworkConnectionSection(URI) * @see VAppTemplateClient#getNetworkConnectionSection(URI)
*/ */
@GET @GET
@Consumes(NETWORK_CONNECTION_SECTION) @Consumes(NETWORK_CONNECTION_SECTION)
@ -232,35 +232,35 @@ public interface VAppTemplateAsyncClient {
ListenableFuture<NetworkConnectionSection> getVAppTemplateNetworkConnectionSection(@EndpointParam URI templateURI); ListenableFuture<NetworkConnectionSection> getVAppTemplateNetworkConnectionSection(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#editVAppTemplateNetworkConnectionSection(URI, org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection) * @see VAppTemplateClient#modifyNetworkConnectionSection(URI, NetworkConnectionSection)
*/ */
@PUT @PUT
@Produces(NETWORK_CONNECTION_SECTION) @Produces(NETWORK_CONNECTION_SECTION)
@Consumes(TASK) @Consumes(TASK)
@Path("/networkConnectionSection") @Path("/networkConnectionSection")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editVAppTemplateNetworkConnectionSection(@EndpointParam URI templateURI, ListenableFuture<Task> modifyNetworkConnectionSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) NetworkConnectionSection section); @BinderParam(BindToXMLPayload.class) NetworkConnectionSection section);
/** /**
* @see VAppTemplateClient#getVAppTemplateNetworkSection(URI) * @see VAppTemplateClient#getNetworkSection(URI)
*/ */
@GET @GET
@Consumes(NETWORK_SECTION) @Consumes(NETWORK_SECTION)
@Path("/networkSection") @Path("/networkSection")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<NetworkSection> getVAppTemplateNetworkSection(@EndpointParam URI templateURI); ListenableFuture<NetworkSection> getNetworkSection(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#getVAppTemplateOvf(URI) * @see VAppTemplateClient#getOvf(URI)
*/ */
@GET @GET
@Consumes @Consumes
@Path("/ovf") @Path("/ovf")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<Envelope> getVAppTemplateOvf(@EndpointParam URI templateURI); ListenableFuture<Envelope> getOvf(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#getOwnerOfVAppTemplate(URI) * @see VAppTemplateClient#getOwnerOfVAppTemplate(URI)
@ -270,7 +270,7 @@ public interface VAppTemplateAsyncClient {
@Path("/owner") @Path("/owner")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<Owner> getOwnerOfVAppTemplate(@EndpointParam URI templateURI); ListenableFuture<Owner> getOwner(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#getProductSectionsForVAppTemplate(URI) * @see VAppTemplateClient#getProductSectionsForVAppTemplate(URI)
@ -280,17 +280,17 @@ public interface VAppTemplateAsyncClient {
@Path("/productSections") @Path("/productSections")
@JAXBResponseParser @JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<ProductSectionList> getProductSectionsForVAppTemplate(@EndpointParam URI templateURI); ListenableFuture<ProductSectionList> getProductSections(@EndpointParam URI templateURI);
/** /**
* @see VAppTemplateClient#editProductSectionsForVAppTemplate(URI, org.jclouds.vcloud.director.v1_5.domain.ProductSectionList) * @see VAppTemplateClient#modifyProductSections(URI, ProductSectionList)
*/ */
@PUT @PUT
@Produces(PRODUCT_SECTION_LIST) @Produces(PRODUCT_SECTION_LIST)
@Consumes(TASK) @Consumes(TASK)
@Path("/productSections") @Path("/productSections")
@JAXBResponseParser @JAXBResponseParser
ListenableFuture<Task> editProductSectionsForVAppTemplate(@EndpointParam URI templateURI, ListenableFuture<Task> modifyProductSections(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) ProductSectionList sections); @BinderParam(BindToXMLPayload.class) ProductSectionList sections);
/** /**

View File

@ -51,21 +51,21 @@ public interface VAppTemplateClient {
* *
* The vApp could be in one of these statues: * The vApp could be in one of these statues:
* <ul> * <ul>
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION} - * <li>{@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 * Transient entity state, e.g., model object is created but the corresponding VC backing does not exist yet. This
* does not exist yet. This is further sub-categorized in the respective entities. * is further sub-categorized in the respective entities.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED} - * <li>{@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. * Entity is whole, e.g., VM creation is complete and all the required model objects and VC backings are created.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED RESOLVED(1)} -
* Entity is resolved. * Entity is resolved.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN} - * <li>{@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. * Entity state could not be retrieved from the inventory, e.g., VM power state is null.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF} - * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF POWERED_OFF(8)} -
* All VMs of the vApp template * All VMs of the vApp template are powered off.
* are powered off. * <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED MIXED(10)} -
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED} - * vApp template status is set to {@code MIXED} when the VMs in the vApp are in different power states.
* vApp template status is set to MIXED when the VMs in the vApp are in different power states.
* </ul> * </ul>
*
* <pre> * <pre>
* GET /vAppTemplate/{id} * GET /vAppTemplate/{id}
* </pre> * </pre>
@ -84,10 +84,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param template the template containing the new name and/or description * @param template the template containing the new name and/or description
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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. * Deletes a vApp template.
@ -97,8 +97,8 @@ public interface VAppTemplateClient {
* </pre> * </pre>
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * task status in order to check when it is completed.
*/ */
Task deleteVappTemplate(URI templateUri); Task deleteVappTemplate(URI templateUri);
@ -110,10 +110,10 @@ public interface VAppTemplateClient {
* </pre> * </pre>
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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. * Disables the download link to the ovf of a vApp template.
@ -124,7 +124,7 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
*/ */
void disableDownloadVappTemplate(URI templateUri); void disableDownload(URI templateUri);
/** /**
* Enables downloading of the ovf of a vApp template. * Enables downloading of the ovf of a vApp template.
@ -134,10 +134,10 @@ public interface VAppTemplateClient {
* </pre> * </pre>
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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. * Relocates a virtual machine in a vApp template to a different datastore.
@ -148,10 +148,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param params contains the reference to the new datastore * @param params contains the reference to the new datastore
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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. * Retrieves the customization section of a vApp template.
@ -163,7 +163,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the customization section * @return the customization section
*/ */
CustomizationSection getVAppTemplateCustomizationSection(URI templateUri); CustomizationSection getCustomizationSection(URI templateUri);
/** /**
* Modifies the vApp template customization information. * Modifies the vApp template customization information.
@ -174,10 +174,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param section the new configuration to apply * @param section the new configuration to apply
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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 * Retrieves the Guest Customization Section of a VM
@ -189,7 +189,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the guest customization section * @return the guest customization section
*/ */
GuestCustomizationSection getVAppTemplateGuestCustomizationSection(URI templateUri); GuestCustomizationSection getGuestCustomizationSection(URI templateUri);
/** /**
* Modifies the guest customization options of a VM. * Modifies the guest customization options of a VM.
@ -200,10 +200,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param section the new configuration to apply * @param section the new configuration to apply
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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 * Retrieves the lease settings section of a vApp or vApp template
@ -215,7 +215,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the lease settings * @return the lease settings
*/ */
LeaseSettingsSection getVappTemplateLeaseSettingsSection(URI templateUri); LeaseSettingsSection getLeaseSettingsSection(URI templateUri);
/** /**
* Modifies the lease settings section of a vApp or vApp template. * Modifies the lease settings section of a vApp or vApp template.
@ -226,10 +226,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param section the new configuration to apply * @param section the new configuration to apply
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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. * Retrieves the network config section of a vApp or vApp template.
@ -241,7 +241,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the network config section requested * @return the network config section requested
*/ */
NetworkConfigSection getVAppTemplateNetworkConfigSection(URI templateUri); NetworkConfigSection getNetworkConfigSection(URI templateUri);
/** /**
* Modifies the network config section of a vApp. * Modifies the network config section of a vApp.
@ -252,10 +252,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param section the new configuration to apply * @param section the new configuration to apply
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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 * Retrieves the network connection section of a VM
@ -267,7 +267,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the network connection section requested * @return the network connection section requested
*/ */
NetworkConnectionSection getVAppTemplateNetworkConnectionSection(URI templateUri); NetworkConnectionSection getNetworkConnectionSection(URI templateUri);
/** /**
* Modifies the network connection section of a VM. * Modifies the network connection section of a VM.
@ -278,10 +278,10 @@ public interface VAppTemplateClient {
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @param section the new configuration to apply * @param section the new configuration to apply
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * 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. * Retrieves the network section of a vApp or vApp template.
@ -293,14 +293,14 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the network section requested * @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 * Retrieves an OVF descriptor of a vApp template.
* template as it is, with all vCloud specific information (like mac address, *
* parent networks, etc). The OVF which could be downloaded by enabling for * This OVF represents the vApp template as it is, with all vCloud specific information (like mac address, parent
* download will not contain this information. There no specific states bound * networks, etc). The OVF which could be downloaded by enabling for download will not contain this information.
* to this entity. * There are no specific states bound to this entity.
* *
* <pre> * <pre>
* GET /vAppTemplate/{id}/ovf * GET /vAppTemplate/{id}/ovf
@ -309,7 +309,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the ovf envelope * @return the ovf envelope
*/ */
Envelope getVAppTemplateOvf(URI templateUri); Envelope getOvf(URI templateUri);
/** /**
* Retrieves vApp template owner. * Retrieves vApp template owner.
@ -321,7 +321,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the owner of the vApp template * @return the owner of the vApp template
*/ */
Owner getOwnerOfVAppTemplate(URI templateUri); Owner getOwner(URI templateUri);
/** /**
* Retrieves VAppTemplate/VM product sections * Retrieves VAppTemplate/VM product sections
@ -333,7 +333,7 @@ public interface VAppTemplateClient {
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the product sections * @return the product sections
*/ */
ProductSectionList getProductSectionsForVAppTemplate(URI templateUri); ProductSectionList getProductSections(URI templateUri);
/** /**
* Modifies the product sections of a vApp or vApp template. * Modifies the product sections of a vApp or vApp template.
@ -343,10 +343,10 @@ public interface VAppTemplateClient {
* </pre> * </pre>
* *
* @param templateUri the URI of the template * @param templateUri the URI of the template
* @return the task performing the action. This operation is asynchronous and the user * @return the task performing the action. This operation is asynchronous and the user should monitor the returned
* should monitor the returned task status in order to check when it is completed. * task status in order to check when it is completed.
*/ */
Task editProductSectionsForVAppTemplate(URI templateUri, ProductSectionList sections); Task modifyProductSections(URI templateUri, ProductSectionList sections);
/** /**
* <pre> * <pre>

View File

@ -56,30 +56,34 @@ public interface VdcClient {
* Captures a vApp into vApp template. * Captures a vApp into vApp template.
* *
* The status of vApp template will be in * The status of vApp template will be in
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the
* until the capture task is finished. * capture task is finished.
* *
* @return a VApp resource which will contain a task. * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able
* The user should should wait for this task to finish to be able to use the vApp. * to use the vApp.
*/ */
VAppTemplate captureVApp(URI vdcUri, CaptureVAppParams params); 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.
* *
* @return a Media resource which will contain a task. * The status of the returned media is
* The user should monitor the contained task status in order to check when it is completed. * {@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.
*/ */
Media cloneMedia(URI vdcUri, CloneMediaParams params); 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.
* *
* @return a VApp resource which will contain a task. * The status of vApp will be in {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED
* The user should should wait for this task to finish to be able to use the vApp. * 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.
*/ */
VApp cloneVApp(URI vdcUri, CloneVAppParams params); VApp cloneVApp(URI vdcUri, CloneVAppParams params);
@ -87,11 +91,11 @@ public interface VdcClient {
* Clones a vApp template into new one. * Clones a vApp template into new one.
* *
* The status of vApp template will be in * The status of vApp template will be in
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the clone
* until the clone task is finished. * task is finished.
* *
* @return a VAppTemplate resource which will contain a task. * @return a VAppTemplate resource which will contain a task. The user should should wait for this task to finish to
* The user should should wait for this task to finish to be able to use the VAppTemplate. * be able to use the VAppTemplate.
*/ */
VAppTemplate cloneVAppTemplate(URI vdcUri, CloneVAppTemplateParams params); VAppTemplate cloneVAppTemplate(URI vdcUri, CloneVAppTemplateParams params);
@ -104,43 +108,41 @@ public interface VdcClient {
* makes a compose vApp request whose body is a ComposeVAppParams element, includes the * makes a compose vApp request whose body is a ComposeVAppParams element, includes the
* following information: * following information:
* <ul> * <ul>
* <li>An InstantiationParams element that applies to the composed vApp itself and any vApp * <li>An InstantiationParams element that applies to the composed vApp itself and any vApp templates referenced in
* templates referenced in Item elements. * Item elements.
* <li>A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in * <li>A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in the composition. Each
* the composition. Each SourcedItem can contain the following elements: * SourcedItem can contain the following elements:
* <ul> * <ul>
* <li>A required Source element whose href attribute value is a reference * <li>A required Source element whose href attribute value is a reference to a vApp template, vApp, or VM to include
* to a vApp template, vApp, or VM to include in the composition. If the Source element * in the composition. If the Source element references a VM, the Item must also include an InstantiationParams
* references a VM, the Item must also include an InstantiationParams element specific to * element specific to that VM.
* that VM. * <li>An optional NetworkAssignment element that specifies how the network connections of child VM elements are
* <li>An optional NetworkAssignment element that specifies how the network connections * mapped to vApp networks in the parent.
* of child VM elements are mapped to vApp networks in the parent.
* </ul> * </ul>
* <li>If any of the composition items is subject to a EULA, the ComposeVAppParams element * </ul>
* must include an AllEULAsAccepted element that has a value of true, indicating that you * If any of the composition items is subject to a EULA, the ComposeVAppParams element must include an
* accept the EULA. Otherwise, composition fails. The composed vApp must be deployed and * AllEULAsAccepted element that has a value of true, indicating that you accept the EULA. Otherwise, composition
* powered on before it can be used. The status of vApp will be * 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)} * {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} until the
* until the compose task is finished. * compose task is finished.
* *
* @return a VApp resource which will contain a task. * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able
* The user should should wait for this task to finish to be able to use the vApp. * to use the vApp.
*/ */
VApp composeVApp(URI vdcUri, ComposeVAppParams params); VApp composeVApp(URI vdcUri, ComposeVAppParams params);
/** /**
* Instantiate a vApp template into a new vApp. * Instantiate a vApp template into a new vApp.
* *
* The status of vApp will be in * The status of vApp will be in {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)} * UNRESOLVED(0)} until the instantiate task is finished.
* until the instantiate task is finished.
* *
* <pre> * <pre>
* POST /vdc/{id}/action/instantiateVAppTemplate * POST /vdc/{id}/action/instantiateVAppTemplate
* </pre> * </pre>
* *
* @return a VApp resource which will contain a task. * @return a VApp resource which will contain a task. The user should should wait for this task to finish to be able
* The user should should wait for this task to finish to be able to use the vApp. * to use the vApp.
*/ */
VApp instantiateVApp(URI vdcUri, InstantiateVAppParamsType params); VApp instantiateVApp(URI vdcUri, InstantiateVAppParamsType params);
@ -154,14 +156,14 @@ public interface VdcClient {
* <li>uploading disks described from the OVF * <li>uploading disks described from the OVF
* <li>finishing task for uploading * <li>finishing task for uploading
* </ol> * </ol>
* The status of vApp template will be {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#NOT_READY NOT_READY(0)} * The status of vApp template will be
* until the ovf and all disks are uploaded to the transfer site. After this a task will run on the vApp template uploading. * {@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, * 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. * because the descriptor.ovf does not yet exist.
* *
* @return a VAppTemplate resource which will contain a task. * @return a VAppTemplate resource which will contain a task. The user should should wait for this task to finish to
* The user should should wait for this task to finish to be able to use the VAppTemplate. * be able to use the VAppTemplate.
*/ */
VAppTemplate uploadVAppTemplate(URI vdcUri, UploadVAppTemplateParams params); VAppTemplate uploadVAppTemplate(URI vdcUri, UploadVAppTemplateParams params);

View File

@ -140,7 +140,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest
Task expected = consolidateVAppTask(); Task expected = consolidateVAppTask();
assertEquals(client.getVAppClient().consolidateVApp(vAppURI), expected); assertEquals(client.getVAppClient().consolidateVm(vAppURI), expected);
} }
@Test(enabled = false) @Test(enabled = false)
@ -159,7 +159,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest
ControlAccessParams expected = controlAccessParams(); ControlAccessParams expected = controlAccessParams();
assertEquals(client.getVAppClient().controlAccess(vAppURI, params), expected); assertEquals(client.getVAppClient().modifyControlAccess(vAppURI, params), expected);
} }
@Test(enabled = false) @Test(enabled = false)
@ -259,7 +259,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest
Task expected = recomposeVAppTask(); Task expected = recomposeVAppTask();
assertEquals(client.getVAppClient().recomposeVApp(vAppURI, params), expected); assertEquals(client.getVAppClient().recompose(vAppURI, params), expected);
} }
@Test(enabled = false) @Test(enabled = false)
@ -279,7 +279,7 @@ public class VAppClientExpectTest extends BaseVCloudDirectorRestClientExpectTest
Task expected = relocateTask(); Task expected = relocateTask();
assertEquals(client.getVAppClient().relocate(vAppURI, params), expected); assertEquals(client.getVAppClient().relocateVm(vAppURI, params), expected);
} }
@Test(enabled = false) @Test(enabled = false)

View File

@ -316,7 +316,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
vApp = powerOn(vApp); vApp = powerOn(vApp);
// The method under test // 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")); assertTrue(retryTaskSuccess.apply(consolidateVApp), String.format(TASK_COMPLETE_TIMELY, "consolidateVApp"));
} }
@ -331,7 +331,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
.build(); .build();
// The method under test // 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 // Check the retrieved object is well formed
checkControlAccessParams(modified); checkControlAccessParams(modified);
@ -347,7 +347,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
.build(); .build();
// The method under test // 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 // Check the retrieved object is well formed
checkControlAccessParams(modified); checkControlAccessParams(modified);
@ -436,7 +436,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
RecomposeVAppParams params = RecomposeVAppParams.builder().build(); RecomposeVAppParams params = RecomposeVAppParams.builder().build();
// The method under test // 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")); 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(); RelocateParams params = RelocateParams.builder().datastore(Reference.builder().href(datastore.getHref()).build()).build();
// The method under test // 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")); assertTrue(retryTaskSuccess.apply(relocate), String.format(TASK_COMPLETE_TIMELY, "relocate"));
} }

View File

@ -102,7 +102,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
assertEquals(template, exampleTemplate()); assertEquals(template, exampleTemplate());
Task task = client.editVAppTemplate(uri, exampleTemplate()); Task task = client.modifyVAppTemplate(uri, exampleTemplate());
assertNotNull(task); assertNotNull(task);
task = client.deleteVappTemplate(uri); 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 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(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
client.editVAppTemplate(uri, exampleTemplate()); client.modifyVAppTemplate(uri, exampleTemplate());
} }
@Test(expectedExceptions = VCloudDirectorException.class) @Test(expectedExceptions = VCloudDirectorException.class)
@ -155,7 +155,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
).getVAppTemplateClient(); ).getVAppTemplateClient();
assertNotNull(client); assertNotNull(client);
Task task = client.consolidateVappTemplate(uri); Task task = client.consolidateVm(uri);
assertNotNull(task); assertNotNull(task);
} }
@ -168,7 +168,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/consolidate").acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/consolidate").acceptMedia(TASK).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
client.consolidateVappTemplate(uri); client.consolidateVm(uri);
} }
public void testDisableDownloadVAppTemplate() { public void testDisableDownloadVAppTemplate() {
@ -181,7 +181,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
).getVAppTemplateClient(); ).getVAppTemplateClient();
assertNotNull(client); assertNotNull(client);
client.disableDownloadVappTemplate(uri); client.disableDownload(uri);
} }
@Test(expectedExceptions = VCloudDirectorException.class) @Test(expectedExceptions = VCloudDirectorException.class)
@ -193,7 +193,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/disableDownload").httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/disableDownload").httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient();
client.disableDownloadVappTemplate(uri); client.disableDownload(uri);
} }
public void testEnableDownloadVAppTemplate() { public void testEnableDownloadVAppTemplate() {
@ -206,7 +206,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
).getVAppTemplateClient(); ).getVAppTemplateClient();
assertNotNull(client); assertNotNull(client);
Task task = client.enableDownloadVappTemplate(uri); Task task = client.enableDownload(uri);
assertNotNull(task); assertNotNull(task);
} }
@ -219,7 +219,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/enableDownload").acceptMedia(TASK).httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("POST", templateId + "/action/enableDownload").acceptMedia(TASK).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
client.enableDownloadVappTemplate(uri); client.enableDownload(uri);
} }
public void testRelocateVAppTemplate() { 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(); Reference datastore = Reference.builder().href(URI.create("https://vcloud.example.com/api/admin/extension/datastore/607")).build();
RelocateParams params = RelocateParams.builder().datastore(datastore).build(); RelocateParams params = RelocateParams.builder().datastore(datastore).build();
Task task = client.relocateVappTemplate(uri, params); Task task = client.relocateVm(uri, params);
assertNotNull(task); 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(); Reference datastore = Reference.builder().href(URI.create("https://vcloud.example.com/api/admin/extension/datastore/607")).build();
RelocateParams params = RelocateParams.builder().datastore(datastore).build(); RelocateParams params = RelocateParams.builder().datastore(datastore).build();
client.relocateVappTemplate(uri, params); client.relocateVm(uri, params);
} }
@Test @Test
@ -268,11 +268,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
).getVAppTemplateClient(); ).getVAppTemplateClient();
assertNotNull(client); assertNotNull(client);
CustomizationSection section = client.getVAppTemplateCustomizationSection(uri); CustomizationSection section = client.getCustomizationSection(uri);
assertEquals(section, exampleCustomizationSection()); assertEquals(section, exampleCustomizationSection());
Task task = client.editVAppTemplateCustomizationSection(uri, exampleCustomizationSection()); Task task = client.modifyCustomizationSection(uri, exampleCustomizationSection());
assertNotNull(task); assertNotNull(task);
} }
@ -284,7 +284,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/customizationSection").acceptMedia(CUSTOMIZATION_SECTION).httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/customizationSection").acceptMedia(CUSTOMIZATION_SECTION).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
assertNull(client.getVAppTemplateCustomizationSection(uri)); assertNull(client.getCustomizationSection(uri));
} }
@Test(expectedExceptions = ResourceNotFoundException.class) @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 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(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
client.editVAppTemplateCustomizationSection(uri, exampleCustomizationSection()); client.modifyCustomizationSection(uri, exampleCustomizationSection());
} }
public void testGuestCustomizationSection() { public void testGuestCustomizationSection() {
@ -311,11 +311,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
).getVAppTemplateClient(); ).getVAppTemplateClient();
assertNotNull(client); assertNotNull(client);
GuestCustomizationSection section = client.getVAppTemplateGuestCustomizationSection(uri); GuestCustomizationSection section = client.getGuestCustomizationSection(uri);
assertEquals(section, exampleGuestCustomizationSection()); assertEquals(section, exampleGuestCustomizationSection());
Task task = client.editVAppTemplateGuestCustomizationSection(uri, exampleGuestCustomizationSection()); Task task = client.modifyGuestCustomizationSection(uri, exampleGuestCustomizationSection());
assertNotNull(task); assertNotNull(task);
} }
@ -328,7 +328,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/guestCustomizationSection").acceptMedia(GUEST_CUSTOMIZATION_SECTION).httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/guestCustomizationSection").acceptMedia(GUEST_CUSTOMIZATION_SECTION).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient();
client.getVAppTemplateGuestCustomizationSection(uri); client.getGuestCustomizationSection(uri);
} }
@Test(expectedExceptions = VCloudDirectorException.class) @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 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(); 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 { public void testLeaseSettingsSection() throws ParseException {
@ -355,11 +355,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
).getVAppTemplateClient(); ).getVAppTemplateClient();
assertNotNull(client); assertNotNull(client);
LeaseSettingsSection section = client.getVappTemplateLeaseSettingsSection(uri); LeaseSettingsSection section = client.getLeaseSettingsSection(uri);
assertEquals(section, exampleLeaseSettingsSection()); assertEquals(section, exampleLeaseSettingsSection());
Task task = client.editVappTemplateLeaseSettingsSection(uri, exampleLeaseSettingsSection()); Task task = client.modifyLeaseSettingsSection(uri, exampleLeaseSettingsSection());
assertNotNull(task); assertNotNull(task);
} }
@ -371,7 +371,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/leaseSettingsSection").acceptMedia(LEASE_SETTINGS_SECTION).httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/leaseSettingsSection").acceptMedia(LEASE_SETTINGS_SECTION).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
assertNull(client.getVappTemplateLeaseSettingsSection(uri)); assertNull(client.getLeaseSettingsSection(uri));
} }
@Test(expectedExceptions = ResourceNotFoundException.class) @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 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(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error403.xml", ERROR).httpResponseBuilder().statusCode(403).build()).getVAppTemplateClient();
client.editVappTemplateLeaseSettingsSection(uri, exampleLeaseSettingsSection()); client.modifyLeaseSettingsSection(uri, exampleLeaseSettingsSection());
} }
public void testVappTemplateMetadata() { public void testVappTemplateMetadata() {
@ -503,11 +503,11 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
assertNotNull(client); assertNotNull(client);
NetworkConfigSection section = client.getVAppTemplateNetworkConfigSection(uri); NetworkConfigSection section = client.getNetworkConfigSection(uri);
assertEquals(section, exampleNetworkConfigSection()); assertEquals(section, exampleNetworkConfigSection());
Task task = client.editVAppTemplateNetworkConfigSection(uri, exampleNetworkConfigSection()); Task task = client.modifyNetworkConfigSection(uri, exampleNetworkConfigSection());
assertNotNull(task); assertNotNull(task);
} }
@ -520,7 +520,7 @@ public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientEx
new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/networkConfigSection").acceptMedia(NETWORK_CONFIG_SECTION).httpRequestBuilder().build(), new VcloudHttpRequestPrimer().apiCommand("GET", templateId + "/networkConfigSection").acceptMedia(NETWORK_CONFIG_SECTION).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient();
client.getVAppTemplateNetworkConfigSection(uri); client.getNetworkConfigSection(uri);
} }
@Test(expectedExceptions = VCloudDirectorException.class) @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 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(); new VcloudHttpResponsePrimer().xmlFilePayload("/vapptemplate/error400.xml", ERROR).httpResponseBuilder().statusCode(400).build()).getVAppTemplateClient();
client.editVAppTemplateNetworkConfigSection(uri, exampleNetworkConfigSection()); client.modifyNetworkConfigSection(uri, exampleNetworkConfigSection());
} }
private VAppTemplate exampleTemplate() { private VAppTemplate exampleTemplate() {

View File

@ -106,7 +106,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "GET /vAppTemplate/{id}/owner") @Test(description = "GET /vAppTemplate/{id}/owner")
public void testGetVAppTemplateOwner() { public void testGetVAppTemplateOwner() {
Owner owner = vAppTemplateClient.getOwnerOfVAppTemplate(vAppTemplateURI); Owner owner = vAppTemplateClient.getOwner(vAppTemplateURI);
checkOwner(owner); checkOwner(owner);
assertEquals(owner.getUser(), vAppTemplateClient.getVAppTemplate(vAppTemplateURI).getOwner().getUser()); assertEquals(owner.getUser(), vAppTemplateClient.getVAppTemplate(vAppTemplateURI).getOwner().getUser());
@ -114,14 +114,14 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "GET /vAppTemplate/{id}/customizationSection") @Test(description = "GET /vAppTemplate/{id}/customizationSection")
public void testGetCustomizationSection() { public void testGetCustomizationSection() {
CustomizationSection customizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI); CustomizationSection customizationSection = vAppTemplateClient.getCustomizationSection(vAppTemplateURI);
checkCustomizationSection(customizationSection); checkCustomizationSection(customizationSection);
} }
@Test(description = "GET /vAppTemplate/{id}/productSections") @Test(description = "GET /vAppTemplate/{id}/productSections")
public void testGetProductSections() { public void testGetProductSections() {
ProductSectionList productSectionList = vAppTemplateClient.getProductSectionsForVAppTemplate(vAppTemplateURI); ProductSectionList productSectionList = vAppTemplateClient.getProductSections(vAppTemplateURI);
checkProductSectionList(productSectionList); checkProductSectionList(productSectionList);
} }
@ -130,13 +130,13 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
public void testEditProductSections() { public void testEditProductSections() {
// TODO make a real modification // TODO make a real modification
ProductSectionList origSections = vAppTemplateClient.getProductSectionsForVAppTemplate(vApp.getHref()); ProductSectionList origSections = vAppTemplateClient.getProductSections(vApp.getHref());
ProductSectionList newSections = origSections.toBuilder().build(); ProductSectionList newSections = origSections.toBuilder().build();
Task task = vAppTemplateClient.editProductSectionsForVAppTemplate(vApp.getHref(), newSections); Task task = vAppTemplateClient.modifyProductSections(vApp.getHref(), newSections);
assertTaskSucceeds(task); assertTaskSucceeds(task);
ProductSectionList modified = vAppTemplateClient.getProductSectionsForVAppTemplate(vApp.getHref()); ProductSectionList modified = vAppTemplateClient.getProductSections(vApp.getHref());
checkProductSectionList(modified); checkProductSectionList(modified);
} }
@ -145,7 +145,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
getGuestCustomizationSection(new Function<URI, GuestCustomizationSection>() { getGuestCustomizationSection(new Function<URI, GuestCustomizationSection>() {
@Override @Override
public GuestCustomizationSection apply(URI uri) { 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") @Test(description = "GET /vAppTemplate/{id}/leaseSettingsSection")
public void testGetLeaseSettingsSection() { public void testGetLeaseSettingsSection() {
// FIXME Wrong case for Vapp // FIXME Wrong case for Vapp
LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI); LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getLeaseSettingsSection(vAppTemplateURI);
checkLeaseSettingsSection(leaseSettingsSection); checkLeaseSettingsSection(leaseSettingsSection);
} }
@ -179,7 +179,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "GET /vAppTemplate/{id}/networkConfigSection") @Test(description = "GET /vAppTemplate/{id}/networkConfigSection")
public void testGetVAppTemplateNetworkConfigSection() { public void testGetVAppTemplateNetworkConfigSection() {
NetworkConfigSection networkConfigSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI); NetworkConfigSection networkConfigSection = vAppTemplateClient.getNetworkConfigSection(vAppTemplateURI);
checkNetworkConfigSection(networkConfigSection); checkNetworkConfigSection(networkConfigSection);
} }
@ -189,21 +189,21 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
getNetworkConnectionSection(new Function<URI, NetworkConnectionSection>() { getNetworkConnectionSection(new Function<URI, NetworkConnectionSection>() {
@Override @Override
public NetworkConnectionSection apply(URI uri) { public NetworkConnectionSection apply(URI uri) {
return vAppTemplateClient.getVAppTemplateNetworkConnectionSection(uri); return vAppTemplateClient.getNetworkConnectionSection(uri);
} }
}); });
} }
@Test(description = "GET /vAppTemplate/{id}/networkSection") @Test(description = "GET /vAppTemplate/{id}/networkSection")
public void testGetVAppTemplateNetworkSection() { public void testGetVAppTemplateNetworkSection() {
NetworkSection networkSection = vAppTemplateClient.getVAppTemplateNetworkSection(vAppTemplateURI); NetworkSection networkSection = vAppTemplateClient.getNetworkSection(vAppTemplateURI);
checkOvfNetworkSection(networkSection); checkOvfNetworkSection(networkSection);
} }
@Test(description = "GET /vAppTemplate/{id}/ovf") @Test(description = "GET /vAppTemplate/{id}/ovf")
public void testGetVAppTemplateOvf() { public void testGetVAppTemplateOvf() {
Envelope envelope = vAppTemplateClient.getVAppTemplateOvf(vAppTemplateURI); Envelope envelope = vAppTemplateClient.getOvf(vAppTemplateURI);
checkOvfEnvelope(envelope); checkOvfEnvelope(envelope);
} }
@ -217,7 +217,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
.description(description) .description(description)
.build(); .build();
final Task task = vAppTemplateClient.editVAppTemplate(vAppTemplateURI, template); final Task task = vAppTemplateClient.modifyVAppTemplate(vAppTemplateURI, template);
retryTaskSuccess.apply(task); retryTaskSuccess.apply(task);
VAppTemplate newTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI); VAppTemplate newTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
@ -288,10 +288,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
.computerName(computerName) .computerName(computerName)
.build(); .build();
final Task task = vAppTemplateClient.editVAppTemplateGuestCustomizationSection(vm.getHref(), newSection); final Task task = vAppTemplateClient.modifyGuestCustomizationSection(vm.getHref(), newSection);
assertTaskSucceeds(task); assertTaskSucceeds(task);
GuestCustomizationSection modified = vAppTemplateClient.getVAppTemplateGuestCustomizationSection(vm.getHref()); GuestCustomizationSection modified = vAppTemplateClient.getGuestCustomizationSection(vm.getHref());
checkGuestCustomizationSection(modified); checkGuestCustomizationSection(modified);
assertEquals(modified.getComputerName(), computerName); assertEquals(modified.getComputerName(), computerName);
@ -299,7 +299,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "PUT /vAppTemplate/{id}/customizationSection") @Test(description = "PUT /vAppTemplate/{id}/customizationSection")
public void testEditCustomizationSection() { public void testEditCustomizationSection() {
boolean oldVal = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate(); boolean oldVal = vAppTemplateClient.getCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate();
boolean newVal = !oldVal; boolean newVal = !oldVal;
CustomizationSection customizationSection = CustomizationSection.builder() CustomizationSection customizationSection = CustomizationSection.builder()
@ -307,10 +307,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
.customizeOnInstantiate(newVal) .customizeOnInstantiate(newVal)
.build(); .build();
final Task task = vAppTemplateClient.editVAppTemplateCustomizationSection(vAppTemplateURI, customizationSection); final Task task = vAppTemplateClient.modifyCustomizationSection(vAppTemplateURI, customizationSection);
retryTaskSuccess.apply(task); retryTaskSuccess.apply(task);
CustomizationSection newCustomizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI); CustomizationSection newCustomizationSection = vAppTemplateClient.getCustomizationSection(vAppTemplateURI);
assertEquals(newCustomizationSection.isCustomizeOnInstantiate(), newVal); assertEquals(newCustomizationSection.isCustomizeOnInstantiate(), newVal);
} }
@ -327,10 +327,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
.deploymentLeaseInSeconds(deploymentLeaseInSeconds) .deploymentLeaseInSeconds(deploymentLeaseInSeconds)
.build(); .build();
final Task task = vAppTemplateClient.editVappTemplateLeaseSettingsSection(vAppTemplateURI, leaseSettingSection); final Task task = vAppTemplateClient.modifyLeaseSettingsSection(vAppTemplateURI, leaseSettingSection);
retryTaskSuccess.apply(task); retryTaskSuccess.apply(task);
LeaseSettingsSection newLeaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI); LeaseSettingsSection newLeaseSettingsSection = vAppTemplateClient.getLeaseSettingsSection(vAppTemplateURI);
assertEquals(newLeaseSettingsSection.getStorageLeaseInSeconds(), (Integer) storageLeaseInSeconds); assertEquals(newLeaseSettingsSection.getStorageLeaseInSeconds(), (Integer) storageLeaseInSeconds);
assertEquals(newLeaseSettingsSection.getDeploymentLeaseInSeconds(), (Integer) deploymentLeaseInSeconds); assertEquals(newLeaseSettingsSection.getDeploymentLeaseInSeconds(), (Integer) deploymentLeaseInSeconds);
} }
@ -339,7 +339,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
public void testEditNetworkConfigSection() { public void testEditNetworkConfigSection() {
// TODO What to modify? // TODO What to modify?
NetworkConfigSection oldSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vApp.getHref()); NetworkConfigSection oldSection = vAppTemplateClient.getNetworkConfigSection(vApp.getHref());
NetworkConfigSection newSection = oldSection.toBuilder().build(); NetworkConfigSection newSection = oldSection.toBuilder().build();
// String networkName = ""+random.nextInt(); // String networkName = ""+random.nextInt();
@ -356,10 +356,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
// .networkConfigs(vappNetworkConfigurations) // .networkConfigs(vappNetworkConfigurations)
// .build(); // .build();
final Task task = vAppTemplateClient.editVAppTemplateNetworkConfigSection(vApp.getHref(), newSection); final Task task = vAppTemplateClient.modifyNetworkConfigSection(vApp.getHref(), newSection);
assertTaskSucceeds(task); assertTaskSucceeds(task);
NetworkConfigSection modified = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI); NetworkConfigSection modified = vAppTemplateClient.getNetworkConfigSection(vAppTemplateURI);
checkNetworkConfigSection(modified); checkNetworkConfigSection(modified);
// assertEquals(modified§.getNetworkConfigs().size(), 1); // assertEquals(modified§.getNetworkConfigs().size(), 1);
@ -383,10 +383,10 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
.build()) .build())
.build(); .build();
Task task = vAppTemplateClient.editVAppTemplateNetworkConnectionSection(vm.getHref(), newSection); Task task = vAppTemplateClient.modifyNetworkConnectionSection(vm.getHref(), newSection);
assertTaskSucceeds(task); assertTaskSucceeds(task);
NetworkConnectionSection modified = vAppTemplateClient.getVAppTemplateNetworkConnectionSection(vm.getHref()); NetworkConnectionSection modified = vAppTemplateClient.getNetworkConnectionSection(vm.getHref());
checkNetworkConnectionSection(modified); checkNetworkConnectionSection(modified);
} }
@ -413,7 +413,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "POST /vAppTemplate/{id}/action/disableDownload") @Test(description = "POST /vAppTemplate/{id}/action/disableDownload")
public void testDisableVAppTemplateDownload() throws Exception { 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 // 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 // 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") @Test(description = "POST /vAppTemplate/{id}/action/enableDownload")
public void testEnableVAppTemplateDownload() throws Exception { public void testEnableVAppTemplateDownload() throws Exception {
// First disable so that enable really has some work to do... // First disable so that enable really has some work to do...
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); vAppTemplateClient.disableDownload(vAppTemplateURI);
final Task task = vAppTemplateClient.enableDownloadVappTemplate(vAppTemplateURI); final Task task = vAppTemplateClient.enableDownload(vAppTemplateURI);
retryTaskSuccess.apply(task); retryTaskSuccess.apply(task);
// TODO Check that it really is enabled. The only thing I can see for determining this // 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") @Test(description = "POST /vAppTemplate/{id}/action/consolidate")
public void testConsolidateVAppTemplate() throws Exception { public void testConsolidateVAppTemplate() throws Exception {
final Task task = vAppTemplateClient.consolidateVappTemplate(vm.getHref()); final Task task = vAppTemplateClient.consolidateVm(vm.getHref());
assertTaskSucceedsLong(task); assertTaskSucceedsLong(task);
// TODO Need assertion that command had effect // TODO Need assertion that command had effect
@ -468,7 +468,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
.datastore(dataStore) .datastore(dataStore)
.build(); .build();
final Task task = vAppTemplateClient.relocateVappTemplate(vAppTemplateURI, relocateParams); final Task task = vAppTemplateClient.relocateVm(vAppTemplateURI, relocateParams);
assertTaskSucceedsLong(task); assertTaskSucceedsLong(task);
} }
@ -484,8 +484,8 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
@Test(description = "test completed task not included in vAppTemplate") @Test(description = "test completed task not included in vAppTemplate")
public void testCompletedTaskNotIncludedInVAppTemplate() throws Exception { public void testCompletedTaskNotIncludedInVAppTemplate() throws Exception {
// Kick off a task, and wait for it to complete // Kick off a task, and wait for it to complete
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); vAppTemplateClient.disableDownload(vAppTemplateURI);
final Task task = vAppTemplateClient.enableDownloadVappTemplate(vAppTemplateURI); final Task task = vAppTemplateClient.enableDownload(vAppTemplateURI);
assertTaskDoneEventually(task); assertTaskDoneEventually(task);
// Ask the VAppTemplate for its tasks, and the status of the matching task if it exists // Ask the VAppTemplate for its tasks, and the status of the matching task if it exists