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 DomainAddress
- type DomainAlias
- type DomainBIOS
- type DomainBootDevice
- type DomainBootMenu
- type DomainCPU
- type DomainCPUFeature
- type DomainCPUModel
- type DomainCPUTopology
- type DomainChannel
- type DomainChannelTarget
- type DomainChardevSource
- type DomainChardevTarget
- 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 DomainInput
- type DomainInterface
- type DomainInterfaceAlias
- type DomainInterfaceDriver
- type DomainInterfaceLink
- type DomainInterfaceMAC
- type DomainInterfaceModel
- type DomainInterfaceScript
- type DomainInterfaceSource
- type DomainInterfaceTarget
- type DomainInterfaceVirtualport
- type DomainLoader
- type DomainMaxMemory
- type DomainMemBalloon
- type DomainMemory
- type DomainNVRam
- type DomainOS
- type DomainOSType
- type DomainResource
- type DomainSMBios
- type DomainSerial
- 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 DomainVCPU
- type DomainVideo
- type DomainVideoModel
- type Network
- type NetworkBridge
- type NetworkDHCP
- type NetworkDHCPHost
- type NetworkDHCPRange
- type NetworkDomain
- type NetworkForward
- type NetworkIP
- type NetworkMAC
- type NetworkRoute
- 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
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"` Name string `xml:"name"` UUID string `xml:"uuid,omitempty"` Memory *DomainMemory `xml:"memory"` CurrentMemory *DomainMemory `xml:"currentMemory"` MaximumMemory *DomainMaxMemory `xml:"maxMemory"` VCPU *DomainVCPU `xml:"vcpu"` Resource *DomainResource `xml:"resource"` SysInfo *DomainSysInfo `xml:"sysinfo"` OS *DomainOS `xml:"os"` Features *DomainFeatureList `xml:"features"` CPU *DomainCPU `xml:"cpu"` OnPoweroff string `xml:"on_poweroff,omitempty"` OnReboot string `xml:"on_reboot,omitempty"` OnCrash string `xml:"on_crash,omitempty"` Devices *DomainDeviceList `xml:"devices"` }
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 DomainAddress ¶
type DomainAddress struct { Type string `xml:"type,attr"` Controller *uint `xml:"controller,attr"` Domain *uint `xml:"domain,attr"` Bus *uint `xml:"bus,attr"` Port *uint `xml:"port,attr"` Slot *uint `xml:"slot,attr"` Function *uint `xml:"function,attr"` Target *uint `xml:"target,attr"` Unit *uint `xml:"unit,attr"` }
type DomainAlias ¶
type DomainAlias struct {
Name string `xml:"name,attr"`
}
type DomainBIOS ¶
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"` Model *DomainCPUModel `xml:"model"` Vendor string `xml:"vendor,omitempty"` Topology *DomainCPUTopology `xml:"topology"` Features []DomainCPUFeature `xml:"feature"` }
type DomainCPUFeature ¶
type DomainCPUModel ¶
type DomainCPUTopology ¶
type DomainChannel ¶
type DomainChannel struct { XMLName xml.Name `xml:"channel"` Type string `xml:"type,attr"` Source *DomainChardevSource `xml:"source"` Target *DomainChannelTarget `xml:"target"` 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 DomainChardevSource ¶
type DomainChardevTarget ¶
type DomainConsole ¶
type DomainConsole struct { XMLName xml.Name `xml:"console"` Type string `xml:"type,attr"` Source *DomainChardevSource `xml:"source"` Target *DomainConsoleTarget `xml:"target"` 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"` Sounds []DomainSound `xml:"sound"` }
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"` }
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 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 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"` 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 DomainInterfaceDriver ¶
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"` }
type DomainInterfaceTarget ¶
type DomainInterfaceTarget struct {
Dev string `xml:"dev,attr"`
}
type DomainInterfaceVirtualport ¶
type DomainInterfaceVirtualport struct {
Type string `xml:"type,attr"`
}
type DomainLoader ¶
type DomainMaxMemory ¶
type DomainMemBalloon ¶
type DomainMemBalloon struct { XMLName xml.Name `xml:"memballoon"` Model string `xml:"model,attr"` Address *DomainAddress `xml:"address"` }
func (*DomainMemBalloon) Marshal ¶
func (d *DomainMemBalloon) Marshal() (string, error)
func (*DomainMemBalloon) Unmarshal ¶
func (d *DomainMemBalloon) Unmarshal(doc string) error
type DomainMemory ¶
type DomainNVRam ¶
type DomainOS ¶
type DomainOS struct { Type *DomainOSType `xml:"type"` Loader *DomainLoader `xml:"loader"` NVRam *DomainNVRam `xml:"nvram"` Kernel string `xml:"kernel,omitempty"` Initrd string `xml:"initrd,omitempty"` KernelArgs string `xml:"cmdline,omitempty"` BootDevices []DomainBootDevice `xml:"boot"` BootMenu *DomainBootMenu `xml:"bootmenu"` SMBios *DomainSMBios `xml:"smbios"` BIOS *DomainBIOS `xml:"bios"` Init string `xml:"init,omitempty"` InitArgs []string `xml:"initarg"` }
type DomainOSType ¶
type DomainResource ¶
type DomainResource struct {
Partition string `xml:"partition,omitempty"`
}
type DomainSMBios ¶
type DomainSMBios struct {
Mode string `xml:"mode,attr"`
}
type DomainSerial ¶
type DomainSerial struct { XMLName xml.Name `xml:"serial"` Type string `xml:"type,attr"` Source *DomainChardevSource `xml:"source"` Target *DomainSerialTarget `xml:"target"` 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 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 DomainVCPU ¶
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 DomainVideoModel ¶
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"` Forward *NetworkForward `xml:"forward"` Domain *NetworkDomain `xml:"domain"` IPs []NetworkIP `xml:"ip"` Routes []NetworkRoute `xml:"route"` }
type NetworkBridge ¶
type NetworkDHCP ¶
type NetworkDHCP struct { Ranges []NetworkDHCPRange `xml:"range"` Hosts []NetworkDHCPHost `xml:"host"` }
type NetworkDHCPHost ¶
type NetworkDHCPRange ¶
type NetworkDomain ¶
type NetworkForward ¶
type NetworkMAC ¶
type NetworkMAC struct {
Address string `xml:"address,attr,omitempty"`
}
type NetworkRoute ¶
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"`
}