From c06825e064df8e8e90e55ba8e283cd5a949609ea Mon Sep 17 00:00:00 2001 From: Scott Seekamp Date: Mon, 9 Dec 2024 16:26:31 -0700 Subject: [PATCH 1/3] Fix verify_bios_attributes command --- plugins/module_utils/redfish_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index dd559921aef..253395ea93c 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -3616,7 +3616,7 @@ def set_session_service(self, sessions_config): def verify_bios_attributes(self, bios_attributes): # This method verifies BIOS attributes against the provided input - server_bios = self.get_multi_bios_attributes() + server_bios = self.get_bios_attributes(self.systems_uri) if server_bios["ret"] is False: return server_bios @@ -3625,8 +3625,8 @@ def verify_bios_attributes(self, bios_attributes): # Verify bios_attributes with BIOS settings available in the server for key, value in bios_attributes.items(): - if key in server_bios["entries"][0][1]: - if server_bios["entries"][0][1][key] != value: + if key in server_bios["entries"]: + if server_bios["entries"][key] != value: bios_dict.update({key: value}) else: wrong_param.update({key: value}) From 6d2916529543b7524e944ec3e7f6d4f8484053ae Mon Sep 17 00:00:00 2001 From: Scott Seekamp Date: Mon, 9 Dec 2024 16:57:32 -0700 Subject: [PATCH 2/3] Add changelog fragment --- .../fragments/9234-fix-verify-bios-attributes-multi-system.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml diff --git a/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml b/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml new file mode 100644 index 00000000000..c64d7cde09d --- /dev/null +++ b/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml @@ -0,0 +1,2 @@ +bugfixes: + - redfish_utils module utils - Fix VerifyBiosAttributes command on multi system resource nodes (https://github.com/ansible-collections/community.general/pull/9234). From f67d95c876d64a539d1514e5cb60dd8ecd23a8cc Mon Sep 17 00:00:00 2001 From: Scott Seekamp Date: Wed, 11 Dec 2024 18:13:52 -0700 Subject: [PATCH 3/3] Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml Improve fragment Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../fragments/9234-fix-verify-bios-attributes-multi-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml b/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml index c64d7cde09d..95bafed8d87 100644 --- a/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml +++ b/changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml @@ -1,2 +1,2 @@ bugfixes: - - redfish_utils module utils - Fix VerifyBiosAttributes command on multi system resource nodes (https://github.com/ansible-collections/community.general/pull/9234). + - redfish_utils module utils - Fix ``VerifyBiosAttributes`` command on multi system resource nodes (https://github.com/ansible-collections/community.general/pull/9234).