feat(exporter): collect and export storage.vendor_id/device_id (contract v2.13)
Add PCI Vendor ID / Device ID to hardware.storage[] per the updated Reanimator ingest contract, mirroring the existing pcie_devices[] fields. Populated for Redfish-collected NVMe drives (live + TSR replay, via linked PCIeFunctions) and for Inspur (from asset.json's own PcieInfo[], joined by PcieSlot). Also fixes canonicalDevicesForExport dropping the fields when converting Storage into the canonical HardwareDevice list used by the actual export path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
063587958e
commit
399eca5f49
@@ -1933,6 +1933,20 @@ func TestParseComponentDetails_UseLinkedSupplementalMetrics(t *testing.T) {
|
||||
t.Fatalf("expected drive details from supplemental metrics, got %#v", drive.Details)
|
||||
}
|
||||
|
||||
driveWithPCIeFn := parseDriveWithSupplementalDocs(
|
||||
map[string]interface{}{
|
||||
"Id": "Drive1",
|
||||
"SerialNumber": "NVME-001",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"VendorId": "0x144D",
|
||||
"DeviceId": "0xA808",
|
||||
},
|
||||
)
|
||||
if driveWithPCIeFn.VendorID != 0x144D || driveWithPCIeFn.DeviceID != 0xA808 {
|
||||
t.Fatalf("expected vendor/device id from linked PCIeFunction doc, got vendor=%#x device=%#x", driveWithPCIeFn.VendorID, driveWithPCIeFn.DeviceID)
|
||||
}
|
||||
|
||||
psu := parsePSUWithSupplementalDocs(
|
||||
map[string]interface{}{
|
||||
"MemberId": "PSU0",
|
||||
|
||||
Reference in New Issue
Block a user