libvirt-go-xml: github.com/libvirt/libvirt-go-xml Index | Files

package libvirtxml

import "github.com/libvirt/libvirt-go-xml"

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

Package Files

capabilities.go doc.go domain.go domain_snapshot.go network.go secret.go storage_encryption.go storage_pool.go storage_vol.go

type Caps Uses

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

func (*Caps) Marshal Uses

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

func (*Caps) Unmarshal Uses

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

type CapsGuest Uses

type CapsGuest struct {
    OSType   string             `xml:"os_type"`
    Arch     CapsGuestArch      `xml:"arch"`
    Features *CapsGuestFeatures `xml:"features"`
}

type CapsGuestArch Uses

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 Uses

type CapsGuestDomain struct {
    Type     string             `xml:"type,attr"`
    Emulator string             `xml:"emulator"`
    Machines []CapsGuestMachine `xml:"machine"`
}

type CapsGuestFeatures Uses

type CapsGuestFeatures struct {
    CPUSelection *struct{} `xml:"cpuselection"`
    DeviceBoot   *struct{} `xml:"deviceboot"`
}

type CapsGuestMachine Uses

type CapsGuestMachine struct {
    Name      string  `xml:",chardata"`
    MaxCPUs   int     `xml:"maxCpus,attr"`
    Canonical *string `xml:"canonical,attr"`
}

type CapsHost Uses

type CapsHost struct {
    UUID     string                `xml:"uuid"`
    CPU      *CapsHostCPU          `xml:"cpu"`
    NUMA     *CapsHostNUMATopology `xml:"topology"`
    SecModel []CapsHostSecModel    `xml:"secmodel"`
}

type CapsHostCPU Uses

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 Uses

type CapsHostCPUFeature struct {
    Name string `xml:"name,attr"`
}

type CapsHostCPUPageSize Uses

type CapsHostCPUPageSize struct {
    Size int    `xml:"size,attr"`
    Unit string `xml:"unit,attr"`
}

type CapsHostCPUTopology Uses

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

type CapsHostNUMACPU Uses

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 Uses

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 Uses

type CapsHostNUMADistance struct {
    ID    int `xml:"id,attr"`
    Value int `xml:"value,attr"`
}

type CapsHostNUMAMemory Uses

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

type CapsHostNUMAPageInfo Uses

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

type CapsHostNUMATopology Uses

type CapsHostNUMATopology struct {
    Cells []CapsHostNUMACell `xml:"cells>cell"`
}

type CapsHostSecModel Uses

type CapsHostSecModel struct {
    Name   string                  `xml:"model"`
    DOI    string                  `xml:"doi"`
    Labels []CapsHostSecModelLabel `xml:"baselabel"`
}

type CapsHostSecModelLabel Uses

type CapsHostSecModelLabel struct {
    Type  string `xml:"type,attr"`
    Value string `xml:",chardata"`
}

type Domain Uses

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"`
    CPU           *DomainCPU        `xml:"cpu"`
    Resource      *DomainResource   `xml:"resource"`
    Devices       *DomainDeviceList `xml:"devices"`
    OS            *DomainOS         `xml:"os"`
    SysInfo       *DomainSysInfo    `xml:"sysinfo"`
    OnPoweroff    string            `xml:"on_poweroff,omitempty"`
    OnReboot      string            `xml:"on_reboot,omitempty"`
    OnCrash       string            `xml:"on_crash,omitempty"`
}

func (*Domain) Marshal Uses

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

func (*Domain) Unmarshal Uses

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

type DomainAddress Uses

type DomainAddress struct {
    Type       string `xml:"type,attr"`
    Controller *uint  `xml:"controller,attr"`
    Bus        *uint  `xml:"bus,attr"`
    Port       *uint  `xml:"port,attr"`
}

type DomainAlias Uses

type DomainAlias struct {
    Name string `xml:"name,attr"`
}

type DomainBIOS Uses

type DomainBIOS struct {
    UseSerial     string `xml:"useserial,attr"`
    RebootTimeout string `xml:"rebootTimeout,attr"`
}

type DomainBootDevice Uses

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

type DomainBootMenu Uses

type DomainBootMenu struct {
    Enabled string `xml:"enabled,attr"`
    Timeout string `xml:"timeout,attr"`
}

type DomainCPU Uses

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 Uses

type DomainCPUFeature struct {
    Policy string `xml:"policy,attr,omitempty"`
    Name   string `xml:"name,attr,omitempty"`
}

type DomainCPUModel Uses

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

type DomainCPUTopology Uses

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

type DomainChardev Uses

type DomainChardev struct {
    Type    string               `xml:"type,attr"`
    Source  *DomainChardevSource `xml:"source"`
    Target  *DomainChardevTarget `xml:"target"`
    Alias   *DomainAlias         `xml:"alias"`
    Address *DomainAddress       `xml:"address"`
}

type DomainChardevSource Uses

type DomainChardevSource struct {
    Mode string `xml:"mode,attr"`
    Path string `xml:"path,attr"`
}

type DomainChardevTarget Uses

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

type DomainController Uses

type DomainController struct {
    Type  string `xml:"type,attr"`
    Index string `xml:"index,attr"`
}

type DomainDeviceList Uses

type DomainDeviceList struct {
    Controllers []DomainController `xml:"controller"`
    Disks       []DomainDisk       `xml:"disk"`
    Interfaces  []DomainInterface  `xml:"interface"`
    Serials     []DomainChardev    `xml:"serial"`
    Consoles    []DomainChardev    `xml:"console"`
    Inputs      []DomainInput      `xml:"input"`
    Graphics    []DomainGraphic    `xml:"graphics"`
    Videos      []DomainVideo      `xml:"video"`
    Channels    []DomainChardev    `xml:"channel"`
}

type DomainDisk Uses

type DomainDisk struct {
    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"`
}

type DomainDiskAuth Uses

type DomainDiskAuth struct {
    Username string            `xml:"username,attr,omitempty"`
    Secret   *DomainDiskSecret `xml:"secret"`
}

type DomainDiskDriver Uses

type DomainDiskDriver struct {
    Name string `xml:"name,attr,omitempty"`
    Type string `xml:"type,attr,omitempty"`
}

type DomainDiskSecret Uses

type DomainDiskSecret struct {
    Type  string `xml:"type,attr,omitempty"`
    Usage string `xml:"usage,attr,omitempty"`
    UUID  string `xml:"uuid,attr,omitempty"`
}

type DomainDiskSource Uses

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"`
    Hosts         []DomainDiskSourceHost `xml:"host"`
    StartupPolicy string                 `xml:"startupPolicy,attr,omitempty"`
}

type DomainDiskSourceHost Uses

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 Uses

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

type DomainGraphic Uses

type DomainGraphic struct {
    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 Uses

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 DomainInput Uses

type DomainInput struct {
    Type string `xml:"type,attr"`
    Bus  string `xml:"bus,attr"`
}

type DomainInterface Uses

type DomainInterface struct {
    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   *DomainInterfaceBoot   `xml:"boot"`
    Script *DomainInterfaceScript `xml:"script"`
    Driver *DomainInterfaceDriver `xml:"driver"`
}

type DomainInterfaceAlias Uses

type DomainInterfaceAlias struct {
    Name string `xml:"name,attr"`
}

type DomainInterfaceBoot Uses

type DomainInterfaceBoot struct {
    Order int `xml:"order,attr"`
}

type DomainInterfaceDriver Uses

type DomainInterfaceDriver struct {
    Name   string `xml:"name,attr"`
    Queues uint   `xml:"queues,attr,omitempty"`
}
type DomainInterfaceLink struct {
    State string `xml:"state,attr"`
}

type DomainInterfaceMAC Uses

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

type DomainInterfaceModel Uses

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

type DomainInterfaceScript Uses

type DomainInterfaceScript struct {
    Path string `xml:"path,attr"`
}

type DomainInterfaceSource Uses

type DomainInterfaceSource struct {
    Bridge  string `xml:"bridge,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 Uses

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

type DomainLoader Uses

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

type DomainMaxMemory Uses

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

type DomainMemory Uses

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

type DomainNVRam Uses

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

type DomainOS Uses

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 Uses

type DomainOSType struct {
    Arch    string `xml:"arch,attr,omitempty"`
    Machine string `xml:"machine,attr,omitempty"`
    Type    string `xml:",chardata"`
}

type DomainResource Uses

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

type DomainSMBios Uses

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

type DomainSnapshot Uses

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 Uses

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

func (*DomainSnapshot) Unmarshal Uses

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

type DomainSnapshotDisk Uses

type DomainSnapshotDisk struct {
    Name     string                    `xml:"name,attr"`
    Snapshot string                    `xml:"snapshot,attr,omitempty"`
    Driver   *DomainSnapshotDiskDriver `xml:"driver"`
    Source   *DomainSnapshotDiskSource `xml:"source"`
}

type DomainSnapshotDiskDriver Uses

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

type DomainSnapshotDiskSource Uses

type DomainSnapshotDiskSource struct {
    File string `xml:"file,attr"`
}

type DomainSnapshotDisks Uses

type DomainSnapshotDisks struct {
    Disks []DomainSnapshotDisk `xml:"disk"`
}

type DomainSnapshotMemory Uses

type DomainSnapshotMemory struct {
    Snapshot string `xml:"snapshot,attr"`
}

type DomainSnapshotParent Uses

type DomainSnapshotParent struct {
    Name string `xml:"name"`
}

type DomainSysInfo Uses

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 Uses

type DomainSysInfoEntry struct {
    Name  string `xml:"name,attr"`
    Value string `xml:",chardata"`
}

type DomainVCPU Uses

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 DomainVideo Uses

type DomainVideo struct {
    Model DomainVideoModel `xml:"model"`
}

type DomainVideoModel Uses

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

type Network Uses

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

func (*Network) Marshal Uses

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

func (*Network) Unmarshal Uses

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

type NetworkBridge Uses

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 Uses

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

type NetworkDHCPHost Uses

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 Uses

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

type NetworkDomain Uses

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

type NetworkForward Uses

type NetworkForward struct {
    Mode string `xml:"mode,attr,omitempty"`
    Dev  string `xml:"dev,attr,omitempty"`
}

type NetworkIP Uses

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 Uses

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

type NetworkRoute Uses

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 Secret Uses

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 Uses

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

func (*Secret) Unmarshal Uses

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

type SecretUsage Uses

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 Uses

type StorageEncryption struct {
    Format string                   `xml:"format,attr"`
    Secret *StorageEncryptionSecret `xml:"secret"`
    Cipher *StorageEncryptionCipher `xml:"cipher"`
    Ivgen  *StorageEncryptionIvgen  `xml:"ivgen"`
}

type StorageEncryptionCipher Uses

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 Uses

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

type StorageEncryptionSecret Uses

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

type StoragePool Uses

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 Uses

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

func (*StoragePool) Unmarshal Uses

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

type StoragePoolSize Uses

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

type StoragePoolSource Uses

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 Uses

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 Uses

type StoragePoolSourceAdapterParentAddr struct {
    UniqueID uint64                                     `xml:"unique_id,attr"`
    Address  *StoragePoolSourceAdapterParentAddrAddress `xml:"address"`
}

type StoragePoolSourceAdapterParentAddrAddress Uses

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 Uses

type StoragePoolSourceAuth struct {
    Type     string                       `xml:"type,attr"`
    Username string                       `xml:"username,attr"`
    Secret   *StoragePoolSourceAuthSecret `xml:"secret"`
}

type StoragePoolSourceAuthSecret Uses

type StoragePoolSourceAuthSecret struct {
    Usage string `xml:"usage,attr"`
}

type StoragePoolSourceDevice Uses

type StoragePoolSourceDevice struct {
    Path          string `xml:"path,attr"`
    PartSeparator string `xml:"part_separator,attr,omitempty"`
}

type StoragePoolSourceFormat Uses

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

type StoragePoolSourceHost Uses

type StoragePoolSourceHost struct {
    Name string `xml:"name,attr"`
}

type StoragePoolSourceProduct Uses

type StoragePoolSourceProduct struct {
    Name string `xml:"name,attr"`
}

type StoragePoolSourceVendor Uses

type StoragePoolSourceVendor struct {
    Name string `xml:"name,attr"`
}

type StoragePoolTarget Uses

type StoragePoolTarget struct {
    Path        string                        `xml:"path,omitempty"`
    Permissions *StoragePoolTargetPermissions `xml:"permissions"`
    Timestamps  *StoragePoolTargetTimestamps  `xml:"timestamps"`
    Encryption  *StorageEncryption            `xml:"encryption"`
}

type StoragePoolTargetPermissions Uses

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 Uses

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

type StorageVolume Uses

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 Uses

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

func (*StorageVolume) Unmarshal Uses

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

type StorageVolumeBackingStore Uses

type StorageVolumeBackingStore struct {
    Path        string                          `xml:"path"`
    Format      *StorageVolumeTargetFormat      `xml:"format"`
    Permissions *StorageVolumeTargetPermissions `xml:"permissions"`
}

type StorageVolumeSize Uses

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

type StorageVolumeTarget Uses

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 Uses

type StorageVolumeTargetFeature struct {
    LazyRefcounts *struct{} `xml:"lazy_refcounts"`
}

type StorageVolumeTargetFormat Uses

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

type StorageVolumeTargetPermissions Uses

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 Uses

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

Package libvirtxml imports 1 packages (graph) and is imported by 2 packages. Updated 2017-02-24. Refresh now. Tools for package owners.