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

Redfish: Updated message handling for update operations to skip message objects with missing MessageId properties (#7471)

* Redfish: Updated message handling for update operations to skip message objects with missing MessageId properties

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* Update 7465-redfish-firmware-update-message-id-hardening.yml

---------

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
This commit is contained in:
Mike Raineri 2023-11-05 23:49:48 -05:00 committed by GitHub
parent 07a47c047b
commit ab0b85d7d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- redfish_command - fix usage of message parsing in ``SimpleUpdate`` and ``MultipartHTTPPushUpdate`` commands to treat the lack of a ``MessageId`` as no message (https://github.com/ansible-collections/community.general/issues/7465, https://github.com/ansible-collections/community.general/pull/7471).

View file

@ -1658,7 +1658,10 @@ class RedfishUtils(object):
# Scan the messages to see if next steps are needed
for message in operation_results['messages']:
message_id = message['MessageId']
message_id = message.get('MessageId')
if message_id is None:
# While this is invalid, treat the lack of a MessageId as "no message"
continue
if message_id.startswith('Update.1.') and message_id.endswith('.OperationTransitionedToJob'):
# Operation rerouted to a job; update the status and handle