mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
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. Example result from querying OpenBMC's bmcweb Redfish server: ``` entries: - - system_uri: /redfish/v1/Systems/system - AlwaysOff ret: true ``` Signed-off-by: Paul Fertser <fercerpav@gmail.com>
This commit is contained in:
parent
605a83dbef
commit
129f51cf9d
3 changed files with 27 additions and 1 deletions
|
@ -376,6 +376,14 @@ EXAMPLES = r"""
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Get power restore policy
|
||||
community.general.redfish_info:
|
||||
category: Systems
|
||||
command: GetPowerRestorePolicy
|
||||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Check the availability of the service with a timeout of 5 seconds
|
||||
community.general.redfish_info:
|
||||
category: Service
|
||||
|
@ -402,7 +410,8 @@ CATEGORY_COMMANDS_ALL = {
|
|||
"Systems": ["GetSystemInventory", "GetPsuInventory", "GetCpuInventory",
|
||||
"GetMemoryInventory", "GetNicInventory", "GetHealthReport",
|
||||
"GetStorageControllerInventory", "GetDiskInventory", "GetVolumeInventory",
|
||||
"GetBiosAttributes", "GetBootOrder", "GetBootOverride", "GetVirtualMedia", "GetBiosRegistries"],
|
||||
"GetBiosAttributes", "GetBootOrder", "GetBootOverride", "GetVirtualMedia", "GetBiosRegistries",
|
||||
"GetPowerRestorePolicy"],
|
||||
"Chassis": ["GetFanInventory", "GetPsuInventory", "GetChassisPower",
|
||||
"GetChassisThermals", "GetChassisInventory", "GetHealthReport", "GetHPEThermalConfig", "GetHPEFanPercentMin"],
|
||||
"Accounts": ["ListUsers", "GetAccountServiceConfig"],
|
||||
|
@ -544,6 +553,8 @@ def main():
|
|||
result["virtual_media"] = rf_utils.get_multi_virtualmedia(category)
|
||||
elif command == "GetBiosRegistries":
|
||||
result["bios_registries"] = rf_utils.get_bios_registries()
|
||||
elif command == "GetPowerRestorePolicy":
|
||||
result["power_restore_policy"] = rf_utils.get_multi_power_restore_policy()
|
||||
|
||||
elif category == "Chassis":
|
||||
# execute only if we find Chassis resource
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue