libvirt

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const LibVirtConIsNil string = "the libvirt connection was nil"

LibVirtConIsNil is a global string error msg

Variables

View Source
var WaitSleepInterval = 1 * time.Second

WaitSleepInterval time

View Source
var WaitTimeout = 5 * time.Minute

WaitTimeout time

Functions

func CleanupLibvirtConnections

func CleanupLibvirtConnections()

CleanupLibvirtConnections closes libvirt clients for all URIs

func HasDHCP

func HasDHCP(net libvirtxml.Network) bool

HasDHCP checks if the network has a DHCP server managed by libvirt

func Provider

func Provider() terraform.ResourceProvider

Provider libvirt

Types

type Client

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

Client libvirt

type Config

type Config struct {
	URI string
}

Config struct for the libvirt-provider

func (*Config) Client

func (c *Config) Client() (*Client, error)

Client libvirt, generate libvirt client given URI

type Domain

type Domain interface {
	QemuAgentCommand(command string, timeout libvirt.DomainQemuAgentCommandTimeout, flags uint32) (string, error)
}

Domain Interface used to expose a libvirt.Domain Used to allow testing

type Network

type Network interface {
	GetXMLDesc(flags libvirt.NetworkXMLFlags) (string, error)
}

Network interface used to expose a libvirt.Network

type QemuAgentInterface

type QemuAgentInterface struct {
	Name        string                        `json:"name"`
	Hwaddr      string                        `json:"hardware-address"`
	IPAddresses []QemuAgentInterfaceIPAddress `json:"ip-addresses"`
}

QemuAgentInterface type

type QemuAgentInterfaceIPAddress

type QemuAgentInterfaceIPAddress struct {
	Type    string `json:"ip-address-type"`
	Address string `json:"ip-address"`
	Prefix  uint   `json:"prefix"`
}

QemuAgentInterfaceIPAddress type

type QemuAgentInterfacesResponse

type QemuAgentInterfacesResponse struct {
	Interfaces []QemuAgentInterface `json:"return"`
}

QemuAgentInterfacesResponse type

type StreamIO

type StreamIO struct {
	Stream libvirt.Stream
}

StreamIO libvirt struct

func NewStreamIO

func NewStreamIO(s libvirt.Stream) *StreamIO

NewStreamIO returns libvirt StreamIO

func (*StreamIO) Close

func (sio *StreamIO) Close() error

Close closes the stream

func (*StreamIO) Read

func (sio *StreamIO) Read(p []byte) (int, error)

func (*StreamIO) Write

func (sio *StreamIO) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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