mirror of
https://github.com/bmc-toolbox/bmclib.git
synced 2025-06-03 05:14:43 +00:00
Redfish nextboot update (#318)
This commit is contained in:
commit
f7c4e136f1
2
go.mod
2
go.mod
@ -12,7 +12,7 @@ require (
|
||||
github.com/jacobweinstock/registrar v0.4.6
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stmcginnis/gofish v0.13.1-0.20221107140645-5cc43fad050f
|
||||
github.com/stmcginnis/gofish v0.14.0
|
||||
github.com/stretchr/testify v1.7.2
|
||||
golang.org/x/crypto v0.1.0
|
||||
golang.org/x/exp v0.0.0-20230127130021-4ca2cb1a16b7
|
||||
|
4
go.sum
4
go.sum
@ -39,8 +39,8 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/stmcginnis/gofish v0.13.1-0.20221107140645-5cc43fad050f h1:/nAm+3jDIM9pMfSlY2Lr0wCh4WFEhgbACuX9FpYAJ4k=
|
||||
github.com/stmcginnis/gofish v0.13.1-0.20221107140645-5cc43fad050f/go.mod h1:BLDSFTp8pDlf/xDbLZa+F7f7eW0E/CHCboggsu8CznI=
|
||||
github.com/stmcginnis/gofish v0.14.0 h1:geECNAiG33JDB2x2xDkerpOOuXFqxp5YP3EFE3vd5iM=
|
||||
github.com/stmcginnis/gofish v0.14.0/go.mod h1:BLDSFTp8pDlf/xDbLZa+F7f7eW0E/CHCboggsu8CznI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
|
@ -61,9 +61,16 @@ func (c *Client) SystemBootDeviceSet(ctx context.Context, bootDevice string, set
|
||||
boot.BootSourceOverrideMode = rf.LegacyBootSourceOverrideMode
|
||||
}
|
||||
|
||||
err = system.SetBoot(boot)
|
||||
if err != nil {
|
||||
return false, err
|
||||
if err = system.SetBoot(boot); err != nil {
|
||||
// Some redfish implementations don't like all the fields we're setting so we
|
||||
// try again here with a minimal set of fields. This has shown to work with the
|
||||
// Redfish implementation on HP DL160 Gen10.
|
||||
secondTry := rf.Boot{}
|
||||
secondTry.BootSourceOverrideTarget = boot.BootSourceOverrideTarget
|
||||
secondTry.BootSourceOverrideEnabled = boot.BootSourceOverrideEnabled
|
||||
if err = system.SetBoot(secondTry); err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user