Feat/add GetBootOverride to Systems category of redfish_facts (#54273)

* Add GetBootOverride as possible Systems command

* Add conditional to call get_boot_override if command == GetBootOverride

* Implement get_boot_override() in redfish_utils

* Implement get_multi_boot_override() and modify get_boot_override() to support the multi wrapper

* Update GetBootOverride to use get_multi_boot_override

* Add example for new command in docstring

* fix indent

* Update lib/ansible/module_utils/redfish_utils.py

Co-Authored-By: xmadsen <xander.madsen@gmail.com>
This commit is contained in:
Xander Madsen 2019-05-02 09:08:16 -04:00 committed by John R Barker
commit b108d01b0f
2 changed files with 45 additions and 2 deletions

View file

@ -129,6 +129,14 @@ EXAMPLES = '''
username: "{{ username }}"
password: "{{ password }}"
- name: Get boot override information
redfish_facts:
category: Systems
command: GetBootOverride
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Get all information available in the Manager category
redfish_facts:
category: Manager
@ -169,7 +177,7 @@ CATEGORY_COMMANDS_ALL = {
"Systems": ["GetSystemInventory", "GetPsuInventory", "GetCpuInventory",
"GetMemoryInventory", "GetNicInventory",
"GetStorageControllerInventory", "GetDiskInventory",
"GetBiosAttributes", "GetBootOrder"],
"GetBiosAttributes", "GetBootOrder", "GetBootOverride"],
"Chassis": ["GetFanInventory", "GetPsuInventory", "GetChassisPower", "GetChassisThermals"],
"Accounts": ["ListUsers"],
"Update": ["GetFirmwareInventory", "GetFirmwareUpdateCapabilities"],
@ -267,6 +275,8 @@ def main():
result["bios_attribute"] = rf_utils.get_multi_bios_attributes()
elif command == "GetBootOrder":
result["boot_order"] = rf_utils.get_multi_boot_order()
elif command == "GetBootOverride":
result["boot_override"] = rf_utils.get_multi_boot_override()
elif category == "Chassis":
# execute only if we find Chassis resource