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:
21
internal/parser/vendors/dell/parser.go
vendored
21
internal/parser/vendors/dell/parser.go
vendored
@@ -424,12 +424,33 @@ func parsePowerSupplyView(props map[string]string, result *models.AnalysisResult
|
|||||||
result.Hardware.PowerSupply = append(result.Hardware.PowerSupply, psu)
|
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) {
|
func parsePCIeDeviceView(props map[string]string, result *models.AnalysisResult) {
|
||||||
desc := strings.TrimSpace(firstNonEmpty(props["devicedescription"], props["description"]))
|
desc := strings.TrimSpace(firstNonEmpty(props["devicedescription"], props["description"]))
|
||||||
fqdd := strings.TrimSpace(firstNonEmpty(props["fqdd"], props["instanceid"]))
|
fqdd := strings.TrimSpace(firstNonEmpty(props["fqdd"], props["instanceid"]))
|
||||||
if desc == "" && fqdd == "" {
|
if desc == "" && fqdd == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
for _, prefix := range pcieFQDDNoisePrefix {
|
||||||
|
if strings.HasPrefix(fqdd, prefix) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
p := models.PCIeDevice{
|
p := models.PCIeDevice{
|
||||||
Slot: fqdd,
|
Slot: fqdd,
|
||||||
Description: desc,
|
Description: desc,
|
||||||
|
|||||||
Reference in New Issue
Block a user