mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 23:17:33 +00:00
* Add GetHostInterfaces command to redfish_info
Adding a GetHostInterfaces command to redfish_info in order to report the
following:
- Properties about the HostInterface(s) like Status, InterfaceEnabled, etc
- ManagerEthernetInterface (info on BMC -> host NIC)
- HostEthernetInterfaces (list of NICs for host -> BMC connectivity)
fixes #3692
* add fragment
* fixup for linter
* redfish_utils.py cleanup
- Remove unneeded Properties list from get_nic_inventory()
- Remove bogus key variable from get_hostinterfaces()
- Add additional Properties to collect from HostInterface objects
* fixup for stray deletion
(cherry picked from commit 98cca3c19c)
Co-authored-by: Jacob <jyundt@gmail.com>
This commit is contained in:
parent
7db5c86dc8
commit
84a806be08
3 changed files with 110 additions and 17 deletions
|
|
@ -269,6 +269,14 @@ EXAMPLES = '''
|
|||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Get manager Redfish Host Interface inventory
|
||||
community.general.redfish_info:
|
||||
category: Manager
|
||||
command: GetHostInterfaces
|
||||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
@ -293,7 +301,7 @@ CATEGORY_COMMANDS_ALL = {
|
|||
"Sessions": ["GetSessions"],
|
||||
"Update": ["GetFirmwareInventory", "GetFirmwareUpdateCapabilities", "GetSoftwareInventory"],
|
||||
"Manager": ["GetManagerNicInventory", "GetVirtualMedia", "GetLogs", "GetNetworkProtocols",
|
||||
"GetHealthReport"],
|
||||
"GetHealthReport", "GetHostInterfaces"],
|
||||
}
|
||||
|
||||
CATEGORY_COMMANDS_DEFAULT = {
|
||||
|
|
@ -475,6 +483,8 @@ def main():
|
|||
result["network_protocols"] = rf_utils.get_network_protocols()
|
||||
elif command == "GetHealthReport":
|
||||
result["health_report"] = rf_utils.get_multi_manager_health_report()
|
||||
elif command == "GetHostInterfaces":
|
||||
result["host_interfaces"] = rf_utils.get_hostinterfaces()
|
||||
|
||||
# Return data back
|
||||
module.exit_json(redfish_facts=result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue