Documentation
¶
Index ¶
- func Execute(config ExecuteInventoryConfig) error
- type BMCInfo
- type CPUInfo
- type ChassisInfo
- type DIMMInfo
- type DeviceRecord
- type DeviceType
- type DiskInfo
- type DiskType
- type ExecuteInventoryConfig
- type GPUInfo
- type IMEXNodeAttributes
- type Inventory
- type LLDPNeighborAttributes
- type MemoryInfo
- type NICInfo
- type NeighborRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(config ExecuteInventoryConfig) error
Types ¶
type BMCInfo ¶
type BMCInfo struct {
MACAddr string
IPAddr string
SubnetMask string
Gateway string
IPSource string
Firmware string
}
BMCInfo holds information about an out-of-band management controller.
type CPUInfo ¶
type CPUInfo struct {
ModelName string
Architecture string
Flags []string
Microcode string
CoresPerCPU string
ThreadsPerCore string
AddressSizes string
SerialNumbers []string
LogicalCPUCount int
PhysicalCPUCount int
}
CPUInfo holds information about the system's CPUs.
type ChassisInfo ¶
type ChassisInfo struct {
Manufacturer string
Model string
SerialNumber string
Hostname string
BIOSVersion string
IsVirtual bool
}
ChassisInfo holds information about the system chassis / motherboard.
type DeviceRecord ¶
type DeviceRecord struct {
DeviceType DeviceType `json:"device_type"`
DeviceName string `json:"device_name"`
HostIdentifier string `json:"host_identifier"`
SerialNumber string `json:"serial_number"`
Attributes json.RawMessage `json:"attributes"`
}
DeviceRecord is the central schema for all inventory items. Every collected hardware component is normalised into this structure so that heterogeneous device data can be stored and queried uniformly.
type DeviceType ¶
type DeviceType string
DeviceType identifies the class of hardware component.
const ( DeviceTypeChassis DeviceType = "chassis" DeviceTypeBMC DeviceType = "bmc" DeviceTypeCPU DeviceType = "cpu" DeviceTypeMemory DeviceType = "memory" DeviceTypeDisk DeviceType = "disk" DeviceTypeNIC DeviceType = "nic" DeviceTypeGPU DeviceType = "gpu" )
type DiskInfo ¶
type DiskInfo struct {
Name string
Type DiskType
SizeBytes uint64
SerialNumber string
Firmware string
BlockSize string
Speed string
Driver string
DriverVersion string
}
DiskInfo holds information about a single storage device.
type ExecuteInventoryConfig ¶
type GPUInfo ¶
type GPUInfo struct {
Name string
PCIAddress string
Vendor string
Model string
SerialNumber string
VRAM string
Firmware string
Driver string
DriverVersion string
NUMANode string
}
GPUInfo holds information about a single GPU.
type IMEXNodeAttributes ¶
type IMEXNodeAttributes struct {
NodeIndex int `json:"node_index"`
IPAddress string `json:"ip_address"`
Status string `json:"status"`
Version string `json:"version"`
Hostname string `json:"hostname"`
IsLocal bool `json:"is_local"`
}
IMEXNodeAttributes holds the parsed fields for a single IMEX domain peer.
type Inventory ¶
type Inventory struct {
DeviceRecords []DeviceRecord
NeighborRecords []NeighborRecord
}
func CollectInventory ¶
CollectInventory gathers inventory data from the environment. dbPath specifies where the output database file will be written.
type LLDPNeighborAttributes ¶
type LLDPNeighborAttributes struct {
ChassisID string `json:"chassisId"`
PortID string `json:"portId"`
PortDescription string `json:"portDesc"`
SystemName string `json:"systemName"`
SystemDescription string `json:"systemDesc"`
MgmtAddresses string `json:"mgmtAddresses"`
}
LLDPNeighborAttributes holds the parsed LLDP TLV fields for a single neighbor discovered on a local interface.
type MemoryInfo ¶
MemoryInfo holds information about the system's memory.
type NICInfo ¶
type NICInfo struct {
Name string
MACAddr string
IPAddrs []string
Driver string
Firmware string
LinkSpeed string
MTU string
}
NICInfo holds information about a single network interface.
type NeighborRecord ¶
type NeighborRecord struct {
HostIdentifier string `json:"host_identifier"`
LocalInterface string `json:"local_interface"`
Attributes json.RawMessage `json:"attributes"`
}
NeighborRecord maps directly to a row in the neighbors table.