Skip to content

Commit

Permalink
ResetBiosConfiguration() functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
splaspood committed Apr 12, 2024
1 parent 6f61ba9 commit 6d2a8b4
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion internal/redfishwrapper/bios.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@ func (c *Client) SetBiosConfiguration(ctx context.Context, biosConfig map[string
}

func (c *Client) ResetBiosConfiguration(ctx context.Context) (err error) {
// TODO(jwb) do the reset :P
systems, err := c.Systems()
if err != nil {
return err
}

for _, sys := range systems {
if !c.compatibleOdataID(sys.ODataID, knownSystemsOdataIDs) {
continue
}

bios, err := sys.Bios()
if err != nil {
return err
}

err = bios.ResetBios()

if err != nil {
return err
}
}

return nil
}

0 comments on commit 6d2a8b4

Please sign in to comment.