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:
parent
07a47c047b
commit
ab0b85d7d2
2 changed files with 6 additions and 1 deletions
|
@ -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).
|
|
@ -1658,7 +1658,10 @@ class RedfishUtils(object):
|
||||||
|
|
||||||
# Scan the messages to see if next steps are needed
|
# Scan the messages to see if next steps are needed
|
||||||
for message in operation_results['messages']:
|
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'):
|
if message_id.startswith('Update.1.') and message_id.endswith('.OperationTransitionedToJob'):
|
||||||
# Operation rerouted to a job; update the status and handle
|
# Operation rerouted to a job; update the status and handle
|
||||||
|
|
Loading…
Reference in a new issue