Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HttpBootUri into Boot #271

Merged
merged 1 commit into from
Sep 4, 2023
Merged
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
2 changes: 2 additions & 0 deletions redfish/computersystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ type Boot struct {
UefiTargetBootSourceOverride string `json:",omitempty"`
// The link to a collection of certificates used for booting through HTTPS by this computer system.
certificates string
// The URI to boot from when BootSourceOverrideTarget is set to UefiHttp.
HTTPBootURI string `json:",omitempty"`
}

// UnmarshalJSON unmarshals a Boot object from the raw JSON.
Expand Down
7 changes: 6 additions & 1 deletion redfish/computersystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ var computerSystemBody = `{
"SDCard",
"UefiHttp"
],
"UefiTargetBootSourceOverride": "uefi device path"
"UefiTargetBootSourceOverride": "uefi device path",
"HttpBootURI": "http://localhost/boot.efi"
},
"BiosVersion": "P79 v1.00 (09/20/2013)",
"ProcessorSummary": {
Expand Down Expand Up @@ -198,6 +199,10 @@ func TestComputerSystem(t *testing.T) { //nolint
t.Errorf("Received invalid uefi target boot source: %s", result.Boot.UefiTargetBootSourceOverride)
}

if result.Boot.HTTPBootURI != "http://localhost/boot.efi" {
t.Errorf("Received invalid http boot uri: %s", result.Boot.HTTPBootURI)
}

if result.ProcessorSummary.Status.State != common.EnabledState {
t.Errorf("Received invalid processor summary state: %s", result.ProcessorSummary.Status.State)
}
Expand Down