Package org.jclouds.cloudstack.domain
Class Template
- java.lang.Object
-
- org.jclouds.cloudstack.domain.Template
-
- All Implemented Interfaces:
Comparable<Template>
public class Template extends Object implements Comparable<Template>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Template.Builder<T extends Template.Builder<T>>
static class
Template.Format
static class
Template.Status
static class
Template.Type
-
Constructor Summary
Constructors Modifier Constructor Description protected
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
-
-
-
Constructor Detail
-
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 Detail
-
builder
public static Template.Builder<?> builder()
-
toBuilder
public Template.Builder<?> toBuilder()
-
getId
public String getId()
- Returns:
- Template id
-
getDomain
@Nullable public String getDomain()
- Returns:
- the name of the domain to which the template beLongs
-
getDomainId
@Nullable public String getDomainId()
- Returns:
- the ID of the domain to which the template beLongs
-
getAccount
@Nullable public String getAccount()
- Returns:
- the name of the account to which the template beLongs
-
getAccountId
@Nullable public String getAccountId()
- Returns:
- the ID of the account to which the template beLongs
-
getZone
@Nullable public String getZone()
- Returns:
- the name of the zone to which the template beLongs
-
getZoneId
@Nullable public String getZoneId()
- Returns:
- the ID of the zone to which the template beLongs
-
getOSType
@Nullable public String getOSType()
- Returns:
- the name of the OS type to which the template beLongs
-
getOSTypeId
@Nullable public String getOSTypeId()
- Returns:
- the ID of the OS type to which the template beLongs
-
getType
@Nullable public Template.Type getType()
- Returns:
- the type of the template
-
getStatus
@Nullable public Template.Status 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
@Nullable public Template.Format getFormat()
- Returns:
- the format of the template.
-
getHypervisor
@Nullable public String getHypervisor()
- Returns:
- the hypervisor on which the template runs
-
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
@Nullable public String getJobId()
- Returns:
- shows the current pending asynchronous job ID, or null if current pending jobs are acting on the template
-
getJobStatus
@Nullable public String getJobStatus()
- Returns:
- shows the current pending asynchronous job status
-
getHostId
@Nullable public String getHostId()
- Returns:
- the ID of the secondary storage host for the template
-
getHostName
@Nullable public String getHostName()
- Returns:
- the name of the secondary storage host for the template
-
getSourceTemplateId
@Nullable public String getSourceTemplateId()
- Returns:
- the template ID of the parent template if present
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-
compareTo
public int compareTo(Template o)
- Specified by:
compareTo
in interfaceComparable<Template>
-
-