Fix redfish reboot logic

Power On commnad was not sent due to wrong logic around
ScreenRedfishError function.

Change-Id: Iec39c49ddf7c4df8fed16fdfe06828513692abad
This commit is contained in:
Dmitry Ukov 2019-11-16 10:50:03 -06:00
parent 49e05cc9a6
commit ca08fec157
1 changed files with 2 additions and 2 deletions

View File

@ -89,8 +89,8 @@ func RebootSystem(ctx context.Context, api redfishApi.RedfishAPI, systemId strin
resetReq := redfishClient.ResetRequestBody{}
resetReq.ResetType = redfishClient.RESETTYPE_FORCE_OFF
_, httpResp, err := api.ResetSystem(ctx, systemId, resetReq)
if err != nil {
return ScreenRedfishError(httpResp, err)
if err = ScreenRedfishError(httpResp, err); err != nil {
return err
}
time.Sleep(SystemRebootDelay)