org.jclouds.cloudstack.domain
Class VirtualMachine
java.lang.Object
org.jclouds.cloudstack.domain.VirtualMachine
- All Implemented Interfaces:
- Comparable<VirtualMachine>
public class VirtualMachine
- extends Object
- implements Comparable<VirtualMachine>
- Author:
- Adrian Cole
Constructor Summary |
VirtualMachine(long id,
String account,
long cpuCount,
long cpuSpeed,
String cpuUsed,
String displayName,
Date created,
String domain,
long domainId,
boolean usesVirtualNetwork,
String group,
long groupId,
long guestOSId,
boolean hAEnabled,
long hostId,
String hostname,
String iPAddress,
String iSODisplayText,
long iSOId,
String iSOName,
Long jobId,
Integer jobStatus,
long memory,
String name,
Long networkKbsRead,
Long networkKbsWrite,
String password,
boolean passwordEnabled,
long rootDeviceId,
String rootDeviceType,
Set<SecurityGroup> securityGroups,
long serviceOfferingId,
String serviceOfferingName,
VirtualMachine.State state,
String templateDisplayText,
long templateId,
String templateName,
long zoneId,
String zoneName,
Set<NIC> nics,
String hypervisor)
|
VirtualMachine
public VirtualMachine(long id,
String account,
long cpuCount,
long cpuSpeed,
String cpuUsed,
String displayName,
Date created,
String domain,
long domainId,
boolean usesVirtualNetwork,
String group,
long groupId,
long guestOSId,
boolean hAEnabled,
long hostId,
String hostname,
String iPAddress,
String iSODisplayText,
long iSOId,
String iSOName,
Long jobId,
Integer jobStatus,
long memory,
String name,
Long networkKbsRead,
Long networkKbsWrite,
String password,
boolean passwordEnabled,
long rootDeviceId,
String rootDeviceType,
Set<SecurityGroup> securityGroups,
long serviceOfferingId,
String serviceOfferingName,
VirtualMachine.State state,
String templateDisplayText,
long templateId,
String templateName,
long zoneId,
String zoneName,
Set<NIC> nics,
String hypervisor)
builder
public static VirtualMachine.Builder builder()
getId
public long getId()
- Returns:
- the ID of the virtual machine
getAccount
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
public String getDisplayName()
- Returns:
- user generated name. The name of the virtual machine is returned
if no displayname exists.
getCreated
public Date getCreated()
- Returns:
- the date when this virtual machine was created
getDomain
public String getDomain()
- Returns:
- the name of the domain in which the virtual machine exists
getDomainId
public long 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
public String getGroup()
- Returns:
- the group name of the virtual machine
getGroupId
public long getGroupId()
- Returns:
- the group ID of the virtual machine
getGuestOSId
public long getGuestOSId()
- Returns:
- Os type ID of the virtual machine
isHAEnabled
public boolean isHAEnabled()
- Returns:
- true if high-availability is enabled, false otherwise
getHostId
public long getHostId()
- Returns:
- the ID of the host for the virtual machine
getHostname
public String getHostname()
- Returns:
- the name of the host for the virtual machine
getIPAddress
public String getIPAddress()
- Returns:
- the ip address of the virtual machine
getISODisplayText
public String getISODisplayText()
- Returns:
- an alternate display text of the ISO attached to the virtual
machine
getISOId
public long getISOId()
- Returns:
- the ID of the ISO attached to the virtual machine
getISOName
public String getISOName()
- Returns:
- the name of the ISO attached to the virtual machine
getJobId
@Nullable
public Long 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
public String getName()
- Returns:
- the name of the virtual machine
getNetworkKbsRead
public Long getNetworkKbsRead()
- Returns:
- the incoming network traffic on the vm
getNetworkKbsWrite
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
getRootDeviceId
public long getRootDeviceId()
- Returns:
- device ID of the root volume
getRootDeviceType
public String getRootDeviceType()
- Returns:
- device type of the root volume
getSecurityGroups
public Set<SecurityGroup> getSecurityGroups()
- Returns:
- list of security groups associated with the virtual machine
getServiceOfferingId
public long getServiceOfferingId()
- Returns:
- the ID of the service offering of the virtual machine
getServiceOfferingName
public String getServiceOfferingName()
- Returns:
- the name of the service offering of the virtual machine
getState
public VirtualMachine.State getState()
- Returns:
- the state of the virtual machine
getTemplateDisplayText
public String getTemplateDisplayText()
- Returns:
- an alternate display text of the template for the virtual machine
getTemplateId
public long 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
public String getTemplateName()
- Returns:
- the name of the template for the virtual machine
getZoneId
public long getZoneId()
- Returns:
- the ID of the availablility zone for the virtual machine
getZoneName
public String getZoneName()
- Returns:
- the name of the availability zone for the virtual machine
getNICs
public Set<NIC> getNICs()
- Returns:
- the list of nics associated with vm
getHypervisor
public String getHypervisor()
- Returns:
- type of the hypervisor
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
compareTo
public int compareTo(VirtualMachine arg0)
- Specified by:
compareTo
in interface Comparable<VirtualMachine>
Copyright © 2009-2012 jclouds. All Rights Reserved.