feat: add support for lenovo gb300s#2753
Conversation
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Summary by CodeRabbit
WalkthroughThe pull request introduces ChangesLenovoGB300 Hardware Support
Serial Number Normalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/site-explorer/src/redfish.rs (1)
248-255:⚠️ Potential issue | 🟠 Major | ⚡ Quick winLenovoGB300 is not using the account-id
"2"rotation path.Line 249 currently routes
RedfishVendor::LenovoGB300throughchange_password(curr_user, ...), while the explicit account-id"2"flow is in the AMI branch. That diverges from this cohort’s intended LenovoGB300 rotation contract and can fail factory-password rotation behavior.Suggested fix
- RedfishVendor::LenovoAMI - | RedfishVendor::LenovoGB300 + RedfishVendor::LenovoAMI | RedfishVendor::Supermicro | RedfishVendor::Dell | RedfishVendor::Hpe => { client .change_password(curr_user.as_str(), new_password.as_str()) @@ .map_err(map_redfish_error)?; } + RedfishVendor::LenovoGB300 => { + client + .change_password_by_id("2", new_password.as_str()) + .await + .map_err(|err| redact_password(err, new_password.as_str())) + .map_err(|err| redact_password(err, curr_password.as_str())) + .map_err(map_redfish_error)?; + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/site-explorer/src/redfish.rs` around lines 248 - 255, The RedfishVendor::LenovoGB300 vendor is currently grouped in a match arm with LenovoAMI, Supermicro, Dell, and Hpe that calls change_password with the current user. LenovoGB300 needs separate handling to use the account-id "2" rotation path instead of the curr_user path. Separate RedfishVendor::LenovoGB300 from the grouped match arm into its own dedicated match arm and implement it to use the account-id "2" rotation contract, similar to how the LenovoAMI branch handles its specialized rotation behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@crates/site-explorer/src/redfish.rs`:
- Around line 248-255: The RedfishVendor::LenovoGB300 vendor is currently
grouped in a match arm with LenovoAMI, Supermicro, Dell, and Hpe that calls
change_password with the current user. LenovoGB300 needs separate handling to
use the account-id "2" rotation path instead of the curr_user path. Separate
RedfishVendor::LenovoGB300 from the grouped match arm into its own dedicated
match arm and implement it to use the account-id "2" rotation contract, similar
to how the LenovoAMI branch handles its specialized rotation behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 51438e88-be25-46df-a244-a34ea7dc2f9d
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
Cargo.tomlcrates/bmc-explorer/src/lib.rscrates/bmc-explorer/tests/lenovo_gb300_explore.rscrates/redfish/src/libredfish/conv.rscrates/site-explorer/src/redfish.rs
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pull-request-2753.docs.buildwithfern.com/infra-controller |
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
This PR adds support for Lenovo-AMI GB300s and bumps libredfish to
v0.44.12Type of Change
Related Issue
#4099
Breaking Changes
Testing
Additional Notes