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:
Mikhail Chusavitin
2026-08-11 16:04:54 +03:00
co-authored by Claude Sonnet 5
parent 063587958e
commit 399eca5f49
11 changed files with 221 additions and 4 deletions
@@ -175,6 +175,8 @@ func buildDevicesFromLegacy(hw *models.HardwareConfig) []models.HardwareDevice {
Kind: models.DeviceKindStorage,
Slot: stor.Slot,
Model: stor.Model,
VendorID: stor.VendorID,
DeviceID: stor.DeviceID,
Manufacturer: stor.Manufacturer,
RemainingEndurancePct: stor.RemainingEndurancePct,
SerialNumber: stor.SerialNumber,
@@ -771,6 +773,8 @@ func convertStorageFromDevices(devices []models.HardwareDevice, collectedAt stri
Slot: d.Slot,
Type: d.Type,
Model: d.Model,
VendorID: d.VendorID,
DeviceID: d.DeviceID,
SizeGB: d.SizeGB,
SerialNumber: d.SerialNumber,
Manufacturer: d.Manufacturer,
@@ -1452,6 +1456,8 @@ func convertStorage(storage []models.Storage, collectedAt string) []ReanimatorSt
Slot: stor.Slot,
Type: stor.Type,
Model: stor.Model,
VendorID: stor.VendorID,
DeviceID: stor.DeviceID,
SizeGB: stor.SizeGB,
SerialNumber: stor.SerialNumber,
Manufacturer: stor.Manufacturer,