Forum Stats

  • 3,851,525 Users
  • 2,263,993 Discussions
  • 7,904,766 Comments

Discussions

ILOM 4.0x RESTful API url to update firmware

User_ZGHAB
User_ZGHAB Member Posts: 12 Red Ribbon
edited Nov 8, 2018 2:09PM in Enterprise Manager Ops Center

Trying to identify the right rest api uri to execute remote upload and update of ILOM firmware .

After accessing the swagger.json documentation of the api I cant seen to find the uri for the same .

Closet I came was to the following url .....

PATCH/SP/firmware

Update properties in the SP firmware object. User role required for set = a.

Parameters

Try it out

NameDescription
Patch Options

(body)

/SP patch options

{
load_uristring

Firmware load. URI syntax and examples: ftp://user[:password]@host//absolute-file-path, ftp://user[:password]@host/relative-file-path, sftp://user[:password]@host/absolute-file-path, ex:sftp://[email protected]/tmp/file.xxx. Possible values = tftp, ftp, sftp, scp, http, https. User role required for set = a.

}

while executing the uri is successful the firmware doesn't get updared .

I have tested the uri used in the rest call ,  using the ilom cli which worked fine  , after answering  following questions ... in json form of

{"questions": [

  {

   "text": "Preserve existing SP configuration",

   "value": "true"

  },

  {

   "text": "Preserve existing BIOS configuration",

   "value": "true"

  },

  {

   "text": "Delay BIOS upgrade until next server poweroff or reset",

   "value": "true"

  }

  ]}

The current firmware version is :

"Target": "/rest/v1/System/firmware",

"system_fw_version": "4.0.0.24"

Any help is very much appreciated

Answers

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Nov 6, 2018 3:41PM
  • User_ZGHAB
    User_ZGHAB Member Posts: 12 Red Ribbon
    edited Nov 7, 2018 8:45AM

    Prior to me posting  I did try all the curl examples also tried using other rest api client ( insomnia ) still didn't get any success . Once u initiate the upload the process hung ..,  the ILOM  web interface  stops responding   , at this point the only available option is to ssh to the ILOM and reset it . The strange thing all the functions that were documented by the swagger interface are functioning  . The listed links dont even expose  these  the target uri or call details .

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Nov 7, 2018 9:25AM

    Hi.

    I have only information about problem that you provide. You not say about you test from your first post.

    On which step ( 1,2,3) ILOM stop to respond ?

    How long you wait after initiate upload porcess ?

    Can you monitor network activiti or snoop network traffic on ILOM interface ?  ( For check: Started  downloading or not ).

    Can you provide what URI and JSON request was used ?

    Which Hardware used for  this test ?

    Regards,

    Nik

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Nov 8, 2018 7:47AM

    Hi.

    Additional attantion: Some servers not support http; https as Firmware load URI.

    ( From  FW notes for X4170 M2;X4270 M2:

    Keep in mind that the package URL must use the tftp/ftp/sftp protocol. Do NOT use the http/https protocol in the PKG_URL link.  )

    Regards,

    Nik

  • User_ZGHAB
    User_ZGHAB Member Posts: 12 Red Ribbon
    edited Nov 8, 2018 8:38AM

    Hi NIK

    1- Step 1 , I waited about 10 min , I am comparing to the time it took to do the same from the cli using the upload uri ..

    2- Using python requests.ssession() object :

    payload = "{\"firmwarefile\" : \"@e:/code/iconectiv/ilom/python/ILOM-4_0_2_26_b_r125868-Oracle_Server_X6-2.pkg\"}"

    baseuri = 'https://urldefense.proofpoint.com/v2/url?u=https-3A__-257BhostName-257D-3A-257BportNr-257D_rest_v1-27.format-28hostName-3Dself.ilomHost&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=J0c9pJSHG4nYqXAMPCi8W4OODRgLT8Gma9DHAp5n8DHBwoVbFCCQ4OEmzUQt6qul&m=nXU4DA8jyb-LodAACKo8rkUAvXUDgMn8_LYxMyJMahM&s=YWU8WApBFiESXSGphKUZ9nlbeC4mnJKiFaN5MJc6ZKQ&e=, portNr=self.ilomPort)

    url = self.baseuri+'/SP/firmware/update'

    restS = requests.Session()

    restS.auth = (IlomUser, IlomPass)

    restS.headers.update({'Content-Type': 'application/json'})

    restS.verify = False

    result=restS.post(url, data=payload )

    3- Regarding snoop .. I don’t see the event being registered by the ilom logs …. Something in the initial call is wrong

    your help is very much appreciated .

    Thanks

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Nov 8, 2018 1:33PM

    Hi.

    As I undertand provided information, you try post FW file via request.

    Original doc say that you should use one from: tftp, ftp, sftp, scp, http, https,   as you do via CLI.

    Can you provide what docs used for build  your request?

    Regards,

    Nik

  • User_ZGHAB
    User_ZGHAB Member Posts: 12 Red Ribbon
    edited Nov 8, 2018 2:09PM

    Hi Nik,

    The posted was to replicate the curl example listed in the docs , and the links u listed.

    curl -v --request POST -F "firmwarefile=local_directory_location" -k -v -u "root:changeme" -H "Accept:application/json" https://urldefense.proofpoint.com/v2/url?u=https-3A__IP&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=J0c9pJSHG4nYqXAMPCi8W4OODRgLT8Gma9DHAp5n8DHBwoVbFCCQ4OEmzUQt6qul&m=mPU25OLOVeHT30d6Hq4fXo-1cq4VA4hurXX_k-gXMUI&s=Bd0tK_mf45R9lrjfy-p657ryYladoy3KMUCgaOqlkMw&e= addr:443/rest/v1/SP/firmware/update

    The issue I am having is the rest api call in the example with POST to https://urldefense.proofpoint.com/v2/url?u=https-3A__IP&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=J0c9pJSHG4nYqXAMPCi8W4OODRgLT8Gma9DHAp5n8DHBwoVbFCCQ4OEmzUQt6qul&m=mPU25OLOVeHT30d6Hq4fXo-1cq4VA4hurXX_k-gXMUI&s=Bd0tK_mf45R9lrjfy-p657ryYladoy3KMUCgaOqlkMw&e= addr:443/rest/v1/SP/firmware/update is not documented any where outside the link , or even exist in the swagger documentation .

    And yes I do need to use tftp, ftp, sftp, scp, http, https and not local file , but have no idea what needs to be the contents of the payload json data for the call .

    Thanks for you patience