diff --git a/providers/supermicro/x13.go b/providers/supermicro/x13.go index a9b3cf26..1bf3673c 100644 --- a/providers/supermicro/x13.go +++ b/providers/supermicro/x13.go @@ -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 +}