Documentation
¶
Index ¶
- func NewRequest(c CloudstackClient, request string, params url.Values) (interface{}, error)
- type AttachIsoResponse
- type CloudstackClient
- func (c CloudstackClient) AttachIso(isoid string, vmid string) (AttachIsoResponse, error)
- func (c CloudstackClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error)
- func (c CloudstackClient) CreateTags(options *CreateTags) (CreateTagsResponse, error)
- func (c CloudstackClient) CreateTemplate(options *CreateTemplate) (CreateTemplateResponse, error)
- func (c CloudstackClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error)
- func (c CloudstackClient) DeleteTags(options *DeleteTags) (DeleteTagsResponse, error)
- func (c CloudstackClient) DeleteTemplate(id string) (DeleteTemplateResponse, error)
- func (c CloudstackClient) DeployVirtualMachine(serviceofferingid string, templateid string, zoneid string, account string, ...) (DeployVirtualMachineResponse, error)
- func (c CloudstackClient) DestroyVirtualMachine(id string) (DestroyVirtualMachineResponse, error)
- func (c CloudstackClient) DetachIso(vmid string) (DetachIsoResponse, error)
- func (c CloudstackClient) ListDiskOfferings(domainid string, id string, keyword string, name string, page string, ...) (ListDiskOfferingsResponse, error)
- func (c CloudstackClient) ListIsos() (ListIsosResponse, error)
- func (c CloudstackClient) ListProjects(name string) (ListProjectsResponse, error)
- func (c CloudstackClient) ListTags(options *ListTags) (ListTagsResponse, error)
- func (c CloudstackClient) ListTemplates(name string, filter string) (ListTemplatesResponse, error)
- func (c CloudstackClient) ListVirtualMachines(id string) (ListVirtualMachinesResponse, error)
- func (c CloudstackClient) ListVolumes(vmid string) (ListVolumesResponse, error)
- func (cloudstack CloudstackClient) New(apiurl string, apikey string, secretkey string, insecureskipverify bool) *CloudstackClient
- func (c CloudstackClient) QueryAsyncJobResult(jobid string) (QueryAsyncJobResultResponse, error)
- func (c CloudstackClient) StopVirtualMachine(id string) (StopVirtualMachineResponse, error)
- func (c CloudstackClient) UpdateVirtualMachine(id string, displayname string, group string, haenable string, ostypeid string, ...) (UpdateVirtualMachineResponse, error)
- func (c CloudstackClient) WaitForAsyncJob(jobId string, timeout time.Duration) error
- func (c CloudstackClient) WaitForVirtualMachineState(vmid string, wantedState string, timeout time.Duration) error
- type CreateSshKeyPairResponse
- type CreateTags
- type CreateTagsResponse
- type CreateTemplate
- type CreateTemplateResponse
- type DeleteSshKeyPairResponse
- type DeleteTags
- type DeleteTagsResponse
- type DeleteTemplateResponse
- type DeployVirtualMachineResponse
- type DestroyVirtualMachineResponse
- type DetachIsoResponse
- type DiskOffering
- type ListDiskOfferingsResponse
- type ListIsosResponse
- type ListProjectsResponse
- type ListTags
- type ListTagsResponse
- type ListTemplatesResponse
- type ListVirtualMachinesResponse
- type ListVolumesResponse
- type Nic
- type Project
- type QueryAsyncJobResultResponse
- type StopVirtualMachineResponse
- type Tag
- type TagArg
- type Template
- type UpdateVirtualMachineResponse
- type Virtualmachine
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
func NewRequest(c CloudstackClient, request string, params url.Values) (interface{}, error)
Types ¶
type AttachIsoResponse ¶
type AttachIsoResponse struct {
}
type CloudstackClient ¶
type CloudstackClient struct {
// The base URL of the API
BaseURL string
// Credentials
APIKey string
SecretKey string
// contains filtered or unexported fields
}
func (CloudstackClient) AttachIso ¶
func (c CloudstackClient) AttachIso(isoid string, vmid string) (AttachIsoResponse, error)
Deploys a Virtual Machine and returns it's id
func (CloudstackClient) CreateSSHKeyPair ¶
func (c CloudstackClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error)
Create a SSH key pair
func (CloudstackClient) CreateTags ¶
func (c CloudstackClient) CreateTags(options *CreateTags) (CreateTagsResponse, error)
Add tags to specified resources
func (CloudstackClient) CreateTemplate ¶
func (c CloudstackClient) CreateTemplate(options *CreateTemplate) (CreateTemplateResponse, error)
Creates a Template of a Virtual Machine by it's ID
func (CloudstackClient) DeleteSSHKeyPair ¶
func (c CloudstackClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error)
Deletes an SSH key pair
func (CloudstackClient) DeleteTags ¶
func (c CloudstackClient) DeleteTags(options *DeleteTags) (DeleteTagsResponse, error)
Remove tags from specified resources
func (CloudstackClient) DeleteTemplate ¶
func (c CloudstackClient) DeleteTemplate(id string) (DeleteTemplateResponse, error)
Deletes an template by its ID.
func (CloudstackClient) DeployVirtualMachine ¶
func (c CloudstackClient) DeployVirtualMachine(serviceofferingid string, templateid string, zoneid string, account string, diskofferingid string, displayname string, networkids []string, keypair string, projectid string, userdata string, hypervisor string) (DeployVirtualMachineResponse, error)
Deploys a Virtual Machine and returns it's id
func (CloudstackClient) DestroyVirtualMachine ¶
func (c CloudstackClient) DestroyVirtualMachine(id string) (DestroyVirtualMachineResponse, error)
Destroys a Virtual Machine
func (CloudstackClient) DetachIso ¶
func (c CloudstackClient) DetachIso(vmid string) (DetachIsoResponse, error)
func (CloudstackClient) ListDiskOfferings ¶
func (c CloudstackClient) ListDiskOfferings(domainid string, id string, keyword string, name string, page string, pagesize string) (ListDiskOfferingsResponse, error)
func (CloudstackClient) ListIsos ¶
func (c CloudstackClient) ListIsos() (ListIsosResponse, error)
func (CloudstackClient) ListProjects ¶
func (c CloudstackClient) ListProjects(name string) (ListProjectsResponse, error)
List the available Cloudstack projects
func (CloudstackClient) ListTags ¶
func (c CloudstackClient) ListTags(options *ListTags) (ListTagsResponse, error)
Returns all items with a particular tag
func (CloudstackClient) ListTemplates ¶
func (c CloudstackClient) ListTemplates(name string, filter string) (ListTemplatesResponse, error)
Returns all available templates
func (CloudstackClient) ListVirtualMachines ¶
func (c CloudstackClient) ListVirtualMachines(id string) (ListVirtualMachinesResponse, error)
Returns Cloudstack string representation of the Virtual Machine state
func (CloudstackClient) ListVolumes ¶
func (c CloudstackClient) ListVolumes(vmid string) (ListVolumesResponse, error)
List volumes for Virtual Machine by it's ID
func (CloudstackClient) New ¶
func (cloudstack CloudstackClient) New(apiurl string, apikey string, secretkey string, insecureskipverify bool) *CloudstackClient
Creates a new client for communicating with Cloudstack
func (CloudstackClient) QueryAsyncJobResult ¶
func (c CloudstackClient) QueryAsyncJobResult(jobid string) (QueryAsyncJobResultResponse, error)
Query Cloudstack for the state of a scheduled job
func (CloudstackClient) StopVirtualMachine ¶
func (c CloudstackClient) StopVirtualMachine(id string) (StopVirtualMachineResponse, error)
Stops a Virtual Machine
func (CloudstackClient) UpdateVirtualMachine ¶
func (c CloudstackClient) UpdateVirtualMachine(id string, displayname string, group string, haenable string, ostypeid string, userdata string) (UpdateVirtualMachineResponse, error)
func (CloudstackClient) WaitForAsyncJob ¶
func (c CloudstackClient) WaitForAsyncJob(jobId string, timeout time.Duration) error
waitForAsyncJob simply blocks until the the asynchronous job has executed or has timed out.
func (CloudstackClient) WaitForVirtualMachineState ¶
func (c CloudstackClient) WaitForVirtualMachineState(vmid string, wantedState string, timeout time.Duration) error
WaitForVirtualMachineState simply blocks until the virtual machine is in the specified state.
type CreateTags ¶
type CreateTagsResponse ¶
type CreateTemplate ¶
type CreateTemplate struct {
Displaytext string `json:"displaytext"`
Isdynamicallyscalable bool `json:"isdynamicallyscalable"`
Isextractable bool `json:"isextractable"`
Isfeatured bool `json:"isfeatured"`
Ispublic bool `json:"ispublic"`
Name string `json:"name"`
Ostypeid string `json:"ostypeid"`
Passwordenabled bool `json:"passwordenabled"`
Snapshotid string `json:"snapshotid"`
Volumeid string `json:"volumeid"`
}
type CreateTemplateResponse ¶
type DeleteSshKeyPairResponse ¶
type DeleteSshKeyPairResponse struct {
Deletesshkeypairresponse struct {
Success string `json:"success"`
} `json:"deletesshkeypairresponse"`
}
type DeleteTags ¶
type DeleteTagsResponse ¶
type DeleteTemplateResponse ¶
type DeleteTemplateResponse struct {
Deletetemplateresponse struct {
}
}
type DestroyVirtualMachineResponse ¶
type DestroyVirtualMachineResponse struct {
Destroyvirtualmachineresponse struct {
Jobid string `json:"jobid"`
} `json:"destroyvirtualmachineresponse"`
}
type DetachIsoResponse ¶
type DetachIsoResponse struct {
Detachisoresponse struct {
Jobid string `json:"jobid"`
} `json:"detachisoresponse"`
}
type DiskOffering ¶
type ListDiskOfferingsResponse ¶
type ListDiskOfferingsResponse struct {
Listdiskofferingsresponse struct {
Count float64 `json:"count"`
Diskoffering []DiskOffering `json:"diskoffering"`
} `json:"listdiskofferingsresponse"`
}
type ListIsosResponse ¶
type ListIsosResponse struct {
}
type ListProjectsResponse ¶
type ListTags ¶
type ListTags struct {
Account string `json:"account"`
Customer string `json:"customer"`
Domainid string `json:"domainid"`
Isrecursive bool `json:"isrecursive"`
Key string `json:"key"`
Keyword string `json:"keyword"`
Listall bool `json:"listall"`
Page string `json:"page"`
Pagesize string `json:"pagesize"`
Projectid string `json:"projectid"`
Resourceid string `json:"resourceid"`
Resourcetype string `json:"resourcetype`
Value string `json:"value`
}
type ListTagsResponse ¶
type ListTemplatesResponse ¶
type ListVirtualMachinesResponse ¶
type ListVirtualMachinesResponse struct {
Listvirtualmachinesresponse struct {
Count float64 `json:"count"`
Virtualmachine []Virtualmachine `json:"virtualmachine"`
} `json:"listvirtualmachinesresponse"`
}
type ListVolumesResponse ¶
type Nic ¶
type Nic struct {
Gateway string `json:"gateway"`
ID string `json:"id"`
Ipaddress string `json:"ipaddress"`
Isdefault bool `json:"isdefault"`
Macaddress string `json:"macaddress"`
Netmask string `json:"netmask"`
Networkid string `json:"networkid"`
Traffictype string `json:"traffictype"`
Type string `json:"type"`
}
type QueryAsyncJobResultResponse ¶
type QueryAsyncJobResultResponse struct {
Queryasyncjobresultresponse struct {
Accountid string `json:"accountid"`
Cmd string `json:"cmd"`
Created string `json:"created"`
Jobid string `json:"jobid"`
Jobprocstatus float64 `json:"jobprocstatus"`
Jobresultcode float64 `json:"jobresultcode"`
Jobstatus float64 `json:"jobstatus"`
Userid string `json:"userid"`
} `json:"queryasyncjobresultresponse"`
}
type StopVirtualMachineResponse ¶
type StopVirtualMachineResponse struct {
Stopvirtualmachineresponse struct {
Jobid string `json:"jobid"`
} `json:"stopvirtualmachineresponse"`
}
type Tag ¶
type Tag struct {
Account string `json:"account"`
Customer string `json:"customer"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Key string `json:"key"`
Project string `json:"project"`
Projectid string `json:"projectid"`
Resourceid string `json:"resourceid"`
Resourcetype string `json:"resourcetype`
Value string `json:"value`
}
type Template ¶
type Template struct {
Account string `json:"account"`
Created string `json:"created"`
CrossZones bool `json:"crossZones"`
Displaytext string `json:"displaytext"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Format string `json:"format"`
Hypervisor string `json:"hypervisor"`
ID string `json:"id"`
Isextractable bool `json:"isextractable"`
Isfeatured bool `json:"isfeatured"`
Ispublic bool `json:"ispublic"`
Isready bool `json:"isready"`
Name string `json:"name"`
Ostypeid string `json:"ostypeid"`
Ostypename string `json:"ostypename"`
Passwordenabled bool `json:"passwordenabled"`
Size float64 `json:"size"`
Sourcetemplateid string `json:"sourcetemplateid"`
Sshkeyenabled bool `json:"sshkeyenabled"`
Status string `json:"status"`
Tags []Tag `json:"tags"`
Templatetype string `json:"templatetype"`
Zoneid string `json:"zoneid"`
Zonename string `json:"zonename"`
}
type UpdateVirtualMachineResponse ¶
type UpdateVirtualMachineResponse struct {
Updatevirtualmachineresponse struct {
}
}
type Virtualmachine ¶
type Virtualmachine struct {
Account string `json:"account"`
Cpunumber float64 `json:"cpunumber"`
Cpuspeed float64 `json:"cpuspeed"`
Created string `json:"created"`
Displayname string `json:"displayname"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Guestosid string `json:"guestosid"`
Haenable bool `json:"haenable"`
Hypervisor string `json:"hypervisor"`
ID string `json:"id"`
IsoId string `json:"isoid"`
IsoName string `json:"isoname"`
Keypair string `json:"keypair"`
Memory float64 `json:"memory"`
Name string `json:"name"`
Nic []Nic `json:"nic"`
Passwordenabled bool `json:"passwordenabled"`
Rootdeviceid float64 `json:"rootdeviceid"`
Rootdevicetype string `json:"rootdevicetype"`
Securitygroup []interface{} `json:"securitygroup"`
Serviceofferingid string `json:"serviceofferingid"`
Serviceofferingname string `json:"serviceofferingname"`
State string `json:"state"`
Tags []interface{} `json:"tags"`
Templatedisplaytext string `json:"templatedisplaytext"`
Templateid string `json:"templateid"`
Templatename string `json:"templatename"`
Zoneid string `json:"zoneid"`
Zonename string `json:"zonename"`
}
type Volume ¶
type Volume struct {
Account string `json:"account"`
Created string `json:"created"`
Destroyed bool `json:"destroyed"`
Deviceid float64 `json:"deviceid"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
ID string `json:"id"`
Isextractable bool `json:"isextractable"`
Name string `json:"name"`
Serviceofferingdisplaytext string `json:"serviceofferingdisplaytext"`
Serviceofferingid string `json:"serviceofferingid"`
Serviceofferingname string `json:"serviceofferingname"`
Size float64 `json:"size"`
State string `json:"state"`
Storage string `json:"storage"`
Storagetype string `json:"storagetype"`
Tags []interface{} `json:"tags"`
Type string `json:"type"`
Virtualmachineid string `json:"virtualmachineid"`
Vmdisplayname string `json:"vmdisplayname"`
Vmname string `json:"vmname"`
Vmstate string `json:"vmstate"`
Zoneid string `json:"zoneid"`
Zonename string `json:"zonename"`
}

