fix(inspur): read RESTful FRU info and float fans_power from component.log
Diffing an NF5280M6 BMC dump against its BEE-SP live-CD bundle found two blind spots in the combined-component.log onekeylog layout (no devicefrusdr.log / asset.json): - board manufacturer/product/part/uuid empty and stats.fru 0: the "RESTful FRU info:" JSON block was never parsed. New component_fru.go (ParseComponentLogFRU) flattens it to []models.FRUInfo, prefers the product-area system serial over the board PCB serial, and sets BoardInfo.UUID from system_uuid. Wired as a fallback only when result.FRU is still empty. - zero fan sensors: FanRESTInfo.FansPower was int but this firmware writes "fans_power": 12.000000, so json.Unmarshal of the whole fan block failed. Changed to float64. Also included: SOL smartd SCSI/SAS device-line parsing and diagnose.go gofmt from concurrent work on the same live-CD-diff task. See ADL-064. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LffAvostt3uMkiUbVUiyM
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ab8636da04
commit
2fa0f78f94
+14
-14
@@ -16,20 +16,20 @@ import (
|
||||
// otrdDiagnosePCIeEntry mirrors the relevant fields of "Pcie Device Info"
|
||||
// entries in OtrdDiagnoseComponent.json.
|
||||
type otrdDiagnosePCIeEntry struct {
|
||||
LocString string `json:"LocString"`
|
||||
PcieSlot int `json:"PcieSlot"`
|
||||
PresentStatus int `json:"PresentStatus"`
|
||||
VendorId int `json:"VendorId"`
|
||||
DeviceId int `json:"DeviceId"`
|
||||
BusNumber int `json:"BusNumber"`
|
||||
DeviceNumber int `json:"DeviceNumber"`
|
||||
FunctionNumber int `json:"FunctionNumber"`
|
||||
CurrentLinkSpeed int `json:"CurrentLinkSpeed"`
|
||||
MaxLinkSpeed int `json:"MaxLinkSpeed"`
|
||||
NegotiatedLinkWidth int `json:"NegotiatedLinkWidth"`
|
||||
MaxLinkWidth int `json:"MaxLinkWidth"`
|
||||
SerialNumber *string `json:"SerialNumber"`
|
||||
PartNumber *string `json:"PartNumber"`
|
||||
LocString string `json:"LocString"`
|
||||
PcieSlot int `json:"PcieSlot"`
|
||||
PresentStatus int `json:"PresentStatus"`
|
||||
VendorId int `json:"VendorId"`
|
||||
DeviceId int `json:"DeviceId"`
|
||||
BusNumber int `json:"BusNumber"`
|
||||
DeviceNumber int `json:"DeviceNumber"`
|
||||
FunctionNumber int `json:"FunctionNumber"`
|
||||
CurrentLinkSpeed int `json:"CurrentLinkSpeed"`
|
||||
MaxLinkSpeed int `json:"MaxLinkSpeed"`
|
||||
NegotiatedLinkWidth int `json:"NegotiatedLinkWidth"`
|
||||
MaxLinkWidth int `json:"MaxLinkWidth"`
|
||||
SerialNumber *string `json:"SerialNumber"`
|
||||
PartNumber *string `json:"PartNumber"`
|
||||
}
|
||||
|
||||
type otrdDiagnoseComponent struct {
|
||||
|
||||
Reference in New Issue
Block a user