Documentation
¶
Index ¶
- Constants
- Variables
- func DiskLetterForIndex(i int) string
- func FreeNetworkInterface(basename string) (string, error)
- func HasDHCP(net libvirtxml.Network) bool
- func NetworkRange(network *net.IPNet) (net.IP, net.IP)
- func Provider() terraform.ResourceProvider
- func RandomMACAddress() (string, error)
- func RandomPort() int
- func RemoveVolume(virConn *libvirt.Connect, key string) error
- func WaitForSuccess(errorMessage string, f func() error) error
- type Client
- type CloudInitUserData
- type Config
- type Domain
- type DomainMeta
- type Network
- type QemuAgentInterface
- type QemuAgentInterfaceIPAddress
- type QemuAgentInterfacesResponse
- type StreamIO
Constants ¶
const LibVirtConIsNil string = "the libvirt connection was nil"
LibVirtConIsNil is a global string error msg
const METADATA string = "meta-data"
METADATA is the filename expected by cloud-init
const USERDATA string = "user-data"
USERDATA is the filename expected by cloud-init
Variables ¶
var WaitSleepInterval = 1 * time.Second
WaitSleepInterval time
var WaitTimeout = 5 * time.Minute
WaitTimeout time
Functions ¶
func DiskLetterForIndex ¶
DiskLetterForIndex return diskLetters for index
func FreeNetworkInterface ¶
FreeNetworkInterface returns a free network interface
func HasDHCP ¶
func HasDHCP(net libvirtxml.Network) bool
HasDHCP checks if the network has a DHCP server managed by libvirt
func NetworkRange ¶
NetworkRange calculates the first and last IP addresses in an IPNet
func RandomMACAddress ¶
RandomMACAddress returns a randomized MAC address
func RemoveVolume ¶
RemoveVolume removes the volume identified by `key` from libvirt
func WaitForSuccess ¶
WaitForSuccess wait for success and timeout after 5 minutes.
Types ¶
type CloudInitUserData ¶
type CloudInitUserData struct {
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
}
CloudInitUserData struct
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 DomainMeta ¶
type DomainMeta struct {
// contains filtered or unexported fields
}
DomainMeta struct
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
Source Files
¶
- cloudinit_def.go
- config.go
- coreos_ignition_def.go
- disk_def.go
- domain.go
- domain_def.go
- libvirt_interfaces.go
- network_def.go
- provider.go
- qemu_agent.go
- resource_cloud_init.go
- resource_libvirt_coreos_ignition.go
- resource_libvirt_domain.go
- resource_libvirt_domain_console.go
- resource_libvirt_domain_netiface.go
- resource_libvirt_network.go
- resource_libvirt_volume.go
- stream.go
- utils.go
- utils_domain_def.go
- utils_libvirt.go
- utils_net.go
- utils_volume.go
- volume_def.go