libvirt

package
v0.0.0-...-c6cf541 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MetadataXMLNamespace = "https://github.com/bcrusu/kcm"

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func NewConnection

func NewConnection(uri string) (*Connection, error)

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) CreateDomain

func (c *Connection) CreateDomain(name string) error

func (*Connection) CreateNetwork

func (c *Connection) CreateNetwork(name string) error

func (*Connection) CreateStorageVolume

func (c *Connection) CreateStorageVolume(params CreateStorageVolumeParams) (*libvirtxml.StorageVolume, error)

func (*Connection) DefineDomain

func (c *Connection) DefineDomain(params DefineDomainParams) error

func (*Connection) DefineNATNetwork

func (c *Connection) DefineNATNetwork(params DefineNetworkParams) error

func (*Connection) DeleteStorageVolume

func (c *Connection) DeleteStorageVolume(pool, name string) error

func (*Connection) DestroyDomain

func (c *Connection) DestroyDomain(name string) error

func (*Connection) DestroyNetwork

func (c *Connection) DestroyNetwork(name string) error

func (*Connection) DomainIsActive

func (c *Connection) DomainIsActive(name string) (bool, error)

func (*Connection) GenerateUniqueMACAddresses

func (c *Connection) GenerateUniqueMACAddresses(count int) ([]string, error)

func (*Connection) GetCapabilities

func (c *Connection) GetCapabilities() (*libvirtxml.Capabilities, error)

func (*Connection) GetDomain

func (c *Connection) GetDomain(domain string) (*libvirtxml.Domain, error)

func (*Connection) GetNetwork

func (c *Connection) GetNetwork(network string) (*libvirtxml.Network, error)

func (*Connection) GetStoragePool

func (c *Connection) GetStoragePool(pool string) (*libvirtxml.StoragePool, error)

func (*Connection) GetStorageVolume

func (c *Connection) GetStorageVolume(pool, volume string) (*libvirtxml.StorageVolume, error)

func (*Connection) ListAllDomains

func (c *Connection) ListAllDomains() ([]libvirtxml.Domain, error)

func (*Connection) ListDomainInterfaceAddresses

func (c *Connection) ListDomainInterfaceAddresses(domainName string) ([]string, error)

func (*Connection) NetworkIsActive

func (c *Connection) NetworkIsActive(name string) (bool, error)

func (*Connection) ShutdownDomain

func (c *Connection) ShutdownDomain(name string) error

func (*Connection) UndefineDomain

func (c *Connection) UndefineDomain(name string) error

func (*Connection) UndefineNetwork

func (c *Connection) UndefineNetwork(name string) error

type CreateStorageVolumeParams

type CreateStorageVolumeParams struct {
	Pool        string
	Name        string
	CapacityGiB uint

	// only one should be set
	BackingVolumeName string
	Content           []byte
}

type DefineDomainParams

type DefineDomainParams struct {
	Name                string
	Network             string
	NetworkInterfaceMAC string
	StorageVolumePath   string
	FilesystemMounts    []FilesystemMount
	MemoryMiB           uint              // max domain memory
	CPUs                uint              // number of CPU cores
	Metadata            map[string]string // map[NAME]VALUE
}

type DefineNetworkParams

type DefineNetworkParams struct {
	Name     string
	IPv4CIDR string
	Domain   string
	Metadata map[string]string // map[NAME]VALUE
}

type FilesystemMount

type FilesystemMount struct {
	HostPath  string
	GuestPath string
}

Jump to

Keyboard shortcuts

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