feat: add set_boot_override trait method with HttpBootUri support#74
Open
chet wants to merge 1 commit into
Open
feat: add set_boot_override trait method with HttpBootUri support#74chet wants to merge 1 commit into
chet wants to merge 1 commit into
Conversation
This PR adds a new `BootOverride` struct and `Redfish::set_boot_override` trait method that exposes full Redfish Boot override support:
- `target` -- e.g. (`UefiHttp`, `Hdd`, etc...)
- `enabled` -- e.g. (`Once`, `Continuous`, `Disabled`)
- `mode` -- e.g. (`UEFI`, `Legacy`)
- `http_boot_uri` -- (an optional `ipxe.efi` URI, which allows us to override DHCP option 67).
The `boot_once`/`boot_first` paths now route through it internally, so existing callers keep their current behavior.
The purpose of this is for upcoming feature work: when `http_boot_uri` is set together with `target = UefiHttp`, the BMC pins the boot URL, and the host will UEFI HTTP boot from it *without* needing DHCP option 67 (which we currently set with `carbide-dhcp`). When `http_boot_uri` is None, the firmware falls back to option 67 per the UEFI HTTP Boot specification. The idea is we can start controlling the `ipxe.efi` boot URL via Redfish and not need to have `carbide-dhcp` populate it via option 67, reducing depdencencies on `carbide-dhcp` as the DHCP server.
Vendor support implemented (via standard Boot resource `PATCH`) for: `nvidia_gh200`, `nvidia_gbx00`, `nvidia_dpu`, `nvidia_viking`, `nvidia_gbswitch`, `hpe`, `supermicro`, `ami`.
Returning `NotSupported` (planned as follow-up PRs) for: `dell`, `lenovo`. Both BMCs require a vendor-specific BIOS-attribute path (`HttpDev1Uri` on iDRAC, XCC equivalent on Lenovo) -- they don't expose the standard `Boot.HttpBootUri` property.
...and then `standard` and `liteon_powershelf` will just stay `NotSupported`.
It currently returns `Result<Option<String>, RedfishError>` -- `Some(job_id)` is reserved for vendors that schedule the change via a BIOS settings job (e.g. future `dell` + `lenovo` impls); current vendors apply immediately and return `None`.
Also fixes a stray trailing space in `Systems/{id}/Settings ` and `Systems/{id}/SD ` URLs across the NVIDIA family vendors.
Tests added.
Signed-off-by: Chet Nichols III <chetn@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new
BootOverridestruct andRedfish::set_boot_overridetrait method that exposes full Redfish Boot override support:target-- e.g. (UefiHttp,Hdd, etc...)enabled-- e.g. (Once,Continuous,Disabled)mode-- e.g. (UEFI,Legacy)http_boot_uri-- (an optionalipxe.efiURI, which allows us to override DHCP option 67).The
boot_once/boot_firstpaths now route through it internally, so existing callers keep their current behavior.The purpose of this is for upcoming feature work: when
http_boot_uriis set together withtarget = UefiHttp, the BMC pins the boot URL, and the host will UEFI HTTP boot from it without needing DHCP option 67 (which we currently set withcarbide-dhcp). Whenhttp_boot_uriis None, the firmware falls back to option 67 per the UEFI HTTP Boot specification. The idea is we can start controlling theipxe.efiboot URL via Redfish and not need to havecarbide-dhcppopulate it via option 67, reducing depdencencies oncarbide-dhcpas the DHCP server.Vendor support implemented (via standard Boot resource
PATCH) for:nvidia_gh200,nvidia_gbx00,nvidia_dpu,nvidia_viking,nvidia_gbswitch,hpe,supermicro,ami.Returning
NotSupported(planned as follow-up PRs) for:dell,lenovo. Both BMCs require a vendor-specific BIOS-attribute path (HttpDev1Urion iDRAC, XCC equivalent on Lenovo) -- they don't expose the standardBoot.HttpBootUriproperty....and then
standardandliteon_powershelfwill just stayNotSupported.It currently returns
Result<Option<String>, RedfishError>--Some(job_id)is reserved for vendors that schedule the change via a BIOS settings job (e.g. futuredell+lenovoimpls); current vendors apply immediately and returnNone.Also fixes a stray trailing space in
Systems/{id}/SettingsandSystems/{id}/SDURLs across the NVIDIA family vendors.Tests added.
Signed-off-by: Chet Nichols III chetn@nvidia.com