1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix IndexError in SetManagerNic (#2040)

* fix IndexError in SetManagerNic

* add changelog fragment
This commit is contained in:
Bill Dodd 2021-03-19 13:06:57 -05:00 committed by GitHub
parent 8225b745f3
commit 0b2ebabd29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- redfish_config module, redfish_utils module utils - fix IndexError in ``SetManagerNic`` command (https://github.com/ansible-collections/community.general/issues/1692).

View file

@ -2672,6 +2672,10 @@ class RedfishUtils(object):
need_change = True need_change = True
# type is list # type is list
if isinstance(set_value, list): if isinstance(set_value, list):
if len(set_value) != len(cur_value):
# if arrays are not the same len, no need to check each element
need_change = True
continue
for i in range(len(set_value)): for i in range(len(set_value)):
for subprop in payload[property][i].keys(): for subprop in payload[property][i].keys():
if subprop not in target_ethernet_current_setting[property][i]: if subprop not in target_ethernet_current_setting[property][i]: