mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
[PR #7330/cd83b245 backport][stable-7] Add support for Oem params (#7341)
Add support for Oem params (#7330)
* Add support for "Oem" parameters in the MultipartHTTPPushUpdate redfish_command
* Add doc entry
* Add changelog fragment
Add version_added field
* Re-word the changelog fragment
* After further testing this should not have a default definition as
it should not be in the payload if not defined
(cherry picked from commit cd83b245bb
)
Co-authored-by: Scott Seekamp <sseekamp@coreweave.com>
This commit is contained in:
parent
87aedc7bd6
commit
51648d5328
3 changed files with 15 additions and 0 deletions
|
@ -1745,6 +1745,7 @@ class RedfishUtils(object):
|
|||
image_file = update_opts.get('update_image_file')
|
||||
targets = update_opts.get('update_targets')
|
||||
apply_time = update_opts.get('update_apply_time')
|
||||
oem_params = update_opts.get('update_oem_params')
|
||||
|
||||
# Ensure the image file is provided
|
||||
if not image_file:
|
||||
|
@ -1775,6 +1776,8 @@ class RedfishUtils(object):
|
|||
payload["Targets"] = targets
|
||||
if apply_time:
|
||||
payload["@Redfish.OperationApplyTime"] = apply_time
|
||||
if oem_params:
|
||||
payload["Oem"] = oem_params
|
||||
multipart_payload = {
|
||||
'UpdateParameters': {'content': json.dumps(payload), 'mime_type': 'application/json'},
|
||||
'UpdateFile': {'filename': image_file, 'content': image_payload, 'mime_type': 'application/octet-stream'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue