redfish: filter PCIe topology noise, deduplicate GPU/NIC cross-sources
- isUnidentifiablePCIeDevice: skip PCIe entries with generic class (SingleFunction/MultiFunction) and no model/serial/VendorID — eliminates PCH bridges, root ports and other bus infrastructure that MSI BMC enumerates exhaustively (59→9 entries on CG480-S5063) - collectPCIeDevices: skip entries where looksLikeGPU — prevents GPU devices from appearing in both hw.GPUs and hw.PCIeDevices (fixed Inspur H100 duplicate) - dedupeCanonicalDevices: secondary model+manufacturer match for noKey items (no serial, no BDF) — merges NetworkAdapter entries into matching PCIe device entries; isGenericDeviceClass helper for DeviceClass identity check (fixed Inspur ENFI1100-T4 duplicate) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1261,7 +1261,13 @@ func (r redfishSnapshotReader) collectPCIeDevices(systemPaths, chassisPaths []st
|
||||
}
|
||||
for _, doc := range memberDocs {
|
||||
functionDocs := r.getLinkedPCIeFunctions(doc)
|
||||
if looksLikeGPU(doc, functionDocs) {
|
||||
continue
|
||||
}
|
||||
dev := parsePCIeDevice(doc, functionDocs)
|
||||
if isUnidentifiablePCIeDevice(dev) {
|
||||
continue
|
||||
}
|
||||
out = append(out, dev)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user