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

Redfish: perform manager network interface configuration even if property is missing (#3582)

* Redfish: perform manager network interface configuration even if property is missing

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Update changelogs/fragments/3404-redfish_utils-skip-manager-network-check.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Mike Raineri 2021-10-20 11:26:15 -04:00 committed by GitHub
parent d9e8724b1d
commit 6580e7559b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- redfish_utils module utils - if a manager network property is not specified in the service, attempt to change the requested settings (https://github.com/ansible-collections/community.general/issues/3404/).

View file

@ -2762,7 +2762,9 @@ class RedfishUtils(object):
if isinstance(set_value, dict): if isinstance(set_value, dict):
for subprop in payload[property].keys(): for subprop in payload[property].keys():
if subprop not in target_ethernet_current_setting[property]: if subprop not in target_ethernet_current_setting[property]:
return {'ret': False, 'msg': "Sub-property %s in nic_config is invalid" % subprop} # Not configured already; need to apply the request
need_change = True
break
sub_set_value = payload[property][subprop] sub_set_value = payload[property][subprop]
sub_cur_value = target_ethernet_current_setting[property][subprop] sub_cur_value = target_ethernet_current_setting[property][subprop]
if sub_set_value != sub_cur_value: if sub_set_value != sub_cur_value:
@ -2776,7 +2778,9 @@ class RedfishUtils(object):
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]:
return {'ret': False, 'msg': "Sub-property %s in nic_config is invalid" % subprop} # Not configured already; need to apply the request
need_change = True
break
sub_set_value = payload[property][i][subprop] sub_set_value = payload[property][i][subprop]
sub_cur_value = target_ethernet_current_setting[property][i][subprop] sub_cur_value = target_ethernet_current_setting[property][i][subprop]
if sub_set_value != sub_cur_value: if sub_set_value != sub_cur_value: