Skip to content

Commit

Permalink
Add TODO for streaming the update data
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Sep 5, 2023
1 parent 92258c6 commit bc153ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion providers/redfish/firmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

}
Expand Down

0 comments on commit bc153ee

Please sign in to comment.