Documentation
¶
Index ¶
- type Address
- type Channel
- type Controller
- type DHCPLease
- type DHCPLeases
- type DataStore
- type Disk
- type Graphics
- type History
- type Host
- type Hyper
- type Index
- type Instance
- type InstancesStats
- type Interface
- type List
- type ListDHCPLease
- type ListDataStore
- type ListDisk
- type ListGraphics
- type ListHistory
- type ListInstance
- type ListInterface
- type ListNetwork
- type ListSession
- type ListSnapshot
- type ListUser
- type Memory
- type MetaData
- type NFS
- type Network
- type Processor
- type Range
- type Session
- type Snapshot
- type Statics
- type StaticsInfo
- type Target
- type User
- type Version
- type Volume
- type Volumes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type DHCPLeases ¶
type DataStore ¶
type DataStore struct {
UUID string `json:"uuid"`
Id string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Format string `json:"format"`
State string `json:"state"`
Capacity uint64 `json:"capacity"` // bytes
Allocation uint64 `json:"allocation"` // bytes
Available uint64 `json:"available"` // Bytes
Source string `json:"source"`
NFS *NFS `json:"nfs"`
}
type Disk ¶
type Disk struct {
Domain Instance `json:"domain"`
Seq string `json:"seq,omitempty"` // configure
Name string `json:"name,omitempty"` // disk name
UUID string `json:"uuid,omitempty"` // disk UUID
Store string `json:"datastore,omitempty"` // disk saved to datastore
Size string `json:"size"` // configure
SizeUnit string `json:"sizeUnit,omitempty"` //configure
Format string `json:"format"`
Source string `json:"source"`
Device string `json:"device"`
Bus string `json:"bus"` //configre
AddrType string `json:"addrType"` // pci, and drive
AddrSlot string `json:"addrSlot"`
AddrDomain string `json:"addrDomain"`
AddrBus string `json:"addrBus"`
AddrFunc string `json:"addrFunc"`
AddrCtl string `json:"addrCtl"`
AddrTgt string `json:"addrTgt"`
AddrUnit string `json:"addrUnit"`
Volume Volume `json:"volume"`
}
type Host ¶
type Host struct {
Name string `json:"name"`
Url string `json:"url"`
Username string `json:"username"`
Password string `json:"password"`
Hostname string `json:"hostname"`
Schema string `json:"schema"`
Port string `json:"port"`
}
func (*Host) Initialize ¶
func (h *Host) Initialize()
type Hyper ¶
type Hyper struct {
Name string `json:"name"`
Host string `json:"host"`
CpuNum uint `json:"cpuNum"`
CpuVendor string `json:"cpuVendor"`
CpuUtils uint64 `json:"cpuUtils"`
MemTotal uint64 `json:"memTotal"`
MemFree uint64 `json:"memFree"`
MemCached uint64 `json:"memCached"`
MemPercent float64 `json:"memPercent"`
UpTime int64 `json:"uptime"`
}
type Instance ¶
type Instance struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
Family string `json:"family,omitempty"` // linux, windows or others
State string `json:"state,omitempty"`
Arch string `json:"arch,omitempty"` // x86_64 or i386
Type string `json:"type,omitempty"`
Boots string `json:"boots,omitempty"`
DataStore string `json:"datastore,omitempty"`
Start string `json:"start,omitempty"` // whether booting with created
CpuMode string `json:"cpuMode,omitempty"`
MaxCpu uint `json:"maxCpu,omitempty"`
MaxMem uint64 `json:"maxMem,omitempty"` // KiB
Memory uint64 `json:"memory,omitempty"` // KiB
CpuTime uint64 `json:"cpuTime,omitempty"` // micro seconds
Disks []Disk `json:"disks,omitempty"`
Interfaces []Interface `json:"interfaces,omitempty"`
Controllers []Controller `json:"controllers,omitempty"`
Graphics []Graphics `json:"graphics,omitempty"`
Channels []Channel `json:"channels,omitempty"`
}
type InstancesStats ¶
type InstancesStats struct {
Running uint `json:"running"`
Shutdown uint `json:"shutdown"`
Others uint `json:"others"`
AllocMem uint64 `json:"allocMem"`
OccupiedMem uint64 `json:"occupiedMem"`
AllocCpu uint `json:"allocCpu"`
OccupiedCpu uint `json:"occupiedCpu"`
AllocStorage uint64 `json:"allocStorage"`
}
type Interface ¶
type Interface struct {
Domain Instance `json:"domain"`
Seq string `json:"seq,omitempty"` //configure
Name string `json:"name,omitempty"`
UUID string `json:"uuid,omitempty"`
Type string `json:"type,omitempty"` //bridge or openvswitch
Address string `json:"address"`
Network string `json:"network"`
Source string `json:"source"`
HostDev string `json:"hostDev"`
Model string `json:"model"` // configure
Device string `json:"device"`
AddrType string `json:"addrType"` // now only pci.
AddrSlot string `json:"addrSlot"`
AddrDomain string `json:"addrDomain"`
AddrBus string `json:"addrBus"`
AddrFunc string `json:"addrFunc"`
}
type List ¶
type List struct {
Items []interface{} `json:"items"`
Metadata MetaData `json:"metadata"`
}
type ListDHCPLease ¶
type ListDataStore ¶
type ListGraphics ¶
type ListHistory ¶ added in v0.9.1
type ListInstance ¶
type ListInterface ¶
type ListNetwork ¶
type ListSession ¶ added in v0.9.1
type ListSnapshot ¶
type Network ¶
type Network struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Bridge string `json:"bridge"`
State string `json:"state"`
Address string `json:"address"`
Netmask string `json:"netmask,omitempty"`
Prefix string `json:"prefix,omitempty"`
Range []Range `json:"range"`
Mode string `json:"mode"` // nat, router.
Type string `json:"type,omitempty"` // linux bridge or openvswitch
}
type Statics ¶
type Statics struct {
Instance StaticsInfo `json:"instance"`
DataStore StaticsInfo `json:"datastore"`
Network StaticsInfo `json:"network"`
Ports StaticsInfo `json:"ports"`
}
type StaticsInfo ¶
type Target ¶
type Version ¶
type Version struct {
Version string `json:"version"`
Date string `json:"date"`
Commit string `json:"commit"`
}
func NewVersion ¶
func NewVersion() Version
Click to show internal directories.
Click to hide internal directories.