Skip to content

feat: Fix system order for Lenovo GB300#89

Open
hakhondzadeh wants to merge 5 commits into
NVIDIA:mainfrom
hakhondzadeh:LenovoGB300
Open

feat: Fix system order for Lenovo GB300#89
hakhondzadeh wants to merge 5 commits into
NVIDIA:mainfrom
hakhondzadeh:LenovoGB300

Conversation

@hakhondzadeh

Copy link
Copy Markdown

Previous platforms found System_0 in systems.first() but Lenovo GB300 has it as the second.

GB200 redfish/v1/systems/index.json

{
    "@odata.id": "/redfish/v1/Systems",
    "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
    "Members": [
        {
            "@odata.id": "/redfish/v1/Systems/System_0"
        },
        {
            "@odata.id": "/redfish/v1/Systems/HGX_Baseboard_0"
        }
    ],
    "Members@odata.count": 2,
    "Name": "Computer System Collection"
}

GB300, redfish/v1/systems/index.json:

  "@odata.context": "/redfish/v1/$metadata#ComputerSystemCollection.ComputerSystemCollection",
    "@odata.etag": "\"1765104551\"",
    "@odata.id": "/redfish/v1/Systems",
    "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
    "Description": "Collection of Computer Systems",
    "Members": [
        {
            "@odata.id": "/redfish/v1/Systems/HGX_Baseboard_0"
        },
        {
            "@odata.id": "/redfish/v1/Systems/System_0"
        }
    ],
    "Members@odata.count": 2,
    "Name": "Systems Collection"

This PR introduces LenovoGN300 vendor and finds the system_0 with iterating over members rather than taking the first.

Comment thread src/network.rs
@hakhondzadeh hakhondzadeh marked this pull request as draft June 12, 2026 06:45
@hakhondzadeh hakhondzadeh marked this pull request as ready for review June 12, 2026 16:43
Comment thread src/ami.rs Outdated
Comment thread src/ami.rs Outdated
@hakhondzadeh hakhondzadeh changed the title feat: new vendor LenovoGB300 feat: Fix system order for Lenovo GB300 Jun 15, 2026
Comment thread src/network.rs
})?;
let is_lenovo_gb300 = vendor == RedfishVendor::AMI
&& Self::detect_lenovo_gb300(&s, &systems, &chassis).await?;
let system_id = if is_lenovo_gb300 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detect_lenovo_gb300 already guarantees that System_0 exists, you can replace it with:

let system_id: &str = if vendor == RedfishVendor::AMI
        && Self::detect_lenovo_gb300(&s, &systems, &chassis).await?
    {
        "System_0"
    } else { ...

Comment thread src/model/service_root.rs
manufacturer.is_some_and(|m| m.eq_ignore_ascii_case("Lenovo"))
}

systems.iter().any(|id| id == "System_0")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking systems here again feels redundant, maybe you can replace it with:

    baseboard_model.is_some_and(|m| m.to_lowercase().contains("gb300"))
        && is_lenovo(host_system_manufacturer)
        && is_lenovo(host_chassis_manufacturer)

@martinraumann

Copy link
Copy Markdown

Did we mean to remove NTP support here that was just added in #87?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants