diff --git a/providers/redfish/firmware.go b/providers/redfish/firmware.go index 48f95287..9db2f436 100644 --- a/providers/redfish/firmware.go +++ b/providers/redfish/firmware.go @@ -186,7 +186,7 @@ func (c *Conn) multipartHTTPUpload(ctx context.Context, url, applyAt string, upd // payload ordered in the format it ends up in the multipart form payload := &multipartPayload{ updateParameters: []byte(parameters), - updateFile: update, + updateFile: update, } return c.runRequestWithMultipartPayload(url, payload) @@ -227,28 +227,6 @@ func (c *Conn) firmwareInstallMethodURI(ctx context.Context) (method installMeth return "", "", errors.Wrap(bmclibErrs.ErrRedfishUpdateService, "unsupported update method") } -// firmwareUpdateCompatible retuns an error if the firmware update process for the BMC is not supported -func (c *Conn) firmwareUpdateCompatible(ctx context.Context) (err error) { - updateService, err := c.redfishwrapper.UpdateService() - if err != nil { - return err - } - - // TODO: check for redfish version - - // update service disabled - if !updateService.ServiceEnabled { - return errors.Wrap(bmclibErrs.ErrRedfishUpdateService, "service disabled") - } - - // for now we expect multipart HTTP push update support - if updateService.MultipartHTTPPushURI == "" { - return errors.Wrap(bmclibErrs.ErrRedfishUpdateService, "Multipart HTTP push updates not supported") - } - - return nil -} - // pipeReaderFakeSeeker wraps the io.PipeReader and implements the io.Seeker interface // to meet the API requirements for the Gofish client https://github.com/stmcginnis/gofish/blob/46b1b33645ed1802727dc4df28f5d3c3da722b15/client.go#L434 // diff --git a/providers/redfish/firmware_test.go b/providers/redfish/firmware_test.go index c42c2bfa..16b224cc 100644 --- a/providers/redfish/firmware_test.go +++ b/providers/redfish/firmware_test.go @@ -227,13 +227,6 @@ func TestMultipartPayloadSize(t *testing.T) { } } -func TestFirmwareUpdateCompatible(t *testing.T) { - err := mockClient.firmwareUpdateCompatible(context.TODO()) - if err != nil { - t.Fatal(err) - } -} - // referenced in main_test.go func openbmcStatus(w http.ResponseWriter, r *http.Request) {