Documentation ¶
Index ¶
- Constants
- type Address
- type Alias
- type BIOS
- type Ballooning
- type BandWidth
- type Boot
- type BootMenu
- type BootOrder
- type Channel
- type ChannelSource
- type ChannelTarget
- type Clock
- type Commandline
- type Console
- type ConsoleTarget
- type Devices
- type Disk
- type DiskAuth
- type DiskDriver
- type DiskSecret
- type DiskSource
- type DiskSourceHost
- type DiskTarget
- type Domain
- type DomainList
- type DomainSpec
- type DomainStatus
- type Entry
- type Env
- type FilterRef
- type Graphics
- type Interface
- type InterfaceSource
- type InterfaceTarget
- type LifeCycle
- type LinkState
- type Listen
- type Loader
- type MAC
- type Memory
- type Model
- type NVRam
- type OS
- type OSType
- type RandomGenerator
- type ReadOnly
- type Resource
- type SMBios
- type SecretSpec
- type SecretUsage
- type Serial
- type SerialTarget
- type StateChangeReason
- type SysInfo
- type Timer
- type Video
- type VideoModel
- type Watchdog
Constants ¶
View Source
const ( NoState LifeCycle = "NoState" Running LifeCycle = "Running" Blocked LifeCycle = "Blocked" Paused LifeCycle = "Paused" Shutdown LifeCycle = "ShuttingDown" Shutoff LifeCycle = "Shutoff" Crashed LifeCycle = "Crashed" PMSuspended LifeCycle = "PMSuspended" // Common reasons ReasonUnknown StateChangeReason = "Unknown" // ShuttingDown reasons ReasonUser StateChangeReason = "User" // Shutoff reasons ReasonShutdown StateChangeReason = "Shutdown" ReasonDestroyed StateChangeReason = "Destroyed" ReasonMigrated StateChangeReason = "Migrated" ReasonCrashed StateChangeReason = "Crashed" ReasonPanicked StateChangeReason = "Panicked" ReasonSaved StateChangeReason = "Saved" ReasonFailed StateChangeReason = "Failed" ReasonFromSnapshot StateChangeReason = "FromSnapshot" // NoState reasons ReasonNonExistent StateChangeReason = "NonExistent" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BIOS ¶
type BIOS struct { }
TODO <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader>
type Ballooning ¶
type Ballooning struct {
Model string `xml:"model,attr"`
}
type Channel ¶
type Channel struct { Type string `xml:"type,attr"` Source ChannelSource `xml:"source,omitempty"` Target *ChannelTarget `xml:"target,omitempty"` }
type ChannelSource ¶
type ChannelTarget ¶
type Commandline ¶ added in v0.0.3
type Commandline struct {
QEMUEnv []Env `xml:"qemu:env,omitempty"`
}
type Console ¶
type Console struct { Type string `xml:"type,attr"` Target *ConsoleTarget `xml:"target,omitempty"` }
type ConsoleTarget ¶
type Devices ¶
type Devices struct { Emulator string `xml:"emulator,omitempty"` Interfaces []Interface `xml:"interface"` Channels []Channel `xml:"channel"` Video []Video `xml:"video"` Graphics []Graphics `xml:"graphics"` Ballooning *Ballooning `xml:"memballoon,omitempty"` Disks []Disk `xml:"disk"` Serials []Serial `xml:"serial"` Consoles []Console `xml:"console"` Watchdog *Watchdog `xml:"watchdog,omitempty"` }
type Disk ¶
type Disk struct { Device string `xml:"device,attr"` Snapshot string `xml:"snapshot,attr,omitempty"` Type string `xml:"type,attr"` Source DiskSource `xml:"source"` Target DiskTarget `xml:"target"` Serial string `xml:"serial,omitempty"` Driver *DiskDriver `xml:"driver,omitempty"` ReadOnly *ReadOnly `xml:"readonly,omitempty"` Auth *DiskAuth `xml:"auth,omitempty"` }
type DiskAuth ¶
type DiskAuth struct { Username string `xml:"username,attr"` Secret *DiskSecret `xml:"secret,omitempty"` }
type DiskDriver ¶
type DiskSecret ¶
type DiskSource ¶
type DiskSource struct { File string `xml:"file,attr,omitempty"` StartupPolicy string `xml:"startupPolicy,attr,omitempty"` Protocol string `xml:"protocol,attr,omitempty"` Name string `xml:"name,attr,omitempty"` Host *DiskSourceHost `xml:"host,omitempty"` }
type DiskSourceHost ¶
type DiskTarget ¶
type Domain ¶
type Domain struct { metav1.TypeMeta ObjectMeta kubev1.ObjectMeta Spec DomainSpec Status DomainStatus }
func NewMinimalDomain ¶
func NewMinimalDomainWithNS ¶
func (*Domain) DeepCopyInto ¶ added in v0.0.3
func (*Domain) DeepCopyObject ¶ added in v0.0.3
func (*Domain) GetObjectKind ¶
func (d *Domain) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
func (*Domain) GetObjectMeta ¶
Required to satisfy ObjectMetaAccessor interface
func (*Domain) SetState ¶
func (d *Domain) SetState(state LifeCycle, reason StateChangeReason)
type DomainList ¶
func (*DomainList) DeepCopy ¶ added in v0.0.3
func (in *DomainList) DeepCopy() *DomainList
func (*DomainList) DeepCopyInto ¶ added in v0.0.3
func (in *DomainList) DeepCopyInto(out *DomainList)
func (*DomainList) DeepCopyObject ¶ added in v0.0.3
func (in *DomainList) DeepCopyObject() runtime.Object
func (*DomainList) GetListMeta ¶
func (dl *DomainList) GetListMeta() meta.List
Required to satisfy ListMetaAccessor interface
func (*DomainList) GetObjectKind ¶
func (dl *DomainList) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
type DomainSpec ¶
type DomainSpec struct { XMLName xml.Name `xml:"domain"` Type string `xml:"type,attr"` XmlNS string `xml:"xmlns:qemu,attr,omitempty"` Name string `xml:"name"` UUID string `xml:"uuid,omitempty"` Memory Memory `xml:"memory"` OS OS `xml:"os"` SysInfo *SysInfo `xml:"sysinfo,omitempty"` Devices Devices `xml:"devices"` Clock *Clock `xml:"clock,omitempty"` Resource *Resource `xml:"resource,omitempty"` QEMUCmd *Commandline `xml:"qemu:commandline,omitempty"` }
DomainSpec represents the actual conversion to libvirt XML. The fields must be tagged, and they must correspond to the libvirt domain as described in https://libvirt.org/formatdomain.html.
func NewMinimalDomainSpec ¶
func NewMinimalDomainSpec(vmName string) *DomainSpec
type DomainStatus ¶
type DomainStatus struct { Status LifeCycle Reason StateChangeReason }
type Graphics ¶
type Graphics struct { AutoPort string `xml:"autoPort,attr,omitempty"` DefaultMode string `xml:"defaultMode,attr,omitempty"` Listen Listen `xml:"listen,omitempty"` PasswdValidTo string `xml:"passwdValidTo,attr,omitempty"` Port int32 `xml:"port,attr,omitempty"` TLSPort int `xml:"tlsPort,attr,omitempty"` Type string `xml:"type,attr"` }
type Interface ¶
type Interface struct { Address *Address `xml:"address,omitempty"` Type string `xml:"type,attr"` Source InterfaceSource `xml:"source"` Target *InterfaceTarget `xml:"target,omitempty"` Model *Model `xml:"model,omitempty"` MAC *MAC `xml:"mac,omitempty"` BandWidth *BandWidth `xml:"bandwidth,omitempty"` BootOrder *BootOrder `xml:"boot,omitempty"` LinkState *LinkState `xml:"link,omitempty"` FilterRef *FilterRef `xml:"filterref,omitempty"` Alias *Alias `xml:"alias,omitempty"` }
type InterfaceSource ¶
type InterfaceTarget ¶
type InterfaceTarget struct {
Device string `xml:"dev,attr"`
}
type OS ¶
type OS struct { Type OSType `xml:"type"` SMBios *SMBios `xml:"smbios,omitempty"` BootOrder []Boot `xml:"boot"` BootMenu *BootMenu `xml:"bootmenu,omitempty"` BIOS *BIOS `xml:"bios,omitempty"` Kernel string `xml:"kernel,omitempty"` Initrd string `xml:"initrd,omitempty"` KernelArgs string `xml:"cmdline,omitempty"` }
type RandomGenerator ¶
type RandomGenerator struct { }
type SecretSpec ¶
type SecretUsage ¶
type Serial ¶
type Serial struct { Type string `xml:"type,attr"` Target *SerialTarget `xml:"target,omitempty"` }
type SerialTarget ¶
type SerialTarget struct {
Port *uint `xml:"port,attr,omitempty"`
}
type StateChangeReason ¶
type StateChangeReason string
type Video ¶
type Video struct {
Model VideoModel `xml:"model"`
}
type VideoModel ¶
Click to show internal directories.
Click to hide internal directories.