-PASS: POST command passed to convert disk "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1" to RAID, status code 200 returned
- Job ID JID_419384593171 successfully created for storage method "ConvertToRAID"
Traceback (most recent call last):
File "iDRAC-Redfish-Scripting/Redfish Python/ConvertToRAIDREDFISH.py", line 177, in <module>
loop_job_status()
File "iDRAC-Redfish-Scripting/Redfish Python/ConvertToRAIDREDFISH.py", line 163, in loop_job_status
print("- WARNING, JobStatus not completed, current status: \"%s\", percent complete: \"%s\"" % (data[u'Message'],data[u'PercentComplete']))
KeyError: 'PercentComplete'
adding a try on the variable makes it non invasive and solves the issue
Change
else:
print("- WARNING, JobStatus not completed, current status: \"%s\", percent complete: \"%s\"" % (data[u'Message'],data[u'PercentComplete']))
time.sleep(3)
to
try:
print("- WARNING, JobStatus not completed, current status: \"%s\", percent complete: \"%s\"" % (data[u'Message'],data[u'PercentComplete']))
time.sleep(3)
except:
continue
Hi team, Thanks for the tool it saves time to operate.
When using Redfish Python/ConvertToRAIDREDFISH.py you will have a keyerror with "PercentComplete"
Example
(_venv) $ python ConvertToRAIDREDFISH.py -ip 192.168.235.11 -u root -p calvin -n Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1
adding a try on the variable makes it non invasive and solves the issue Change
to