1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

[PR #11301/13035e2a backport][stable-12] Add support for multiple managers to get_manager_attributes command in idrac_redfish_info module (#11375)

Add support for multiple managers to get_manager_attributes command in idrac_redfish_info module (#11301)

* Update get_manager_attributes method to support systems with multiple managers present

Fixes https://github.com/ansible-collections/community.general/issues/11294

* Add changelog fragment
Pre-define reponse for get_manager_attributes method

* Update changelogs/fragments/11301-idrac-info-multi-manager.yml

Update per suggestion!



* Update plugins/modules/idrac_redfish_info.py
Remove extra manager quantity check



---------


(cherry picked from commit 13035e2a2c)

Co-authored-by: Scott Seekamp <13857911+sseekamp@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2026-01-02 19:29:33 +01:00 committed by GitHub
parent 88eee5fbb4
commit 8242f6fa46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- idrac_redfish_info - add multiple manager support to ``GetManagerAttributes`` command (https://github.com/ansible-collections/community.general/pull/11294).

View file

@ -138,10 +138,14 @@ from ansible_collections.community.general.plugins.module_utils.redfish_utils im
class IdracRedfishUtils(RedfishUtils):
def get_manager_attributes(self):
result = {}
response = {}
manager_attributes = []
properties = ["Attributes", "Id"]
response = self.get_request(self.root_uri + self.manager_uri)
if len(self.manager_uris) == 1:
response = self.get_request(f"{self.root_uri}{self.manager_uri}")
elif len(self.manager_uris) > 1:
response = self.get_request(f"{self.root_uri}/redfish/v1/Managers/iDRAC.Embedded.1", override_headers=None)
if response["ret"] is False:
return response