Documentation
¶
Overview ¶
Package libvirt-go-xml defines structs for parsing libvirt XML schemas
The libvirt API uses XML schemas/documents to describe the configuration of many of its managed objects. Thus when using the libvirt-go package, it is often neccessary to either parse or format XML documents. This package defines a set of Go structs which have been annotated for use with the encoding/xml API to manage libvirt XML documents.
Example creating a domain XML document from configuration:
import (
"github.com/libvirt/libvirt-go-xml"
)
domcfg := &libvirtxml.Domain{Type: "kvm", Name: "demo",
UUID: "8f99e332-06c4-463a-9099-330fb244e1b3",
....}
xmldoc, err := domcfg.Marshal()
Example parsing a domainXML document, in combination with libvirt-go
import (
"github.com/libvirt/libvirt-go"
"github.com/libvirt/libvirt-go-xml"
"fmt"
)
conn, err := libvirt.NewConnect("qemu:///system")
dom := conn.LookupDomainByName("demo")
xmldoc, err := dom.GetXMLDesc(0)
domcfg := &libvirtxml.Domain{}
err := domcfg.Unmarshal(xmldoc)
fmt.Printf("Virt type %s", domcfg.Type)
Index ¶
- type Caps
- type CapsGuest
- type CapsGuestArch
- type CapsGuestDomain
- type CapsGuestFeatures
- type CapsGuestMachine
- type CapsHost
- type CapsHostCPU
- type CapsHostCPUFeature
- type CapsHostCPUPageSize
- type CapsHostCPUTopology
- type CapsHostNUMACPU
- type CapsHostNUMACell
- type CapsHostNUMADistance
- type CapsHostNUMAMemory
- type CapsHostNUMAPageInfo
- type CapsHostNUMATopology
- type CapsHostSecModel
- type CapsHostSecModelLabel
- type Document
- type Domain
- type DomainACPI
- type DomainACPITable
- type DomainAddress
- type DomainAddressCCW
- type DomainAddressDIMM
- type DomainAddressDrive
- type DomainAddressISA
- type DomainAddressPCI
- type DomainAddressSpaprVIO
- type DomainAddressUSB
- type DomainAddressVirtioMMIO
- type DomainAddressVirtioSerial
- type DomainAlias
- type DomainBIOS
- type DomainBlockIOTune
- type DomainBlockIOTuneDevice
- type DomainBootDevice
- type DomainBootMenu
- type DomainCPU
- type DomainCPUFeature
- type DomainCPUModel
- type DomainCPUTopology
- type DomainCPUTune
- type DomainCPUTuneEmulatorPin
- type DomainCPUTuneIOThreadPin
- type DomainCPUTuneIOThreadSched
- type DomainCPUTunePeriod
- type DomainCPUTuneQuota
- type DomainCPUTuneShares
- type DomainCPUTuneVCPUPin
- type DomainCPUTuneVCPUSched
- type DomainCell
- type DomainChannel
- type DomainChannelTarget
- type DomainChardevLog
- type DomainChardevSource
- type DomainChardevTarget
- type DomainClock
- type DomainConsole
- type DomainConsoleTarget
- type DomainController
- type DomainDeviceBoot
- type DomainDeviceList
- type DomainDisk
- type DomainDiskAuth
- type DomainDiskDriver
- type DomainDiskIOTune
- type DomainDiskReadOnly
- type DomainDiskSecret
- type DomainDiskShareable
- type DomainDiskSource
- type DomainDiskSourceHost
- type DomainDiskTarget
- type DomainFeature
- type DomainFeatureAPIC
- type DomainFeatureGIC
- type DomainFeatureHyperV
- type DomainFeatureHyperVSpinlocks
- type DomainFeatureHyperVVendorId
- type DomainFeatureKVM
- type DomainFeatureList
- type DomainFeatureState
- type DomainFilesystem
- type DomainFilesystemDriver
- type DomainFilesystemReadOnly
- type DomainFilesystemSource
- type DomainFilesystemSpaceHardLimit
- type DomainFilesystemSpaceSoftLimit
- type DomainFilesystemTarget
- type DomainGraphic
- type DomainGraphicListener
- type DomainHostdev
- type DomainHostdevAdapter
- type DomainHostdevSource
- type DomainIDMap
- type DomainIDMapRange
- type DomainIOThread
- type DomainIOThreadIDs
- type DomainInput
- type DomainInterface
- type DomainInterfaceAlias
- type DomainInterfaceBandwidth
- type DomainInterfaceBandwidthParams
- type DomainInterfaceDriver
- type DomainInterfaceDriverHost
- type DomainInterfaceLink
- type DomainInterfaceMAC
- type DomainInterfaceModel
- type DomainInterfaceScript
- type DomainInterfaceSource
- type DomainInterfaceSourceLocal
- type DomainInterfaceTarget
- type DomainInterfaceVirtualport
- type DomainKeyWrap
- type DomainKeyWrapCipher
- type DomainLoader
- type DomainMaxMemory
- type DomainMemBalloon
- type DomainMemBalloonStats
- type DomainMemory
- type DomainMemoryAccess
- type DomainMemoryAllocation
- type DomainMemoryBacking
- type DomainMemoryHugepage
- type DomainMemoryHugepages
- type DomainMemoryLocked
- type DomainMemoryNosharepages
- type DomainMemorySource
- type DomainMemoryTune
- type DomainMemoryTuneLimit
- type DomainMemorydev
- type DomainMemorydevTarget
- type DomainMemorydevTargetNode
- type DomainNUMATune
- type DomainNUMATuneMemNode
- type DomainNUMATuneMemory
- type DomainNVRam
- type DomainNuma
- type DomainOS
- type DomainOSType
- type DomainPM
- type DomainPMPolicy
- type DomainPanic
- type DomainQEMUCommandline
- type DomainQEMUCommandlineArg
- type DomainQEMUCommandlineEnv
- type DomainRNG
- type DomainRNGBackend
- type DomainRNGProtocol
- type DomainRNGRate
- type DomainResource
- type DomainSMBios
- type DomainSecLabel
- type DomainSerial
- type DomainSerialProtocol
- type DomainSerialTarget
- type DomainSnapshot
- type DomainSnapshotDisk
- type DomainSnapshotDiskDriver
- type DomainSnapshotDiskSource
- type DomainSnapshotDisks
- type DomainSnapshotMemory
- type DomainSnapshotParent
- type DomainSound
- type DomainSoundCodec
- type DomainSysInfo
- type DomainSysInfoEntry
- type DomainTimer
- type DomainTimerCatchUp
- type DomainVCPU
- type DomainVCPUs
- type DomainVCPUsVCPU
- type DomainVideo
- type DomainVideoAccel
- type DomainVideoModel
- type DomainWatchdog
- type Network
- type NetworkBootp
- type NetworkBridge
- type NetworkDHCP
- type NetworkDHCPHost
- type NetworkDHCPRange
- type NetworkDNS
- type NetworkDNSForwarder
- type NetworkDNSHost
- type NetworkDNSHostHostname
- type NetworkDNSSRV
- type NetworkDNSTXT
- type NetworkDomain
- type NetworkForward
- type NetworkForwardNAT
- type NetworkForwardNATAddress
- type NetworkForwardNATPort
- type NetworkIP
- type NetworkMAC
- type NetworkRoute
- type NodeDevice
- type NodeDeviceCapability
- type NodeDeviceDRMCapability
- type NodeDeviceIDName
- type NodeDeviceIOMMUGroup
- type NodeDeviceNUMA
- type NodeDeviceNetCapability
- type NodeDeviceNetLink
- type NodeDeviceNetOffloadFeatures
- type NodeDeviceNetSubCapability
- type NodeDevicePCIAddress
- type NodeDevicePCICapability
- type NodeDevicePCIExpress
- type NodeDevicePCIExpressLink
- type NodeDevicePCISubCapability
- type NodeDeviceSCSICapability
- type NodeDeviceSCSIFCHost
- type NodeDeviceSCSIHostCapability
- type NodeDeviceSCSIHostSubCapability
- type NodeDeviceSCSIVportsOPS
- type NodeDeviceStorageCapability
- type NodeDeviceStorageSubCapability
- type NodeDeviceSystemCapability
- type NodeDeviceSystemFirmware
- type NodeDeviceSystemHardware
- type NodeDeviceUSBCapability
- type NodeDeviceUSBDeviceCapability
- type Secret
- type SecretUsage
- type StorageEncryption
- type StorageEncryptionCipher
- type StorageEncryptionIvgen
- type StorageEncryptionSecret
- type StoragePool
- type StoragePoolSize
- type StoragePoolSource
- type StoragePoolSourceAdapter
- type StoragePoolSourceAdapterParentAddr
- type StoragePoolSourceAdapterParentAddrAddress
- type StoragePoolSourceAuth
- type StoragePoolSourceAuthSecret
- type StoragePoolSourceDevice
- type StoragePoolSourceFormat
- type StoragePoolSourceHost
- type StoragePoolSourceProduct
- type StoragePoolSourceVendor
- type StoragePoolTarget
- type StoragePoolTargetPermissions
- type StoragePoolTargetTimestamps
- type StorageVolume
- type StorageVolumeBackingStore
- type StorageVolumeSize
- type StorageVolumeTarget
- type StorageVolumeTargetFeature
- type StorageVolumeTargetFormat
- type StorageVolumeTargetPermissions
- type StorageVolumeTargetTimestamps
- type VirtualPort
- type VirtualPortParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caps ¶
type CapsGuest ¶
type CapsGuest struct {
OSType string `xml:"os_type"`
Arch CapsGuestArch `xml:"arch"`
Features *CapsGuestFeatures `xml:"features"`
}
type CapsGuestArch ¶
type CapsGuestArch struct {
Name string `xml:"name,attr"`
WordSize string `xml:"wordsize"`
Emulator string `xml:"emulator"`
Machines []CapsGuestMachine `xml:"machine"`
Domains []CapsGuestDomain `xml:"domain"`
}
type CapsGuestDomain ¶
type CapsGuestDomain struct {
Type string `xml:"type,attr"`
Emulator string `xml:"emulator"`
Machines []CapsGuestMachine `xml:"machine"`
}
type CapsGuestFeatures ¶
type CapsGuestFeatures struct {
CPUSelection *struct{} `xml:"cpuselection"`
DeviceBoot *struct{} `xml:"deviceboot"`
}
type CapsGuestMachine ¶
type CapsHost ¶
type CapsHost struct {
UUID string `xml:"uuid"`
CPU *CapsHostCPU `xml:"cpu"`
NUMA *CapsHostNUMATopology `xml:"topology"`
SecModel []CapsHostSecModel `xml:"secmodel"`
}
type CapsHostCPU ¶
type CapsHostCPU struct {
Arch string `xml:"arch"`
Model string `xml:"model"`
Vendor string `xml:"vendor"`
Topology CapsHostCPUTopology `xml:"topology"`
Features []CapsHostCPUFeature `xml:"feature"`
PageSizes []CapsHostCPUPageSize `xml:"pages"`
}
type CapsHostCPUFeature ¶
type CapsHostCPUFeature struct {
Name string `xml:"name,attr"`
}
type CapsHostCPUPageSize ¶
type CapsHostCPUTopology ¶
type CapsHostNUMACPU ¶
type CapsHostNUMACell ¶
type CapsHostNUMACell struct {
ID int `xml:"id,attr"`
Memory CapsHostNUMAMemory `xml:"memory"`
PageInfo []CapsHostNUMAPageInfo `xml:"pages"`
Distances []CapsHostNUMADistance `xml:"distances>sibling"`
CPUS []CapsHostNUMACPU `xml:"cpus>cpu"`
}
type CapsHostNUMADistance ¶
type CapsHostNUMAMemory ¶
type CapsHostNUMAPageInfo ¶
type CapsHostNUMATopology ¶
type CapsHostNUMATopology struct {
Cells []CapsHostNUMACell `xml:"cells>cell"`
}
type CapsHostSecModel ¶
type CapsHostSecModel struct {
Name string `xml:"model"`
DOI string `xml:"doi"`
Labels []CapsHostSecModelLabel `xml:"baselabel"`
}
type CapsHostSecModelLabel ¶
type Domain ¶
type Domain struct {
XMLName xml.Name `xml:"domain"`
Type string `xml:"type,attr,omitempty"`
ID *int `xml:"id,attr"`
Name string `xml:"name"`
UUID string `xml:"uuid,omitempty"`
Title string `xml:"title,omitempty"`
Description string `xml:"description,omitempty"`
MaximumMemory *DomainMaxMemory `xml:"maxMemory"`
Memory *DomainMemory `xml:"memory"`
CurrentMemory *DomainMemory `xml:"currentMemory"`
BlockIOTune *DomainBlockIOTune `xml:"blkiotune"`
MemoryTune *DomainMemoryTune `xml:"memtune"`
MemoryBacking *DomainMemoryBacking `xml:"memoryBacking"`
VCPU *DomainVCPU `xml:"vcpu"`
VCPUs *DomainVCPUs `xml:"vcpus"`
IOThreads uint `xml:"iothreads,omitempty"`
IOThreadIDs *DomainIOThreadIDs `xml:"iothreadids"`
CPUTune *DomainCPUTune `xml:"cputune"`
NUMATune *DomainNUMATune `xml:"numatune"`
Resource *DomainResource `xml:"resource"`
SysInfo *DomainSysInfo `xml:"sysinfo"`
Bootloader string `xml:"bootloader,omitempty"`
BootloaderArgs string `xml:"bootloader_args,omitempty"`
OS *DomainOS `xml:"os"`
IDMap *DomainIDMap `xml:"idmap"`
Features *DomainFeatureList `xml:"features"`
CPU *DomainCPU `xml:"cpu"`
Clock *DomainClock `xml:"clock,omitempty"`
OnPoweroff string `xml:"on_poweroff,omitempty"`
OnReboot string `xml:"on_reboot,omitempty"`
OnCrash string `xml:"on_crash,omitempty"`
PM *DomainPM `xml:"pm"`
Devices *DomainDeviceList `xml:"devices"`
SecLabel []DomainSecLabel `xml:"seclabel"`
QEMUCommandline *DomainQEMUCommandline
KeyWrap *DomainKeyWrap `xml:"keywrap"`
}
NB, try to keep the order of fields in this struct matching the order of XML elements that libvirt will generate when dumping XML.
type DomainACPI ¶
type DomainACPI struct {
Tables []DomainACPITable `xml:"table"`
}
type DomainACPITable ¶
type DomainAddress ¶
type DomainAddress struct {
USB *DomainAddressUSB
PCI *DomainAddressPCI
Drive *DomainAddressDrive
DIMM *DomainAddressDIMM
ISA *DomainAddressISA
VirtioMMIO *DomainAddressVirtioMMIO
CCW *DomainAddressCCW
VirtioSerial *DomainAddressVirtioSerial
SpaprVIO *DomainAddressSpaprVIO
}
func (*DomainAddress) MarshalXML ¶
func (a *DomainAddress) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddress) UnmarshalXML ¶
func (a *DomainAddress) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressCCW ¶
type DomainAddressCCW struct {
Cssid *uint `xml:"cssid,attr"`
Ssid *uint `xml:"ssid,attr"`
DevNo *uint `xml:"devno,attr"`
}
func (*DomainAddressCCW) MarshalXML ¶
func (a *DomainAddressCCW) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressCCW) UnmarshalXML ¶
func (a *DomainAddressCCW) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressDIMM ¶
func (*DomainAddressDIMM) MarshalXML ¶
func (a *DomainAddressDIMM) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressDIMM) UnmarshalXML ¶
func (a *DomainAddressDIMM) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressDrive ¶
type DomainAddressDrive struct {
Controller *uint `xml:"controller,attr"`
Bus *uint `xml:"bus,attr"`
Target *uint `xml:"target,attr"`
Unit *uint `xml:"unit,attr"`
}
func (*DomainAddressDrive) MarshalXML ¶
func (a *DomainAddressDrive) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressDrive) UnmarshalXML ¶
func (a *DomainAddressDrive) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressISA ¶
func (*DomainAddressISA) MarshalXML ¶
func (a *DomainAddressISA) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressISA) UnmarshalXML ¶
func (a *DomainAddressISA) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressPCI ¶
type DomainAddressPCI struct {
Domain *uint `xml:"domain,attr"`
Bus *uint `xml:"bus,attr"`
Slot *uint `xml:"slot,attr"`
Function *uint `xml:"function,attr"`
MultiFunction string `xml:"multifunction,attr,omitempty"`
}
func (*DomainAddressPCI) MarshalXML ¶
func (a *DomainAddressPCI) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressPCI) UnmarshalXML ¶
func (a *DomainAddressPCI) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressSpaprVIO ¶
type DomainAddressSpaprVIO struct {
Reg *uint64 `xml:"reg,attr"`
}
func (*DomainAddressSpaprVIO) MarshalXML ¶
func (a *DomainAddressSpaprVIO) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressSpaprVIO) UnmarshalXML ¶
func (a *DomainAddressSpaprVIO) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressUSB ¶
func (*DomainAddressUSB) MarshalXML ¶
func (a *DomainAddressUSB) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressUSB) UnmarshalXML ¶
func (a *DomainAddressUSB) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressVirtioMMIO ¶
type DomainAddressVirtioMMIO struct {
}
func (*DomainAddressVirtioMMIO) MarshalXML ¶
func (a *DomainAddressVirtioMMIO) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressVirtioMMIO) UnmarshalXML ¶
func (a *DomainAddressVirtioMMIO) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAddressVirtioSerial ¶
type DomainAddressVirtioSerial struct {
Controller *uint `xml:"controller,attr"`
Bus *uint `xml:"bus,attr"`
Port *uint `xml:"port,attr"`
}
func (*DomainAddressVirtioSerial) MarshalXML ¶
func (a *DomainAddressVirtioSerial) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*DomainAddressVirtioSerial) UnmarshalXML ¶
func (a *DomainAddressVirtioSerial) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type DomainAlias ¶
type DomainAlias struct {
Name string `xml:"name,attr"`
}
type DomainBIOS ¶
type DomainBlockIOTune ¶
type DomainBlockIOTune struct {
Weight uint `xml:"weight,omitempty"`
Device []DomainBlockIOTuneDevice `xml:"device"`
}
type DomainBlockIOTuneDevice ¶
type DomainBootDevice ¶
type DomainBootDevice struct {
Dev string `xml:"dev,attr"`
}
type DomainBootMenu ¶
type DomainCPU ¶
type DomainCPU struct {
Match string `xml:"match,attr,omitempty"`
Mode string `xml:"mode,attr,omitempty"`
Check string `xml:"check,attr,omitempty"`
Model *DomainCPUModel `xml:"model"`
Vendor string `xml:"vendor,omitempty"`
Topology *DomainCPUTopology `xml:"topology"`
Features []DomainCPUFeature `xml:"feature"`
Numa *DomainNuma `xml:"numa,omitempty"`
}
type DomainCPUFeature ¶
type DomainCPUModel ¶
type DomainCPUTopology ¶
type DomainCPUTune ¶
type DomainCPUTune struct {
Period *DomainCPUTunePeriod `xml:"period"`
Quota *DomainCPUTuneQuota `xml:"quota"`
GlobalPeriod *DomainCPUTunePeriod `xml:"global_period"`
GlobalQuota *DomainCPUTuneQuota `xml:"global_quota"`
EmulatorPeriod *DomainCPUTunePeriod `xml:"emulator_period"`
EmulatorQuota *DomainCPUTuneQuota `xml:"emulator_quota"`
IOThreadPeriod *DomainCPUTunePeriod `xml:"iothread_period"`
IOThreadQuota *DomainCPUTuneQuota `xml:"iothread_quota"`
VCPUPin []DomainCPUTuneVCPUPin `xml:"vcpupin"`
EmulatorPin *DomainCPUTuneEmulatorPin `xml:"emulatorpin"`
IOThreadPin []DomainCPUTuneIOThreadPin `xml:"iothreadpin"`
VCPUSched []DomainCPUTuneVCPUSched `xml:"vcpusched"`
IOThreadSched []DomainCPUTuneIOThreadSched `xml:"iothreadsched"`
}
type DomainCPUTuneEmulatorPin ¶
type DomainCPUTuneEmulatorPin struct {
CPUSet string `xml:"cpuset,attr"`
}
type DomainCPUTunePeriod ¶
type DomainCPUTunePeriod struct {
Value uint64 `xml:",chardata"`
}
type DomainCPUTuneQuota ¶
type DomainCPUTuneQuota struct {
Value int64 `xml:",chardata"`
}
type DomainCPUTuneShares ¶
type DomainCPUTuneShares struct {
}
type DomainCPUTuneVCPUPin ¶
type DomainCPUTuneVCPUSched ¶
type DomainCell ¶
type DomainChannel ¶
type DomainChannel struct {
XMLName xml.Name `xml:"channel"`
Type string `xml:"type,attr"`
Source *DomainChardevSource `xml:"source"`
Target *DomainChannelTarget `xml:"target"`
Log *DomainChardevLog `xml:"log"`
Alias *DomainAlias `xml:"alias"`
Address *DomainAddress `xml:"address"`
}
func (*DomainChannel) Marshal ¶
func (d *DomainChannel) Marshal() (string, error)
func (*DomainChannel) Unmarshal ¶
func (d *DomainChannel) Unmarshal(doc string) error
type DomainChannelTarget ¶
type DomainChardevLog ¶
type DomainChardevSource ¶
type DomainChardevTarget ¶
type DomainClock ¶
type DomainClock struct {
Offset string `xml:"offset,attr,omitempty"`
Basis string `xml:"basis,attr,omitempty"`
Adjustment int `xml:"adjustment,attr,omitempty"`
Timer []DomainTimer `xml:"timer,omitempty"`
}
type DomainConsole ¶
type DomainConsole struct {
XMLName xml.Name `xml:"console"`
Type string `xml:"type,attr"`
Source *DomainChardevSource `xml:"source"`
Target *DomainConsoleTarget `xml:"target"`
Log *DomainChardevLog `xml:"log"`
Alias *DomainAlias `xml:"alias"`
Address *DomainAddress `xml:"address"`
}
func (*DomainConsole) Marshal ¶
func (d *DomainConsole) Marshal() (string, error)
func (*DomainConsole) Unmarshal ¶
func (d *DomainConsole) Unmarshal(doc string) error
type DomainConsoleTarget ¶
type DomainController ¶
type DomainController struct {
XMLName xml.Name `xml:"controller"`
Type string `xml:"type,attr"`
Index *uint `xml:"index,attr"`
Model string `xml:"model,attr,omitempty"`
Address *DomainAddress `xml:"address"`
}
func (*DomainController) Marshal ¶
func (d *DomainController) Marshal() (string, error)
func (*DomainController) Unmarshal ¶
func (d *DomainController) Unmarshal(doc string) error
type DomainDeviceBoot ¶
type DomainDeviceBoot struct {
Order uint `xml:"order,attr"`
}
type DomainDeviceList ¶
type DomainDeviceList struct {
Emulator string `xml:"emulator,omitempty"`
Controllers []DomainController `xml:"controller"`
Disks []DomainDisk `xml:"disk"`
Filesystems []DomainFilesystem `xml:"filesystem"`
Interfaces []DomainInterface `xml:"interface"`
Serials []DomainSerial `xml:"serial"`
Consoles []DomainConsole `xml:"console"`
Inputs []DomainInput `xml:"input"`
Graphics []DomainGraphic `xml:"graphics"`
Videos []DomainVideo `xml:"video"`
Channels []DomainChannel `xml:"channel"`
MemBalloon *DomainMemBalloon `xml:"memballoon"`
Panics []DomainPanic `xml:"panic"`
Sounds []DomainSound `xml:"sound"`
RNGs []DomainRNG `xml:"rng"`
Hostdevs []DomainHostdev `xml:"hostdev"`
Memorydevs []DomainMemorydev `xml:"memory"`
Watchdog *DomainWatchdog `xml:"watchdog"`
}
type DomainDisk ¶
type DomainDisk struct {
XMLName xml.Name `xml:"disk"`
Type string `xml:"type,attr"`
Device string `xml:"device,attr"`
Snapshot string `xml:"snapshot,attr,omitempty"`
Driver *DomainDiskDriver `xml:"driver"`
Auth *DomainDiskAuth `xml:"auth"`
Source *DomainDiskSource `xml:"source"`
Target *DomainDiskTarget `xml:"target"`
IOTune *DomainDiskIOTune `xml:"iotune"`
Serial string `xml:"serial,omitempty"`
ReadOnly *DomainDiskReadOnly `xml:"readonly"`
Address *DomainAddress `xml:"address"`
Boot *DomainDeviceBoot `xml:"boot"`
WWN string `xml:"wwn,omitempty"`
}
func (*DomainDisk) Marshal ¶
func (d *DomainDisk) Marshal() (string, error)
func (*DomainDisk) Unmarshal ¶
func (d *DomainDisk) Unmarshal(doc string) error
type DomainDiskAuth ¶
type DomainDiskAuth struct {
Username string `xml:"username,attr,omitempty"`
Secret *DomainDiskSecret `xml:"secret"`
}
type DomainDiskDriver ¶
type DomainDiskDriver struct {
Name string `xml:"name,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Cache string `xml:"cache,attr,omitempty"`
IO string `xml:"io,attr,omitempty"`
ErrorPolicy string `xml:"error_policy,attr,omitempty"`
RErrorPolicy string `xml:"rerror_policy,attr,omitempty"`
Discard string `xml:"discard,attr,omitempty"`
}
type DomainDiskIOTune ¶
type DomainDiskIOTune struct {
TotalBytesSec uint64 `xml:"total_bytes_sec"`
ReadBytesSec uint64 `xml:"read_bytes_sec"`
WriteBytesSec uint64 `xml:"write_bytes_sec"`
TotalIopsSec uint64 `xml:"total_iops_sec"`
ReadIopsSec uint64 `xml:"read_iops_sec"`
WriteIopsSec uint64 `xml:"write_iops_sec"`
TotalBytesSecMax uint64 `xml:"total_bytes_sec_max"`
ReadBytesSecMax uint64 `xml:"read_bytes_sec_max"`
WriteBytesSecMax uint64 `xml:"write_bytes_sec_max"`
TotalIopsSecMax uint64 `xml:"total_iops_sec_max"`
ReadIopsSecMax uint64 `xml:"read_iops_sec_max"`
WriteIopsSecMax uint64 `xml:"write_iops_sec_max"`
TotalBytesSecMaxLength uint64 `xml:"total_bytes_sec_max_length"`
ReadBytesSecMaxLength uint64 `xml:"read_bytes_sec_max_length"`
WriteBytesSecMaxLength uint64 `xml:"write_bytes_sec_max_length"`
TotalIopsSecMaxLength uint64 `xml:"total_iops_sec_max_length"`
ReadIopsSecMaxLength uint64 `xml:"read_iops_sec_max_length"`
WriteIopsSecMaxLength uint64 `xml:"write_iops_sec_max_length"`
SizeIopsSec uint64 `xml:"size_iops_sec"`
GroupName string `xml:"group_name"`
}
type DomainDiskReadOnly ¶
type DomainDiskReadOnly struct {
}
type DomainDiskSecret ¶
type DomainDiskShareable ¶
type DomainDiskShareable struct {
}
type DomainDiskSource ¶
type DomainDiskSource struct {
File string `xml:"file,attr,omitempty"`
Device string `xml:"dev,attr,omitempty"`
Protocol string `xml:"protocol,attr,omitempty"`
Name string `xml:"name,attr,omitempty"`
Pool string `xml:"pool,attr,omitempty"`
Volume string `xml:"volume,attr,omitempty"`
Hosts []DomainDiskSourceHost `xml:"host"`
StartupPolicy string `xml:"startupPolicy,attr,omitempty"`
}
type DomainDiskSourceHost ¶
type DomainDiskTarget ¶
type DomainFeature ¶
type DomainFeature struct {
}
type DomainFeatureAPIC ¶
type DomainFeatureAPIC struct {
EOI string `xml:"eio,attr,omitempty"`
}
type DomainFeatureGIC ¶
type DomainFeatureGIC struct {
Version string `xml:"version,attr,omitempty"`
}
type DomainFeatureHyperV ¶
type DomainFeatureHyperV struct {
DomainFeature
Relaxed *DomainFeatureState `xml:"relaxed"`
VAPIC *DomainFeatureState `xml:"vapic"`
Spinlocks *DomainFeatureHyperVSpinlocks `xml:"spinlocks"`
VPIndex *DomainFeatureState `xml:"vpindex"`
Runtime *DomainFeatureState `xml:"runtime"`
Synic *DomainFeatureState `xml:"synic"`
STimer *DomainFeatureState `xml:"stimer"`
Reset *DomainFeatureState `xml:"reset"`
VendorId *DomainFeatureHyperVVendorId `xml:"vendor_id"`
}
type DomainFeatureHyperVSpinlocks ¶
type DomainFeatureHyperVSpinlocks struct {
DomainFeatureState
Retries uint `xml:"retries,attr,omitempty"`
}
type DomainFeatureHyperVVendorId ¶
type DomainFeatureHyperVVendorId struct {
DomainFeatureState
Value string `xml:"value,attr,omitempty"`
}
type DomainFeatureKVM ¶
type DomainFeatureKVM struct {
Hidden *DomainFeatureState `xml:"hidden"`
}
type DomainFeatureList ¶
type DomainFeatureList struct {
PAE *DomainFeature `xml:"pae"`
ACPI *DomainFeature `xml:"acpi"`
APIC *DomainFeatureAPIC `xml:"apic"`
HAP *DomainFeatureState `xml:"hap"`
Viridian *DomainFeature `xml:"viridian"`
PrivNet *DomainFeature `xml:"privnet"`
HyperV *DomainFeatureHyperV `xml:"hyperv"`
KVM *DomainFeatureKVM `xml:"kvm"`
PVSpinlock *DomainFeatureState `xml:"pvspinlock"`
PMU *DomainFeatureState `xml:"pmu"`
VMPort *DomainFeatureState `xml:"vmport"`
GIC *DomainFeatureGIC `xml:"gic"`
SMM *DomainFeatureState `xml:"smm"`
}
type DomainFeatureState ¶
type DomainFeatureState struct {
State string `xml:"state,attr,omitempty"`
}
type DomainFilesystem ¶
type DomainFilesystem struct {
XMLName xml.Name `xml:"filesystem"`
Type string `xml:"type,attr"`
AccessMode string `xml:"accessmode,attr"`
Driver *DomainFilesystemDriver `xml:"driver"`
Source *DomainFilesystemSource `xml:"source"`
Target *DomainFilesystemTarget `xml:"target"`
ReadOnly *DomainFilesystemReadOnly `xml:"readonly"`
SpaceHardLimit *DomainFilesystemSpaceHardLimit `xml:"space_hard_limit"`
SpaceSoftLimit *DomainFilesystemSpaceSoftLimit `xml:"space_soft_limit"`
Address *DomainAddress `xml:"address"`
}
func (*DomainFilesystem) Marshal ¶
func (d *DomainFilesystem) Marshal() (string, error)
func (*DomainFilesystem) Unmarshal ¶
func (d *DomainFilesystem) Unmarshal(doc string) error
type DomainFilesystemDriver ¶
type DomainFilesystemReadOnly ¶
type DomainFilesystemReadOnly struct {
}
type DomainFilesystemSource ¶
type DomainFilesystemTarget ¶
type DomainFilesystemTarget struct {
Dir string `xml:"dir,attr"`
}
type DomainGraphic ¶
type DomainGraphic struct {
XMLName xml.Name `xml:"graphics"`
Type string `xml:"type,attr"`
AutoPort string `xml:"autoport,attr,omitempty"`
Port int `xml:"port,attr,omitempty"`
TLSPort int `xml:"tlsPort,attr,omitempty"`
WebSocket int `xml:"websocket,attr,omitempty"`
Listen string `xml:"listen,attr,omitempty"`
Socket string `xml:"socket,attr,omitempty"`
Keymap string `xml:"keymap,attr,omitempty"`
Passwd string `xml:"passwd,attr,omitempty"`
PasswdValidTo string `xml:"passwdValidTo,attr,omitempty"`
Connected string `xml:"connected,attr,omitempty"`
DefaultMode string `xml:"defaultMode,attr,omitempty"`
Display string `xml:"display,attr,omitempty"`
XAuth string `xml:"xauth,attr,omitempty"`
FullScreen string `xml:"fullscreen,attr,omitempty"`
ReplaceUser string `xml:"replaceUser,attr,omitempty"`
MultiUser string `xml:"multiUser,attr,omitempty"`
Listeners []DomainGraphicListener `xml:"listen"`
}
type DomainGraphicListener ¶
type DomainHostdev ¶
type DomainHostdev struct {
XMLName xml.Name `xml:"hostdev"`
Mode string `xml:"mode,attr"`
Type string `xml:"type,attr"`
SGIO string `xml:"sgio,attr,omitempty"`
RawIO string `xml:"rawio,attr,omitempty"`
Managed string `xml:"managed,attr,omitempty"`
Source *DomainHostdevSource `xml:"source"`
Address *DomainAddress `xml:"address"`
}
func (*DomainHostdev) Marshal ¶
func (d *DomainHostdev) Marshal() (string, error)
func (*DomainHostdev) Unmarshal ¶
func (d *DomainHostdev) Unmarshal(doc string) error
type DomainHostdevAdapter ¶
type DomainHostdevAdapter struct {
Name string `xml:"name,attr,omitempty"`
}
type DomainHostdevSource ¶
type DomainHostdevSource struct {
Protocol string `xml:"protocol,attr,omitempty"`
Name string `xml:"name,attr,omitempty"`
WWPN string `xml:"wwpn,attr,omitempty"`
Adapter *DomainHostdevAdapter `xml:"adapter"`
Address *DomainAddress `xml:"address"`
}
type DomainIDMap ¶
type DomainIDMap struct {
UIDs []DomainIDMapRange `xml:"uid"`
GIDs []DomainIDMapRange `xml:"gid"`
}
type DomainIDMapRange ¶
type DomainIOThread ¶
type DomainIOThread struct {
ID uint `xml:"id,attr"`
}
type DomainIOThreadIDs ¶
type DomainIOThreadIDs struct {
IOThreads []DomainIOThread `xml:"iothread"`
}
type DomainInput ¶
type DomainInput struct {
XMLName xml.Name `xml:"input"`
Type string `xml:"type,attr"`
Bus string `xml:"bus,attr"`
Address *DomainAddress `xml:"address"`
}
func (*DomainInput) Marshal ¶
func (d *DomainInput) Marshal() (string, error)
func (*DomainInput) Unmarshal ¶
func (d *DomainInput) Unmarshal(doc string) error
type DomainInterface ¶
type DomainInterface struct {
XMLName xml.Name `xml:"interface"`
Type string `xml:"type,attr"`
MAC *DomainInterfaceMAC `xml:"mac"`
Model *DomainInterfaceModel `xml:"model"`
Source *DomainInterfaceSource `xml:"source"`
Target *DomainInterfaceTarget `xml:"target"`
Alias *DomainInterfaceAlias `xml:"alias"`
Link *DomainInterfaceLink `xml:"link"`
Boot *DomainDeviceBoot `xml:"boot"`
Script *DomainInterfaceScript `xml:"script"`
Driver *DomainInterfaceDriver `xml:"driver"`
Virtualport *DomainInterfaceVirtualport `xml:"virtualport"`
Bandwidth *DomainInterfaceBandwidth `xml:"bandwidth"`
Address *DomainAddress `xml:"address"`
}
func (*DomainInterface) Marshal ¶
func (d *DomainInterface) Marshal() (string, error)
func (*DomainInterface) Unmarshal ¶
func (d *DomainInterface) Unmarshal(doc string) error
type DomainInterfaceAlias ¶
type DomainInterfaceAlias struct {
Name string `xml:"name,attr"`
}
type DomainInterfaceBandwidth ¶
type DomainInterfaceBandwidth struct {
Inbound *DomainInterfaceBandwidthParams `xml:"inbound"`
Outbound *DomainInterfaceBandwidthParams `xml:"outbound"`
}
type DomainInterfaceDriver ¶
type DomainInterfaceDriver struct {
Name string `xml:"name,attr,omitempty"`
Queues uint `xml:"queues,attr,omitempty"`
RxQueueSize string `xml:"rx_queue_size,attr,omitempty"`
Host *DomainInterfaceDriverHost `xml:"host"`
}
type DomainInterfaceDriverHost ¶
type DomainInterfaceDriverHost struct {
MrgRxbuf string `xml:"mrg_rxbuf,attr"`
}
type DomainInterfaceLink ¶
type DomainInterfaceLink struct {
State string `xml:"state,attr"`
}
type DomainInterfaceMAC ¶
type DomainInterfaceMAC struct {
Address string `xml:"address,attr"`
}
type DomainInterfaceModel ¶
type DomainInterfaceModel struct {
Type string `xml:"type,attr"`
}
type DomainInterfaceScript ¶
type DomainInterfaceScript struct {
Path string `xml:"path,attr"`
}
type DomainInterfaceSource ¶
type DomainInterfaceSource struct {
Bridge string `xml:"bridge,attr,omitempty"`
Dev string `xml:"dev,attr,omitempty"`
Network string `xml:"network,attr,omitempty"`
Address string `xml:"address,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Path string `xml:"path,attr,omitempty"`
Mode string `xml:"mode,attr,omitempty"`
Port uint `xml:"port,attr,omitempty"`
Service string `xml:"service,attr,omitempty"`
Host string `xml:"host,attr,omitempty"`
Local *DomainInterfaceSourceLocal `xml:"local"`
}
type DomainInterfaceTarget ¶
type DomainInterfaceTarget struct {
Dev string `xml:"dev,attr"`
}
type DomainInterfaceVirtualport ¶
type DomainInterfaceVirtualport struct {
Type string `xml:"type,attr"`
}
type DomainKeyWrap ¶
type DomainKeyWrap struct {
Ciphers []DomainKeyWrapCipher `xml:"cipher"`
}
type DomainKeyWrapCipher ¶
type DomainLoader ¶
type DomainMaxMemory ¶
type DomainMemBalloon ¶
type DomainMemBalloon struct {
XMLName xml.Name `xml:"memballoon"`
Model string `xml:"model,attr"`
AutoDeflate string `xml:"autodeflate,attr,omitempty"`
Stats *DomainMemBalloonStats `xml:"stats"`
Address *DomainAddress `xml:"address"`
}
func (*DomainMemBalloon) Marshal ¶
func (d *DomainMemBalloon) Marshal() (string, error)
func (*DomainMemBalloon) Unmarshal ¶
func (d *DomainMemBalloon) Unmarshal(doc string) error
type DomainMemBalloonStats ¶
type DomainMemBalloonStats struct {
Period uint `xml:"period,attr"`
}
type DomainMemory ¶
type DomainMemoryAccess ¶
type DomainMemoryAccess struct {
Mode string `xml:"mode,attr,omitempty"`
}
type DomainMemoryAllocation ¶
type DomainMemoryAllocation struct {
Mode string `xml:"mode,attr,omitempty"`
}
type DomainMemoryBacking ¶
type DomainMemoryBacking struct {
MemoryHugePages *DomainMemoryHugepages `xml:"hugepages"`
MemoryLocked *DomainMemoryLocked `xml:"locked"`
MemorySource *DomainMemorySource `xml:"source"`
MemoryAccess *DomainMemoryAccess `xml:"access"`
MemoryAllocation *DomainMemoryAllocation `xml:"allocation"`
}
type DomainMemoryHugepage ¶
type DomainMemoryHugepages ¶
type DomainMemoryHugepages struct {
Hugepages []DomainMemoryHugepage `xml:"page"`
}
type DomainMemoryLocked ¶
type DomainMemoryLocked struct {
}
type DomainMemoryNosharepages ¶
type DomainMemoryNosharepages struct {
}
type DomainMemorySource ¶
type DomainMemorySource struct {
Type string `xml:"type,attr,omitempty"`
}
type DomainMemoryTune ¶
type DomainMemoryTune struct {
HardLimit *DomainMemoryTuneLimit `xml:"hard_limit"`
SoftLimit *DomainMemoryTuneLimit `xml:"soft_limit"`
MinGuarantee *DomainMemoryTuneLimit `xml:"min_guarantee"`
SwapHardLimit *DomainMemoryTuneLimit `xml:"swap_hard_limit"`
}
type DomainMemoryTuneLimit ¶
type DomainMemorydev ¶
type DomainMemorydev struct {
XMLName xml.Name `xml:"memory"`
Model string `xml:"model,attr"`
Access string `xml:"access,attr"`
Target *DomainMemorydevTarget `xml:"target"`
Address *DomainAddress `xml:"address"`
}
func (*DomainMemorydev) Marshal ¶
func (d *DomainMemorydev) Marshal() (string, error)
func (*DomainMemorydev) Unmarshal ¶
func (d *DomainMemorydev) Unmarshal(doc string) error
type DomainMemorydevTarget ¶
type DomainMemorydevTarget struct {
Size *DomainMemory `xml:"size"`
Node *DomainMemorydevTargetNode `xml:"node"`
}
type DomainMemorydevTargetNode ¶
type DomainMemorydevTargetNode struct {
Value uint `xml:",chardata"`
}
type DomainNUMATune ¶
type DomainNUMATune struct {
Memory *DomainNUMATuneMemory `xml:"memory"`
MemNodes []DomainNUMATuneMemNode `xml:"memnode"`
}
type DomainNUMATuneMemNode ¶
type DomainNUMATuneMemory ¶
type DomainNVRam ¶
type DomainNuma ¶
type DomainNuma struct {
Cell []DomainCell `xml:"cell"`
}
type DomainOS ¶
type DomainOS struct {
Type *DomainOSType `xml:"type"`
Init string `xml:"init,omitempty"`
InitArgs []string `xml:"initarg"`
Loader *DomainLoader `xml:"loader"`
NVRam *DomainNVRam `xml:"nvram"`
Kernel string `xml:"kernel,omitempty"`
Initrd string `xml:"initrd,omitempty"`
Cmdline string `xml:"cmdline,omitempty"`
DTB string `xml:"dtb,omitempty"`
ACPI *DomainACPI `xml:"acpi"`
BootDevices []DomainBootDevice `xml:"boot"`
BootMenu *DomainBootMenu `xml:"bootmenu"`
BIOS *DomainBIOS `xml:"bios"`
SMBios *DomainSMBios `xml:"smbios"`
}
type DomainOSType ¶
type DomainPM ¶
type DomainPM struct {
SuspendToMem *DomainPMPolicy `xml:"suspend-to-mem"`
SuspendToDisk *DomainPMPolicy `xml:"suspend-to-disk"`
}
type DomainPMPolicy ¶
type DomainPMPolicy struct {
Enabled string `xml:"enabled,attr"`
}
type DomainPanic ¶
type DomainPanic struct {
XMLName xml.Name `xml:"panic"`
Model string `xml:"model,attr"`
Address *DomainAddress `xml:"address"`
}
type DomainQEMUCommandline ¶
type DomainQEMUCommandline struct {
XMLName xml.Name `xml:"http://libvirt.org/schemas/domain/qemu/1.0 commandline"`
Args []DomainQEMUCommandlineArg `xml:"arg"`
Envs []DomainQEMUCommandlineEnv `xml:"env"`
}
type DomainQEMUCommandlineArg ¶
type DomainQEMUCommandlineArg struct {
Value string `xml:"value,attr"`
}
type DomainRNG ¶
type DomainRNG struct {
XMLName xml.Name `xml:"rng"`
Model string `xml:"model,attr"`
Rate *DomainRNGRate `xml:"rate"`
Backend *DomainRNGBackend `xml:"backend"`
Address *DomainAddress `xml:"address"`
}
type DomainRNGBackend ¶
type DomainRNGBackend struct {
Device string `xml:",chardata"`
Model string `xml:"model,attr"`
Type string `xml:"type,attr,omitempty"`
Sources []DomainInterfaceSource `xml:"source"`
Protocol *DomainRNGProtocol `xml:"protocol"`
}
type DomainRNGProtocol ¶
type DomainRNGProtocol struct {
Type string `xml:"type,attr"`
}
type DomainRNGRate ¶
type DomainResource ¶
type DomainResource struct {
Partition string `xml:"partition,omitempty"`
}
type DomainSMBios ¶
type DomainSMBios struct {
Mode string `xml:"mode,attr"`
}
type DomainSecLabel ¶
type DomainSerial ¶
type DomainSerial struct {
XMLName xml.Name `xml:"serial"`
Type string `xml:"type,attr"`
Source *DomainChardevSource `xml:"source"`
Protocol *DomainSerialProtocol `xml:"protocol"`
Target *DomainSerialTarget `xml:"target"`
Log *DomainChardevLog `xml:"log"`
Alias *DomainAlias `xml:"alias"`
Address *DomainAddress `xml:"address"`
}
func (*DomainSerial) Marshal ¶
func (d *DomainSerial) Marshal() (string, error)
func (*DomainSerial) Unmarshal ¶
func (d *DomainSerial) Unmarshal(doc string) error
type DomainSerialProtocol ¶
type DomainSerialProtocol struct {
Type string `xml:"type,attr"`
}
type DomainSerialTarget ¶
type DomainSnapshot ¶
type DomainSnapshot struct {
XMLName xml.Name `xml:"domainsnapshot"`
Name string `xml:"name,omitempty"`
Description string `xml:"description,omitempty"`
State string `xml:"state,omitempty"`
CreationTime string `xml:"creationTime,omitempty"`
Parent *DomainSnapshotParent `xml:"parent"`
Memory *DomainSnapshotMemory `xml:"memory"`
Disks *DomainSnapshotDisks `xml:"disks"`
Domain *Domain `xml:"domain"`
}
func (*DomainSnapshot) Marshal ¶
func (s *DomainSnapshot) Marshal() (string, error)
func (*DomainSnapshot) Unmarshal ¶
func (s *DomainSnapshot) Unmarshal(doc string) error
type DomainSnapshotDisk ¶
type DomainSnapshotDisk struct {
Name string `xml:"name,attr"`
Snapshot string `xml:"snapshot,attr,omitempty"`
Driver *DomainSnapshotDiskDriver `xml:"driver"`
Source *DomainSnapshotDiskSource `xml:"source"`
}
type DomainSnapshotDiskDriver ¶
type DomainSnapshotDiskDriver struct {
Type string `xml:"type,attr"`
}
type DomainSnapshotDiskSource ¶
type DomainSnapshotDiskSource struct {
File string `xml:"file,attr"`
}
type DomainSnapshotDisks ¶
type DomainSnapshotDisks struct {
Disks []DomainSnapshotDisk `xml:"disk"`
}
type DomainSnapshotMemory ¶
type DomainSnapshotMemory struct {
Snapshot string `xml:"snapshot,attr"`
}
type DomainSnapshotParent ¶
type DomainSnapshotParent struct {
Name string `xml:"name"`
}
type DomainSound ¶
type DomainSound struct {
XMLName xml.Name `xml:"sound"`
Model string `xml:"model,attr"`
Codec *DomainSoundCodec `xml:"codec"`
Address *DomainAddress `xml:"address"`
}
func (*DomainSound) Marshal ¶
func (d *DomainSound) Marshal() (string, error)
func (*DomainSound) Unmarshal ¶
func (d *DomainSound) Unmarshal(doc string) error
type DomainSoundCodec ¶
type DomainSoundCodec struct {
Type string `xml:"type,attr"`
}
type DomainSysInfo ¶
type DomainSysInfo struct {
Type string `xml:"type,attr"`
System []DomainSysInfoEntry `xml:"system>entry"`
BIOS []DomainSysInfoEntry `xml:"bios>entry"`
BaseBoard []DomainSysInfoEntry `xml:"baseBoard>entry"`
}
type DomainSysInfoEntry ¶
type DomainTimer ¶
type DomainTimer struct {
Name string `xml:"name,attr"`
Track string `xml:"track,attr,omitempty"`
TickPolicy string `xml:"tickpolicy,attr,omitempty"`
CatchUp *DomainTimerCatchUp `xml:"catchup,omitempty"`
Frequency uint32 `xml:"frequency,attr,omitempty"`
Mode string `xml:"mode,attr,omitempty"`
Present string `xml:"present,attr,omitempty"`
}
type DomainTimerCatchUp ¶
type DomainVCPU ¶
type DomainVCPUs ¶
type DomainVCPUs struct {
VCPU []DomainVCPUsVCPU `xml:"vcpu"`
}
type DomainVCPUsVCPU ¶
type DomainVideo ¶
type DomainVideo struct {
XMLName xml.Name `xml:"video"`
Model DomainVideoModel `xml:"model"`
Address *DomainAddress `xml:"address"`
}
func (*DomainVideo) Marshal ¶
func (d *DomainVideo) Marshal() (string, error)
func (*DomainVideo) Unmarshal ¶
func (d *DomainVideo) Unmarshal(doc string) error
type DomainVideoAccel ¶
type DomainVideoAccel struct {
Accel3D string `xml:"accel3d,attr,omitempty"`
}
type DomainVideoModel ¶
type DomainVideoModel struct {
Type string `xml:"type,attr"`
Heads uint `xml:"heads,attr,omitempty"`
Ram uint `xml:"ram,attr,omitempty"`
VRam uint `xml:"vram,attr,omitempty"`
VRam64 uint `xml:"vram64,attr,omitempty"`
VGAMem uint `xml:"vgamem,attr,omitempty"`
Primary string `xml:"primary,attr,omitempty"`
Accel *DomainVideoAccel `xml:"acceleration"`
}
type DomainWatchdog ¶
type DomainWatchdog struct {
XMLName xml.Name `xml:"watchdog"`
Model string `xml:"model,attr"`
Action string `xml:"action,attr,omitempty"`
Address *DomainAddress `xml:"address"`
}
func (*DomainWatchdog) Marshal ¶
func (d *DomainWatchdog) Marshal() (string, error)
func (*DomainWatchdog) Unmarshal ¶
func (d *DomainWatchdog) Unmarshal(doc string) error
type Network ¶
type Network struct {
XMLName xml.Name `xml:"network"`
IPv6 string `xml:"ipv6,attr,omitempty"`
TrustGuestRxFilters string `xml:"trustGuestRxFilters,attr,omitempty"`
Name string `xml:"name,omitempty"`
UUID string `xml:"uuid,omitempty"`
MAC *NetworkMAC `xml:"mac"`
Bridge *NetworkBridge `xml:"bridge"`
VirtualPort *VirtualPort `xml:"virtualport"`
Forward *NetworkForward `xml:"forward"`
Domain *NetworkDomain `xml:"domain"`
IPs []NetworkIP `xml:"ip"`
Routes []NetworkRoute `xml:"route"`
DNS *NetworkDNS `xml:"dns"`
}
type NetworkBootp ¶
type NetworkBridge ¶
type NetworkDHCP ¶
type NetworkDHCP struct {
Ranges []NetworkDHCPRange `xml:"range"`
Hosts []NetworkDHCPHost `xml:"host"`
Bootp []NetworkBootp `xml:"bootp"`
}
type NetworkDHCPHost ¶
type NetworkDHCPRange ¶
type NetworkDNS ¶
type NetworkDNS struct {
Enable string `xml:"enable,attr,omitempty"`
ForwardPlainNames string `xml:"forwardPlainNames,attr,omitempty"`
Forwarders []NetworkDNSForwarder `xml:"forwarder"`
TXTs []NetworkDNSTXT `xml:"txt"`
Host *NetworkDNSHost `xml:"host"`
SRVs []NetworkDNSSRV `xml:"srv"`
}
type NetworkDNSForwarder ¶
type NetworkDNSHost ¶
type NetworkDNSHost struct {
IP string `xml:"ip,attr"`
Hostnames []NetworkDNSHostHostname `xml:"hostname"`
}
type NetworkDNSHostHostname ¶
type NetworkDNSHostHostname struct {
Hostname string `xml:",chardata"`
}
type NetworkDNSSRV ¶
type NetworkDNSSRV struct {
Service string `xml:"service,attr"`
Protocol string `xml:"protocol,attr"`
Target string `xml:"target,attr,omitempty"`
Port uint `xml:"port,attr,omitempty"`
Priority uint `xml:"priority,attr,omitempty"`
Weight uint `xml:"weight,attr,omitempty"`
Domain string `xml:"domain,attr,omitempty"`
}
type NetworkDNSTXT ¶
type NetworkDomain ¶
type NetworkForward ¶
type NetworkForward struct {
Mode string `xml:"mode,attr,omitempty"`
Dev string `xml:"dev,attr,omitempty"`
NAT *NetworkForwardNAT `xml:"nat"`
}
type NetworkForwardNAT ¶
type NetworkForwardNAT struct {
Addresses []NetworkForwardNATAddress `xml:"address"`
Ports []NetworkForwardNATPort `xml:"port"`
}
type NetworkForwardNATPort ¶
type NetworkMAC ¶
type NetworkMAC struct {
Address string `xml:"address,attr,omitempty"`
}
type NetworkRoute ¶
type NodeDevice ¶
type NodeDevice struct {
XMLName xml.Name `xml:"device"`
Name string `xml:"name"`
Path string `xml:"path,omitempty"`
Parent string `xml:"parent,omitempty"`
Driver string `xml:"driver>name,omitempty"`
Capability NodeDeviceCapability `xml:"capability"`
}
func (*NodeDevice) Marshal ¶
func (c *NodeDevice) Marshal() (string, error)
func (*NodeDevice) Unmarshal ¶
func (c *NodeDevice) Unmarshal(doc string) error
type NodeDeviceCapability ¶
type NodeDeviceCapability struct {
System *NodeDeviceSystemCapability
PCI *NodeDevicePCICapability
USB *NodeDeviceUSBCapability
USBDevice *NodeDeviceUSBDeviceCapability
Net *NodeDeviceNetCapability
SCSIHost *NodeDeviceSCSIHostCapability
SCSI *NodeDeviceSCSICapability
Storage *NodeDeviceStorageCapability
DRM *NodeDeviceDRMCapability
}
func (*NodeDeviceCapability) MarshalXML ¶
func (c *NodeDeviceCapability) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*NodeDeviceCapability) UnmarshalXML ¶
func (c *NodeDeviceCapability) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type NodeDeviceDRMCapability ¶
type NodeDeviceDRMCapability struct {
Type string `xml:"type"`
}
type NodeDeviceIDName ¶
type NodeDeviceIOMMUGroup ¶
type NodeDeviceIOMMUGroup struct {
Number int `xml:"number,attr"`
}
type NodeDeviceNUMA ¶
type NodeDeviceNUMA struct {
Node int `xml:"node,attr"`
}
type NodeDeviceNetCapability ¶
type NodeDeviceNetCapability struct {
Interface string `xml:"interface"`
Address string `xml:"address"`
Link *NodeDeviceNetLink `xml:"link"`
Features []NodeDeviceNetOffloadFeatures `xml:"feature,omitempty"`
Capability *NodeDeviceNetSubCapability `xml:"capability"`
}
type NodeDeviceNetLink ¶
type NodeDeviceNetOffloadFeatures ¶
type NodeDeviceNetOffloadFeatures struct {
Name string `xml:"number"`
}
type NodeDeviceNetSubCapability ¶
type NodeDeviceNetSubCapability struct {
Type string `xml:"type,attr"`
}
type NodeDevicePCIAddress ¶
type NodeDevicePCICapability ¶
type NodeDevicePCICapability struct {
Domain int `xml:"domain,omitempty"`
Bus int `xml:"bus,omitempty"`
Slot int `xml:"slot,omitempty"`
Function int `xml:"function,omitempty"`
Product NodeDeviceIDName `xml:"product,omitempty"`
Vendor NodeDeviceIDName `xml:"vendor,omitempty"`
IOMMUGroup *NodeDeviceIOMMUGroup `xml:"iommuGroup"`
NUMA *NodeDeviceNUMA `xml:"numa"`
PCIExpress *NodeDevicePCIExpress `xml:"pci-express"`
Capabilities []NodeDevicePCISubCapability `xml:"capability,omitempty"`
}
type NodeDevicePCIExpress ¶
type NodeDevicePCIExpress struct {
Links []NodeDevicePCIExpressLink `xml:"link"`
}
type NodeDevicePCISubCapability ¶
type NodeDevicePCISubCapability struct {
Type string `xml:"type,attr"`
Address []NodeDevicePCIAddress `xml:"address,omitempty"`
MaxCount int `xml:"maxCount,attr,omitempty"`
}
type NodeDeviceSCSIFCHost ¶
type NodeDeviceSCSIHostCapability ¶
type NodeDeviceSCSIHostCapability struct {
Host int `xml:"host"`
UniqueID int `xml:"unique_id"`
Capability *NodeDeviceSCSIHostSubCapability `xml:"capability"`
}
type NodeDeviceSCSIHostSubCapability ¶
type NodeDeviceSCSIHostSubCapability struct {
VportsOPS *NodeDeviceSCSIVportsOPS `xml:"vports_ops"`
FCHost *NodeDeviceSCSIFCHost `xml:"fc_host"`
}
type NodeDeviceSCSIVportsOPS ¶
type NodeDeviceStorageCapability ¶
type NodeDeviceStorageCapability struct {
Block string `xml:"block"`
Bus string `xml:"bus"`
DriverType string `xml:"drive_type"`
Model string `xml:"model"`
Vendor string `xml:"vendor"`
Serial string `xml:"serial"`
Size int `xml:"size"`
Capatibility *NodeDeviceStorageSubCapability `xml:"capability,omitempty"`
}
type NodeDeviceSystemCapability ¶
type NodeDeviceSystemCapability struct {
Product string `xml:"product"`
Hardware *NodeDeviceSystemHardware `xml:"hardware"`
Firmware *NodeDeviceSystemFirmware `xml:"firmware"`
}
type NodeDeviceUSBCapability ¶
type NodeDeviceUSBDeviceCapability ¶
type NodeDeviceUSBDeviceCapability struct {
Bus int `xml:"bus"`
Device int `xml:"device"`
Product NodeDeviceIDName `xml:"product,omitempty"`
Vendor NodeDeviceIDName `xml:"vendor,omitempty"`
}
type Secret ¶
type SecretUsage ¶
type StorageEncryption ¶
type StorageEncryption struct {
Format string `xml:"format,attr"`
Secret *StorageEncryptionSecret `xml:"secret"`
Cipher *StorageEncryptionCipher `xml:"cipher"`
Ivgen *StorageEncryptionIvgen `xml:"ivgen"`
}
type StorageEncryptionCipher ¶
type StorageEncryptionIvgen ¶
type StorageEncryptionSecret ¶
type StoragePool ¶
type StoragePool struct {
XMLName xml.Name `xml:"pool"`
Type string `xml:"type,attr"`
Name string `xml:"name"`
UUID string `xml:"uuid,omitempty"`
Allocation *StoragePoolSize `xml:"allocation,omitempty"`
Capacity *StoragePoolSize `xml:"capacity,omitempty"`
Available *StoragePoolSize `xml:"available,omitempty"`
Target *StoragePoolTarget `xml:"target"`
Source *StoragePoolSource `xml:"source"`
}
func (*StoragePool) Marshal ¶
func (s *StoragePool) Marshal() (string, error)
func (*StoragePool) Unmarshal ¶
func (s *StoragePool) Unmarshal(doc string) error
type StoragePoolSize ¶
type StoragePoolSource ¶
type StoragePoolSource struct {
Host *StoragePoolSourceHost `xml:"host"`
Device *StoragePoolSourceDevice `xml:"device"`
Auth *StoragePoolSourceAuth `xml:"auth"`
Vendor *StoragePoolSourceVendor `xml:"vendor"`
Product *StoragePoolSourceProduct `xml:"product"`
Format *StoragePoolSourceFormat `xml:"format"`
Adapter *StoragePoolSourceAdapter `xml:"adapter"`
}
type StoragePoolSourceAdapter ¶
type StoragePoolSourceAdapter struct {
Type string `xml:"type,attr"`
Name string `xml:"name,attr,omitempty"`
Parent string `xml:"parent,attr,omitempty"`
WWNN string `xml:"wwnn,attr,omitempty"`
WWPN string `xml:"wwpn,attr,omitempty"`
ParentAddr *StoragePoolSourceAdapterParentAddr `xml:"parentaddr"`
}
type StoragePoolSourceAdapterParentAddr ¶
type StoragePoolSourceAdapterParentAddr struct {
UniqueID uint64 `xml:"unique_id,attr"`
Address *StoragePoolSourceAdapterParentAddrAddress `xml:"address"`
}
type StoragePoolSourceAuth ¶
type StoragePoolSourceAuth struct {
Type string `xml:"type,attr"`
Username string `xml:"username,attr"`
Secret *StoragePoolSourceAuthSecret `xml:"secret"`
}
type StoragePoolSourceAuthSecret ¶
type StoragePoolSourceAuthSecret struct {
Usage string `xml:"usage,attr"`
}
type StoragePoolSourceDevice ¶
type StoragePoolSourceFormat ¶
type StoragePoolSourceFormat struct {
Type string `xml:"type,attr"`
}
type StoragePoolSourceHost ¶
type StoragePoolSourceHost struct {
Name string `xml:"name,attr"`
}
type StoragePoolSourceProduct ¶
type StoragePoolSourceProduct struct {
Name string `xml:"name,attr"`
}
type StoragePoolSourceVendor ¶
type StoragePoolSourceVendor struct {
Name string `xml:"name,attr"`
}
type StoragePoolTarget ¶
type StoragePoolTarget struct {
Path string `xml:"path,omitempty"`
Permissions *StoragePoolTargetPermissions `xml:"permissions"`
Timestamps *StoragePoolTargetTimestamps `xml:"timestamps"`
Encryption *StorageEncryption `xml:"encryption"`
}
type StorageVolume ¶
type StorageVolume struct {
XMLName xml.Name `xml:"volume"`
Type string `xml:"type,attr,omitempty"`
Name string `xml:"name"`
Key string `xml:"key,omitempty"`
Allocation *StorageVolumeSize `xml:"allocation"`
Capacity *StorageVolumeSize `xml:"capacity"`
Physical *StorageVolumeSize `xml:"physical"`
Target *StorageVolumeTarget `xml:"target"`
BackingStore *StorageVolumeBackingStore `xml:"backingStore"`
}
func (*StorageVolume) Marshal ¶
func (s *StorageVolume) Marshal() (string, error)
func (*StorageVolume) Unmarshal ¶
func (s *StorageVolume) Unmarshal(doc string) error
type StorageVolumeBackingStore ¶
type StorageVolumeBackingStore struct {
Path string `xml:"path"`
Format *StorageVolumeTargetFormat `xml:"format"`
Permissions *StorageVolumeTargetPermissions `xml:"permissions"`
}
type StorageVolumeSize ¶
type StorageVolumeTarget ¶
type StorageVolumeTarget struct {
Path string `xml:"path,omitempty"`
Format *StorageVolumeTargetFormat `xml:"format"`
Permissions *StorageVolumeTargetPermissions `xml:"permissions"`
Timestamps *StorageVolumeTargetTimestamps `xml:"timestamps"`
Compat string `xml:"compat,omitempty"`
NoCOW *struct{} `xml:"nocow"`
Features []StorageVolumeTargetFeature `xml:"features"`
Encryption *StorageEncryption `xml:"encryption"`
}
type StorageVolumeTargetFeature ¶
type StorageVolumeTargetFeature struct {
LazyRefcounts *struct{} `xml:"lazy_refcounts"`
}
type StorageVolumeTargetFormat ¶
type StorageVolumeTargetFormat struct {
Type string `xml:"type,attr"`
}
type VirtualPort ¶
type VirtualPort struct {
Type string `xml:"type,attr,omitempty"`
Parameters []VirtualPortParameters `xml:"parameters,omitempty"`
}