libvirtxml

package module
v0.0.0-...-079c708 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2018 License: MIT Imports: 4 Imported by: 0

README

libvirt-go-xml Build Status GoDoc

Go API for manipulating libvirt XML documents

This package provides a Go API that defines a set of structs, annotated for use with "encoding/xml", that can represent libvirt XML documents. There is no dependancy on the libvirt library itself, so this can be used regardless of the way in which the application talks to libvirt.

Documentation

Contributing

The libvirt project aims to add support for new APIs to libvirt-go as soon as they are added to the main libvirt C library. If you are submitting changes to the libvirt C library API, please submit a libvirt-go change at the same time.

Bug fixes and other improvements to the libvirt-go library are welcome at any time. The preferred submission method is to use git send-email to submit patches to the libvir-list@redhat.com mailing list. eg. to send a single patch

  # git send-email --to libvir-list@redhat.com --subject-prefix "PATCH go-xml" \
       --smtp-server=$HOSTNAME -1

Or to send all patches on the current branch, against master

  $ git send-email --to libvir-list@redhat.com --subject-prefix "PATCH go-xml" \
       --smtp-server=$HOSTNAME --no-chain-reply-to --cover-letter --annotate \
       master..

Note the master GIT repository is at

   http://libvirt.org/git/?p=libvirt-go.git;a=summary

The following automatic read-only mirrors are available as a convenience to allow contributors to "fork" the repository:

  https://gitlab.com/libvirt/libvirt-go
  https://github.com/libvirt/libvirt-go

While you can send pull-requests to these mirrors, they will be re-submitted via emai to the mailing list for review before being merged, unless they are trivial/obvious bug fixes.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caps

type Caps struct {
	XMLName xml.Name    `xml:"capabilities"`
	Host    CapsHost    `xml:"host"`
	Guests  []CapsGuest `xml:"guest"`
}

func (*Caps) Marshal

func (c *Caps) Marshal() (string, error)

func (*Caps) Unmarshal

func (c *Caps) Unmarshal(doc string) error

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 CapsGuestMachine struct {
	Name      string  `xml:",chardata"`
	MaxCPUs   int     `xml:"maxCpus,attr"`
	Canonical *string `xml:"canonical,attr"`
}

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 CapsHostCPUPageSize struct {
	Size int    `xml:"size,attr"`
	Unit string `xml:"unit,attr"`
}

type CapsHostCPUTopology

type CapsHostCPUTopology struct {
	Sockets int `xml:"sockets,attr"`
	Cores   int `xml:"cores,attr"`
	Threads int `xml:"threads,attr"`
}

type CapsHostNUMACPU

type CapsHostNUMACPU struct {
	ID       int    `xml:"id,attr"`
	SocketID int    `xml:"socket_id,attr"`
	CoreID   int    `xml:"core_id,attr"`
	Siblings string `xml:"siblings,attr"`
}

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 CapsHostNUMADistance struct {
	ID    int `xml:"id,attr"`
	Value int `xml:"value,attr"`
}

type CapsHostNUMAMemory

type CapsHostNUMAMemory struct {
	Size uint64 `xml:"size,attr"`
	Unit string `xml:"unit,attr"`
}

type CapsHostNUMAPageInfo

type CapsHostNUMAPageInfo struct {
	Size  int    `xml:"size,attr"`
	Unit  string `xml:"unit,attr"`
	Count uint64 `xml:",chardata"`
}

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 CapsHostSecModelLabel struct {
	Type  string `xml:"type,attr"`
	Value string `xml:",chardata"`
}

type Document

type Document interface {
	Unmarshal(doc string) error
	Marshal() (string, error)
}

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.

func (*Domain) Marshal

func (d *Domain) Marshal() (string, error)

func (*Domain) Unmarshal

func (d *Domain) Unmarshal(doc string) error

type DomainACPI

type DomainACPI struct {
	Tables []DomainACPITable `xml:"table"`
}

type DomainACPITable

type DomainACPITable struct {
	Type string `xml:"type,attr"`
	Path string `xml:",chardata"`
}

type DomainAddress

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

type DomainAddressDIMM struct {
	Slot *uint   `xml:"slot,attr"`
	Base *uint64 `xml:"base,attr"`
}

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

type DomainAddressISA struct {
	IOBase *uint `xml:"iobase,attr"`
	IRQ    *uint `xml:"irq,attr"`
}

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

type DomainAddressUSB struct {
	Bus  *uint  `xml:"bus,attr"`
	Port string `xml:"port,attr,omitempty"`
}

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 DomainBIOS struct {
	UseSerial     string `xml:"useserial,attr"`
	RebootTimeout string `xml:"rebootTimeout,attr"`
}

type DomainBlockIOTune

type DomainBlockIOTune struct {
	Weight uint                      `xml:"weight,omitempty"`
	Device []DomainBlockIOTuneDevice `xml:"device"`
}

type DomainBlockIOTuneDevice

type DomainBlockIOTuneDevice struct {
	Path          string `xml:"path"`
	Weight        uint   `xml:"weight,omitempty"`
	ReadIopsSec   uint   `xml:"read_iops_sec"`
	WriteIopsSec  uint   `xml:"write_iops_sec"`
	ReadBytesSec  uint   `xml:"read_bytes_sec"`
	WriteBytesSec uint   `xml:"write_bytes_sec"`
}

type DomainBootDevice

type DomainBootDevice struct {
	Dev string `xml:"dev,attr"`
}

type DomainBootMenu

type DomainBootMenu struct {
	Enable  string `xml:"enable,attr,omitempty"`
	Timeout string `xml:"timeout,attr,omitempty"`
}

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 DomainCPUFeature struct {
	Policy string `xml:"policy,attr,omitempty"`
	Name   string `xml:"name,attr,omitempty"`
}

type DomainCPUModel

type DomainCPUModel struct {
	Fallback string `xml:"fallback,attr,omitempty"`
	Value    string `xml:",chardata"`
}

type DomainCPUTopology

type DomainCPUTopology struct {
	Sockets int `xml:"sockets,attr,omitempty"`
	Cores   int `xml:"cores,attr,omitempty"`
	Threads int `xml:"threads,attr,omitempty"`
}

type DomainCPUTune

type DomainCPUTune struct {
	Shares         *DomainCPUTuneShares         `xml:"shares"`
	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 DomainCPUTuneIOThreadPin

type DomainCPUTuneIOThreadPin struct {
	IOThread uint   `xml:"iothread,attr"`
	CPUSet   string `xml:"cpuset,attr"`
}

type DomainCPUTuneIOThreadSched

type DomainCPUTuneIOThreadSched struct {
	IOThreads string `xml:"iothreads,attr"`
	Scheduler string `xml:"scheduler,attr,omitempty"`
	Priority  *int   `xml:"priority,attr"`
}

type DomainCPUTunePeriod

type DomainCPUTunePeriod struct {
	Value uint64 `xml:",chardata"`
}

type DomainCPUTuneQuota

type DomainCPUTuneQuota struct {
	Value int64 `xml:",chardata"`
}

type DomainCPUTuneShares

type DomainCPUTuneShares struct {
	Value uint `xml:",chardata"`
}

type DomainCPUTuneVCPUPin

type DomainCPUTuneVCPUPin struct {
	VCPU   uint   `xml:"vcpu,attr"`
	CPUSet string `xml:"cpuset,attr"`
}

type DomainCPUTuneVCPUSched

type DomainCPUTuneVCPUSched struct {
	VCPUs     string `xml:"vcpus,attr"`
	Scheduler string `xml:"scheduler,attr,omitempty"`
	Priority  *int   `xml:"priority,attr"`
}

type DomainCell

type DomainCell struct {
	ID        string `xml:"id,attr"`
	CPUs      string `xml:"cpus,attr"`
	Memory    string `xml:"memory,attr"`
	Unit      string `xml:"unit,attr"`
	MemAccess string `xml:"memAccess,attr"`
}

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 DomainChannelTarget struct {
	Type  string `xml:"type,attr,omitempty"`
	Name  string `xml:"name,attr,omitempty"`
	State string `xml:"state,attr,omitempty"` // is guest agent connected?
}

type DomainChardevLog

type DomainChardevLog struct {
	File   string `xml:"file,attr"`
	Append string `xml:"append,attr,omitempty"`
}

type DomainChardevSource

type DomainChardevSource struct {
	Mode    string `xml:"mode,attr,omitempty"`
	Path    string `xml:"path,attr,omitempty"`
	Append  string `xml:"append,attr,omitempty"`
	Host    string `xml:"host,attr,omitempty"`
	Service string `xml:"service,attr,omitempty"`
	TLS     string `xml:"tls,attr,omitempty"`
}

type DomainChardevTarget

type DomainChardevTarget struct {
	Type  string `xml:"type,attr,omitempty"`
	Name  string `xml:"name,attr,omitempty"`
	State string `xml:"state,attr,omitempty"` // is guest agent connected?
	Port  *uint  `xml:"port,attr"`
}

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 DomainConsoleTarget struct {
	Type string `xml:"type,attr,omitempty"`
	Port *uint  `xml:"port,attr"`
}

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"`
	Shareable *DomainDiskShareable `xml:"shareable"`
	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 DomainDiskSecret struct {
	Type  string `xml:"type,attr,omitempty"`
	Usage string `xml:"usage,attr,omitempty"`
	UUID  string `xml:"uuid,attr,omitempty"`
}

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 DomainDiskSourceHost struct {
	Transport string `xml:"transport,attr,omitempty"`
	Name      string `xml:"name,attr,omitempty"`
	Port      string `xml:"port,attr,omitempty"`
	Socket    string `xml:"socket,attr,omitempty"`
}

type DomainDiskTarget

type DomainDiskTarget struct {
	Dev string `xml:"dev,attr,omitempty"`
	Bus string `xml:"bus,attr,omitempty"`
}

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 DomainFilesystemDriver struct {
	Type     string `xml:"type,attr"`
	Name     string `xml:"name,attr,omitempty"`
	WRPolicy string `xml:"wrpolicy,attr,omitempty"`
}

type DomainFilesystemReadOnly

type DomainFilesystemReadOnly struct {
}

type DomainFilesystemSource

type DomainFilesystemSource struct {
	Dir  string `xml:"dir,attr,omitempty"`
	File string `xml:"file,attr,omitempty"`
}

type DomainFilesystemSpaceHardLimit

type DomainFilesystemSpaceHardLimit struct {
	Value uint   `xml:",chardata"`
	Unit  string `xml:"unit,attr,omitempty"`
}

type DomainFilesystemSpaceSoftLimit

type DomainFilesystemSpaceSoftLimit struct {
	Value uint   `xml:",chardata"`
	Unit  string `xml:"unit,attr,omitempty"`
}

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"`
	SharePolicy   string                  `xml:"sharePolicy,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 DomainGraphicListener struct {
	Type    string `xml:"type,attr"`
	Address string `xml:"address,attr,omitempty"`
	Network string `xml:"network,attr,omitempty"`
	Socket  string `xml:"socket,attr,omitempty"`
}

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 DomainIDMapRange struct {
	Start  uint `xml:"start,attr"`
	Target uint `xml:"target,attr"`
	Count  uint `xml:"count,attr"`
}

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 DomainInterfaceBandwidthParams

type DomainInterfaceBandwidthParams struct {
	Average *int `xml:"average,attr,omitempty"`
	Peak    *int `xml:"peak,attr,omitempty"`
	Burst   *int `xml:"burst,attr,omitempty"`
	Floor   *int `xml:"floor,attr,omitempty"`
}

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 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 DomainInterfaceSourceLocal

type DomainInterfaceSourceLocal struct {
	Address string `xml:"address,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 DomainKeyWrap

type DomainKeyWrap struct {
	Ciphers []DomainKeyWrapCipher `xml:"cipher"`
}

type DomainKeyWrapCipher

type DomainKeyWrapCipher struct {
	Name  string `xml:"name,attr"`
	State string `xml:"state,attr"`
}

type DomainLoader

type DomainLoader struct {
	Path     string `xml:",chardata"`
	Readonly string `xml:"readonly,attr,omitempty"`
	Secure   string `xml:"secure,attr,omitempty"`
	Type     string `xml:"type,attr,omitempty"`
}

type DomainMaxMemory

type DomainMaxMemory struct {
	Value uint   `xml:",chardata"`
	Unit  string `xml:"unit,attr,omitempty"`
	Slots uint   `xml:"slots,attr,omitempty"`
}

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 DomainMemory struct {
	Value uint   `xml:",chardata"`
	Unit  string `xml:"unit,attr,omitempty"`
}

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"`
	MemoryNosharepages *DomainMemoryNosharepages `xml:"nosharepages"`
	MemoryLocked       *DomainMemoryLocked       `xml:"locked"`
	MemorySource       *DomainMemorySource       `xml:"source"`
	MemoryAccess       *DomainMemoryAccess       `xml:"access"`
	MemoryAllocation   *DomainMemoryAllocation   `xml:"allocation"`
}

type DomainMemoryHugepage

type DomainMemoryHugepage struct {
	Size    uint   `xml:"size,attr"`
	Unit    string `xml:"unit,attr,omitempty"`
	Nodeset string `xml:"nodeset,attr,omitempty"`
}

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 DomainMemoryTuneLimit struct {
	Value uint64 `xml:",chardata"`
	Unit  string `xml:"unit,attr,omitempty"`
}

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 DomainNUMATuneMemNode struct {
	CellID  uint   `xml:"cellid,attr"`
	Mode    string `xml:"mode,attr"`
	Nodeset string `xml:"nodeset,attr"`
}

type DomainNUMATuneMemory

type DomainNUMATuneMemory struct {
	Mode      string `xml:"mode,attr"`
	Nodeset   string `xml:"nodeset,attr,omitempty"`
	Placement string `xml:"placement,attr,omitempty"`
}

type DomainNVRam

type DomainNVRam struct {
	NVRam    string `xml:",chardata"`
	Template string `xml:"template,attr,omitempty"`
}

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 DomainOSType struct {
	Arch    string `xml:"arch,attr,omitempty"`
	Machine string `xml:"machine,attr,omitempty"`
	Type    string `xml:",chardata"`
}

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 DomainQEMUCommandlineEnv

type DomainQEMUCommandlineEnv struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr,omitempty"`
}

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"`
}

func (*DomainRNG) Marshal

func (d *DomainRNG) Marshal() (string, error)

func (*DomainRNG) Unmarshal

func (d *DomainRNG) Unmarshal(doc string) error

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 DomainRNGRate struct {
	Bytes  uint `xml:"bytes,attr"`
	Period uint `xml:"period,attr,omitempty"`
}

type DomainResource

type DomainResource struct {
	Partition string `xml:"partition,omitempty"`
}

type DomainSMBios

type DomainSMBios struct {
	Mode string `xml:"mode,attr"`
}

type DomainSecLabel

type DomainSecLabel struct {
	Type       string `xml:"type,attr,omitempty"`
	Model      string `xml:"model,attr,omitempty"`
	Relabel    string `xml:"relabel,attr,omitempty"`
	Label      string `xml:"label,omitempty"`
	ImageLabel string `xml:"imagelabel,omitempty"`
	BaseLabel  string `xml:"baselabel,omitempty"`
}

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 DomainSerialTarget struct {
	Type string `xml:"type,attr,omitempty"`
	Port *uint  `xml:"port,attr"`
}

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 DomainSysInfoEntry struct {
	Name  string `xml:"name,attr"`
	Value string `xml:",chardata"`
}

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 DomainTimerCatchUp struct {
	Threshold uint `xml:"threshold,attr,omitempty"`
	Slew      uint `xml:"slew,attr,omitempty"`
	Limit     uint `xml:"limit,attr,omitempty"`
}

type DomainVCPU

type DomainVCPU struct {
	Placement string `xml:"placement,attr,omitempty"`
	CPUSet    string `xml:"cpuset,attr,omitempty"`
	Current   string `xml:"current,attr,omitempty"`
	Value     int    `xml:",chardata"`
}

type DomainVCPUs

type DomainVCPUs struct {
	VCPU []DomainVCPUsVCPU `xml:"vcpu"`
}

type DomainVCPUsVCPU

type DomainVCPUsVCPU struct {
	Id           *uint  `xml:"id,attr,omitempty"`
	Enabled      string `xml:"enabled,attr,omitempty"`
	Hotpluggable string `xml:"hotpluggable,attr,omitempty"`
	Order        *uint  `xml:"order,attr,omitempty"`
}

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"`
}

func (*Network) Marshal

func (s *Network) Marshal() (string, error)

func (*Network) Unmarshal

func (s *Network) Unmarshal(doc string) error

type NetworkBootp

type NetworkBootp struct {
	File   string `xml:"file,attr,omitempty"`
	Server string `xml:"server,attr,omitempty"`
}

type NetworkBridge

type NetworkBridge struct {
	Name            string `xml:"name,attr,omitempty"`
	STP             string `xml:"stp,attr,omitempty"`
	Delay           string `xml:"delay,attr,omitempty"`
	MACTableManager string `xml:"macTableManager,attr,omitempty"`
}

type NetworkDHCP

type NetworkDHCP struct {
	Ranges []NetworkDHCPRange `xml:"range"`
	Hosts  []NetworkDHCPHost  `xml:"host"`
	Bootp  []NetworkBootp     `xml:"bootp"`
}

type NetworkDHCPHost

type NetworkDHCPHost struct {
	ID   string `xml:"id,attr,omitempty"`
	MAC  string `xml:"mac,attr,omitempty"`
	Name string `xml:"name,attr,omitempty"`
	IP   string `xml:"ip,attr,omitempty"`
}

type NetworkDHCPRange

type NetworkDHCPRange struct {
	Start string `xml:"start,attr,omitempty"`
	End   string `xml:"end,attr,omitempty"`
}

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 NetworkDNSForwarder struct {
	Domain string `xml:"domain,attr,omitempty"`
	Addr   string `xml:"addr,attr,omitempty"`
}

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 NetworkDNSTXT struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type NetworkDomain

type NetworkDomain struct {
	Name      string `xml:"name,attr,omitempty"`
	LocalOnly string `xml:"localOnly,attr,omitempty"`
}

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 NetworkForwardNATAddress

type NetworkForwardNATAddress struct {
	Start string `xml:"start,attr"`
	End   string `xml:"end,attr"`
}

type NetworkForwardNATPort

type NetworkForwardNATPort struct {
	Start uint `xml:"start,attr"`
	End   uint `xml:"end,attr"`
}

type NetworkIP

type NetworkIP struct {
	Address  string       `xml:"address,attr,omitempty"`
	Family   string       `xml:"family,attr,omitempty"`
	Netmask  string       `xml:"netmask,attr,omitempty"`
	Prefix   string       `xml:"prefix,attr,omitempty"`
	LocalPtr string       `xml:"localPtr,attr,omitempty"`
	DHCP     *NetworkDHCP `xml:"dhcp"`
}

type NetworkMAC

type NetworkMAC struct {
	Address string `xml:"address,attr,omitempty"`
}

type NetworkRoute

type NetworkRoute struct {
	Address string `xml:"address,attr,omitempty"`
	Family  string `xml:"family,attr,omitempty"`
	Prefix  string `xml:"prefix,attr,omitempty"`
	Metric  string `xml:"metric,attr,omitempty"`
	Gateway string `xml:"gateway,attr,omitempty"`
}

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

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 NodeDeviceIDName struct {
	ID   string `xml:"id,attr"`
	Name string `xml:",chardata"`
}

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 struct {
	State string `xml:"state,attr"`
	Speed string `xml:"speed,attr,omitempty"`
}

type NodeDeviceNetOffloadFeatures

type NodeDeviceNetOffloadFeatures struct {
	Name string `xml:"number"`
}

type NodeDeviceNetSubCapability

type NodeDeviceNetSubCapability struct {
	Type string `xml:"type,attr"`
}

type NodeDevicePCIAddress

type NodeDevicePCIAddress struct {
	Domain   string `xml:"domain,attr"`
	Bus      string `xml:"bus,attr"`
	Slot     string `xml:"slot,attr"`
	Function string `xml:"function,attr"`
}

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 NodeDevicePCIExpressLink struct {
	Validity string  `xml:"validity,attr,omitempty"`
	Speed    float64 `xml:"speed,attr,omitempty"`
	Port     int     `xml:"port,attr,omitempty"`
	Width    int     `xml:"width,attr,omitempty"`
}

type NodeDevicePCISubCapability

type NodeDevicePCISubCapability struct {
	Type     string                 `xml:"type,attr"`
	Address  []NodeDevicePCIAddress `xml:"address,omitempty"`
	MaxCount int                    `xml:"maxCount,attr,omitempty"`
}

type NodeDeviceSCSICapability

type NodeDeviceSCSICapability struct {
	Host   int    `xml:"host"`
	Bus    int    `xml:"bus"`
	Target int    `xml:"target"`
	Lun    int    `xml:"lun"`
	Type   string `xml:"type"`
}

type NodeDeviceSCSIFCHost

type NodeDeviceSCSIFCHost struct {
	WWNN      string `xml:"wwnn,omitempty"`
	WWPN      string `xml:"wwpn,omitempty"`
	FabricWWN string `xml:"fabric_wwn,omitempty"`
}

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 NodeDeviceSCSIVportsOPS struct {
	Vports    int `xml:"vports,omitempty"`
	MaxVports int `xml:"maxvports,,omitempty"`
}

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 NodeDeviceStorageSubCapability

type NodeDeviceStorageSubCapability struct {
	Type           string `xml:"match,attr"`
	MediaAvailable int    `xml:"media_available,omitempty"`
	MediaSize      int    `xml:"media_size,omitempty"`
	MediaLable     int    `xml:"media_label,omitempty"`
}

type NodeDeviceSystemCapability

type NodeDeviceSystemCapability struct {
	Product  string                    `xml:"product"`
	Hardware *NodeDeviceSystemHardware `xml:"hardware"`
	Firmware *NodeDeviceSystemFirmware `xml:"firmware"`
}

type NodeDeviceSystemFirmware

type NodeDeviceSystemFirmware struct {
	Vendor      string `xml:"vendor"`
	Version     string `xml:"version"`
	ReleaseData string `xml:"release_date"`
}

type NodeDeviceSystemHardware

type NodeDeviceSystemHardware struct {
	Vendor  string `xml:"vendor"`
	Version string `xml:"version"`
	Serial  string `xml:"serial"`
	UUID    string `xml:"uuid"`
}

type NodeDeviceUSBCapability

type NodeDeviceUSBCapability struct {
	Number      int    `xml:"number"`
	Class       int    `xml:"class"`
	Subclass    int    `xml:"subclass"`
	Protocol    int    `xml:"protocol"`
	Description string `xml:"description,omitempty"`
}

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 Secret struct {
	XMLName     xml.Name     `xml:"secret"`
	Ephemeral   string       `xml:"ephemeral,attr,omitempty"`
	Private     string       `xml:"private,attr,omitempty"`
	Description string       `xml:"description,omitempty"`
	UUID        string       `xml:"uuid,omitempty"`
	Usage       *SecretUsage `xml:"usage"`
}

func (*Secret) Marshal

func (s *Secret) Marshal() (string, error)

func (*Secret) Unmarshal

func (s *Secret) Unmarshal(doc string) error

type SecretUsage

type SecretUsage struct {
	Type   string `xml:"type,attr"`
	Volume string `xml:"volume,omitempty"`
	Name   string `xml:"name,omitempty"`
	Target string `xml:"target,omitempty"`
}

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 StorageEncryptionCipher struct {
	Name string `xml:"name,attr"`
	Size uint64 `xml:"size,attr"`
	Mode string `xml:"mode,attr"`
	Hash string `xml:"hash,attr"`
}

type StorageEncryptionIvgen

type StorageEncryptionIvgen struct {
	Name string `xml:"name,attr"`
	Hash string `xml:"hash,attr"`
}

type StorageEncryptionSecret

type StorageEncryptionSecret struct {
	Type string `xml:"type,attr"`
	UUID string `xml:"uuid,attr"`
}

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 StoragePoolSize struct {
	Unit  string `xml:"unit,attr,omitempty"`
	Value uint64 `xml:",chardata"`
}

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 StoragePoolSourceAdapterParentAddrAddress

type StoragePoolSourceAdapterParentAddrAddress struct {
	Domain string `xml:"domain,attr"`
	Bus    string `xml:"bus,attr"`
	Slot   string `xml:"slot,attr"`
	Addr   string `xml:"addr,attr"`
}

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 StoragePoolSourceDevice struct {
	Path          string `xml:"path,attr"`
	PartSeparator string `xml:"part_separator,attr,omitempty"`
}

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 StoragePoolTargetPermissions

type StoragePoolTargetPermissions struct {
	Owner string `xml:"owner,omitempty"`
	Group string `xml:"group,omitempty"`
	Mode  string `xml:"mode,omitempty"`
	Label string `xml:"label,omitempty"`
}

type StoragePoolTargetTimestamps

type StoragePoolTargetTimestamps struct {
	Atime string `xml:"atime"`
	Mtime string `xml:"mtime"`
	Ctime string `xml:"ctime"`
}

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 StorageVolumeSize struct {
	Unit  string `xml:"unit,attr,omitempty"`
	Value uint64 `xml:",chardata"`
}

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 StorageVolumeTargetPermissions

type StorageVolumeTargetPermissions struct {
	Owner string `xml:"owner,omitempty"`
	Group string `xml:"group,omitempty"`
	Mode  string `xml:"mode,omitempty"`
	Label string `xml:"label,omitempty"`
}

type StorageVolumeTargetTimestamps

type StorageVolumeTargetTimestamps struct {
	Atime string `xml:"atime"`
	Mtime string `xml:"mtime"`
	Ctime string `xml:"ctime"`
}

type VirtualPort

type VirtualPort struct {
	Type       string                  `xml:"type,attr,omitempty"`
	Parameters []VirtualPortParameters `xml:"parameters,omitempty"`
}

type VirtualPortParameters

type VirtualPortParameters struct {
	InterfaceID string `xml:"interfaceid,attr,omitempty"`
	ProfileID   string `xml:"profileid,attr,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL