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:
parent
8225b745f3
commit
0b2ebabd29
2 changed files with 6 additions and 0 deletions
|
@ -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).
|
|
@ -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]:
|
||||||
|
|
Loading…
Reference in a new issue