org.jclouds.vcloud.features
Interface VmClient


public interface VmClient

Provides access to VM functionality in vCloud

Author:
Adrian Cole

Method Summary
 Task deployAndPowerOnVm(URI href)
          like #deploy(URI), except deploy transitions to power on state
 Task deployVm(URI href)
          To deploy a vApp, the client makes a request to its action/deploy URL.
 InputStream getScreenThumbnailForVm(URI href)
          Get a Screen Thumbnail for a Virtual Machine
 Vm getVm(URI vApp)
           
 Task powerOffVm(URI href)
          A powerOff request to a vApp URL powers off all of the virtual machines in the vApp, as specified in its StartupSection field.
 Task powerOnVm(URI href)
          A powerOn request to a vApp URL powers on all of the virtual machines in the vApp, as specified in the vApp’s StartupSection field.
 void rebootVm(URI href)
          A reboot request to a vApp URL reboots all of the virtual machines in the vApp, as specified in its StartupSection field.
 Task resetVm(URI href)
          A reset request to a vApp URL resets all of the virtual machines in the vApp, as specified in its StartupSection field.
 void shutdownVm(URI href)
          A shutdown request to a vApp URL shuts down all of the virtual machines in the vApp, as specified in its StartupSection field.
 Task suspendVm(URI href)
          A suspend request to a vApp URL suspends all of the virtual machines in the vApp, as specified in its StartupSection field.
 Task undeployAndSaveStateOfVm(URI href)
          like #undeploy(URI), where the undeployed virtual machines are suspended and their suspend state saved
 Task undeployVm(URI href)
          Undeploying a vApp powers off or suspends any running virtual machines it contains, then frees the resources reserved for the vApp and sets the vApp’s deploy attribute to a value of false to indicate that it is not deployed.
 Task updateCPUCountOfVm(int cpuCount, URI href)
          update the cpuCount of an existing VM
 Task updateGuestCustomizationOfVm(GuestCustomizationSection guestCustomizationSection, URI href)
          Modify the Guest Customization Section of a Virtual Machine
 Task updateMemoryMBOfVm(int memoryInMB, URI href)
          update the memoryInMB of an existing VM
 Task updateNetworkConnectionOfVm(NetworkConnectionSection guestCustomizationSection, URI href)
          Modify the Network Connection Section of a Virtual Machine
 

Method Detail

getVm

Vm getVm(URI vApp)

deployVm

Task deployVm(URI href)
To deploy a vApp, the client makes a request to its action/deploy URL. Deploying a vApp automatically deploys all of the virtual machines it contains. To deploy a virtual machine, the client makes a request to its action/deploy URL.

Deploying a Vm implicitly deploys the parent vApp if that vApp is not already deployed.


deployAndPowerOnVm

Task deployAndPowerOnVm(URI href)
like #deploy(URI), except deploy transitions to power on state


undeployVm

Task undeployVm(URI href)
Undeploying a vApp powers off or suspends any running virtual machines it contains, then frees the resources reserved for the vApp and sets the vApp’s deploy attribute to a value of false to indicate that it is not deployed.

Undeploying a virtual machine powers off or suspends the virtual machine, then frees the resources reserved for it and sets the its deploy attribute to a value of false to indicate that it is not deployed. This operation has no effect on the containing vApp.

NOTE

Using this method will simply power off the vms. In order to save their state, use #undeployAndSaveStateOf


undeployAndSaveStateOfVm

Task undeployAndSaveStateOfVm(URI href)
like #undeploy(URI), where the undeployed virtual machines are suspended and their suspend state saved


powerOnVm

Task powerOnVm(URI href)
A powerOn request to a vApp URL powers on all of the virtual machines in the vApp, as specified in the vApp’s StartupSection field.

A powerOn request to a virtual machine URL powers on the specified virtual machine and forces deployment of the parent vApp.

NOTE

A powerOn request to a vApp or virtual machine that is undeployed forces deployment.


powerOffVm

Task powerOffVm(URI href)
A powerOff request to a vApp URL powers off all of the virtual machines in the vApp, as specified in its StartupSection field.

A powerOff request to a virtual machine URL powers off the specified virtual machine.


shutdownVm

void shutdownVm(URI href)
A shutdown request to a vApp URL shuts down all of the virtual machines in the vApp, as specified in its StartupSection field.

A shutdown request to a virtual machine URL shuts down the specified virtual machine.

NOTE


resetVm

Task resetVm(URI href)
A reset request to a vApp URL resets all of the virtual machines in the vApp, as specified in its StartupSection field.

A reset request to a virtual machine URL resets the specified virtual machine.


rebootVm

void rebootVm(URI href)
A reboot request to a vApp URL reboots all of the virtual machines in the vApp, as specified in its StartupSection field.

A reboot request to a virtual machine URL reboots the specified virtual machine.

NOTE

Because this request sends a signal to the guest OS, the vCloud API cannot track the progress or verify the result of the requested operation. Hence, void is returned


suspendVm

Task suspendVm(URI href)
A suspend request to a vApp URL suspends all of the virtual machines in the vApp, as specified in its StartupSection field.

A suspend request to a virtual machine URL suspends the specified virtual machine.


getScreenThumbnailForVm

InputStream getScreenThumbnailForVm(URI href)
Get a Screen Thumbnail for a Virtual Machine

Parameters:
href - to snapshot

updateGuestCustomizationOfVm

Task updateGuestCustomizationOfVm(GuestCustomizationSection guestCustomizationSection,
                                  URI href)
Modify the Guest Customization Section of a Virtual Machine

Parameters:
href - uri to modify
updated - guestCustomizationSection
Returns:
task in progress

updateNetworkConnectionOfVm

Task updateNetworkConnectionOfVm(NetworkConnectionSection guestCustomizationSection,
                                 URI href)
Modify the Network Connection Section of a Virtual Machine

Parameters:
href - uri to modify
updated - networkConnectionSection
Returns:
task in progress

updateCPUCountOfVm

Task updateCPUCountOfVm(int cpuCount,
                        URI href)
update the cpuCount of an existing VM

Parameters:
href - to update
cpuCount - count to change the primary cpu to

updateMemoryMBOfVm

Task updateMemoryMBOfVm(int memoryInMB,
                        URI href)
update the memoryInMB of an existing VM

Parameters:
href - to update
memoryInMB - memory in MB to assign to the VM


Copyright © 2009-2012 jclouds. All Rights Reserved.