This post is more than 5 years old
1 Rookie
•
11 Posts
0
11656
July 18th, 2018 03:00
Using the redfish api to change bios settings
Can the redfish api be used to change a bios setting on a poweredge server (C6320) ?
I can get it to report the settings but can't change anything & all the dell api info I can find is quite vague about using the patch command to make a change.
It's very easily done on an HP e.g. using the python requests module.
requests.patch(https://iLO_or_IDRAC_address/redfish/v1/Systems/1/Bios/Settings,json={"AdminName":"test"},verify=False,auth=('USERID','PASSWORD'))
but a similar approach on Dells using "redfish/v1/Systems/System.Embedded.1/Bios" & a Dell specific key:value pair doesn't work.
I'm using the latest iDrac/lifecycle controller firmware etc.
Can we "PATCH" a bios setting directly or do we need to create a job to do it ?
Thanks.


DELL-Chris H
Moderator
•
9.7K Posts
0
July 18th, 2018 08:00
CM9999,
It does appear that you can use Redfish API to change BIOS attributes, as seen on page 24 here, which also appears to provide examples. Just on a side note, this would require the latest updates for the BIOS and iDrac of your system.
cm9999
1 Rookie
•
11 Posts
0
July 19th, 2018 05:00
Thanks, it looks like the Dell implementation uses a different URL for GET (to retrieve the current BIOS settings) and PATCH (to change a setting)
eg
requests.get('https://IDRAC/redfish/v1/Systems/System.Embedded.1/Bios',verify=False,auth=('USERID','PASSWORD')).json() requests.patch('https://IDRAC/redfish/v1/Systems/System.Embedded.1/Bios/Settings','{"Attributes": {"NumLock": "Off"}}', headers=headers, verify=False,auth=('USERID','PASSWORD'))That seems to work in that it changes the pending value.
The sample script also then creates a BIOS target config job which applies the change.