White Papers
25 Implementation of the DMTF Redfish API on Dell EMC PowerEdge Servers
f=open("bios_attributes.txt","a")
global current_value
global pending_value
response =
requests.get('https://%s/redfish/v1/Systems/System.Embedded.1/Bios' %
idrac_ip,verify=False,auth=(idrac_username,idrac_password))
data = response.json()
a="\n--- BIOS Attributes ---\n\n%-30s%-30s\n\n" % ("Attribute", "Value")
print a
f.writelines(a)
for i in data[u'Attributes'].items():
attribute_name = "%-30s" % (i[0])
#print attribute_name
f.writelines(attribute_name)
attribute_value = "%-30s\n" % (i[1])
#print attribute_value
f.writelines(attribute_value)
print "%-30s%-30s" % (i[0],i[1])
print "\n- Attributes are also captured in \"bios_attributes.txt\" file"
f.close()
# Run Code
get_bios_attributes()
Output (shortened for brevity):
--- BIOS Attributes ---
Attribute Value
NodeInterleave Disabled
IscsiDev1Con1EnDis Disabled
MemFrequency MaxPerf
HttpDev3EnDis Disabled
SataPortADriveType Unknown Device
MemPatrolScrub Standard
SataPortNDriveType Unknown Device
FailSafeBaud 115200
MeFailureRecoveryEnable Enabled
SystemBiosVersion 1.0.0
WriteDataCrc Disabled
MemoryRmt Disabled
WriteCache Disabled
IscsiDev1Con2EnDis Disabled
SysProfile PerfPerWattOptimizedDapc