Package org.jclouds.cloudstack.domain
Class Template
java.lang.Object
org.jclouds.cloudstack.domain.Template
- All Implemented Interfaces:
Comparable<Template>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Template.Builder<T extends Template.Builder<T>>
static enum
static enum
static enum
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Template
(String id, String displayText, String domain, String domainId, String account, String accountId, String zone, String zoneId, String OSType, String OSTypeId, String name, Template.Type type, Template.Status status, Template.Format format, String hypervisor, Long size, Date created, Date removed, boolean crossZones, boolean bootable, boolean extractable, boolean featured, boolean ispublic, boolean ready, boolean passwordEnabled, String jobId, String jobStatus, String checksum, String hostId, String hostName, String sourceTemplateId, String templateTag, Set<Tag> tags) -
Method Summary
Modifier and TypeMethodDescriptionstatic Template.Builder
<?> builder()
int
boolean
getId()
getJobId()
getName()
getSize()
Retrieve the status of the template.getTags()
getType()
getZone()
int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
ispublic()
boolean
isReady()
protected com.google.common.base.MoreObjects.ToStringHelper
string()
toString()
-
Constructor Details
-
Template
@ConstructorProperties({"id","displaytext","domain","domainid","account","accountid","zonename","zoneid","ostypename","ostypeid","name","templatetype","status","format","hypervisor","size","created","removed","crossZones","bootable","isextractable","isfeatured","ispublic","isready","passwordenabled","jobid","jobstatus","checksum","hostId","hostname","sourcetemplateid","templatetag","tags"}) protected Template(String id, @Nullable String displayText, @Nullable String domain, @Nullable String domainId, @Nullable String account, @Nullable String accountId, @Nullable String zone, @Nullable String zoneId, @Nullable String OSType, @Nullable String OSTypeId, @Nullable String name, @Nullable Template.Type type, @Nullable Template.Status status, @Nullable Template.Format format, @Nullable String hypervisor, @Nullable Long size, @Nullable Date created, @Nullable Date removed, boolean crossZones, boolean bootable, boolean extractable, boolean featured, boolean ispublic, boolean ready, boolean passwordEnabled, @Nullable String jobId, @Nullable String jobStatus, @Nullable String checksum, @Nullable String hostId, @Nullable String hostName, @Nullable String sourceTemplateId, @Nullable String templateTag, @Nullable Set<Tag> tags)
-
-
Method Details
-
builder
-
toBuilder
-
getId
- Returns:
- Template id
-
getDisplayText
- Returns:
- the display text of the template
-
getDomain
- Returns:
- the name of the domain to which the template beLongs
-
getDomainId
- Returns:
- the ID of the domain to which the template beLongs
-
getAccount
- Returns:
- the name of the account to which the template beLongs
-
getAccountId
- Returns:
- the ID of the account to which the template beLongs
-
getZone
- Returns:
- the name of the zone to which the template beLongs
-
getZoneId
- Returns:
- the ID of the zone to which the template beLongs
-
getOSType
- Returns:
- the name of the OS type to which the template beLongs
-
getOSTypeId
- Returns:
- the ID of the OS type to which the template beLongs
-
getName
- Returns:
- Template name
-
getType
- Returns:
- the type of the template
-
getStatus
Retrieve the status of the template.Note that in CloudStack 2.2.x through to at least 3.0.4, the possible status values are not well defined by CloudStack. CloudStack returns a plain-text English string for UI display, which jclouds attempts to parse into an enumeration, but the mapping is incomplete. This method should be reliable for the common cases, but it is possible (particularly for error statuses) that this method will return UNRECOGNIZED.
- Returns:
- status of the template
-
getFormat
- Returns:
- the format of the template.
-
getHypervisor
- Returns:
- the hypervisor on which the template runs
-
getSize
- Returns:
- the size of the template in kilobytes
-
getCreated
- Returns:
- the date this template was created
-
getRemoved
- Returns:
- the date this template was removed
-
isCrossZones
public boolean isCrossZones()- Returns:
- true if the template is managed across all Zones, false otherwise
-
isBootable
public boolean isBootable()- Returns:
- true if the ISO is bootable, false otherwise
-
isExtractable
public boolean isExtractable()- Returns:
- true if the template is extractable, false otherwise
-
isFeatured
public boolean isFeatured()- Returns:
- true if this template is a featured template, false otherwise
-
ispublic
public boolean ispublic() -
isReady
public boolean isReady()- Returns:
- true if the template is ready to be deployed from, false otherwise
-
isPasswordEnabled
public boolean isPasswordEnabled()- Returns:
- true if the reset password feature is enabled, false otherwise
-
getJobId
- Returns:
- shows the current pending asynchronous job ID, or null if current pending jobs are acting on the template
-
getJobStatus
- Returns:
- shows the current pending asynchronous job status
-
getChecksum
- Returns:
- checksum of the template
-
getHostId
- Returns:
- the ID of the secondary storage host for the template
-
getHostName
- Returns:
- the name of the secondary storage host for the template
-
getSourceTemplateId
- Returns:
- the template ID of the parent template if present
-
getTemplateTag
- Returns:
- the tag of this template
-
getTags
- Returns:
- the tags on this template
-
hashCode
public int hashCode() -
equals
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Template>
-