Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstanceState2Str ¶
func InstanceState2Str(state libvirt.DomainState) string
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 Disk ¶
type Disk struct {
Format string `json:"format"`
Source string `json:"source"`
Device string `json:"device"`
Bus string `json:"bus"`
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 Instance ¶
type Instance struct {
UUID string `json:"uuid"`
Name string `json:"name"`
State string `json:"state"`
Arch string `json:"arch"`
Type string `json:"type"`
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"`
}
func NewInstance ¶
type InstanceConf ¶
type InstanceConf struct {
Action string `json:"action"` // If is "", means not action.
Name string `json:"name"`
Family string `json:"family"'`
Arch string `json:"arch"`
Boots string `json:"boots"`
DataStore string `json:"datastore"`
Cpu string `json:"cpu"`
CpuMode string `json:"cpuMode"`
MemorySize string `json:"memorySize"`
MemoryUnit string `json:"memoryUnit"`
DiskSize string `json:"diskSize"`
DiskUnit string `json:"diskUnit"`
DiskBus string `json:"diskBus"`
IsoFile string `json:"isoFile"`
Interface string `json:"interface"`
InterfaceBus string `json:"interfaceBus"`
Start string `json:"start"`
}
type Interface ¶
type Interface struct {
Address string `json:"address"`
Source string `json:"source"`
Model string `json:"model"`
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 InterfaceConf ¶
Click to show internal directories.
Click to hide internal directories.