Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateTags(p *cloudstack.CreateTagsParams) (*cloudstack.CreateTagsResponse, error)
- func (c *Client) DeleteTags(p *cloudstack.DeleteTagsParams) (*cloudstack.DeleteTagsResponse, error)
- func (c *Client) DeployVirtualMachine(p *cloudstack.DeployVirtualMachineParams) (*cloudstack.DeployVirtualMachineResponse, error)
- func (c *Client) DestroyVirtualMachine(p *cloudstack.DestroyVirtualMachineParams) (*cloudstack.DestroyVirtualMachineResponse, error)
- func (c *Client) GetDiskOfferingID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
- func (c *Client) GetNetworkID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
- func (c *Client) GetServiceOfferingID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
- func (c *Client) GetTemplateID(name string, filter string, zoneid string, opts ...cloudstack.OptionFunc) (string, int, error)
- func (c *Client) GetVirtualMachineID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
- func (c *Client) GetZoneID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
- func (c *Client) ListDiskOfferings(p *cloudstack.ListDiskOfferingsParams) (*cloudstack.ListDiskOfferingsResponse, error)
- func (c *Client) ListNetworks(p *cloudstack.ListNetworksParams) (*cloudstack.ListNetworksResponse, error)
- func (c *Client) ListServiceOfferings(p *cloudstack.ListServiceOfferingsParams) (*cloudstack.ListServiceOfferingsResponse, error)
- func (c *Client) ListTags(p *cloudstack.ListTagsParams) (*cloudstack.ListTagsResponse, error)
- func (c *Client) ListTemplates(p *cloudstack.ListTemplatesParams) (*cloudstack.ListTemplatesResponse, error)
- func (c *Client) ListVirtualMachines(p *cloudstack.ListVirtualMachinesParams) (*cloudstack.ListVirtualMachinesResponse, error)
- func (c *Client) ListZones(p *cloudstack.ListZonesParams) (*cloudstack.ListZonesResponse, error)
- func (c *Client) WaitForAsyncJob(ctx context.Context, jobID string, timeout time.Duration) (*cloudstack.QueryAsyncJobResultResponse, error)
- type CloudStackAPI
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*cloudstack.CloudStackClient
}
Client wraps the official CloudStack Go SDK client
func (*Client) CreateTags ¶
func (c *Client) CreateTags(p *cloudstack.CreateTagsParams) (*cloudstack.CreateTagsResponse, error)
CreateTags creates tags
func (*Client) DeleteTags ¶
func (c *Client) DeleteTags(p *cloudstack.DeleteTagsParams) (*cloudstack.DeleteTagsResponse, error)
DeleteTags deletes tags
func (*Client) DeployVirtualMachine ¶
func (c *Client) DeployVirtualMachine(p *cloudstack.DeployVirtualMachineParams) (*cloudstack.DeployVirtualMachineResponse, error)
DeployVirtualMachine deploys a virtual machine
func (*Client) DestroyVirtualMachine ¶
func (c *Client) DestroyVirtualMachine(p *cloudstack.DestroyVirtualMachineParams) (*cloudstack.DestroyVirtualMachineResponse, error)
DestroyVirtualMachine destroys a virtual machine
func (*Client) GetDiskOfferingID ¶
func (c *Client) GetDiskOfferingID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
GetDiskOfferingID gets the disk offering ID by name
func (*Client) GetNetworkID ¶
func (c *Client) GetNetworkID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
GetNetworkID gets the network ID by name
func (*Client) GetServiceOfferingID ¶
func (c *Client) GetServiceOfferingID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
GetServiceOfferingID gets the service offering ID by name
func (*Client) GetTemplateID ¶
func (c *Client) GetTemplateID(name string, filter string, zoneid string, opts ...cloudstack.OptionFunc) (string, int, error)
GetTemplateID gets the template ID by name
func (*Client) GetVirtualMachineID ¶
func (c *Client) GetVirtualMachineID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
GetVirtualMachineID gets the VM ID by name
func (*Client) GetZoneID ¶
func (c *Client) GetZoneID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
GetZoneID gets the zone ID by name
func (*Client) ListDiskOfferings ¶
func (c *Client) ListDiskOfferings(p *cloudstack.ListDiskOfferingsParams) (*cloudstack.ListDiskOfferingsResponse, error)
ListDiskOfferings lists disk offerings
func (*Client) ListNetworks ¶
func (c *Client) ListNetworks(p *cloudstack.ListNetworksParams) (*cloudstack.ListNetworksResponse, error)
ListNetworks lists networks
func (*Client) ListServiceOfferings ¶
func (c *Client) ListServiceOfferings(p *cloudstack.ListServiceOfferingsParams) (*cloudstack.ListServiceOfferingsResponse, error)
ListServiceOfferings lists service offerings
func (*Client) ListTags ¶
func (c *Client) ListTags(p *cloudstack.ListTagsParams) (*cloudstack.ListTagsResponse, error)
ListTags lists tags
func (*Client) ListTemplates ¶
func (c *Client) ListTemplates(p *cloudstack.ListTemplatesParams) (*cloudstack.ListTemplatesResponse, error)
ListTemplates lists templates
func (*Client) ListVirtualMachines ¶
func (c *Client) ListVirtualMachines(p *cloudstack.ListVirtualMachinesParams) (*cloudstack.ListVirtualMachinesResponse, error)
ListVirtualMachines lists virtual machines
func (*Client) ListZones ¶
func (c *Client) ListZones(p *cloudstack.ListZonesParams) (*cloudstack.ListZonesResponse, error)
ListZones lists zones
func (*Client) WaitForAsyncJob ¶
func (c *Client) WaitForAsyncJob(ctx context.Context, jobID string, timeout time.Duration) (*cloudstack.QueryAsyncJobResultResponse, error)
WaitForAsyncJob waits for an async job to complete and returns the result
type CloudStackAPI ¶
type CloudStackAPI interface {
// VirtualMachine operations
DeployVirtualMachine(p *cloudstack.DeployVirtualMachineParams) (*cloudstack.DeployVirtualMachineResponse, error)
GetVirtualMachineID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
ListVirtualMachines(p *cloudstack.ListVirtualMachinesParams) (*cloudstack.ListVirtualMachinesResponse, error)
DestroyVirtualMachine(p *cloudstack.DestroyVirtualMachineParams) (*cloudstack.DestroyVirtualMachineResponse, error)
// Service Offering operations
ListServiceOfferings(p *cloudstack.ListServiceOfferingsParams) (*cloudstack.ListServiceOfferingsResponse, error)
GetServiceOfferingID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
// Template operations
ListTemplates(p *cloudstack.ListTemplatesParams) (*cloudstack.ListTemplatesResponse, error)
GetTemplateID(name string, filter string, zoneid string, opts ...cloudstack.OptionFunc) (string, int, error)
// Network operations
ListNetworks(p *cloudstack.ListNetworksParams) (*cloudstack.ListNetworksResponse, error)
GetNetworkID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
// Zone operations
ListZones(p *cloudstack.ListZonesParams) (*cloudstack.ListZonesResponse, error)
GetZoneID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
// Disk Offering operations
ListDiskOfferings(p *cloudstack.ListDiskOfferingsParams) (*cloudstack.ListDiskOfferingsResponse, error)
GetDiskOfferingID(name string, opts ...cloudstack.OptionFunc) (string, int, error)
// Tag operations
CreateTags(p *cloudstack.CreateTagsParams) (*cloudstack.CreateTagsResponse, error)
DeleteTags(p *cloudstack.DeleteTagsParams) (*cloudstack.DeleteTagsResponse, error)
ListTags(p *cloudstack.ListTagsParams) (*cloudstack.ListTagsResponse, error)
}
CloudStackAPI is an interface for CloudStack API operations This allows for easier testing and mocking