proxmox

package module
v0.0.0-...-79afc6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2018 License: MIT Imports: 4 Imported by: 0

README

proxmox (Work In Progress)

Golang client for Proxmox VE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(fqdn string, allowInsecure bool)

func Login

func Login(username, password string) error

Types

type LoginResponse

type LoginResponse struct {
	Data struct {
		Username            string                    `json:"username"`
		Capabilities        map[string]map[string]int `json:"cap"`
		CSRFPreventionToken string                    `json:"CSRFPreventionToken"`
		Ticket              string                    `json:"ticket"`
	} `json:"data"`
}

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 NodeList

type NodeList []*Node

func GetNodes

func GetNodes() (NodeList, error)

type NodeListResponse

type NodeListResponse struct {
	Data NodeList `json:"Data"`
}

type Pool

type Pool struct {
	PoolID  string `json:"poolid"`
	Comment string `json:"comment"`
}

type PoolList

type PoolList []*Pool

func GetPools

func GetPools() (PoolList, error)

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

func GetStorage(storage string) (*Storage, error)

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"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL