Documentation ¶
Index ¶
- type Node
- func (node Node) CreateQemuVM(Name string, Sockets int, Cores int, MemorySize int, DiskSize string) (string, error)
- func (node Node) MaxQemuId() (float64, error)
- func (node Node) Qemu() (QemuList, error)
- func (node Node) Storages() (StorageList, error)
- func (node Node) Tasks(Limit int, Start int, UserFilter string, VmId string) (TaskList, error)
- func (node Node) VZDump(VmId string, BWLimit int, Compress string, IONice int, LockWait int, ...) (string, error)
- type NodeList
- type NodeListResult
- type ProxMox
- func (proxmox ProxMox) Delete(endpoint string) (map[string]interface{}, error)
- func (proxmox ProxMox) DetermineVMPlacement(cpu int64, cores int64, mem int64, overCommitCPU float64, ...) (Node, error)
- func (proxmox ProxMox) FindVM(VmId string) (QemuVM, error)
- func (proxmox ProxMox) Get(endpoint string) (map[string]interface{}, error)
- func (proxmox ProxMox) GetBytes(endpoint string) ([]byte, error)
- func (proxmox ProxMox) NextVMId() (float64, error)
- func (proxmox ProxMox) Nodes() (NodeList, error)
- func (proxmox ProxMox) Post(endpoint string, input string) (map[string]interface{}, error)
- func (proxmox ProxMox) PostForm(endpoint string, form url.Values) (map[string]interface{}, error)
- func (proxmox ProxMox) Tasks() (TaskList, error)
- type QemuConfig
- type QemuList
- type QemuNet
- type QemuStatus
- type QemuVM
- func (qemu QemuVM) Clone(newId float64, name string, targetName string) (string, error)
- func (qemu QemuVM) Config() (QemuConfig, error)
- func (qemu QemuVM) CurrentStatus() (QemuStatus, error)
- func (qemu QemuVM) Delete() (map[string]interface{}, error)
- func (qemu QemuVM) Resume() error
- func (qemu QemuVM) Shutdown() error
- func (qemu QemuVM) Start() error
- func (qemu QemuVM) Stop() error
- func (qemu QemuVM) Suspend() error
- func (qemu QemuVM) WaitForStatus(status string, timeout int) error
- type Storage
- type StorageList
- type Task
- type TaskList
- type TaskResult
- type Volume
- type VolumeList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Mem float64 `json:"mem"` MaxDisk float64 `json:"maxdisk"` Node string `json:"node"` MaxCPU float64 `json:"maxcpu"` Uptime float64 `json:"uptime"` Id string `json:"id"` CPU float64 `json:"cpu"` Level string `json:"level"` NodeType string `json:"nodetype"` Disk float64 `json:"disk"` MaxMem float64 `json:"maxmem"` Proxmox ProxMox }
func (Node) CreateQemuVM ¶
func (Node) Storages ¶
func (node Node) Storages() (StorageList, error)
type NodeListResult ¶
type NodeListResult struct {
Data NodeList `json:"data"`
}
type ProxMox ¶
type ProxMox struct { Hostname string Username string VerifySSL bool BaseURL string ConnectionTicket string // contains filtered or unexported fields }
func NewProxMox ¶
func (ProxMox) DetermineVMPlacement ¶
type QemuConfig ¶
type QemuStatus ¶
type QemuStatus struct { CPU float64 `json:"cpu"` CPUs float64 `json:"cpus"` Mem float64 `json:"mem"` MaxMem float64 `json:"maxmem"` Disk float64 `json:"disk"` MaxDisk float64 `json:"maxdisk"` DiskWrite float64 `json:"diskwrite"` DiskRead float64 `json:"diskread"` NetIn float64 `json:"netin"` NetOut float64 `json:"netout"` Uptime float64 `json:"uptime"` QmpStatus string `json:"qmpstatus"` Status string `json:"status"` Template string `json:"template"` }
type QemuVM ¶
type QemuVM struct { Mem float64 `json:"mem"` CPUs float64 `json:"cpus"` NetOut float64 `json:"netout"` PID string `json:"pid"` Disk float64 `json:"disk"` MaxMem float64 `json:"maxmem"` Status string `json:"status"` Template float64 `json:"template"` NetIn float64 `json:"netin"` MaxDisk float64 `json:"maxdisk"` Name string `json:"name"` DiskWrite float64 `json:"diskwrite"` CPU float64 `json:"cpu"` VMId float64 `json:"vmid"` DiskRead float64 `json:"diskread"` Uptime float64 `json:"uptime"` Node Node }
func (QemuVM) Config ¶
func (qemu QemuVM) Config() (QemuConfig, error)
func (QemuVM) CurrentStatus ¶
func (qemu QemuVM) CurrentStatus() (QemuStatus, error)
type Storage ¶
type Storage struct { StorageType string `json:"type"` Active float64 `json:"active"` Total float64 `json:"total"` Content string `json:"content"` Storage string `json:"storage"` Used float64 `json:"used"` Avail float64 `json:"avail"` Node Node }
func (Storage) CreateVolume ¶
func (Storage) Volumes ¶
func (storage Storage) Volumes() (VolumeList, error)
type StorageList ¶
type Task ¶
type Task struct { UPid string `json:"upid"` Type string `json:"type"` Status string `json:"status"` ExitStatus string `json:"exitstatus"` PID float64 `json:"pid"` PStart float64 `json:"pstart"` StartTime float64 `json:"starttime"` EndTime float64 `json:"endtime"` ID string `json:"id"` // contains filtered or unexported fields }
type TaskResult ¶
type TaskResult struct {
Data Task `json:"data"`
}
type VolumeList ¶
Click to show internal directories.
Click to hide internal directories.