org.jclouds.cloudstack.domain
Class VirtualMachine

java.lang.Object
  extended by org.jclouds.cloudstack.domain.VirtualMachine

public class VirtualMachine
extends Object

Class VirtualMachine

Author:
Adrian Cole

Nested Class Summary
static class VirtualMachine.Builder<T extends VirtualMachine.Builder<T>>
           
static class VirtualMachine.State
           
 
Constructor Summary
protected VirtualMachine(String id, String account, long cpuCount, long cpuSpeed, String cpuUsed, String displayName, Date created, String domain, String domainId, boolean usesVirtualNetwork, String group, String groupId, String guestOSId, boolean HAEnabled, String hostId, String hostname, String IPAddress, String ISODisplayText, String ISOId, String ISOName, String jobId, Integer jobStatus, long memory, String name, Long networkKbsRead, Long networkKbsWrite, String password, boolean passwordEnabled, String publicIP, String publicIPId, String rootDeviceId, String rootDeviceType, String serviceOfferingId, String serviceOfferingName, VirtualMachine.State state, String templateDisplayText, String templateId, String templateName, String zoneId, String zoneName, Set<NIC> nics, String hypervisor, Set<SecurityGroup> securityGroups)
           
 
Method Summary
static VirtualMachine.Builder<?> builder()
           
 boolean equals(Object obj)
           
 String getAccount()
           
 long getCpuCount()
           
 long getCpuSpeed()
           
 float getCpuUsed()
           
 Date getCreated()
           
 String getDisplayName()
           
 String getDomain()
           
 String getDomainId()
           
 String getGroup()
           
 String getGroupId()
           
 String getGuestOSId()
           
 String getHostId()
           
 String getHostname()
           
 String getHypervisor()
           
 String getId()
           
 String getIPAddress()
           
 String getISODisplayText()
           
 String getISOId()
           
 String getISOName()
           
 String getJobId()
           
 Integer getJobStatus()
           
 long getMemory()
           
 String getName()
           
 Long getNetworkKbsRead()
           
 Long getNetworkKbsWrite()
           
 Set<NIC> getNICs()
           
 String getPassword()
           
 String getPublicIP()
           
 String getPublicIPId()
           
 String getRootDeviceId()
           
 String getRootDeviceType()
           
 Set<SecurityGroup> getSecurityGroups()
           
 String getServiceOfferingId()
           
 String getServiceOfferingName()
           
 VirtualMachine.State getState()
           
 String getTemplateDisplayText()
           
 String getTemplateId()
           
 String getTemplateName()
           
 String getZoneId()
           
 String getZoneName()
           
 int hashCode()
           
 boolean isHAEnabled()
           
 boolean isPasswordEnabled()
           
protected  com.google.common.base.Objects.ToStringHelper string()
           
 VirtualMachine.Builder<?> toBuilder()
           
 String toString()
           
 boolean usesVirtualNetwork()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualMachine

@ConstructorProperties(value={"id","account","cpunumber","cpuspeed","cpuused","displayname","created","domain","domainid","forvirtualnetwork","group","groupid","guestosid","haenable","hostid","hostname","ipaddress","isodisplaytext","isoid","isoname","jobid","jobstatus","memory","name","networkkbsread","networkkbswrite","password","passwordenabled","publicip","publicipid","rootdeviceid","rootdevicetype","serviceofferingid","serviceofferingname","state","templatedisplaytext","templateid","templatename","zoneid","zonename","nic","hypervisor","securitygroup"})
protected VirtualMachine(String id,
                                                    @Nullable
                                                    String account,
                                                    long cpuCount,
                                                    long cpuSpeed,
                                                    @Nullable
                                                    String cpuUsed,
                                                    @Nullable
                                                    String displayName,
                                                    @Nullable
                                                    Date created,
                                                    @Nullable
                                                    String domain,
                                                    @Nullable
                                                    String domainId,
                                                    boolean usesVirtualNetwork,
                                                    @Nullable
                                                    String group,
                                                    @Nullable
                                                    String groupId,
                                                    @Nullable
                                                    String guestOSId,
                                                    boolean HAEnabled,
                                                    @Nullable
                                                    String hostId,
                                                    @Nullable
                                                    String hostname,
                                                    String IPAddress,
                                                    String ISODisplayText,
                                                    @Nullable
                                                    String ISOId,
                                                    @Nullable
                                                    String ISOName,
                                                    @Nullable
                                                    String jobId,
                                                    @Nullable
                                                    Integer jobStatus,
                                                    long memory,
                                                    @Nullable
                                                    String name,
                                                    @Nullable
                                                    Long networkKbsRead,
                                                    @Nullable
                                                    Long networkKbsWrite,
                                                    @Nullable
                                                    String password,
                                                    boolean passwordEnabled,
                                                    @Nullable
                                                    String publicIP,
                                                    @Nullable
                                                    String publicIPId,
                                                    @Nullable
                                                    String rootDeviceId,
                                                    @Nullable
                                                    String rootDeviceType,
                                                    @Nullable
                                                    String serviceOfferingId,
                                                    @Nullable
                                                    String serviceOfferingName,
                                                    @Nullable
                                                    VirtualMachine.State state,
                                                    @Nullable
                                                    String templateDisplayText,
                                                    @Nullable
                                                    String templateId,
                                                    @Nullable
                                                    String templateName,
                                                    @Nullable
                                                    String zoneId,
                                                    @Nullable
                                                    String zoneName,
                                                    @Nullable
                                                    Set<NIC> nics,
                                                    @Nullable
                                                    String hypervisor,
                                                    @Nullable
                                                    Set<SecurityGroup> securityGroups)
Method Detail

builder

public static VirtualMachine.Builder<?> builder()

toBuilder

public VirtualMachine.Builder<?> toBuilder()

getId

public String getId()
Returns:
the ID of the virtual machine

getAccount

@Nullable
public String getAccount()
Returns:
the account associated with the virtual machine

getCpuCount

public long getCpuCount()
Returns:
the number of cpu this virtual machine is running with

getCpuSpeed

public long getCpuSpeed()
Returns:
the speed of each cpu

getCpuUsed

public float getCpuUsed()
Returns:
the amount of the vm's CPU currently used

getDisplayName

@Nullable
public String getDisplayName()
Returns:
user generated name. The name of the virtual machine is returned if no displayname exists.

getCreated

@Nullable
public Date getCreated()
Returns:
the date when this virtual machine was created

getDomain

@Nullable
public String getDomain()
Returns:
the name of the domain in which the virtual machine exists

getDomainId

@Nullable
public String getDomainId()
Returns:
the ID of the domain in which the virtual machine exists

usesVirtualNetwork

public boolean usesVirtualNetwork()
Returns:
the virtual network for the service offering

getGroup

@Nullable
public String getGroup()
Returns:
the group name of the virtual machine

getGroupId

@Nullable
public String getGroupId()
Returns:
the group ID of the virtual machine

getGuestOSId

@Nullable
public String getGuestOSId()
Returns:
Os type ID of the virtual machine

isHAEnabled

public boolean isHAEnabled()
Returns:
true if high-availability is enabled, false otherwise

getHostId

@Nullable
public String getHostId()
Returns:
the ID of the host for the virtual machine

getHostname

@Nullable
public String getHostname()
Returns:
the name of the host for the virtual machine

getIPAddress

@Nullable
public String getIPAddress()
Returns:
the ip address of the virtual machine

getISODisplayText

@Nullable
public String getISODisplayText()
Returns:
an alternate display text of the ISO attached to the virtual machine

getISOId

@Nullable
public String getISOId()
Returns:
the ID of the ISO attached to the virtual machine

getISOName

@Nullable
public String getISOName()
Returns:
the name of the ISO attached to the virtual machine

getJobId

@Nullable
public String getJobId()
Returns:
shows the current pending asynchronous job ID. This tag is not returned if no current pending jobs are acting on the virtual machine

getJobStatus

@Nullable
public Integer getJobStatus()
Returns:
shows the current pending asynchronous job status

getMemory

public long getMemory()
Returns:
the memory allocated for the virtual machine

getName

@Nullable
public String getName()
Returns:
the name of the virtual machine

getNetworkKbsRead

@Nullable
public Long getNetworkKbsRead()
Returns:
the incoming network traffic on the vm

getNetworkKbsWrite

@Nullable
public Long getNetworkKbsWrite()
Returns:
the outgoing network traffic on the host

getPassword

@Nullable
public String getPassword()
Returns:
the password (if exists) of the virtual machine

isPasswordEnabled

public boolean isPasswordEnabled()
Returns:
true if the password rest feature is enabled, false otherwise

getPublicIP

@Nullable
public String getPublicIP()
Returns:
public IP of this virtual machine

getPublicIPId

@Nullable
public String getPublicIPId()
Returns:
ID of the public IP of this virtual machine

getRootDeviceId

@Nullable
public String getRootDeviceId()
Returns:
device ID of the root volume

getRootDeviceType

@Nullable
public String getRootDeviceType()
Returns:
device type of the root volume

getServiceOfferingId

@Nullable
public String getServiceOfferingId()
Returns:
the ID of the service offering of the virtual machine

getServiceOfferingName

@Nullable
public String getServiceOfferingName()
Returns:
the name of the service offering of the virtual machine

getState

@Nullable
public VirtualMachine.State getState()
Returns:
the state of the virtual machine

getTemplateDisplayText

@Nullable
public String getTemplateDisplayText()
Returns:
an alternate display text of the template for the virtual machine

getTemplateId

@Nullable
public String getTemplateId()
Returns:
the ID of the template for the virtual machine. A -1 is returned if the virtual machine was created from an ISO file.

getTemplateName

@Nullable
public String getTemplateName()
Returns:
the name of the template for the virtual machine

getZoneId

@Nullable
public String getZoneId()
Returns:
the ID of the availability zone for the virtual machine

getZoneName

@Nullable
public String getZoneName()
Returns:
the name of the availability zone for the virtual machine

getNICs

public Set<NIC> getNICs()

getHypervisor

@Nullable
public String getHypervisor()
Returns:
type of the hypervisor

getSecurityGroups

public Set<SecurityGroup> getSecurityGroups()
Returns:
list of security groups associated with the virtual machine

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

string

protected com.google.common.base.Objects.ToStringHelper string()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2013 jclouds. All Rights Reserved.