Allow status_message updates for actions in SKIPPED state
Fixed action status_message update restrictions to allow updates when action is already in SKIPPED state. Previously, users could only update the status_message when initially transitioning to SKIPPED state. Changes include: - Modified validation logic to allow status_message updates for SKIPPED actions - Changed exception type from PatchError to Conflict for better semantics - Added comprehensive test coverage for the new behavior - Updated API documentation and samples - Added release note documenting the fix This enables administrators to fix typos, provide more detailed explanations, or expand on reasons in action status messages after the action has been skipped. Generated-By: claude-code Closes-Bug: #2121601 Change-Id: I64def708389a8ecd32080fba1638a4499ead349d Signed-off-by: Sean Mooney <work@seanmooney.info>
This commit is contained in:
@@ -210,4 +210,53 @@ Response
|
||||
**Example JSON representation of a skipped Action:**
|
||||
|
||||
.. literalinclude:: samples/action-skip-response.json
|
||||
:language: javascript
|
||||
|
||||
Update Action Status Message
|
||||
============================
|
||||
|
||||
.. rest_method:: PATCH /v1/actions/{action_ident}
|
||||
|
||||
Updates the status_message of an Action that is already in SKIPPED state.
|
||||
|
||||
.. note::
|
||||
The status_message field can only be updated for Actions that are currently
|
||||
in SKIPPED state. This allows administrators to fix typos, provide more
|
||||
detailed explanations, or expand on reasons that were initially omitted.
|
||||
This operation requires API microversion 1.5 or later.
|
||||
|
||||
Normal response codes: 200
|
||||
|
||||
Error codes: 400,404,403,409
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- action_ident: action_ident
|
||||
|
||||
**Example status_message update request for a SKIPPED action:**
|
||||
|
||||
.. literalinclude:: samples/action-update-status-message-request.json
|
||||
:language: javascript
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- uuid: uuid
|
||||
- action_type: action_type
|
||||
- state: action_state
|
||||
- action_plan_uuid: action_action_plan_uuid
|
||||
- parents: action_parents
|
||||
- description: action_description
|
||||
- input_parameters: action_input_parameters
|
||||
- links: links
|
||||
- status_message: action_status_message
|
||||
|
||||
**Example JSON representation of an Action with updated status_message:**
|
||||
|
||||
.. literalinclude:: samples/action-update-status-message-response.json
|
||||
:language: javascript
|
||||
Reference in New Issue
Block a user