Documentation ¶
Index ¶
- func Configure(fqdn string, allowInsecure bool)
- func Login(username, password string) error
- type LoginResponse
- type Node
- type NodeList
- type NodeListResponse
- type Pool
- type PoolList
- type PoolListResponse
- type Storage
- type StorageList
- type StorageListResponse
- type StorageResponse
- type VirtualMachine
- type VirtualMachineList
- type VirtualMachineListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoginResponse ¶
type Node ¶
type Node struct { MaxDisk int64 `json:"maxdisk"` Mem int64 `json:"mem"` ID string `json:"id"` Uptime int `json:"uptime"` Disk int `json:"disk"` Type string `json:"type"` SSLFingerprint string `json:"ssl_fingerprint"` MaxMem int64 `json:"maxmem"` CPU float64 `json:"cpu"` Level string `json:"level"` MaxCPU int `json:"maxcpu"` Status string `json:"status"` Node string `json:"node"` }
type NodeListResponse ¶
type NodeListResponse struct {
Data NodeList `json:"Data"`
}
type PoolListResponse ¶
type PoolListResponse struct {
Data PoolList `json:"data"`
}
type Storage ¶
type Storage struct { // Required Storage string `json:"storage"` Type string `json:"type"` // Optional Content string `json:"content,omitempty"` ThinPool string `json:"thinpool,omitempty"` Digest string `json:"digest,omitempty"` VGName string `json:"vgname,omitempty"` Path string `json:"path,omitempty"` }
func GetStorage ¶
type StorageList ¶
type StorageList []*Storage
func GetStorageByType ¶
func GetStorageByType(storageType string) (StorageList, error)
func GetStorageList ¶
func GetStorageList() (StorageList, error)
type StorageListResponse ¶
type StorageListResponse struct {
Data StorageList `json:"data"`
}
type StorageResponse ¶
type StorageResponse struct {
Data *Storage `json:"data"`
}
type VirtualMachine ¶
type VirtualMachine struct { DiskRead int `json:"diskread"` CPUs int `json:"cpus"` NetIn int64 `json:"netin"` MaxMem int64 `json:"maxmem"` Status string `json:"status"` Uptime int `json:"uptime"` DiskWrite int `json:"diskwrite"` Disk int `json:"disk"` Mem int64 `json:"mem"` MaxDisk int64 `json:"maxdisk"` NetOut int64 `json:"netout"` PID string `json:"pid"` CPU float64 `json:"cpu"` Name string `json:"name"` Template string `json:"template"` VMID int `json:"vmid"` }
type VirtualMachineList ¶
type VirtualMachineList []*VirtualMachine
func GetVirtualMachines ¶
func GetVirtualMachines(node string) (VirtualMachineList, error)
type VirtualMachineListResponse ¶
type VirtualMachineListResponse struct {
Data VirtualMachineList `json:"Data"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.