feat(models): resolve CPU serial from source PPIN as common fallback
Centralize CPU identity in models.ResolveCPUSerialNumber: an explicit source serial wins, otherwise a valid source PPIN is used, placeholders rejected. Dell, H3C and Redfish apply it while parsing; canonical-device and Reanimator conversion apply it again at the output boundary. No identity is synthesized from socket/model/board serial. See ADL-058. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
9d701885da
commit
07c270cda2
@@ -1557,8 +1557,8 @@ func TestParseCPU_UsesPublicSerialAsPPINAndCurrentSpeedMHz(t *testing.T) {
|
||||
if cpus[0].PPIN != "6FB5241E81CECDFD" {
|
||||
t.Fatalf("expected PPIN from Oem.Public.SerialNumber, got %+v", cpus[0])
|
||||
}
|
||||
if cpus[0].SerialNumber != "" {
|
||||
t.Fatalf("expected empty CPU serial number when only Public serial exists, got %+v", cpus[0])
|
||||
if cpus[0].SerialNumber != "6FB5241E81CECDFD" {
|
||||
t.Fatalf("expected CPU serial number to fall back to PPIN, got %+v", cpus[0])
|
||||
}
|
||||
if cpus[0].FrequencyMHz != 2700 {
|
||||
t.Fatalf("expected CPU frequency from Oem.Public.CurrentSpeedMHz, got %+v", cpus[0])
|
||||
|
||||
Reference in New Issue
Block a user