Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion src/model/service_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ impl ServiceRoot {
_ => RedfishVendor::NvidiaDpu,
},
"wiwynn" => RedfishVendor::NvidiaGBx00,
"supermicro" => RedfishVendor::Supermicro,
"supermicro" => match self.product.as_deref() {
Some("GB NVL") => RedfishVendor::NvidiaGBx00,
_ => RedfishVendor::Supermicro,
},
"lite-on technology corp." => RedfishVendor::LiteOnPowerShelf,
"delta" => RedfishVendor::DeltaPowerShelf,
_ => RedfishVendor::Unknown,
Expand All @@ -138,6 +141,29 @@ mod test {
assert_eq!(result.vendor().unwrap(), RedfishVendor::Supermicro);
}

#[test]
fn test_supermicro_gb300_service_root() {
// Supermicro GB300 NVL exposes an OpenBMC/NVIDIA GB tree, so it must route
// to the shared GB implementation rather than the AMI Supermicro path.
let result = ServiceRoot {
vendor: Some("Supermicro".to_string()),
product: Some("GB NVL".to_string()),
..Default::default()
};
assert_eq!(result.vendor().unwrap(), RedfishVendor::NvidiaGBx00);
}

#[test]
fn test_supermicro_non_gb_service_root() {
// A classic Supermicro (no GB NVL product) still uses the Supermicro path.
let result = ServiceRoot {
vendor: Some("Supermicro".to_string()),
product: Some("SYS-821GE-TNHR".to_string()),
..Default::default()
};
assert_eq!(result.vendor().unwrap(), RedfishVendor::Supermicro);
}

#[test]
fn test_nvidia_gb_bmc_service_root() {
let result = ServiceRoot {
Expand Down
18 changes: 18 additions & 0 deletions src/nvidia_gbx00.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,24 @@ impl Redfish for Bmc {
}

impl Bmc {
/// Returns true if this is a GB300 platform.
///
/// The host system model (e.g."GB NVL") can be too vague, so detect via the HGX
/// baseboard model ("GB300 ...").
#[allow(dead_code)]
async fn is_gb300(&self) -> Result<bool, RedfishError> {
let systems: Vec<ComputerSystem> = self
.get_collection(ODataId {
Comment thread
hakhondzadeh marked this conversation as resolved.
odata_id: "/redfish/v1/Systems".to_string(),
})
.await
.and_then(|c| c.try_get::<ComputerSystem>())?
.members;
Ok(systems
.iter()
.any(|s| s.model.as_deref().unwrap_or_default().contains("GB300")))
}

/// Check BIOS and BMC attributes and return differences
async fn diff_bios_bmc_attr(&self) -> Result<Vec<MachineSetupDiff>, RedfishError> {
let mut diffs = vec![];
Expand Down
Loading