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

[PR #6370/484f642c backport][stable-6] Redfish iDRAC: Allow for specifying an exact manager with 'resource_id' for CreateBiosConfigJob (#6380)

Redfish iDRAC: Allow for specifying an exact manager with 'resource_id' for CreateBiosConfigJob (#6370)

Allow for specifying an exact manager with 'resource_id' for CreateBiosConfigJob

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
(cherry picked from commit 484f642c23)

Co-authored-by: Mike Raineri <michael.raineri@dell.com>
This commit is contained in:
patchback[bot] 2023-04-20 07:50:42 +02:00 committed by GitHub
parent eff452e4a5
commit 5f63476404
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- idrac_redfish_command - allow user to specify ``resource_id`` for ``CreateBiosConfigJob`` to specify an exact manager (https://github.com/ansible-collections/community.general/issues/2090).

View file

@ -207,7 +207,20 @@ def main():
if category == "Systems": if category == "Systems":
# execute only if we find a System resource # execute only if we find a System resource
# NOTE: Currently overriding the usage of 'data_modification' due to
# how 'resource_id' is processed. In the case of CreateBiosConfigJob,
# we interact with BOTH systems and managers, so you currently cannot
# specify a single 'resource_id' to make both '_find_systems_resource'
# and '_find_managers_resource' return success. Since
# CreateBiosConfigJob doesn't use the matched 'resource_id' for a
# system regardless of what's specified, disabling the 'resource_id'
# inspection for the next call allows a specific manager to be
# specified with 'resource_id'. If we ever need to expand the input
# to inspect a specific system and manager in parallel, this will need
# updates.
rf_utils.data_modification = False
result = rf_utils._find_systems_resource() result = rf_utils._find_systems_resource()
rf_utils.data_modification = True
if result['ret'] is False: if result['ret'] is False:
module.fail_json(msg=to_native(result['msg'])) module.fail_json(msg=to_native(result['msg']))