util

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConvReason

func ConvReason(status libvirt.DomainState, reason int) api.StateChangeReason

func ConvState

func ConvState(status libvirt.DomainState) api.LifeCycle

func DomainFromNamespaceName added in v0.9.0

func DomainFromNamespaceName(namespace, name string) string

func GetDomainSpec

func GetDomainSpec(status libvirt.DomainState, dom cli.VirDomain) (*api.DomainSpec, error)

GetDomainSpec return the domain XML without runtime information. The result XML is merged from inactive XML and migratable XML.

func GetDomainSpecWithFlags

func GetDomainSpecWithFlags(dom cli.VirDomain, flags libvirt.DomainXMLFlags) (*api.DomainSpec, error)

func GetDomainSpecWithRuntimeInfo added in v0.10.0

func GetDomainSpecWithRuntimeInfo(status libvirt.DomainState, dom cli.VirDomain) (*api.DomainSpec, error)

GetDomainSpecWithRuntimeInfo return the active domain XML with runtime information embedded

func GetPodCPUSet added in v0.9.0

func GetPodCPUSet() ([]int, error)

func NewDomain

func NewDomain(dom cli.VirDomain) (*api.Domain, error)

func NewDomainFromName added in v0.9.0

func NewDomainFromName(name string, vmiUID types.UID) *api.Domain

func SetDomainSpecStr added in v0.11.1

func SetDomainSpecStr(virConn cli.Connection, vmi *v1.VirtualMachineInstance, wantedSpec string) (cli.VirDomain, error)

func SetupLibvirt added in v0.9.0

func SetupLibvirt() error

func SplitVMINamespaceKey added in v0.6.1

func SplitVMINamespaceKey(domainName string) (namespace, name string)

returns the namespace and name that is encoded in the domain name.

func StartLibvirt

func StartLibvirt(stopChan chan struct{})

func StartVirtlog

func StartVirtlog(stopChan chan struct{})

func VMINamespaceKeyFunc added in v0.6.1

func VMINamespaceKeyFunc(vmi *v1.VirtualMachineInstance) string

VMINamespaceKeyFunc constructs the domain name with a namespace prefix i.g. namespace_name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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