mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-03 23:41:51 +00:00
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! Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/idrac_redfish_info.py Remove extra manager quantity check Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
20ba59cce6
commit
13035e2a2c
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue