Documentation ¶
Overview ¶
Package templates implements API functions residing under /provisioning/templates. This path contains methods for querying available VM templates.
Index ¶
Constants ¶
View Source
const ( // TemplateTypeTemplates are templates that already contain a distribution. TemplateTypeTemplates string = "templates" // TemplateTypeFromScratch are templates that need to have distribution added to work. TemplateTypeFromScratch string = "from_scratch" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
List(ctx context.Context, locationID string, templateType string, page, limit int) ([]Template, error)
}
API contains methods for template querying.
type BoolParameter ¶
type BoolParameter struct { Required bool `json:"required"` Label string `json:"label"` Default bool `json:"defaultValue"` }
BoolParameter is a bool parameter for a template.
type IntParameter ¶
type IntParameter struct { Minimum int `json:"minValue"` Maximum int `json:"maxValue"` Required bool `json:"required"` Label string `json:"label"` Default int `json:"defaultValue"` }
IntParameter is an int parameter for a template.
type NICParameter ¶
type NICParameter struct { Required bool `json:"required"` Label string `json:"label"` Default int `json:"defaultValue"` NICs []NIC `json:"data"` }
NICParameter is a network interface card parameter for a template.
type Parameters ¶
type Parameters struct { Hostname StringParameter `json:"hostname"` CPUs IntParameter `json:"cpus"` MemoryMB IntParameter `json:"memoryMB"` DiskGB IntParameter `json:"diskGB"` DNS0 StringParameter `json:"dns0"` DNS1 StringParameter `json:"dns1"` DNS2 StringParameter `json:"dns2"` DNS3 StringParameter `json:"dns3"` NICs NICParameter `json:"nics"` VLAN StringParameter `json:"vlan"` IPs StringParameter `json:"ips"` BootDelaySeconds IntParameter `json:"bootDelaySeconds"` EnterBIOSSetup BoolParameter `json:"enterBIOSSetup"` Password StringParameter `json:"password"` User StringParameter `json:"user"` DiskType StringParameter `json:"disk_type"` }
Parameters set of a VM.
type StringParameter ¶
type StringParameter struct { Required bool `json:"required"` Label string `json:"label"` Default string `json:"defaultValue"` }
StringParameter is a string parameter for a template.
type Template ¶
type Template struct { ID string `json:"id"` Name string `json:"name"` WordSize string `json:"bit"` Build string `json:"build"` Parameters Parameters `json:"param"` }
Template contains a summary about the state of a template.
type TemplateType ¶
type TemplateType string
TemplateType defines which type of template is selected.
Click to show internal directories.
Click to hide internal directories.