Documentation ¶
Index ¶
- type Capabilities
- type LoginResponse
- type LoginResponseContainer
- type NodeListContainer
- type NodeListItem
- type NodeNetworkInfoContainer
- type NodeNetworkListContainer
- type NodeNetworkListItem
- type NodeVMListContainer
- type NodeVMListItem
- type PoolInfo
- type PoolInfoResponse
- type PoolListItem
- type PoolListItemContainer
- type PoolMemberInfo
- type Proxmox
- type UserInfo
- type UserInfoResponse
- type UserListItem
- type UserListResponseContainer
- type VersionInfo
- type VersionInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct { VMs map[string]int `json:"vms"` DC map[string]int `json:"dc"` Nodes map[string]int `json:"nodes"` Access map[string]int `json:"access"` Storage map[string]int `json:"storage"` }
func (*Capabilities) Has ¶
func (c *Capabilities) Has(capability string) bool
type LoginResponse ¶
type LoginResponse struct { CSRFPreventionToken string `json:"CSRFPreventionToken"` Username string `json:"username"` Ticket string `json:"ticket"` UserCapabilities Capabilities `json:"cap"` }
type LoginResponseContainer ¶
type LoginResponseContainer struct {
Data LoginResponse `json:"data"`
}
type NodeListContainer ¶
type NodeListContainer struct {
Data []NodeListItem `json:"data"`
}
type NodeListItem ¶
type NodeListItem struct { ID string `json:"id"` Type string `json:"type"` Node string `json:"node"` Status string `json:"status"` Level string `json:"level"` Uptime int64 `json:"uptime"` SSLFingerprint string `json:"ssl_fingerprint"` Mem int64 `json:"mem"` MaxMem int64 `json:"maxmem"` CPU float64 `json:"cpu"` MaxCPU float64 `json:"maxcpu"` Disk int64 `json:"disk"` }
type NodeNetworkInfoContainer ¶
type NodeNetworkInfoContainer struct {
Data NodeNetworkListItem `json:"data"`
}
type NodeNetworkListContainer ¶
type NodeNetworkListContainer struct {
Data []NodeNetworkListItem `json:"data"`
}
type NodeNetworkListItem ¶
type NodeNetworkListItem struct { IFace string `json:"iface"` Type string `json:"type"` Active *int `json:"active"` Exists *int `json:"exists"` Autostart *int `json:"autostart"` Priority *int `json:"priority"` Families *[]string `json:"families"` Slaves *string `json:"slaves"` BridgeVLANAware *int `json:"bridge_vlan_aware"` BridgeFD *string `json:"bridge_fd"` BridgeSTP *string `json:"bridge_stp"` BridgePorts *string `json:"bridge_ports"` BondMode *string `json:"bond_mode"` BondXmitHashPolicy *string `json:"bond_xmit_hash_policy"` OVSBonds *string `json:"ovs_bonds"` OVSBridge *string `json:"ovs_bridge"` OVSOptions *string `json:"ovs_options"` OVSPorts *string `json:"ovs_ports"` OVSTag int `json:"ovs_tag"` Method *string `json:"method"` Address *string `json:"address"` Netmask *string `json:"netmask"` Gateway *string `json:"gateway"` Comments *string `json:"comments"` Method6 *string `json:"method6"` Address6 *string `json:"address6"` Netmask6 *string `json:"netmask6"` Gateway6 *string `json:"gateway6"` Comments6 *string `json:"comments6"` }
type NodeVMListContainer ¶
type NodeVMListContainer struct {
Data []NodeVMListItem `json:"data"`
}
type NodeVMListItem ¶
type NodeVMListItem struct { VMID string `json:"string"` Name string `json:"name"` PID *int64 `json:"pid"` Status string `json:"status"` Uptime int64 `json:"uptime"` Template string `json:"template"` CPU float64 `json:"cpu"` CPUs int `json:"cpus"` Mem int64 `json:"mem"` NetIn int64 `json:"netin"` NetOut int64 `json:"netout"` Disk int64 `json:"disk"` DiskRead int64 `json:"diskread"` DiskWrite int64 `json:"diskwrite"` MaxDisk int64 `json:"maxdisk"` }
type PoolInfo ¶
type PoolInfo struct { Comment string `json:"comment"` Members []PoolMemberInfo `json:"members"` }
type PoolInfoResponse ¶
type PoolInfoResponse struct {
Data PoolInfo `json:"data"`
}
type PoolListItem ¶
type PoolListItemContainer ¶
type PoolListItemContainer struct {
Data []PoolListItem `json:"data"`
}
type PoolMemberInfo ¶
type PoolMemberInfo struct { ID string `json:"id"` VMID int `json:"vmid"` Type string `json:"type"` Name string `json:"name"` Status string `json:"status"` Node string `json:"node"` Uptime int64 `json:"uptime"` Template int `json:"template"` Disk int64 `json:"disk"` DiskRead int64 `json:"diskread"` DiskWrite int64 `json:"diskwrite"` MaxDisk int64 `json:"maxdisk"` CPU int `json:"cpu"` MaxCPU int `json:"maxcpu"` Mem int64 `json:"mem"` MaxMem int64 `json:"maxmem"` NetIn int64 `json:"netin"` NetOut int64 `json:"netout"` }
type Proxmox ¶
type Proxmox interface { Login(username string, password string) (LoginResponse, error) GetVersion() (VersionInfo, error) GetUserList() ([]UserListItem, error) GetUserInfo(userid string) (UserInfo, error) NewUser(userid string, email string, expire int, firstname string, lastname string, groups []string, password string) error DeleteUser(userid string) error GetPoolList() ([]PoolListItem, error) NewPool(poolid string, comment string) error GetPoolInfo(poolid string) (PoolInfo, error) DeletePool(poolid string) error GetNodeList() ([]NodeListItem, error) GetNodeVMs(node string) ([]NodeVMListItem, error) GetNodeNetworks(node string, nictype string) ([]NodeNetworkListItem, error) ReloadNetworkConfig(node string) error RevertNetworkConfig(node string) error }
type UserInfoResponse ¶
type UserInfoResponse struct {
Data UserInfo `json:"data"`
}
type UserListItem ¶
type UserListResponseContainer ¶
type UserListResponseContainer struct {
Data []UserListItem `json:"data"`
}
type VersionInfo ¶
type VersionInfoResponse ¶
type VersionInfoResponse struct {
Data VersionInfo `json:"data"`
}
Source Files ¶
- go-proxmox-lib.go
- login.go
- node_list.go
- node_networks_delete.go
- node_networks_info.go
- node_networks_list.go
- node_networks_reload.go
- node_networks_revert.go
- node_networks_update.go
- node_vm_list.go
- pool_delete.go
- pool_info.go
- pool_list.go
- pool_new.go
- types_capabilities.go
- users_delete.go
- users_info.go
- users_list.go
- users_new.go
- version.go
Click to show internal directories.
Click to hide internal directories.