Add BIOS reset command to admin cli#3564
Conversation
Signed-off-by: Reuben Elliott <reubenelliott12345@gmail.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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Summary by CodeRabbit
WalkthroughAdds a ChangesRedfish BIOS reset
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant action
participant Redfish
participant SystemPowerControl
CLI->>action: Invoke reset-bios
action->>Redfish: reset_bios()
alt --reboot supplied
action->>SystemPowerControl: ForceRestart
else --reboot omitted
action-->>CLI: Report restart required
end
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@docs/manuals/nico-admin-cli/commands/redfish/redfish-reset-bios.md`:
- Around line 12-13: Update the reset-bios command synopsis to show the required
value placeholder for --sort-by, matching the --sort-by <SORT_BY> declaration in
the options section while preserving the existing formatting and other options.
- Around line 15-22: Update the DESCRIPTION and --reboot option documentation
for the BIOS reset command to state that it returns once the BMC accepts the
reset request, while a restart is required for the settings to take effect.
Clarify that --reboot performs a forced restart after a successful reset.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6f0cc236-b823-4dcb-9a14-d5481bc0de1a
📒 Files selected for processing (5)
crates/admin-cli/src/redfish/args.rscrates/admin-cli/src/redfish/cmds.rscrates/admin-cli/src/redfish/tests.rsdocs/manuals/nico-admin-cli/commands/redfish/redfish-reset-bios.mddocs/manuals/nico-admin-cli/commands/redfish/redfish.md
Signed-off-by: Reuben Elliott <reubenelliott12345@gmail.com>
|
@SnobbishFish40 I've bumped libredfish to |
| **--extended** | ||
| Extended result output. | ||
|
|
||
| This used by measured boot, where basic output contains just what you |
There was a problem hiding this comment.
| This used by measured boot, where basic output contains just what you | |
| This is used by measured boot, where basic output contains just what you |
|
I thought there were versions of redfish commands that went through the API so you wouldn't need to find/know the bmc credentials. Was I dreaming? |
Adds a direct
nico-admin-cli redfish reset-bioscommand for restoring BIOS settings to factory defaults. This allows operators to reset BIOS before a machine has been ingested by NICo, when no machine ID is available, without manually constructing Redfish requests.The command targets a BMC using its address and credentials. By default, it exits once the BMC accepts the BIOS-reset request and informs the operator that a restart is required. Passing
--rebootsubmits a force restart after the BIOS-reset request succeeds.The command uses libredfish’s vendor-specific
reset_bios()implementation. NVIDIA GBx00 and GH200 support depends on the linked libredfish PR and a subsequent NICo dependency update.Related issues
Type of Change
Breaking Changes
Testing
Additional Notes
This PR will not support GBx00 or GH200 until the related libredfish PR is merged and NICo’s libredfish dependency is updated to a tag containing it.