Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Address struct {
Type string `json:"type"`
Domain string `json:"domain"`
Bus string `json:"bus"`
Slot string `json:"slot"`
Function string `json:"function"`
}
func NewFromAddressXML ¶
func NewFromAddressXML(xml libvirtc.AddressXML) (addr Address)
type Controller ¶
type Controller struct {
Type string `json:"source"`
Model string `json:"model"`
Index string `json:"device"`
Address Address `json:"address"`
}
func NewFromControllerXML ¶
func NewFromControllerXML(xml libvirtc.ControllerXML) (ctl Controller)
type DataStore ¶ added in v0.2.23
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"`
}
func NewDataStore ¶ added in v0.2.23
type Disk ¶
type Disk struct {
Action string `json:"action,omitempty"`
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 uint16 `json:"addrSlot"`
AddrDomain uint16 `json:"addrDomain"`
AddrBus uint16 `json:"addrBus"`
AddrFunc uint16 `json:"addrFunc"`
AddrCtl uint16 `json"addrCtl"`
AddrTgt uint16 `json:"addrTgt"`
AddrUnit uint16 `json:"addrUnit"`
}
func NewFromDiskXML ¶
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"`
}
type Instance ¶
type Instance struct {
Action string `json:"action,omitempty"` // If is "", means not action.
UUID string `json:"uuid"`
Name string `json:"name"`
Family string `json:"family"'` // configure
State string `json:"state"`
Arch string `json:"arch"` // configure: x86_64 or i386
Type string `json:"type"`
Boots string `json:"boots,omitempty"` // configure: hd,cdrom,network.
DataStore string `json:"datastore,omitempty"` // configure
Cpu string `json:"cpu,omitempty"` // configure
MemSize string `json:"memSize,omitempty"` // configure
MemUnit string `json:"memUnit,omitempty"` // configure
CpuMode string `json:"cpuMode,omitempty"` // configure
Disk0File string `json:"disk0File,omitempty"` // configure
Disk1Size string `json:"disk1Size,omitempty"` // configure
Disk1Unit string `json:"disk1Unit,omitempty"` // configure
Disk1Bus string `json:"disk1Bus,omitempty"` // configure
Interface0Source string `json:"interface0Source,omitempty"`
Interface0Bus string `json:"interface0Bus,omitempty"`
Start string `json:"start,omitempty"` //configure
MaxCpu uint `json:"maxCpu"`
MaxMem uint64 `json:"maxMem"` // Kbytes
Memory uint64 `json:"memory"` // KBytes
CpuTime uint64 `json:"cpuTime"` // MicroSeconds
Disks []Disk `json:"disks,omitempty"`
Interfaces []Interface `json:"interfaces,omitempty"`
Controllers []Controller `json:"controllers,omitempty"`
Password string `json:"password"`
Vnc Graphics `json:"vnc"`
Spice Graphics `json:"spice"`
Graphics []Graphics `json:"graphics"`
XMLObj *libvirtc.DomainXML `json:"-"`
}
func NewInstance ¶
type Interface ¶
type Interface struct {
Action string `json:"action,omitempty"` // If is "", means not action.
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"`
Source string `json:"source"`
Model string `json:"model"` // configure
Device string `json:"device"`
AddrType string `json:"addrType"` // now only pci.
AddrSlot uint16 `json:"addrSlot"`
AddrDomain uint16 `json:"addrDomain"`
AddrBus uint16 `json:"addrBus"`
AddrFunc uint16 `json:"addrFunc"`
}
func NewFromInterfaceXML ¶
func NewFromInterfaceXML(xml libvirtc.InterfaceXML) (int Interface)
type List ¶ added in v0.4.83
type List struct {
Items []interface{} `json:"items"`
Metadata MetaData `json:"metadata"`
}
type Network ¶ added in v0.2.23
type Network struct {
UUID string `json:"uuid"`
Name string `json:"name"`
State string `json:"state"`
Address string `json:"address"`
Netmask string `json:"netmask,omitempty"`
Prefix string `json:"prefix,omitempty"`
Range []Range `json:"range"`
DHCP string `json:"dhcp,omitempty"`
Mode string `json:"mode"` // nat, router.
}
func NewNetwork ¶ added in v0.2.23
Click to show internal directories.
Click to hide internal directories.