perf(redfish): bound Giga B300 inventory crawl
This commit is contained in:
1 parent
3ac19f37b8
commit
29371f69ee
9 files changed
+432
-6
No files matched your search
@@ -83,6 +83,94 @@ func TestBuildAcquisitionPlan_HGXDisablesNVMePostProbe(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMatchProfiles_GigaManufacturerAloneDoesNotClaimAST2600(t *testing.T) {
|
||||
match := MatchProfiles(MatchSignals{
|
||||
ServiceRootVendor: "AMI",
|
||||
SystemManufacturer: "Giga Computing",
|
||||
SystemModel: "Generic Server",
|
||||
OEMNamespaces: []string{"Ami"},
|
||||
})
|
||||
for _, profile := range match.Profiles {
|
||||
if profile.Name() == "giga-ast2600" {
|
||||
t.Fatal("did not expect Giga AST2600 profile without Gbt/Gct OEM evidence")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildAcquisitionPlan_GigaAST2600NonAcceleratorKeepsGenericRecovery(t *testing.T) {
|
||||
signals := MatchSignals{
|
||||
ServiceRootVendor: "AMI",
|
||||
SystemManufacturer: "Giga Computing",
|
||||
SystemModel: "R-series server",
|
||||
OEMNamespaces: []string{"Ami", "Gbt", "Gct"},
|
||||
ResourceHints: []string{"/redfish/v1/Systems/Self", "/redfish/v1/Chassis/Self"},
|
||||
}
|
||||
match := MatchProfiles(signals)
|
||||
plan := BuildAcquisitionPlan(signals)
|
||||
found := false
|
||||
for _, profile := range match.Profiles {
|
||||
if profile.Name() == "giga-ast2600" {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
t.Fatal("expected Giga AST2600 profile with Gbt/Gct OEM evidence")
|
||||
}
|
||||
if !plan.Tuning.PostProbePolicy.EnableNumericCollectionProbe {
|
||||
t.Fatal("expected non-accelerator Giga platform to retain generic numeric recovery")
|
||||
}
|
||||
if plan.Tuning.SnapshotMaxDocuments == 12000 {
|
||||
t.Fatal("did not expect G894/B300 snapshot cap on a generic Giga server")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCollectSignalsFromTree_GigaComposedSystemPrefersHostSelf(t *testing.T) {
|
||||
tree := map[string]interface{}{
|
||||
"/redfish/v1": map[string]interface{}{
|
||||
"Vendor": "AMI",
|
||||
"Product": "AMI Redfish Server",
|
||||
"Oem": map[string]interface{}{
|
||||
"Ami": map[string]interface{}{},
|
||||
},
|
||||
},
|
||||
"/redfish/v1/Systems": map[string]interface{}{
|
||||
"Members": []interface{}{
|
||||
map[string]interface{}{"@odata.id": "/redfish/v1/Systems/HGX_Baseboard_0"},
|
||||
map[string]interface{}{"@odata.id": "/redfish/v1/Systems/Self"},
|
||||
},
|
||||
},
|
||||
"/redfish/v1/Systems/HGX_Baseboard_0": map[string]interface{}{
|
||||
"Manufacturer": "NVIDIA",
|
||||
"Model": "NA",
|
||||
},
|
||||
"/redfish/v1/Systems/Self": map[string]interface{}{
|
||||
"Manufacturer": "Giga Computing",
|
||||
"Model": "G894-SD3-AAX7-000",
|
||||
"Oem": map[string]interface{}{
|
||||
"Gbt": map[string]interface{}{},
|
||||
"Gct": map[string]interface{}{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
signals := CollectSignalsFromTree(tree)
|
||||
if signals.SystemManufacturer != "Giga Computing" || signals.SystemModel != "G894-SD3-AAX7-000" {
|
||||
t.Fatalf("expected host Self identity, got manufacturer=%q model=%q", signals.SystemManufacturer, signals.SystemModel)
|
||||
}
|
||||
match := MatchProfiles(signals)
|
||||
found := false
|
||||
for _, profile := range match.Profiles {
|
||||
if profile.Name() == "giga-ast2600" {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
t.Fatal("expected Giga AST2600 profile from composed snapshot")
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveAcquisitionPlan_ExpandsScopedPaths(t *testing.T) {
|
||||
signals := MatchSignals{}
|
||||
match := MatchProfiles(signals)
|
||||
|
||||
Reference in new issue
Block a user