util

package
v0.59.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 29 Imported by: 13

Documentation

Index

Constants

View Source
const QEMUSeaBiosDebugPipe = converter.QEMUSeaBiosDebugPipe

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(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)

base64.StdEncoding.EncodeToString

func SetDomainSpecStrWithHooks added in v0.36.0

func SetDomainSpecStrWithHooks(virConn cli.Connection, vmi *v1.VirtualMachineInstance, wantedSpec *api.DomainSpec) (cli.VirDomain, 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 StartVirtlog

func StartVirtlog(stopChan chan struct{}, domainName string, nonRoot bool)

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

type LibvirtWrapper added in v0.44.1

type LibvirtWrapper struct {
	// contains filtered or unexported fields
}

func NewLibvirtWrapper added in v0.44.1

func NewLibvirtWrapper(nonRoot bool) *LibvirtWrapper

func (LibvirtWrapper) SetupLibvirt added in v0.44.1

func (l LibvirtWrapper) SetupLibvirt(customLogFilters *string) (err error)

func (LibvirtWrapper) StartLibvirt added in v0.44.1

func (l LibvirtWrapper) StartLibvirt(stopChan chan struct{})

Jump to

Keyboard shortcuts

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