-
Notifications
You must be signed in to change notification settings - Fork 92
Set BIOS UEFI shell startup
If not created already, create an instance of Rest or Redfish Object using the RestObject or RedfishObject class respectively. The class constructor takes iLO hostname/ ip address, iLO login username and password as arguments. The class also initializes a login session, gets systems resources and message registries.
Rest Object creation:
REST_OBJ = RestObject(iLO_host, login_account, login_password)
Redfish Object creation:
REDFISH_OBJ = RedfishObject(iLO_host, login_account, login_password)
The method ex34_set_bios_uefi_shell_startup takes an instance of rest object ( or redfish object if using Redfish API ) and BIOS service settings as arguments.
def ex34_set_bios_uefi_shell_startup(restobj, uefienabled="Enabled", networkpath="", urlpath="", bios_password=None):
Find and get the BIOS settings URI from the systems resources collection.
instances = restobj.search_for_type("Bios.")
For the UEFI settings, prepare the request body with only the UEFI settings we want to change and perform the PATCH request.
def setproperty (restobj,instance, bios_property, property_value, bios_password):
body = {bios_property: property_value}
response = restobj.rest_patch(instance["href"], body, bios_password)
restobj.error_handler(response)
A successful PATCH response will set the UEFI settings to the new values provided, however the changes will go into effect only after a system reset or reboot.