Redfishtool
Redfishtool copied to clipboard
how do we send multipart/form-data and file information via redfishtool.py ?
via redfishtool.py, I would like to send content-type as multipart/form-data and file information. I have this command via CURL, but how can we send this via redfishtool.py ?
time curl -k -u Administrator:superuser -X POST -H 'content-type: multipart/form-data' -F
image_file=@$(pwd)/afile-v130.tgz
https://<IP>/redfish/v1/UpdateService/Actions/Oem/UpdateService.FwUpldBundle
Currently that's not really possible. We could accommodate having the tool send a multipart request for something like an operation to the UpdateService when trying to perform an update, but all raw types of requests in the tool currently expect JSON encoding.
Thanks Mike. CURL supports a -F option, Can the -F option to redfishtool.py support this similar way ? Some OpenBMC implementations doing redfish can take advantage of this for doing vendor firmware/software updates.
On Fri, Jun 26, 2020 at 6:23 AM Mike Raineri [email protected] wrote:
Currently that's not really possible. We could accommodate having the tool send a multipart request for something like an operation to the UpdateService when trying to perform an update, but all raw types of requests in the tool currently expect JSON encoding.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfishtool/issues/84#issuecomment-650176690, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKBFRW6GBAD7DVPGJQT73RYSOOLANCNFSM4OGCPUAQ .