mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Add GetHostInterfaces command to redfish_info (#3693)
* 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
This commit is contained in:
parent
d29aecad26
commit
98cca3c19c
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