fix(parser): expose NVIDIA HGX tray/baseboard identity separately from vendor carrier FRU
Inspur/Kaytus onekeylog dumps only exposed the mechanical carrier FRU serial (component/fru.txt Board Product) as board identity. That serial doesn't change when the actual NVIDIA HGX baseboard (SXM+NVSwitch "delta board") is swapped, causing false "board unchanged" conclusions. Parse the real HGX tray/baseboard Model/PartNumber/SerialNumber triples from HGX_HWInfo_FWVersion.log into a new HardwareConfig.HGX field, and normalize Redfish's NA/N-A placeholders to empty across HGX identity parsing. Closes #21 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -106,6 +106,26 @@ type HardwareConfig struct {
|
||||
NetworkCards []NIC `json:"network_cards,omitempty"`
|
||||
NetworkAdapters []NetworkAdapter `json:"network_adapters,omitempty"`
|
||||
PowerSupply []PSU `json:"power_supplies,omitempty"`
|
||||
HGX *HGXIdentity `json:"hgx,omitempty"`
|
||||
}
|
||||
|
||||
// HGXAssemblyIdentity is the Model/PartNumber/SerialNumber triple for one
|
||||
// NVIDIA HGX Redfish assembly (tray or baseboard), read from HWInfo/FWVersion.
|
||||
type HGXAssemblyIdentity struct {
|
||||
Model string `json:"model,omitempty"`
|
||||
PartNumber string `json:"part_number,omitempty"`
|
||||
SerialNumber string `json:"serial_number,omitempty"`
|
||||
}
|
||||
|
||||
// HGXIdentity holds the NVIDIA HGX hardware identity as reported by the BMC's
|
||||
// HGX_HWInfo_FWVersion.log Redfish snapshot. This is distinct from BoardInfo:
|
||||
// BoardInfo/vendor FRU describe the mechanical carrier/tray shipped by the
|
||||
// server OEM (e.g. Inspur's YZCA-* part), which does not change when the
|
||||
// NVIDIA HGX baseboard ("delta board") itself is replaced. Tray/Baseboard
|
||||
// here are the actual NVIDIA-assigned identities that do change on a swap.
|
||||
type HGXIdentity struct {
|
||||
Tray HGXAssemblyIdentity `json:"tray,omitempty"`
|
||||
Baseboard HGXAssemblyIdentity `json:"baseboard,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user