fix(xfusion): emit OCP NIC ports with no serial so reanimator keys them by MAC
Verified against reanimator/core: it keys a NIC component on serial → MAC → synthetic(slot). A BMC dump carrying the card serial collapses both ports into one serial-keyed component, while a live-CD bundle (no serial) keeps two MAC-keyed components, so alternating the two sources produced a spurious COMPONENT_REMOVED + 2x COMPONENT_INSTALLED every time. Emitting the per-port NetworkAdapter entries with an empty serial makes both sources key on the port MAC and yield the same two components. The card serial still reaches the export via the FRU record and the legacy NIC entry. Also records ADL-062 findings from reading the ingesting audit tool: it persists only vendor/model/serial per component (no size/speed/link/clock/wattage), so the remaining one-sided field diffs between the two bundles cannot generate change events. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VFy4m7cVv4cqp25jJh2gSB
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
9b2c654182
commit
8e7f22077d
+7
-2
@@ -218,8 +218,13 @@ Product Name: G5500 V7
|
||||
if a.Firmware != "26.39.2048" {
|
||||
t.Fatalf("adapter %s firmware = %q, want 26.39.2048", a.BDF, a.Firmware)
|
||||
}
|
||||
if a.SerialNumber != "02Y238X6RC000058" {
|
||||
t.Fatalf("adapter %s serial = %q, want 02Y238X6RC000058", a.BDF, a.SerialNumber)
|
||||
// Ports keyed by MAC, not by the shared card serial, so a BMC dump and an
|
||||
// lspci-based bundle produce the same components.
|
||||
if a.SerialNumber != "" {
|
||||
t.Fatalf("adapter %s serial = %q, want empty (MAC-keyed)", a.BDF, a.SerialNumber)
|
||||
}
|
||||
if a.PartNumber != "0302Y238" {
|
||||
t.Fatalf("adapter %s part number = %q, want 0302Y238", a.BDF, a.PartNumber)
|
||||
}
|
||||
}
|
||||
if got := byBDF["0000:27:00.0"].MACAddresses; len(got) != 1 || got[0] != "44:1A:4C:16:E8:03" {
|
||||
|
||||
Reference in New Issue
Block a user