Skip to content

Commit 4dec4c6

Browse files
committed
providers/redfish/firmware: removed firmwareUpdateCompatible
1 parent b85640e commit 4dec4c6

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

providers/redfish/firmware.go

+1-23
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func (c *Conn) multipartHTTPUpload(ctx context.Context, url, applyAt string, upd
186186
// payload ordered in the format it ends up in the multipart form
187187
payload := &multipartPayload{
188188
updateParameters: []byte(parameters),
189-
updateFile: update,
189+
updateFile: update,
190190
}
191191

192192
return c.runRequestWithMultipartPayload(url, payload)
@@ -227,28 +227,6 @@ func (c *Conn) firmwareInstallMethodURI(ctx context.Context) (method installMeth
227227
return "", "", errors.Wrap(bmclibErrs.ErrRedfishUpdateService, "unsupported update method")
228228
}
229229

230-
// firmwareUpdateCompatible retuns an error if the firmware update process for the BMC is not supported
231-
func (c *Conn) firmwareUpdateCompatible(ctx context.Context) (err error) {
232-
updateService, err := c.redfishwrapper.UpdateService()
233-
if err != nil {
234-
return err
235-
}
236-
237-
// TODO: check for redfish version
238-
239-
// update service disabled
240-
if !updateService.ServiceEnabled {
241-
return errors.Wrap(bmclibErrs.ErrRedfishUpdateService, "service disabled")
242-
}
243-
244-
// for now we expect multipart HTTP push update support
245-
if updateService.MultipartHTTPPushURI == "" {
246-
return errors.Wrap(bmclibErrs.ErrRedfishUpdateService, "Multipart HTTP push updates not supported")
247-
}
248-
249-
return nil
250-
}
251-
252230
// pipeReaderFakeSeeker wraps the io.PipeReader and implements the io.Seeker interface
253231
// to meet the API requirements for the Gofish client https://github.com/stmcginnis/gofish/blob/46b1b33645ed1802727dc4df28f5d3c3da722b15/client.go#L434
254232
//

providers/redfish/firmware_test.go

-7
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,6 @@ func TestMultipartPayloadSize(t *testing.T) {
227227
}
228228
}
229229

230-
func TestFirmwareUpdateCompatible(t *testing.T) {
231-
err := mockClient.firmwareUpdateCompatible(context.TODO())
232-
if err != nil {
233-
t.Fatal(err)
234-
}
235-
}
236-
237230
// referenced in main_test.go
238231
func openbmcStatus(w http.ResponseWriter, r *http.Request) {
239232

0 commit comments

Comments
 (0)