Documentation ¶
Index ¶
- Constants
- Variables
- func IPInRanges(ip string, ipRanges ...netaddr.IPPrefix) bool
- func ParseBrctlShow(s string) (map[string][]string, error)
- func ParseCSV(s string, fields ...string) ([]map[string]string, error)
- func ParseCSVWithKey(s, key string, fields ...string) (map[string]map[string]string, error)
- func ParseCompressedInfo(cInfo []byte) (bytes.Buffer, error)
- func ParseKVString(s string) (map[string]string, error)
- func ParseVLANConfig(s string) (map[string]int, error)
- func ParseVMStates(s string) (map[string]int, error)
- func ParseYMAL(y string) (prometheusConfig, error)
- func Uint64ToMac(v uint64) net.HardwareAddr
- type Iface
- type KVMAddress
- type KVMDevices
- type KVMDomain
- type KVMDomains
- type KVMInstance
- type KVMInterface
- type KVMMac
- type KVMMetaData
- type KVMModel
- type KVMOwner
- type KVMProject
- type KVMSource
- type KVMTarget
- type KVMUser
- type VifInfo
- type XMLInterface
- type XMLVM
- type XMLVPC
Constants ¶
View Source
const ( TYPE_UPDATE = 1 TYPE_RENEW = 2 TYPE_EXIT = 3 DEVICE_TYPE_KVM_HOST = "kvm-host" DEVICE_TYPE_KVM_VM = "kvm-vm" DEVICE_TYPE_DOCKER_HOST = "docker-host" DEVICE_TYPE_DOCKER_CONTAINER = "docker-container" DEVICE_TYPE_PUBLIC_CLOUD = "public-cloud" DEVICE_TYPE_PHYSICAL_MACHINE = "physical-machine" )
Variables ¶
View Source
var IPRegex = regexp.MustCompile("^\\s+inet6?\\s+([\\d\\.A-Za-z:]+)/(\\d+)\\s+.*scope\\s+(global|link|host)")
View Source
var IfaceRegex = regexp.MustCompile("^(\\d+):\\s+([^@:]+)(@.*)?\\:")
View Source
var MACRegex = regexp.MustCompile("^\\s+link/\\S+\\s+(([\\dA-Za-z]{2}:){5}[\\dA-Za-z]{2}) brd.*$")
Functions ¶
func ParseCSVWithKey ¶
func Uint64ToMac ¶
func Uint64ToMac(v uint64) net.HardwareAddr
Types ¶
type Iface ¶
func ParseIPOutput ¶
type KVMAddress ¶
type KVMDevices ¶
type KVMDevices struct {
Interfaces []KVMInterface `xml:"interface"`
}
type KVMDomain ¶
type KVMDomain struct { Type string `xml:"type,attr"` UUID string `xml:"uuid"` Name string `xml:"name"` Label string `xml:"label"` MetaData KVMMetaData `xml:"metadata"` Devices KVMDevices `xml:"devices"` }
type KVMDomains ¶
type KVMDomains struct {
Domains []KVMDomain `xml:"domain"`
}
type KVMInstance ¶
type KVMInterface ¶
type KVMMetaData ¶
type KVMMetaData struct {
Instance KVMInstance `xml:"instance"`
}
type KVMOwner ¶
type KVMOwner struct { User KVMUser `xml:"user"` Project KVMProject `xml:"project"` }
type KVMProject ¶
type XMLInterface ¶
type XMLVM ¶
type XMLVM struct { UUID string Name string Label string VPC XMLVPC Interfaces []XMLInterface }
func ParseVMXml ¶
Click to show internal directories.
Click to hide internal directories.