Documentation
¶
Index ¶
- type Client
- func (c *Client) CreatePool(ctx context.Context, d *PoolCreateRequestBody) error
- func (c *Client) DeletePool(ctx context.Context, id string) error
- func (c *Client) GetPool(ctx context.Context, id string) (*PoolGetResponseData, error)
- func (c *Client) ListPools(ctx context.Context) ([]*PoolListResponseData, error)
- func (c *Client) UpdatePool(ctx context.Context, id string, d *PoolUpdateRequestBody) error
- type PoolCreateRequestBody
- type PoolGetResponseBody
- type PoolGetResponseData
- type PoolListResponseBody
- type PoolListResponseData
- type PoolUpdateRequestBody
- type VirtualEnvironmentPoolGetResponseMembers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an interface for accessing the Proxmox pools API.
func (*Client) CreatePool ¶
func (c *Client) CreatePool(ctx context.Context, d *PoolCreateRequestBody) error
CreatePool creates a pool.
func (*Client) DeletePool ¶
DeletePool deletes a pool.
func (*Client) ListPools ¶
func (c *Client) ListPools(ctx context.Context) ([]*PoolListResponseData, error)
ListPools retrieves a list of pools.
func (*Client) UpdatePool ¶
UpdatePool updates a pool.
type PoolCreateRequestBody ¶
type PoolCreateRequestBody struct {
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
ID string `json:"groupid" url:"poolid"`
}
PoolCreateRequestBody contains the data for a pool create request.
type PoolGetResponseBody ¶
type PoolGetResponseBody struct {
Data *PoolGetResponseData `json:"data,omitempty"`
}
PoolGetResponseBody contains the body from a pool get response.
type PoolGetResponseData ¶
type PoolGetResponseData struct {
Comment *string `json:"comment,omitempty"`
Members []VirtualEnvironmentPoolGetResponseMembers `json:"members,omitempty"`
}
PoolGetResponseData contains the data from a pool get response.
type PoolListResponseBody ¶
type PoolListResponseBody struct {
Data []*PoolListResponseData `json:"data,omitempty"`
}
PoolListResponseBody contains the body from a pool list response.
type PoolListResponseData ¶
type PoolListResponseData struct {
Comment *string `json:"comment,omitempty"`
ID string `json:"poolid"`
}
PoolListResponseData contains the data from a pool list response.
type PoolUpdateRequestBody ¶
type PoolUpdateRequestBody struct {
// The pool's comment
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
// If this is set to 1, VMs and datastores will be removed from the pool instead of added.
Delete *types.CustomBool `json:"delete,omitempty" url:"delete,omitempty,int"`
// The list of virtual machines to add or delete.
VMs *types.CustomCommaSeparatedList `json:"vms,omitempty" url:"vms,omitempty,comma"`
// The list of datastores to add or delete.
Storage *types.CustomCommaSeparatedList `json:"storage,omitempty" url:"storage,omitempty,comma"`
}
PoolUpdateRequestBody contains the data for an pool update request.
type VirtualEnvironmentPoolGetResponseMembers ¶
type VirtualEnvironmentPoolGetResponseMembers struct {
ID string `json:"id"`
Node string `json:"node"`
DatastoreID *string `json:"storage,omitempty"`
Type string `json:"type"`
VMID *int `json:"vmid"`
}
VirtualEnvironmentPoolGetResponseMembers contains the members data from a pool get response.