mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Redfish Bootoverride Disable behaves incorrectly (#3006)
* https://github.com/ansible-collections/community.general/issues/3005 Bypass the boot device argument check when the command is: DisableBootOverride as it isn't needed to perform this operation. * Add changelog fragment
This commit is contained in:
parent
a3a40f6de3
commit
ea822c7bdd
2 changed files with 11 additions and 7 deletions
|
@ -0,0 +1,3 @@
|
||||||
|
bugfixes:
|
||||||
|
- redfish_command - fix extraneous error caused by missing ``bootdevice`` argument
|
||||||
|
when using the ``DisableBootOverride`` sub-command (https://github.com/ansible-collections/community.general/issues/3005).
|
|
@ -1582,13 +1582,14 @@ class RedfishUtils(object):
|
||||||
|
|
||||||
boot = data[key]
|
boot = data[key]
|
||||||
|
|
||||||
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
|
if override_enabled != 'Disabled':
|
||||||
if annotation in boot:
|
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
|
||||||
allowable_values = boot[annotation]
|
if annotation in boot:
|
||||||
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
|
allowable_values = boot[annotation]
|
||||||
return {'ret': False,
|
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
|
||||||
'msg': "Boot device %s not in list of allowable values (%s)" %
|
return {'ret': False,
|
||||||
(bootdevice, allowable_values)}
|
'msg': "Boot device %s not in list of allowable values (%s)" %
|
||||||
|
(bootdevice, allowable_values)}
|
||||||
|
|
||||||
# read existing values
|
# read existing values
|
||||||
cur_enabled = boot.get('BootSourceOverrideEnabled')
|
cur_enabled = boot.get('BootSourceOverrideEnabled')
|
||||||
|
|
Loading…
Reference in a new issue