Documentation ¶
Index ¶
- Constants
- Variables
- func GetTeamShortLcuuidToInfo() (map[string]TeamInfo, error)
- 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 RequestGet(url string, timeout int, queryStrings map[string]string) error
- func Uint64ToMac(v uint64) net.HardwareAddr
- type DomStatus
- type ETCDomains
- type GenesisSyncData
- type GenesisSyncDataResponse
- type GenesisSyncType
- type Iface
- type K8SRPCMessage
- type KVMAddress
- type KVMDevices
- type KVMDomain
- type KVMInstance
- type KVMInterface
- type KVMMac
- type KVMMetaData
- type KVMModel
- type KVMOwner
- type KVMProject
- type KVMSource
- type KVMTarget
- type KVMUser
- type KubernetesInfo
- type RUNDomains
- type TeamInfo
- type VIFRPCMessage
- type VifInfo
- type XMLInterface
- type XMLVM
- type XMLVPC
Constants ¶
View Source
const ( TYPE_UPDATE = 1 TYPE_RENEW = 2 TYPE_EXIT = 3 )
View Source
const ( 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" )
View Source
const (
SYNC_TYPE_FORMAT = "%v-%v-%v-%v" // region-orgID-type-vtapID
)
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 ETCDomains ¶
type ETCDomains struct {
Domains []KVMDomain `xml:"domain"`
}
type GenesisSyncData ¶ added in v1.6.65
type GenesisSyncData struct { IPLastSeens map[int][]model.GenesisIP VIPs map[int][]model.GenesisVIP VMs map[int][]model.GenesisVM VPCs map[int][]model.GenesisVpc Hosts map[int][]model.GenesisHost Lldps map[int][]model.GenesisLldp Ports map[int][]model.GenesisPort Networks map[int][]model.GenesisNetwork Vinterfaces map[int][]model.GenesisVinterface Processes map[int][]model.GenesisProcess }
type GenesisSyncDataResponse ¶ added in v1.6.65
type GenesisSyncDataResponse struct { IPLastSeens []model.GenesisIP VIPs []model.GenesisVIP VMs []model.GenesisVM VPCs []model.GenesisVpc Hosts []model.GenesisHost Lldps []model.GenesisLldp Ports []model.GenesisPort Networks []model.GenesisNetwork Vinterfaces []model.GenesisVinterface Processes []model.GenesisProcess }
type GenesisSyncType ¶ added in v1.6.65
type GenesisSyncType interface { model.GenesisVinterface | model.GenesisVpc | model.GenesisHost | model.GenesisVM | model.GenesisVIP | model.GenesisNetwork | model.GenesisPort | model.GenesisLldp | model.GenesisIP | model.GenesisProcess }
type Iface ¶
func ParseIPOutput ¶
type K8SRPCMessage ¶ added in v1.6.65
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"` Title string `xml:"title"` MetaData KVMMetaData `xml:"metadata"` Devices KVMDevices `xml:"devices"` }
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 KubernetesInfo ¶ added in v1.6.65
type RUNDomains ¶
type RUNDomains struct {
DomStatus []DomStatus `xml:"domstatus"`
}
type VIFRPCMessage ¶ added in v1.6.65
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.