virtigolib

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

README

This is the common libvirt xml handling code for virtigo & virtigod

This is used to import libvirt xml files (as used by virsh) and
save the information in a protocol buffer config file.

It re-creates the xml files needed for virsh on the hypervisor
and starts the vm with 'virsh create'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDomainDroplet

func AddDomainDroplet(cluster *pb.NewCluster, domcfg *libvirtxml.Domain) (*pb.Droplet, []*pb.Event, error)

import a libvirt xml file

func DumpLibvirtxmlDomainNames

func DumpLibvirtxmlDomainNames()

dump out all the fields in libvirtxml.DomainDeviceList

func DumpNonStandardXML

func DumpNonStandardXML(domcfg *libvirtxml.Domain) (string, error)

func GenerateDropletXml

func GenerateDropletXml(dirs []string, d *pb.Droplet, domcfg *libvirtxml.Domain, hostname string) error

generate the XML for 'virsh create'

func InsertFilename

func InsertFilename(d *pb.Droplet, filename string) (*pb.Event, error)

func IsStructEmptyOrNil

func IsStructEmptyOrNil(value interface{}) bool

IsStructEmptyOrNil checks if a struct or pointer to struct is empty, blank, or nil

func MergeXml

func MergeXml(d *libvirtxml.Domain, xml string) error

func MergelibvirtDomain

func MergelibvirtDomain(d *pb.Droplet, domcfg *libvirtxml.Domain) ([]*pb.Event, error)

merges and updates the droplet protobuf based on the libvirt XML

func ReadXml

func ReadXml(filename string) (*libvirtxml.Domain, error)

func SetSpicePort

func SetSpicePort(d *pb.Droplet, domcfg *libvirtxml.Domain) error

func TestLibvirtDomain

func TestLibvirtDomain(domcfg *libvirtxml.Domain) (*pb.Droplet, error)

do a test import of a libvirt xml domain

Types

This section is empty.

Jump to

Keyboard shortcuts

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