ProLiant Servers (ML,DL,SL)
1844331 Members
4168 Online
110230 Solutions
New Discussion

Re: Query: Upload iLO firmware via redfish API

 
BradV
Esteemed Contributor

Upload iLO firmware via redfish API

Could someone point out what I might be doing incorrectly?  I've tried with both the ilo5_278.fwpkg and the extracted ilo5_278.bin.  I get the same output:

{
  "error": {
    "code": "iLO.0.10.ExtendedInfo",
    "message": "See @Message.ExtendedInfo for mor information.",
    "@Message.ExtendedInfo": [
      {
        "MessageId": "iLO.2.14.UpdateInvalidfile"
      }
    ]
  }
}

I'm using:

# Get OneView session ID
SERVER=my-fqdn.org
ACTV=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])"'serverName' = '${SERVER}'\"")
UUID=$(curl --insecure --header "X-API-Version: ${currentVersion}" --header "auth: ${sessionID}" --silent \
   --request GET ${OneView}/rest/server-hardware?filter=${ACTV} | jq -r '.members[] | .uuid'})
read iLOSSO iLOAuth <<< $(curl --silent --insecure --header "X-API-Version: ${currentVersion}" --header "auth: ${sessionID}" \
   --request GET ${OneView}/rest/server-hardware/${UUID}/remoteConsoleUrl | \
   jq -r '.remoteConsoleUrl ' | sed -e 's|hplocons|https|' -e 's|addr=||' \
   -e 's|^\(.*\)&sessionkey=\(.*\)$|\1 \2|')
FIL=ilo5_278.fwpkg
# This firmware file is larger than 32MB.  So, need to split it:
dd if=${FIL} of=${FIL}.part1 bs=1m count=32
dd if=${FIL} of=${FIL}.part2 bs=1m skip=32
# Place the files on a web server
DIR='https://my-web.server.org/firmware'
for f in {1..2}; do
   DATA='{"ImageURI":"'${DIR}/${FIL}.part${f}'","UpdateRepository":true,"UpdateTarget":false,"ComponentFileName":"'${FIL}'","Section":'${f}'}'
   curl --silent --insecure --max-time 1200 --header "accept: application/json" \
      --header "X-Auth-Token: ${iLOAuth}" --header "content-type: application/json; charset=utf-8" \
      --data ${DATA} --request POST ${iLOSSO}/redfish/v1/UpdateService/Actions/Oem/Hpe/HpeiLOUpdateServiceExt.AddFromUri | jq -r '.'
done  
3 REPLIES 3
support_s
System Recommended

Query: Upload iLO firmware via redfish API

System recommended content:

1. HPE iLO 5 Scripting and Command Line Guide

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".

 

Thank you for being a HPE valuable community member.


Accept or Kudo

BradV
Esteemed Contributor

Re: Query: Upload iLO firmware via redfish API

I looked at the scripting guide and the iLO5 user guide.  There is nothing in either of those relative to this.

TVVJ
HPE Pro

Re: Query: Upload iLO firmware via redfish API

Hello,

You may refer to the "RESTful Interface Tool User Guide" and see if it is of any help.

Regards,



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[All opinions expressed here are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo