White Papers

38 Implementation of the DMTF Redfish API on Dell EMC PowerEdge Servers
print "\n- %s completed in: %s" % (job_id, str(current_time)[0:7])
break
elif data[u"TaskState"] == "Completed with Errors" or data[u"TaskState"]
== "Failed":
print "\n- Job ID = "+data[u"Id"]
print "- Name = "+data[u"Name"]
try:
print "- Message = "+message_string[0][u"Message"]
except:
print "- "+data[u"Messages"][0][u"Message"]
print "- JobStatus = "+data[u"TaskState"]
print "\n- %s completed in: %s" % (job_id, str(current_time)[0:7])
sys.exit()
else:
print "- Job not marked completed, current status is: %s" %
data[u"TaskState"]
print "- Message: %s\n" % message_string[0][u"Message"]
print "- Current job execution time is: %s\n" %
str(current_time)[0:7]
time.sleep(1)
continue
# Run code here
download_image_payload()
install_image_payload()
if install_option == "NowAndReboot" or install_option == "Now":
check_job_status_host_reboot()
check_new_FW_version()
else:
check_job_status()
Output:
C:\Python26>redfish_single_device_update.py <iDRAC9 IP address> root calvin
c:\Python26 Diagnostics_Application_JF9MW_WN64_4301X06_4301.7.EXE Now
- WARNING, downloading DUP payload to iDRAC
- PASS: Command passed, 201 status code returned
- Message: Package successfully downloaded.
- FW file version is: 4301X06
- WARNING, installing downloaded firmware payload to device
- PASS, JID_956512038576 job ID successfully created