org.jclouds.cloudstack.features
Interface VirtualMachineClient


public interface VirtualMachineClient

Provides synchronous access to CloudStack VirtualMachine features.

Author:
Adrian Cole
See Also:
VirtualMachineAsyncClient,

Method Summary
 Long changeServiceForVirtualMachine(long id)
          Changes the service offering for a virtual machine.
 AsyncCreateResponse deployVirtualMachineInZone(long zoneId, long serviceOfferingId, long templateId, DeployVirtualMachineOptions... options)
          Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.
 Long destroyVirtualMachine(long id)
          Destroys a virtual machine.
 String getEncryptedPasswordForVirtualMachine(long id)
          Return an encrypted password for the virtual machine.
 VirtualMachine getVirtualMachine(long id)
          get a specific VirtualMachine by id
 Set<VirtualMachine> listVirtualMachines(ListVirtualMachinesOptions... options)
          Lists VirtualMachines
 Long rebootVirtualMachine(long id)
          Reboots a virtual machine.
 Long resetPasswordForVirtualMachine(long id)
          Resets the password for virtual machine.
 Long startVirtualMachine(long id)
          Starts a virtual machine.
 Long stopVirtualMachine(long id)
          Stops a virtual machine.
 Long updateVirtualMachine(long id)
          Updates parameters of a virtual machine.
 

Method Detail

listVirtualMachines

Set<VirtualMachine> listVirtualMachines(ListVirtualMachinesOptions... options)
Lists VirtualMachines

Parameters:
options - if present, how to constrain the list.
Returns:
VirtualMachines matching query, or empty set, if no VirtualMachines are found

getVirtualMachine

VirtualMachine getVirtualMachine(long id)
get a specific VirtualMachine by id

Parameters:
id - VirtualMachine to get
Returns:
VirtualMachine or null if not found

deployVirtualMachineInZone

AsyncCreateResponse deployVirtualMachineInZone(long zoneId,
                                               long serviceOfferingId,
                                               long templateId,
                                               DeployVirtualMachineOptions... options)
Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.

Parameters:
zoneId - availability zone for the virtual machine
serviceOfferingId - the ID of the service offering for the virtual machine
templateId - the ID of the template for the virtual machine
Returns:
virtual machine

rebootVirtualMachine

Long rebootVirtualMachine(long id)
Reboots a virtual machine.

Parameters:
id - The ID of the virtual machine
Returns:
job id related to destroying the VM

startVirtualMachine

Long startVirtualMachine(long id)
Starts a virtual machine.

Parameters:
id - The ID of the virtual machine
Returns:
job id related to destroying the VM

stopVirtualMachine

Long stopVirtualMachine(long id)
Stops a virtual machine.

Parameters:
id - The ID of the virtual machine
Returns:
job id related to destroying the VM

resetPasswordForVirtualMachine

Long resetPasswordForVirtualMachine(long id)
Resets the password for virtual machine. The virtual machine must be in a "Stopped" state and the template must already support this feature for this command to take effect.

Parameters:
id - The ID of the virtual machine
Returns:
job id related to destroying the VM

getEncryptedPasswordForVirtualMachine

String getEncryptedPasswordForVirtualMachine(long id)
Return an encrypted password for the virtual machine. The command is asynchronous.

Parameters:
id - the ID of the virtual machine
Returns:
encrypted password

changeServiceForVirtualMachine

Long changeServiceForVirtualMachine(long id)
Changes the service offering for a virtual machine. The virtual machine must be in a "Stopped" state for this command to take effect.

Parameters:
id - The ID of the virtual machine
Returns:
job id related to destroying the VM

updateVirtualMachine

Long updateVirtualMachine(long id)
Updates parameters of a virtual machine.

Parameters:
id - The ID of the virtual machine
Returns:
job id related to destroying the VM

destroyVirtualMachine

Long destroyVirtualMachine(long id)
Destroys a virtual machine. Once destroyed, only the administrator can recover it.

Parameters:
id - vm to destroy
Returns:
job id related to destroying the VM, or null if resource was not found


Copyright © 2009-2012 jclouds. All Rights Reserved.