mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
Redfish: implement setting PowerRestorePolicy (#9837)
This property ("The desired power state of the system when power is restored after a power loss.") was added in ComputerSystem.v1_6_0 which became part of 2018.3 Redfish release. Tested against an OpenBMC system running bmcweb Redfish server making sure the policy is updated only when needed and that errors and messages are propogated properly. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
This commit is contained in:
parent
fdbc06c714
commit
abe4e5ce95
3 changed files with 32 additions and 1 deletions
|
@ -3983,3 +3983,7 @@ class RedfishUtils(object):
|
|||
|
||||
def get_multi_power_restore_policy(self):
|
||||
return self.aggregate_systems(self.get_power_restore_policy)
|
||||
|
||||
def set_power_restore_policy(self, policy):
|
||||
body = {'PowerRestorePolicy': policy}
|
||||
return self.patch_request(self.root_uri + self.systems_uri, body, check_pyld=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue