HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API for uploading new OneView update?

 
SOLVED
Go to solution
BradV
Trusted Contributor

REST API for uploading new OneView update?

I haven't found in the API reference yet, so asking here.  Is there a REST API command to upload a new version of the OneView software (the .bin file) to a current appliance?

4 REPLIES 4
Kashyap02
HPE Pro

Re: REST API for uploading new OneView update?

BradV
Trusted Contributor

Re: REST API for uploading new OneView update?

Thanks!  Not sure how I missed it?  I was searching all over.  :)

I gave it try using: 

UPD=/hp/oneview/HPE_OneView_4.10.04_update_Z7550-96558.bin
curl --insecure \
     --header "content-type: application/json" \
     --header "accept: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --form "file=@${UPD}" \
     --request POST ${OneView}/rest/appliance/firmware/image | jq -r '.'

After about a minute, it fails with: 

{
  "message": "Internal Server Error",
  "details": There was a problem while processing the request.  The request might not have completed with the required timeout, or another error might have occurred.",
  "recommendedActions": [
    "Resend the request.  If the error persists, create a support dump and contact your authorized support representative."
   ],
  "data": {},
  "errorCode": "GENERIC_HTTP_500",
  "nestedErrors": [],
  "errorSource": null
}

I tried again and got the same reply.  Is there some way to tell it to allow more time for the upload?

Kashyap02
HPE Pro

Re: REST API for uploading new OneView update?

I request you to raise a support ticket with HPE. 

I am a HPE Employee
BradV
Trusted Contributor
Solution

Re: REST API for uploading new OneView update?

My fault.  I had not read the API fully and completely.  I missed adding '--globoff' and changing the content-type to 'multipart/form-data.'  Once I did that, the file uploaded correctly using

UPD=/hp/oneview/HPE_OneView_4.10.04_update_Z7550-96558.bin
curl --insecure --globoff \
--header "content-type: multipart/form-data" \
--header "accept: application/json" \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--form "file=@${UPD}" \
--request POST ${OneView}/rest/appliance/firmware/image | jq -r '.'

 

Once, I had that, I was able to tell it to go ahead and apply the firmware update.  :)