mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
[PR #9012/67ddb567 backport][stable-9] Dell PwrButton requires a job initated at reboot (#9015)
Dell PwrButton requires a job initated at reboot (#9012)
Dell systems do not change the bios setting PwrButton right away. The
command will return changed=true, but it is not applied. Also no job is
scheduled at next reboot for the change to take place. This patch aims
to fix this issue.
(cherry picked from commit 67ddb567c9)
Co-authored-by: Ruben Bosch <8641284+Rubueno@users.noreply.github.com>
This commit is contained in:
@@ -2311,11 +2311,19 @@ class RedfishUtils(object):
|
||||
|
||||
# Construct payload and issue PATCH command
|
||||
payload = {"Attributes": attrs_to_patch}
|
||||
|
||||
# WORKAROUND
|
||||
# Dell systems require manually setting the apply time to "OnReset"
|
||||
# to spawn a proprietary job to apply the BIOS settings
|
||||
vendor = self._get_vendor()['Vendor']
|
||||
if vendor == 'Dell':
|
||||
payload.update({"@Redfish.SettingsApplyTime": {"ApplyTime": "OnReset"}})
|
||||
|
||||
response = self.patch_request(self.root_uri + set_bios_attr_uri, payload)
|
||||
if response['ret'] is False:
|
||||
return response
|
||||
return {'ret': True, 'changed': True,
|
||||
'msg': "Modified BIOS attributes %s" % (attrs_to_patch),
|
||||
'msg': "Modified BIOS attributes %s. A reboot is required" % (attrs_to_patch),
|
||||
'warning': warning}
|
||||
|
||||
def set_boot_order(self, boot_list):
|
||||
|
||||
Reference in New Issue
Block a user