Skip to content

Commit

Permalink
providers/supermicro/x13.go: Implement bootComplete as a copy of x12's
Browse files Browse the repository at this point in the history
  • Loading branch information
splaspood committed Oct 7, 2024
1 parent 2a3bfc2 commit 663935d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions providers/supermicro/x13.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,21 @@ func (c *x13) firmwareTaskStatus(ctx context.Context, component, taskID string)

return c.redfish.TaskStatus(ctx, taskID)
}

func (c *x13) getBootProgress() (*redfish.BootProgress, error) {
bps, err := c.redfish.GetBootProgress()
if err != nil {
return nil, err
}
return bps[0], nil
}

// this is some syntactic sugar to avoid having to code potentially provider- or model-specific knowledge into a caller
func (c *x13) bootComplete() (bool, error) {
bp, err := c.getBootProgress()
if err != nil {
return false, err
}
// we determined this by experiment on X12STH-SYS with redfish 1.14.0
return bp.LastState == redfish.SystemHardwareInitializationCompleteBootProgressTypes, nil
}

0 comments on commit 663935d

Please sign in to comment.