Skip to content

Commit 34fe331

Browse files
[PR #9234/34e8e8e5 backport][stable-9] Fix VerifyBiosAttributes command on Systems with multiple entries (#9248)
Fix VerifyBiosAttributes command on Systems with multiple entries (#9234) * Fix verify_bios_attributes command * Add changelog fragment * Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml Improve fragment Co-authored-by: Alexei Znamensky <[email protected]> --------- Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 34e8e8e) Co-authored-by: Scott Seekamp <[email protected]>
1 parent 396eb1d commit 34fe331

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- redfish_utils module utils - Fix ``VerifyBiosAttributes`` command on multi system resource nodes (https://github.com/ansible-collections/community.general/pull/9234).

plugins/module_utils/redfish_utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3588,7 +3588,7 @@ def set_session_service(self, sessions_config):
35883588

35893589
def verify_bios_attributes(self, bios_attributes):
35903590
# This method verifies BIOS attributes against the provided input
3591-
server_bios = self.get_multi_bios_attributes()
3591+
server_bios = self.get_bios_attributes(self.systems_uri)
35923592
if server_bios["ret"] is False:
35933593
return server_bios
35943594

@@ -3597,8 +3597,8 @@ def verify_bios_attributes(self, bios_attributes):
35973597

35983598
# Verify bios_attributes with BIOS settings available in the server
35993599
for key, value in bios_attributes.items():
3600-
if key in server_bios["entries"][0][1]:
3601-
if server_bios["entries"][0][1][key] != value:
3600+
if key in server_bios["entries"]:
3601+
if server_bios["entries"][key] != value:
36023602
bios_dict.update({key: value})
36033603
else:
36043604
wrong_param.update({key: value})

0 commit comments

Comments
 (0)