From bc153ee5cd0e1fd3d72c8419ae9a758c8e3cbd84 Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Tue, 5 Sep 2023 15:05:21 +0200 Subject: [PATCH] Add TODO for streaming the update data --- providers/redfish/firmware.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/redfish/firmware.go b/providers/redfish/firmware.go index e2def40e..25b75e6a 100644 --- a/providers/redfish/firmware.go +++ b/providers/redfish/firmware.go @@ -173,9 +173,10 @@ func (c *Conn) unstructuredHttpUpload(ctx context.Context, url, applyAt string, return nil, fmt.Errorf("unable to execute request, no target provided") } + // TODO: transform this to read the update so that we don't hold the data in memory b, _ := io.ReadAll(update) - payloadReadSeeker := bytes.NewReader(b) + return c.redfishwrapper.RunRawRequestWithHeaders(http.MethodPost, url, payloadReadSeeker, "application/octet-stream", nil) }