Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redfish_command: Add OemParameters support in MultipartHTTPPushUpdate #8825

Open
cwhuang opened this issue Sep 3, 2024 · 3 comments
Open
Labels
feature This issue/PR relates to a feature request has_pr module module plugins plugin (any type)

Comments

@cwhuang
Copy link

cwhuang commented Sep 3, 2024

Summary

AMI BMC requires an additional OemParameters json when doing MultipartHTTPPushUpdate updates. It looks like #7331 but not exact the same. AMI BMC needs the OemParameters to be a separate json file instead of a key/value in UpdateParameters.
We suggest to add an option update_image_type to address it.

Issue Type

Feature Idea

Component Name

redfish_command

Additional Information

Presumably it would be used like:
- name: Multipart HTTP push with additional options
  community.general.redfish_command:
    category: Update
    command: MultipartHTTPPushUpdate
    baseuri: "{{ bmc_host }}"
    username: "{{ bmc_user }}"
    password: "{{ bmc_password }}"
    timeout: 600
    update_image_file:  bmc-image.ima
    update_image_type: BMC
    update_targets: /redfish/v1/UpdateService/FirmwareInventory/BMCImage1

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
@cwhuang
Copy link
Author

cwhuang commented Sep 3, 2024

I have worked out a patch to support it. Test OK with AMI BMC 13.3.
If you agree I'll send the pull request.

cwhuang pushed a commit to cwhuang/community.general that referenced this issue Sep 3, 2024
AMI BMC requires a separate OemParameters json to set the image type
when doing MultipartHTTPPushUpdate.

The patch adds a new option update_image_type to support it.
Test OK with AMI BMC 13.3.

Signed-off-by: Chih-Wei Huang <[email protected]>
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module plugins plugin (any type) labels Sep 3, 2024
@sseekamp
Copy link
Contributor

sseekamp commented Oct 29, 2024

@cwhuang are you sure that's the not the behavior that's present? My original PR referenced above was for an AMI BMC system as well. Do you need an additional "upload file" definition?

multipart_payload = {
'UpdateParameters': {'content': json.dumps(payload), 'mime_type': 'application/json'},
'UpdateFile': {'filename': image_file, 'content': image_payload, 'mime_type': 'application/octet-stream'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

3 participants