Issue 830: Method name tidying

This commit is contained in:
Andrew Donald Kennedy 2012-03-27 17:49:22 +01:00
parent 47ecc9aee1
commit 708b065454
9 changed files with 304 additions and 301 deletions

View File

@ -123,24 +123,25 @@ public interface VAppAsyncClient {
ListenableFuture<Task> deleteVApp(@EndpointParam URI vAppURI);
/**
* @see VAppClient#consolidateVApp(URI)
* @see VAppClient#consolidateVm(URI)
*/
@POST
@Path("/action/consolidate")
@Consumes(TASK)
@JAXBResponseParser
ListenableFuture<Task> consolidateVApp(@EndpointParam URI vAppURI);
ListenableFuture<Task> 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<ControlAccessParams> controlAccess(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) ControlAccessParams params);
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<ControlAccessParams> modifyControlAccess(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) ControlAccessParams params);
/**
* @see VAppClient#deploy(URI, DeployVAppParams)
@ -190,26 +191,26 @@ public interface VAppAsyncClient {
ListenableFuture<Task> 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<Task> recomposeVApp(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) RecomposeVAppParams params);
ListenableFuture<Task> 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<Task> relocate(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) RelocateParams params);
ListenableFuture<Task> relocateVm(@EndpointParam URI vAppURI,
@BinderParam(BindToXMLPayload.class) RelocateParams params);
/**
* @see VAppClient#undeploy(URI, UndeployVAppParams)

View File

@ -63,32 +63,32 @@ public interface VAppClient {
*
* The vApp/VM could be in one of these statuses:
* <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
* 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
* 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.
* <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.
* <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.
* <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.
* <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.
* <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.
* <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.
* <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.
* <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
* 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
* </ul>
*
@ -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.

View File

@ -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<Task> editVAppTemplate(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) VAppTemplate template);
ListenableFuture<Task> modifyVAppTemplate(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) VAppTemplate template);
/**
* @see VAppTemplateClient#deleteVappTemplate(URI)
@ -101,21 +101,21 @@ public interface VAppTemplateAsyncClient {
ListenableFuture<Task> deleteVappTemplate(@EndpointParam URI templateUri);
/**
* @see VAppTemplateClient#consolidateVappTemplate(URI)
* @see VAppTemplateClient#consolidateVm(URI)
*/
@POST
@Consumes(TASK)
@Path("/action/consolidate")
@JAXBResponseParser
ListenableFuture<Task> consolidateVappTemplate(@EndpointParam URI templateURI);
ListenableFuture<Task> consolidateVm(@EndpointParam URI templateURI);
/**
* @see VAppTemplateClient#disableDownloadVappTemplate(URI)
* @see VAppTemplateClient#disableDownload(URI)
*/
@POST
@Path("/action/disableDownload")
@JAXBResponseParser
ListenableFuture<Void> disableDownloadVappTemplate(@EndpointParam URI templateURI);
ListenableFuture<Void> disableDownload(@EndpointParam URI templateURI);
/**
* @see VAppTemplateClient#enableDownloadVappTemplate(URI)
@ -124,105 +124,105 @@ public interface VAppTemplateAsyncClient {
@Consumes(TASK)
@Path("/action/enableDownload")
@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
@Produces(RELOCATE_TEMPLATE)
@Consumes(TASK)
@Path("/action/relocate")
@JAXBResponseParser
ListenableFuture<Task> relocateVappTemplate(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) RelocateParams params);
ListenableFuture<Task> 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<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
@Produces(CUSTOMIZATION_SECTION)
@Consumes(TASK)
@Path("/customizationSection")
@JAXBResponseParser
ListenableFuture<Task> editVAppTemplateCustomizationSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) CustomizationSection sectionType);
ListenableFuture<Task> 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<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
@Produces(GUEST_CUSTOMIZATION_SECTION)
@Consumes(TASK)
@Path("/guestCustomizationSection")
@JAXBResponseParser
ListenableFuture<Task> editVAppTemplateGuestCustomizationSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) GuestCustomizationSection section);
ListenableFuture<Task> 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<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
@Produces(LEASE_SETTINGS_SECTION)
@Consumes(TASK)
@Path("/leaseSettingsSection")
@JAXBResponseParser
ListenableFuture<Task> editVappTemplateLeaseSettingsSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) LeaseSettingsSection settingsSection);
ListenableFuture<Task> 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<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
@Produces(NETWORK_CONFIG_SECTION)
@Consumes(TASK)
@Path("/networkConfigSection")
@JAXBResponseParser
ListenableFuture<Task> editVAppTemplateNetworkConfigSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) NetworkConfigSection section);
ListenableFuture<Task> 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<NetworkConnectionSection> 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<Task> editVAppTemplateNetworkConnectionSection(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) NetworkConnectionSection section);
ListenableFuture<Task> 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<NetworkSection> getVAppTemplateNetworkSection(@EndpointParam URI templateURI);
ListenableFuture<NetworkSection> getNetworkSection(@EndpointParam URI templateURI);
/**
* @see VAppTemplateClient#getVAppTemplateOvf(URI)
* @see VAppTemplateClient#getOvf(URI)
*/
@GET
@Consumes
@Path("/ovf")
@JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<Envelope> getVAppTemplateOvf(@EndpointParam URI templateURI);
ListenableFuture<Envelope> getOvf(@EndpointParam URI templateURI);
/**
* @see VAppTemplateClient#getOwnerOfVAppTemplate(URI)
@ -270,7 +270,7 @@ public interface VAppTemplateAsyncClient {
@Path("/owner")
@JAXBResponseParser
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<Owner> getOwnerOfVAppTemplate(@EndpointParam URI templateURI);
ListenableFuture<Owner> getOwner(@EndpointParam URI templateURI);
/**
* @see VAppTemplateClient#getProductSectionsForVAppTemplate(URI)
@ -280,18 +280,18 @@ public interface VAppTemplateAsyncClient {
@Path("/productSections")
@JAXBResponseParser
@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
@Produces(PRODUCT_SECTION_LIST)
@Consumes(TASK)
@Path("/productSections")
@JAXBResponseParser
ListenableFuture<Task> editProductSectionsForVAppTemplate(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) ProductSectionList sections);
ListenableFuture<Task> modifyProductSections(@EndpointParam URI templateURI,
@BinderParam(BindToXMLPayload.class) ProductSectionList sections);
/**
* @see VAppTemplateClient#getShadowVms(URI)

View File

@ -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:
* <ul>
* <li>{@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.
* <li>{@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.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED} -
* Entity is resolved.
* <li>{@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.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF} -
* All VMs of the vApp template
* are powered off.
* <li>{@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.
* <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 exist yet. This
* is further sub-categorized in the respective entities.
* <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.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED RESOLVED(1)} -
* Entity is resolved.
* <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.
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF POWERED_OFF(8)} -
* All VMs of the vApp template are powered off.
* <li>{@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.
* </ul>
*
* <pre>
* GET /vAppTemplate/{id}
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}
* </pre>
*
* @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.
*
*
* <pre>
* DELETE /vAppTemplate/{id}
* </pre>
*
*
* @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
*
*
* <pre>
* POST /vAppTemplate/{id}/action/consolidate
* </pre>
*
*
* @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.
*
*
* <pre>
* POST /vAppTemplate/{id}/action/disableDownload
* </pre>
*
*
* @param templateUri the URI of the template
*/
void disableDownloadVappTemplate(URI templateUri);
void disableDownload(URI templateUri);
/**
* Enables downloading of the ovf of a vApp template.
*
*
* <pre>
* POST /vAppTemplate/{id}/action/enableDownload
* </pre>
*
*
* @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.
*
*
* <pre>
* POST /vAppTemplate/{id}/action/relocate
* </pre>
*
*
* @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.
*
*
* <pre>
* GET /vAppTemplate/{id}/customizationSection
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}/customizationSection
* </pre>
*
*
* @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
*
*
* <pre>
* GET /vAppTemplate/{id}/guestCustomizationSection
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}/guestCustomizationSection
* </pre>
*
*
* @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
*
*
* <pre>
* GET /vAppTemplate/{id}/leaseSettingsSection
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}/leaseSettingsSection
* </pre>
*
*
* @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 {
* <pre>
* GET /vAppTemplate/{id}/networkConfigSection
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}/networkConfigSection
* </pre>
*
*
* @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
*
*
* <pre>
* GET /vAppTemplate/{id}/networkConnectionSection
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}/networkConnectionSection
* </pre>
*
*
* @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.
*
*
* <pre>
* GET /vAppTemplate/{id}/networkSection
* </pre>
*
*
* @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.
*
* <pre>
* GET /vAppTemplate/{id}/ovf
* </pre>
*
*
* @param templateUri the URI of the template
* @return the ovf envelope
*/
Envelope getVAppTemplateOvf(URI templateUri);
Envelope getOvf(URI templateUri);
/**
* Retrieves vApp template owner.
*
*
* <pre>
* GET /vAppTemplate/{id}/owner
* </pre>
*
*
* @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
*
*
* <pre>
* GET /vAppTemplate/{id}/productSections
* </pre>
*
*
* @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.
*
*
* <pre>
* PUT /vAppTemplate/{id}/productSections
* </pre>
*
*
* @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);
/**
* <pre>
* GET /vAppTemplate/{id}/shadowVms
* </pre>
*
*
* @param templateUri the URI of the template
* @return shadowVM references
*/

View File

@ -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:
* <ul>
* <li>An InstantiationParams element that applies to the composed vApp itself and any vApp
* templates referenced in Item elements.
* <li>A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in
* the composition. Each SourcedItem can contain the following elements:
* <li>An InstantiationParams element that applies to the composed vApp itself and any vApp templates referenced in
* Item elements.
* <li>A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in the composition. Each
* SourcedItem can contain the following elements:
* <ul>
* <li>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.
* <li>An optional NetworkAssignment element that specifies how the network connections
* of child VM elements are mapped to vApp networks in the parent.
* <li>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.
* <li>An optional NetworkAssignment element that specifies how the network connections of child VM elements are
* mapped to vApp networks in the parent.
* </ul>
* <li>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.
* </ul>
* 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.
*
* <pre>
* POST /vdc/{id}/action/instantiateVAppTemplate
* </pre>
*
* @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:
* <ol>
* <li>creating empty vApp template entity
* <li>uploading an OVF of vApp template
* <li>uploading disks described from the OVF
* <li>creating empty vApp template entity
* <li>uploading an OVF of vApp template
* <li>uploading disks described from the OVF
* <li>finishing task for uploading
* </ol>
* 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);

View File

@ -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)

View File

@ -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"));
}

View File

@ -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() {

View File

@ -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<URI, GuestCustomizationSection>() {
@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<URI, NetworkConnectionSection>() {
@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