inventory

package
v2.0.0-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootInfoType

type BootInfoType struct {
	CurrentBootMode string `json:"current_boot_mode"`
	PXEInterface    string `json:"pxe_interface"`
}

type CPUType

type CPUType struct {
	Architecture string   `json:"architecture"`
	Count        int      `json:"count"`
	Flags        []string `json:"flags"`
	Frequency    string   `json:"frequency"`
	ModelName    string   `json:"model_name"`
}

type ConfigurationType

type ConfigurationType struct {
	// Collectors is a list of enabled collectors - ramdisk-side inspection
	// plugins that populated the plugin data.
	Collectors []string `json:"collectors"`
	// Managers is a list of hardware managers - ramdisk-side plugins that
	// implement all actions, such as writing images or collecting
	// inventory.
	Managers []HardwareManager `json:"managers"`
}

type ExtraDataItem

type ExtraDataItem map[string]interface{}

type ExtraDataSection

type ExtraDataSection map[string]ExtraDataItem

type ExtraDataType

type ExtraDataType struct {
	CPU      ExtraDataSection `json:"cpu"`
	Disk     ExtraDataSection `json:"disk"`
	Firmware ExtraDataSection `json:"firmware"`
	IPMI     ExtraDataSection `json:"ipmi"`
	Memory   ExtraDataSection `json:"memory"`
	Network  ExtraDataSection `json:"network"`
	System   ExtraDataSection `json:"system"`
}

type HardwareManager

type HardwareManager struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type InterfaceType

type InterfaceType struct {
	BIOSDevName string `json:"biosdevname"`
	ClientID    string `json:"client_id"`
	HasCarrier  bool   `json:"has_carrier"`
	IPV4Address string `json:"ipv4_address"`
	IPV6Address string `json:"ipv6_address"`
	MACAddress  string `json:"mac_address"`
	Name        string `json:"name"`
	Product     string `json:"product"`
	SpeedMbps   int    `json:"speed_mbps"`
	Vendor      string `json:"vendor"`
}

type InventoryType

type InventoryType struct {
	BmcAddress   string           `json:"bmc_address"`
	Boot         BootInfoType     `json:"boot"`
	CPU          CPUType          `json:"cpu"`
	Disks        []RootDiskType   `json:"disks"`
	Interfaces   []InterfaceType  `json:"interfaces"`
	Memory       MemoryType       `json:"memory"`
	SystemVendor SystemVendorType `json:"system_vendor"`
	Hostname     string           `json:"hostname"`
}

type LLDPTLVType

type LLDPTLVType struct {
	Type  int
	Value string
}

func (*LLDPTLVType) UnmarshalJSON

func (r *LLDPTLVType) UnmarshalJSON(data []byte) error

UnmarshalJSON interprets an LLDP TLV [key, value] pair as an LLDPTLVType structure

type MemoryType

type MemoryType struct {
	PhysicalMb int `json:"physical_mb"`
	Total      int `json:"total"`
}

type NUMACPU

type NUMACPU struct {
	CPU            int   `json:"cpu"`
	NUMANode       int   `json:"numa_node"`
	ThreadSiblings []int `json:"thread_siblings"`
}

type NUMANIC

type NUMANIC struct {
	Name     string `json:"name"`
	NUMANode int    `json:"numa_node"`
}

type NUMARAM

type NUMARAM struct {
	NUMANode int `json:"numa_node"`
	SizeKB   int `json:"size_kb"`
}

type NUMATopology

type NUMATopology struct {
	CPUs []NUMACPU `json:"cpus"`
	NICs []NUMANIC `json:"nics"`
	RAM  []NUMARAM `json:"ram"`
}

type ParsedLLDP

type ParsedLLDP = map[string]interface{}

type ProcessedInterfaceType

type ProcessedInterfaceType struct {
	InterfaceType
	// Whether PXE was enabled on this interface during inspection
	PXEEnabled bool `json:"pxe_enabled"`
}

type RootDiskType

type RootDiskType struct {
	Hctl               string `json:"hctl"`
	Model              string `json:"model"`
	Name               string `json:"name"`
	ByPath             string `json:"by_path"`
	Rotational         bool   `json:"rotational"`
	Serial             string `json:"serial"`
	Size               int64  `json:"size"`
	Vendor             string `json:"vendor"`
	Wwn                string `json:"wwn"`
	WwnVendorExtension string `json:"wwn_vendor_extension"`
	WwnWithExtension   string `json:"wwn_with_extension"`
}

type StandardPluginData

type StandardPluginData struct {
	AllInterfaces   map[string]ProcessedInterfaceType `json:"all_interfaces"`
	BootInterface   string                            `json:"boot_interface"`
	Configuration   ConfigurationType                 `json:"configuration"`
	Error           string                            `json:"error"`
	Extra           ExtraDataType                     `json:"extra"`
	MACs            []string                          `json:"macs"`
	NUMATopology    NUMATopology                      `json:"numa_topology"`
	ParsedLLDP      map[string]ParsedLLDP             `json:"parsed_lldp"`
	RawLLDP         map[string][]LLDPTLVType          `json:"lldp_raw"`
	RootDisk        RootDiskType                      `json:"root_disk"`
	ValidInterfaces map[string]ProcessedInterfaceType `json:"valid_interfaces"`
}

StandardPluginData represents the plugin data as collected and processes by a standard ramdisk and a standard Ironic deployment. The format and contents of the stored data depends on the ramdisk used and plugins enabled both in the ramdisk and in inspector itself. This structure has been provided for basic compatibility but it will need extensions.

type SystemFirmwareType

type SystemFirmwareType struct {
	Version   string `json:"version"`
	BuildDate string `json:"build_date"`
	Vendor    string `json:"vendor"`
}

type SystemVendorType

type SystemVendorType struct {
	Manufacturer string             `json:"manufacturer"`
	ProductName  string             `json:"product_name"`
	SerialNumber string             `json:"serial_number"`
	Firmware     SystemFirmwareType `json:"firmware"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL