IsDynamicallyScalablebool`json:"isdynamicallyscalable,omitempty" doc:"true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory"`
IsExtractablebool`json:"isextractable,omitempty" doc:"true if the template is extractable, false otherwise"`
IsFeaturedbool`json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"`
IsPublicbool`json:"ispublic,omitempty" doc:"true if this template is a public template, false otherwise"`
IsReadybool`json:"isready,omitempty" doc:"true if the template is ready to be deployed from, false otherwise."`
TemplateFilterstring`json:"templatefilter" doc:"possible values are \"featured\", \"self\", \"selfexecutable\",\"sharedexecutable\",\"executable\", and \"community\". * featured : templates that have been marked as featured and public. * self : templates that have been registered or created by the calling user. * selfexecutable : same as self, but only returns templates that can be used to deploy a new VM. * sharedexecutable : templates ready to be deployed that have been granted to the calling user by another user. * executable : templates that are owned by the calling user, or public templates, that can be used to deploy a VM. * community : templates that have been marked as public but not featured. * all : all templates (only usable by admins)."`
Accountstring`json:"account,omitempty" doc:"list resources by account. Must be used with the domainId parameter."`
DomainID*UUID`json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"`
Hypervisorstring`json:"hypervisor,omitempty" doc:"the hypervisor for which to restrict the search"`
IsRecursive*bool`json:"isrecursive,omitempty" doc:"defaults to false, but if true, lists all resources from the parent specified by the domainId till leaves."`
Keywordstring`json:"keyword,omitempty" doc:"List by keyword"`
ListAll*bool`json:"listall,omitempty" doc:"If set to false, list only resources belonging to the command's caller; if set to true - list resources that the caller is authorized to see. Default value is false"`
// CreateTemplate (Async) represents a template creation
typeCreateTemplatestruct{
Bitsint`json:"bits,omitempty" doc:"32 or 64 bit"`
Detailsmap[string]string`json:"details,omitempty" doc:"Template details in key/value pairs."`
DisplayTextstring`json:"displaytext" doc:"the display text of the template. This is usually used for display purposes."`
IsDynamicallyScalable*bool`json:"isdynamicallyscalable,omitempty" doc:"true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory"`
IsFeatured*bool`json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"`
IsPublic*bool`json:"ispublic,omitempty" doc:"true if this template is a public template, false otherwise"`
Namestring`json:"name" doc:"the name of the template"`
OsTypeID*UUID`json:"ostypeid" doc:"the ID of the OS Type that best represents the OS of this template."`
PasswordEnabled*bool`json:"passwordenabled,omitempty" doc:"true if the template supports the password reset feature; default is false"`
RequiresHVM*bool`json:"requireshvm,omitempty" doc:"true if the template requres HVM, false otherwise"`
SnapshotID*UUID`json:"snapshotid,omitempty" doc:"the ID of the snapshot the template is being created from. Either this parameter, or volumeId has to be passed in"`
TemplateTagstring`json:"templatetag,omitempty" doc:"the tag for this template."`
URLstring`json:"url,omitempty" doc:"Optional, only for baremetal hypervisor. The directory name where template stored on CIFS server"`
VirtualMachineID*UUID`json:"virtualmachineid,omitempty" doc:"Optional, VM ID. If this presents, it is going to create a baremetal template for VM this ID refers to. This is only for VM whose hypervisor type is BareMetal"`
VolumeID*UUID`json:"volumeid,omitempty" doc:"the ID of the disk volume the template is being created from. Either this parameter, or snapshotId has to be passed in"`
_bool`name:"createTemplate" description:"Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it."`
}
func(CreateTemplate)response()interface{}{
returnnew(AsyncJobResult)
}
func(CreateTemplate)asyncResponse()interface{}{
returnnew(Template)
}
// CopyTemplate (Async) represents a template copy
typeCopyTemplatestruct{
DestZoneID*UUID`json:"destzoneid" doc:"ID of the zone the template is being copied to."`
ID*UUID`json:"id" doc:"Template ID."`
SourceZoneID*UUID`json:"sourcezoneid,omitempty" doc:"ID of the zone the template is currently hosted on. If not specified and template is cross-zone, then we will sync this template to region wide image store."`
_bool`name:"copyTemplate" description:"Copies a template from one zone to another."`
}
func(CopyTemplate)response()interface{}{
returnnew(AsyncJobResult)
}
func(CopyTemplate)asyncResponse()interface{}{
returnnew(Template)
}
// UpdateTemplate represents a template change
typeUpdateTemplatestruct{
Bootable*bool`json:"bootable,omitempty" doc:"true if image is bootable, false otherwise"`
Detailsmap[string]string`json:"details,omitempty" doc:"Details in key/value pairs."`
DisplayTextstring`json:"displaytext,omitempty" doc:"the display text of the image"`
Formatstring`json:"format,omitempty" doc:"the format for the image"`
ID*UUID`json:"id" doc:"the ID of the image file"`
IsDynamicallyScalable*bool`json:"isdynamicallyscalable,omitempty" doc:"true if template/ISO contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory"`
IsRouting*bool`json:"isrouting,omitempty" doc:"true if the template type is routing i.e., if template is used to deploy router"`
Namestring`json:"name,omitempty" doc:"the name of the image file"`
OsTypeID*UUID`json:"ostypeid,omitempty" doc:"the ID of the OS type that best represents the OS of this image."`
PasswordEnabled*bool`json:"passwordenabled,omitempty" doc:"true if the image supports the password reset feature; default is false"`
SortKeyint`json:"sortkey,omitempty" doc:"sort key of the template, integer"`
_bool`name:"updateTemplate" description:"Updates attributes of a template."`
}
func(UpdateTemplate)response()interface{}{
returnnew(AsyncJobResult)
}
func(UpdateTemplate)asyncResponse()interface{}{
returnnew(Template)
}
// DeleteTemplate (Async) represents the deletion of a template
typeDeleteTemplatestruct{
ID*UUID`json:"id" doc:"the ID of the template"`
ZoneID*UUID`json:"zoneid,omitempty" doc:"the ID of zone of the template"`
_bool`name:"deleteTemplate" description:"Deletes a template from the system. All virtual machines using the deleted template will not be affected."`
}
func(DeleteTemplate)response()interface{}{
returnnew(AsyncJobResult)
}
func(DeleteTemplate)asyncResponse()interface{}{
returnnew(booleanResponse)
}
// PrepareTemplate represents a template preparation
typePrepareTemplatestruct{
TemplateID*UUID`json:"templateid" doc:"template ID of the template to be prepared in primary storage(s)."`
ZoneID*UUID`json:"zoneid" doc:"zone ID of the template to be prepared in primary storage(s)."`
_bool`name:"prepareTemplate" description:"load template into primary storage"`
}
func(PrepareTemplate)response()interface{}{
returnnew(AsyncJobResult)
}
func(PrepareTemplate)asyncResponse()interface{}{
returnnew(Template)
}
// RegisterTemplate represents a template registration
typeRegisterTemplatestruct{
Accountstring`json:"account,omitempty" doc:"an optional accountName. Must be used with domainId."`
Bitsint`json:"bits,omitempty" doc:"32 or 64 bits support. 64 by default"`
Checksumstring`json:"checksum,omitempty" doc:"the MD5 checksum value of this template"`
Detailsmap[string]string`json:"details,omitempty" doc:"Template details in key/value pairs."`
DisplayTextstring`json:"displaytext" doc:"the display text of the template. This is usually used for display purposes."`
DomainID*UUID`json:"domainid,omitempty" doc:"an optional domainId. If the account parameter is used, domainId must also be used."`
Formatstring`json:"format" doc:"the format for the template. Possible values include QCOW2, RAW, and VHD."`
Hypervisorstring`json:"hypervisor" doc:"the target hypervisor for the template"`
IsDynamicallyScalable*bool`json:"isdynamicallyscalable,omitempty" doc:"true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory"`
IsExtractable*bool`json:"isextractable,omitempty" doc:"true if the template or its derivatives are extractable; default is false"`
IsFeatured*bool`json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"`
IsPublic*bool`json:"ispublic,omitempty" doc:"true if the template is available to all accounts; default is true"`
IsRouting*bool`json:"isrouting,omitempty" doc:"true if the template type is routing i.e., if template is used to deploy router"`
IsSystem*bool`json:"issystem,omitempty" doc:"true if the template type is system i.e., if template is used to deploy system VM"`
Namestring`json:"name" doc:"the name of the template"`
OsTypeID*UUID`json:"ostypeid" doc:"the ID of the OS Type that best represents the OS of this template."`
PasswordEnabled*bool`json:"passwordenabled,omitempty" doc:"true if the template supports the password reset feature; default is false"`
RequiresHVM*bool`json:"requireshvm,omitempty" doc:"true if this template requires HVM"`
SSHKeyEnabled*bool`json:"sshkeyenabled,omitempty" doc:"true if the template supports the sshkey upload feature; default is false"`
TemplateTagstring`json:"templatetag,omitempty" doc:"the tag for this template."`
URLstring`json:"url" doc:"the URL of where the template is hosted. Possible URL include http:// and https://"`
ZoneID*UUID`json:"zoneid" doc:"the ID of the zone the template is to be hosted on"`
_bool`name:"registerTemplate" description:"Registers an existing template into the CloudStack cloud."`
}
func(RegisterTemplate)response()interface{}{
returnnew(Template)
}
// OSCategory represents an OS category
typeOSCategorystruct{
IDstring`json:"id,omitempty" doc:"the ID of the OS category"`
Namestring`json:"name,omitempty" doc:"the name of the OS category"`
}
// ListOSCategories lists the OS categories
typeListOSCategoriesstruct{
IDstring`json:"id,omitempty" doc:"list Os category by id"`
Keywordstring`json:"keyword,omitempty" doc:"List by keyword"`
Namestring`json:"name,omitempty" doc:"list os category by name"`
Pageint`json:"page,omitempty"`
PageSizeint`json:"pagesize,omitempty"`
_bool`name:"listOsCategories" description:"Lists all supported OS categories for this cloud."`
}
// ListOSCategoriesResponse represents a list of OS categories