Skip to content

Commit

Permalink
add some requested comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVin committed Oct 4, 2024
1 parent e2d487b commit 841d66a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions internal/redfishwrapper/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ func redfishVersionMeetsOrExceeds(version string, major, minor, patch int) bool
}

func (c *Client) GetBootProgress() ([]*redfish.BootProgress, error) {
// The redfish standard adopts the BootProgress object in 1.13.0. Earlier versions of redfish return
// json NULL, which gofish turns into a zero-value object of BootProgress. We gate this on the RedfishVersion
// to avoid the complexity of interpreting whether a given value is legitimate.
if !redfishVersionMeetsOrExceeds(c.client.Service.RedfishVersion, 1, 13, 0) {
return nil, fmt.Errorf("%w: %s", bmclibErrs.ErrRedfishVersionIncompatible, c.client.Service.RedfishVersion)
}
Expand Down
2 changes: 1 addition & 1 deletion providers/supermicro/x12.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,6 @@ func (c *x12) bootComplete() (bool, error) {
if err != nil {
return false, err
}
// we determined this by experiment on SYS-510T-MR with redfish 1.14.0
// we determined this by experiment on X12STH-SYS with redfish 1.14.0
return bp.LastState == redfish.SystemHardwareInitializationCompleteBootProgressTypes, nil
}

0 comments on commit 841d66a

Please sign in to comment.