HewlettPackard / python-redfish-utility

Python-based utility for interacting with devices supporting a Redfish Service
Other
85 stars 41 forks source link

ERROR: local variable 'data' referenced before assignment #38

Closed ast3rik closed 2 years ago

ast3rik commented 3 years ago

Hi,

I'm having errors getting serverinfo from remote servers running ilo4 I can see in the debug that the ilorest is connecting to ilo and gathering data but then in breaks at prettyprint with the above error. Tried with version 3.1.0, 3.1.1, 3.2.1 and 3.2.2

here are some more details: ilorest -d serverinfo --url XXX -u YYY -p ZZZ INFO : Exception: UnboundLocalError(local variable 'data' referenced before assignment) ERROR: local variable 'data' referenced before assignment Traceback (most recent call last): File "rdmc.py", line 302, in run File "rdmc.py", line 187, in _run_command File "extensions/iLO COMMANDS/ServerInfoCommand.py", line 71, in run File "extensions/iLO COMMANDS/ServerInfoCommand.py", line 143, in gatherinfo UnboundLocalError: local variable 'data' referenced before assignment

before that you can see

DEBUG : _loading /rest/v1/systems/1/bios/settings DEBUG : HTTP REQUEST: GET PATH: /rest/v1/systems/1/bios/settings HEADERS: {'Accept-Encoding': 'gzip', 'X-Auth-Token': 'e53965fe8b417268bf29ba0b24bc5f26'} BODY: None DEBUG : https://XXX:443 "GET /rest/v1/systems/1/bios/settings HTTP/1.1" 200 4288 INFO : Response Time to /rest/v1/systems/1/bios/settings: 1.03761601448 seconds. DEBUG : HTTP RESPONSE for /rest/v1/systems/1/bios/settings: Code:200 OK

Server information: iLO Firmware Version | 2.78 Apr 28 2021 System ROM | U17 v2.80 (10/16/2020) System ROM Date | 10/16/2020

~]$ ilorest login XXX -u YYY -p ZZZ iLOrest : RESTful Interface Tool version 3.1.1 Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP

Discovering data...Done [w87bnrt@lxf02p31 ~]$ ilorest serverinfo iLOrest : RESTful Interface Tool version 3.1.1 Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP

ERROR: local variable 'data' referenced before assignment

even when trying it this way: ~]$ ilorest iLOrest : RESTful Interface Tool version 3.1.1 Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP

Both remote and local mode is accessible when RESTful Interface Tool is run as administrator. Only remote mode is available for non-admin user groups. iLOrest > login XXX -u YYY -p ZZZ Discovering data...Done iLOrest > serverinfo ERROR: local variable 'data' referenced before assignment iLOrest >

When I try the same for ilo 5 ~]$ ilorest serverinfo --url XXXX -u YYY -p ZZZ iLOrest : RESTful Interface Tool version 3.1.1 Copyright (c) 2014-2020 Hewlett Packard Enterprise Development LP

Discovering data...Done

System Information:

Model: HPE ProLiant DL580 Gen10 Bios Version: U34 v2.42 (01/23/2021)

Summary: Serverinfo - not working on 3.1.x and 3.2.x for ilo4 but working for ilo5

rajeevkallur commented 2 years ago

Hi, Could you check with ilorest 3.3.0.0 and update the status of this issue?

sahanaramavana commented 2 years ago

Hi @ast3rik ,

We checked that our latest released version 3.3.0 is not giving the error on iLO 4 and iLO 5 . Kindly check at your end as well and let us know .

Thanks & Regards, iLORest Team