Redfishtool icon indicating copy to clipboard operation
Redfishtool copied to clipboard

how do we send multipart/form-data and file information via redfishtool.py ?

Open mungayree opened this issue 4 years ago • 3 comments

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

mungayree avatar Jun 23 '20 22:06 mungayree

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.

mraineri avatar Jun 26 '20 13:06 mraineri

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 .

mungayree avatar Jun 26 '20 16:06 mungayree

Short Term

rosedahl avatar Jul 27 '20 18:07 rosedahl