mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 05:43:09 +00:00
* 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
(cherry picked from commit ea822c7bdd)
Co-authored-by: Scott Seekamp <sylgeist@users.noreply.github.com>
This commit is contained in:
@@ -1582,13 +1582,14 @@ class RedfishUtils(object):
|
||||
|
||||
boot = data[key]
|
||||
|
||||
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
|
||||
if annotation in boot:
|
||||
allowable_values = boot[annotation]
|
||||
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
|
||||
return {'ret': False,
|
||||
'msg': "Boot device %s not in list of allowable values (%s)" %
|
||||
(bootdevice, allowable_values)}
|
||||
if override_enabled != 'Disabled':
|
||||
annotation = 'BootSourceOverrideTarget@Redfish.AllowableValues'
|
||||
if annotation in boot:
|
||||
allowable_values = boot[annotation]
|
||||
if isinstance(allowable_values, list) and bootdevice not in allowable_values:
|
||||
return {'ret': False,
|
||||
'msg': "Boot device %s not in list of allowable values (%s)" %
|
||||
(bootdevice, allowable_values)}
|
||||
|
||||
# read existing values
|
||||
cur_enabled = boot.get('BootSourceOverrideEnabled')
|
||||
|
||||
Reference in New Issue
Block a user