[PR #9234/34e8e8e5 backport][stable-10] Fix VerifyBiosAttributes command on Systems with multiple entries (#9249)
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 <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 34e8e8e5d1
)
Co-authored-by: Scott Seekamp <sseekamp@coreweave.com>
pull/9253/head
parent
a89990ab9b
commit
3f29683191
|
@ -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).
|
|
@ -3616,7 +3616,7 @@ class RedfishUtils(object):
|
||||||
|
|
||||||
def verify_bios_attributes(self, bios_attributes):
|
def verify_bios_attributes(self, bios_attributes):
|
||||||
# This method verifies BIOS attributes against the provided input
|
# 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:
|
if server_bios["ret"] is False:
|
||||||
return server_bios
|
return server_bios
|
||||||
|
|
||||||
|
@ -3625,8 +3625,8 @@ class RedfishUtils(object):
|
||||||
|
|
||||||
# Verify bios_attributes with BIOS settings available in the server
|
# Verify bios_attributes with BIOS settings available in the server
|
||||||
for key, value in bios_attributes.items():
|
for key, value in bios_attributes.items():
|
||||||
if key in server_bios["entries"][0][1]:
|
if key in server_bios["entries"]:
|
||||||
if server_bios["entries"][0][1][key] != value:
|
if server_bios["entries"][key] != value:
|
||||||
bios_dict.update({key: value})
|
bios_dict.update({key: value})
|
||||||
else:
|
else:
|
||||||
wrong_param.update({key: value})
|
wrong_param.update({key: value})
|
||||||
|
|
Loading…
Reference in New Issue