ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
827 stars 1.52k forks source link

redfish_command: Add OemParameters support in MultipartHTTPPushUpdate #8825

Open cwhuang opened 2 months ago

cwhuang commented 2 months ago

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 commented 2 months ago

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.

ansibullbot commented 2 months ago

cc @TSKushal @bhavya06 @jyundt @mraineri @rajeevkallur @renxulei @tomasg2012 @xmadsen click here for bot help

sseekamp commented 1 week ago

@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?

https://github.com/ansible-collections/community.general/blob/e5ab4be82d880d9c4bc513835b7e204303846522/plugins/module_utils/redfish_utils.py#L1947-L1949