dell: filter chipset/embedded noise from PCIe device list

Skip FQDD prefixes that are internal AMD EPYC fabric or devices
already captured with richer data from other DCIM views:
- HostBridge/P2PBridge/ISABridge/SMBus.Embedded: AMD internal bus
- AHCI.Embedded: AMD FCH SATA (chipset, not a slot)
- Video.Embedded: BMC Matrox G200eW3, not user-visible
- NIC.Embedded: duplicates DCIM_NICView entries (no model/MAC in PCIe view)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-03-06 12:09:40 +03:00
parent 19d857b459
commit f09344e288

View File

@@ -424,12 +424,33 @@ func parsePowerSupplyView(props map[string]string, result *models.AnalysisResult
result.Hardware.PowerSupply = append(result.Hardware.PowerSupply, psu)
}
// pcieFQDDNoisePrefix lists FQDD prefixes that represent internal chipset/CPU
// components or devices already captured with richer data elsewhere:
// - HostBridge/P2PBridge/ISABridge/SMBus: AMD EPYC internal fabric, not PCIe slots
// - AHCI.Embedded: AMD FCH SATA, not a slot device
// - Video.Embedded: BMC/iDRAC Matrox graphics chip, not user-visible
// - NIC.Embedded: already parsed from DCIM_NICView with model and MAC addresses
var pcieFQDDNoisePrefix = []string{
"HostBridge.Embedded.",
"P2PBridge.Embedded.",
"ISABridge.Embedded.",
"SMBus.Embedded.",
"AHCI.Embedded.",
"Video.Embedded.",
"NIC.Embedded.",
}
func parsePCIeDeviceView(props map[string]string, result *models.AnalysisResult) {
desc := strings.TrimSpace(firstNonEmpty(props["devicedescription"], props["description"]))
fqdd := strings.TrimSpace(firstNonEmpty(props["fqdd"], props["instanceid"]))
if desc == "" && fqdd == "" {
return
}
for _, prefix := range pcieFQDDNoisePrefix {
if strings.HasPrefix(fqdd, prefix) {
return
}
}
p := models.PCIeDevice{
Slot: fqdd,
Description: desc,