v1.15.0
This commit is contained in:
@@ -9,7 +9,7 @@ type RecordNode struct {
|
||||
CpuInfo CpuInfo `json:"cpuInfo"`
|
||||
|
||||
// CPU Allocation Ratio
|
||||
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
|
||||
CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"`
|
||||
|
||||
// DPDK info
|
||||
DPDK DPDK `json:"dpdk"`
|
||||
@@ -27,7 +27,7 @@ type RecordNode struct {
|
||||
IsolatedCpus []interface{} `json:"isolatedCpus"`
|
||||
|
||||
// MemAllocationRatio
|
||||
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
|
||||
MemAllocationRatio uint64 `json:"mem_allocation_ratio"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
@@ -120,7 +120,7 @@ type FreeResourcesInfo struct {
|
||||
RAM float64 `json:"RAM"`
|
||||
|
||||
// VCPU
|
||||
VCPU float64 `json:"vCPUs"`
|
||||
VCPU uint64 `json:"vCPUs"`
|
||||
}
|
||||
|
||||
// Resources Info
|
||||
@@ -303,10 +303,10 @@ type ItemNode struct {
|
||||
OldCompatLVMID uint64 `json:"old_compat_lvm_id"`
|
||||
|
||||
// CPU Allocation ratio
|
||||
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
|
||||
CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"`
|
||||
|
||||
// MemAllocationRatio
|
||||
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
|
||||
MemAllocationRatio uint64 `json:"mem_allocation_ratio"`
|
||||
|
||||
// Packages
|
||||
Packages map[string]PackageInfo `json:"packages"`
|
||||
@@ -319,6 +319,9 @@ type ItemNode struct {
|
||||
|
||||
// AutoStart Count
|
||||
AutoStartCount uint64 `json:"autostart_count"`
|
||||
|
||||
// PCI devices attached to the node
|
||||
PCIDevices []ItemPCIDevice `json:"pci_devices"`
|
||||
}
|
||||
|
||||
type PackageInfo struct {
|
||||
@@ -350,9 +353,36 @@ type ItemMemory struct {
|
||||
// 1G
|
||||
OneG uint64 `json:"1G"`
|
||||
|
||||
// 1G available
|
||||
OneGAvailable uint64 `json:"1G_available"`
|
||||
|
||||
// 1G free
|
||||
OneGFree uint64 `json:"1G_free"`
|
||||
|
||||
// 1G reserved
|
||||
OneGReserved uint64 `json:"1G_reserved"`
|
||||
|
||||
// 1G used
|
||||
OneGUsed uint64 `json:"1G_used"`
|
||||
|
||||
// 1G DPDK reserved
|
||||
OneGDPDKReserved uint64 `json:"1G_dpdk_reserved"`
|
||||
|
||||
// 2M
|
||||
TwoM uint64 `json:"2M"`
|
||||
|
||||
// 2M available
|
||||
TwoMAvailable uint64 `json:"2M_available"`
|
||||
|
||||
// 2M free
|
||||
TwoMFree uint64 `json:"2M_free"`
|
||||
|
||||
// 2M reserved
|
||||
TwoMReserved uint64 `json:"2M_reserved"`
|
||||
|
||||
// 2M used
|
||||
TwoMUsed uint64 `json:"2M_used"`
|
||||
|
||||
// Total
|
||||
Total uint64 `json:"total"`
|
||||
}
|
||||
@@ -454,6 +484,54 @@ type Role struct {
|
||||
Time uint64 `json:"time"`
|
||||
}
|
||||
|
||||
// PCI device info
|
||||
type ItemPCIDevice struct {
|
||||
// Hardware path
|
||||
HWPath string `json:"hw_path"`
|
||||
|
||||
// Current driver
|
||||
CurrentDriver string `json:"current_driver"`
|
||||
|
||||
// NUMA node
|
||||
NUMANode uint64 `json:"numa_node"`
|
||||
|
||||
// Product ID
|
||||
ProductID string `json:"product_id"`
|
||||
|
||||
// Product name
|
||||
ProductName string `json:"product_name"`
|
||||
|
||||
// Vendor ID
|
||||
VendorID string `json:"vendor_id"`
|
||||
|
||||
// Vendor name
|
||||
VendorName string `json:"vendor_name"`
|
||||
|
||||
// IOMMU group
|
||||
IOMMUGroup uint64 `json:"iommu_group"`
|
||||
}
|
||||
|
||||
// List of PCI devices
|
||||
type ListPCIDevices struct {
|
||||
// Data
|
||||
Data []ItemPCIDevice `json:"data"`
|
||||
|
||||
// Entry count
|
||||
EntryCount uint64 `json:"entryCount"`
|
||||
}
|
||||
|
||||
// Response for PCI device driver binding actions
|
||||
type RecordPCIDeviceDriver struct {
|
||||
// Success
|
||||
Success bool `json:"success"`
|
||||
|
||||
// Message
|
||||
Message string `json:"message"`
|
||||
|
||||
// Result
|
||||
Result interface{} `json:"result"`
|
||||
}
|
||||
|
||||
// Information about SSH Identity
|
||||
type SSHIdentity struct {
|
||||
//Host name of the client
|
||||
@@ -465,3 +543,231 @@ type SSHIdentity struct {
|
||||
//Array of SSH public keys of the client
|
||||
PublicKeys []string `json:"public_keys"`
|
||||
}
|
||||
|
||||
// Full network configuration of a node
|
||||
type RecordNodeNetworkInfo struct {
|
||||
// System-level information about all network interfaces on the node
|
||||
SystemNetworksInfo map[string]SystemNetworkInfo `json:"system_networks_info"`
|
||||
|
||||
// Raw OVS ports data
|
||||
OVSNetworksInfo []OVSNetworkInfo `json:"ovs_networks_info"`
|
||||
|
||||
// VM network interface connections
|
||||
LibvirtNetworksInfo []LibvirtNetworkInfo `json:"libvirt_networks_info"`
|
||||
|
||||
// Assembled network topology of the node
|
||||
Topology NetworkTopology `json:"topology"`
|
||||
}
|
||||
|
||||
// System network interface
|
||||
type SystemNetworkInfo struct {
|
||||
// MTU value
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// Interface link speed
|
||||
Speed int64 `json:"speed"`
|
||||
|
||||
// Linux bridge ID
|
||||
BridgeID string `json:"bridge_id"`
|
||||
|
||||
// Bridge port ID
|
||||
BPortID string `json:"bport_id"`
|
||||
|
||||
// MAC address
|
||||
MAC string `json:"mac"`
|
||||
}
|
||||
|
||||
// OVS port information
|
||||
type OVSNetworkInfo struct {
|
||||
// Bridge name
|
||||
BridgeName string `json:"bridge_name"`
|
||||
|
||||
// Bridge tag
|
||||
BridgeTag string `json:"bridge_tag"`
|
||||
|
||||
// Interface UUID
|
||||
InterfaceUUID string `json:"interface_uuid"`
|
||||
|
||||
// Interface type
|
||||
InterfaceType string `json:"interface_type"`
|
||||
|
||||
// Interface name
|
||||
InterfaceName string `json:"interface_name"`
|
||||
|
||||
// Interface MTU value
|
||||
InterfaceMTU uint64 `json:"interface_mtu"`
|
||||
|
||||
// Interface IP address
|
||||
InterfaceIP string `json:"interface_ip"`
|
||||
|
||||
// Interface MAC address
|
||||
InterfaceMAC string `json:"interface_mac"`
|
||||
|
||||
// Interface peer name
|
||||
InterfacePeer string `json:"interface_peer"`
|
||||
}
|
||||
|
||||
// VM network interface connection
|
||||
type LibvirtNetworkInfo struct {
|
||||
// VM name
|
||||
VMName string `json:"vm_name"`
|
||||
|
||||
// Host-side interface name used by the VM
|
||||
Interface string `json:"interface"`
|
||||
|
||||
// Interface type
|
||||
InterfaceType string `json:"interface_type"`
|
||||
|
||||
// Name of the bridge the VM interface is attached to
|
||||
InterfaceSource string `json:"interface_source"`
|
||||
}
|
||||
|
||||
// Assembled network topology of the node
|
||||
type NetworkTopology struct {
|
||||
// Map of all network interfaces by name with their topology details and connections
|
||||
Interfaces map[string]TopologyInterface `json:"interfaces"`
|
||||
}
|
||||
|
||||
// Interface and its role in the network topology
|
||||
type TopologyInterface struct {
|
||||
// Interface type
|
||||
Type string `json:"type"`
|
||||
|
||||
// Interface MTU value
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// Interface link speed
|
||||
Speed int64 `json:"speed"`
|
||||
|
||||
// Connections to VMs and to bridges
|
||||
Connections TopologyInterfaceConnections `json:"connections"`
|
||||
|
||||
// VLANs associated with the interface
|
||||
VLANs []string `json:"vlans"`
|
||||
|
||||
// Linux bridge ID
|
||||
BridgeID string `json:"bridge_id"`
|
||||
|
||||
// Port configuration of this bridge
|
||||
BridgeInfo *TopologyBridgeInfo `json:"bridge_info"`
|
||||
|
||||
// Peer bridges connected to this bridge via patch ports
|
||||
BridgeConnections []TopologyBridgeRef `json:"bridge_connections"`
|
||||
|
||||
// Names of interfaces attached to this bridge as ports
|
||||
ConnectedInterfaces []string `json:"connected_interfaces"`
|
||||
|
||||
// Peer interface name
|
||||
Peer string `json:"peer"`
|
||||
|
||||
// OVS UUID
|
||||
UUID string `json:"uuid"`
|
||||
}
|
||||
|
||||
// Lists what is connected to this interface
|
||||
type TopologyInterfaceConnections struct {
|
||||
// VMs connected to this interface
|
||||
VMs []TopologyVMConnection `json:"vms"`
|
||||
|
||||
// Bridges this interface is attached to
|
||||
Bridges []TopologyBridgeAttachment `json:"bridges"`
|
||||
}
|
||||
|
||||
// VM connected to a bridge or interface
|
||||
type TopologyVMConnection struct {
|
||||
// VM name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Host-side interface name
|
||||
VMInterface string `json:"vm_interface"`
|
||||
|
||||
// VM interface type
|
||||
VMInterfaceType string `json:"vm_interface_type"`
|
||||
|
||||
// Connection type
|
||||
ConnectionType string `json:"connection_type"`
|
||||
|
||||
// Via bridge
|
||||
ViaBridge string `json:"via_bridge"`
|
||||
}
|
||||
|
||||
// How interface is attached to a bridge
|
||||
type TopologyBridgeAttachment struct {
|
||||
// Bridge name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Bridge type
|
||||
Type string `json:"type"`
|
||||
|
||||
// Attachment method
|
||||
Via string `json:"via"`
|
||||
|
||||
// Port details
|
||||
PortInfo *TopologyPortInfo `json:"port_info"`
|
||||
|
||||
// Linux bridge port ID
|
||||
BPortID string `json:"bport_id"`
|
||||
}
|
||||
|
||||
// Bridge port entry
|
||||
type TopologyPortInfo struct {
|
||||
// Port name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Port type
|
||||
Type string `json:"type"`
|
||||
|
||||
// MTU value
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// VLAN tag
|
||||
VLAN string `json:"vlan"`
|
||||
|
||||
// OVS UUID of the port
|
||||
UUID string `json:"uuid"`
|
||||
}
|
||||
|
||||
// OVS bridge port configuration
|
||||
type TopologyBridgeInfo struct {
|
||||
// Bridge type
|
||||
Type string `json:"type"`
|
||||
|
||||
// List of ports on this bridge
|
||||
Ports []TopologyBridgePort `json:"ports"`
|
||||
}
|
||||
|
||||
// Port on an OVS bridge
|
||||
type TopologyBridgePort struct {
|
||||
// Port name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Port type
|
||||
Type string `json:"type"`
|
||||
|
||||
// MTU value
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// VLAN tag
|
||||
VLAN string `json:"vlan"`
|
||||
|
||||
// UUID
|
||||
UUID string `json:"uuid"`
|
||||
|
||||
// IP address
|
||||
IP string `json:"ip"`
|
||||
|
||||
// MAC address
|
||||
MAC string `json:"mac"`
|
||||
}
|
||||
|
||||
// Peer bridge connected via a patch port
|
||||
type TopologyBridgeRef struct {
|
||||
// Name of the peer bridge
|
||||
Name string `json:"name"`
|
||||
|
||||
// Name of the patch port used to connect to the peer bridge
|
||||
Via string `json:"via"`
|
||||
|
||||
// VLAN tag on the patch connection
|
||||
VLAN string `json:"vlan"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user