Merge "API changes for skipped actions: patch actions and status_message"
This commit is contained in:
@@ -189,6 +189,13 @@ action_state:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
action_status_message:
|
||||
description: |
|
||||
Message with additional information about the Action state.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
min_version: 1.5
|
||||
action_type:
|
||||
description: |
|
||||
Action type based on specific API action. Actions in Watcher are
|
||||
@@ -230,6 +237,13 @@ actionplan_state:
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
actionplan_status_message:
|
||||
description: |
|
||||
Message with additional information about the Action Plan state.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
min_version: 1.5
|
||||
|
||||
# Audit
|
||||
audit_autotrigger:
|
||||
@@ -320,6 +334,13 @@ audit_state:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
audit_status_message:
|
||||
description: |
|
||||
Message with additional information about the Audit state.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
min_version: 1.5
|
||||
audit_strategy:
|
||||
description: |
|
||||
The UUID or name of the Strategy.
|
||||
|
||||
12
api-ref/source/samples/action-skip-request-with-message.json
Normal file
12
api-ref/source/samples/action-skip-request-with-message.json
Normal file
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"op": "replace",
|
||||
"value": "SKIPPED",
|
||||
"path": "/state"
|
||||
},
|
||||
{
|
||||
"op": "replace",
|
||||
"value": "Skipping due to maintenance window",
|
||||
"path": "/status_message"
|
||||
}
|
||||
]
|
||||
7
api-ref/source/samples/action-skip-request.json
Normal file
7
api-ref/source/samples/action-skip-request.json
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"op": "replace",
|
||||
"value": "SKIPPED",
|
||||
"path": "/state"
|
||||
}
|
||||
]
|
||||
29
api-ref/source/samples/action-skip-response.json
Normal file
29
api-ref/source/samples/action-skip-response.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"state": "SKIPPED",
|
||||
"description": "Migrate instance to another compute node",
|
||||
"parents": [
|
||||
"b4529294-1de6-4302-b57a-9b5d5dc363c6"
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"rel": "self",
|
||||
"href": "http://controller:9322/v1/actions/54acc7a0-91b0-46ea-a5f7-4ae2b9df0b0a"
|
||||
},
|
||||
{
|
||||
"rel": "bookmark",
|
||||
"href": "http://controller:9322/actions/54acc7a0-91b0-46ea-a5f7-4ae2b9df0b0a"
|
||||
}
|
||||
],
|
||||
"action_plan_uuid": "4cbc4ede-0d25-481b-b86e-998dbbd4f8bf",
|
||||
"uuid": "54acc7a0-91b0-46ea-a5f7-4ae2b9df0b0a",
|
||||
"deleted_at": null,
|
||||
"updated_at": "2018-04-10T12:15:44.026973+00:00",
|
||||
"input_parameters": {
|
||||
"migration_type": "live",
|
||||
"destination_node": "compute-2",
|
||||
"resource_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
|
||||
},
|
||||
"action_type": "migrate",
|
||||
"created_at": "2018-04-10T11:59:12.725147+00:00",
|
||||
"status_message": "Action skipped by user. Reason:Skipping due to maintenance window"
|
||||
}
|
||||
@@ -21,7 +21,8 @@
|
||||
"uuid": "4cbc4ede-0d25-481b-b86e-998dbbd4f8bf",
|
||||
"audit_uuid": "7d100b05-0a86-491f-98a7-f93da19b272a",
|
||||
"created_at": "2018-04-10T11:59:52.640067+00:00",
|
||||
"hostname": "controller"
|
||||
"hostname": "controller",
|
||||
"status_message": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
"strategy_name": "dummy_with_resize",
|
||||
"uuid": "4cbc4ede-0d25-481b-b86e-998dbbd4f8bf",
|
||||
"audit_uuid": "7d100b05-0a86-491f-98a7-f93da19b272a",
|
||||
"hostname": "controller"
|
||||
}
|
||||
"hostname": "controller",
|
||||
"status_message": null
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
"duration": 3.2
|
||||
},
|
||||
"action_type": "sleep",
|
||||
"created_at": "2018-03-26T11:56:08.235226+00:00"
|
||||
"created_at": "2018-03-26T11:56:08.235226+00:00",
|
||||
"status_message": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,5 +22,6 @@
|
||||
"message": "Welcome"
|
||||
},
|
||||
"action_type": "nop",
|
||||
"created_at": "2018-04-10T11:59:12.725147+00:00"
|
||||
}
|
||||
"created_at": "2018-04-10T11:59:12.725147+00:00",
|
||||
"status_message": null
|
||||
}
|
||||
|
||||
@@ -51,5 +51,6 @@
|
||||
"updated_at": null,
|
||||
"hostname": null,
|
||||
"start_time": null,
|
||||
"end_time": null
|
||||
"end_time": null,
|
||||
"status_message": null
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
"updated_at": "2018-04-06T09:44:01.604146+00:00",
|
||||
"hostname": "controller",
|
||||
"start_time": null,
|
||||
"end_time": null
|
||||
"end_time": null,
|
||||
"status_message": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -51,5 +51,6 @@
|
||||
"updated_at": "2018-04-06T11:54:01.266447+00:00",
|
||||
"hostname": "controller",
|
||||
"start_time": null,
|
||||
"end_time": null
|
||||
"end_time": null,
|
||||
"status_message": null
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ Response
|
||||
- global_efficacy: actionplan_global_efficacy
|
||||
- links: links
|
||||
- hostname: actionplan_hostname
|
||||
- status_message: actionplan_status_message
|
||||
|
||||
**Example JSON representation of an Action Plan:**
|
||||
|
||||
@@ -177,6 +178,7 @@ Response
|
||||
- global_efficacy: actionplan_global_efficacy
|
||||
- links: links
|
||||
- hostname: actionplan_hostname
|
||||
- status_message: actionplan_status_message
|
||||
|
||||
**Example JSON representation of an Audit:**
|
||||
|
||||
@@ -233,6 +235,7 @@ version 1:
|
||||
- global_efficacy: actionplan_global_efficacy
|
||||
- links: links
|
||||
- hostname: actionplan_hostname
|
||||
- status_message: actionplan_status_message
|
||||
|
||||
**Example JSON representation of an Action Plan:**
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ Response
|
||||
- description: action_description
|
||||
- input_parameters: action_input_parameters
|
||||
- links: links
|
||||
- status_message: action_status_message
|
||||
|
||||
**Example JSON representation of an Action:**
|
||||
|
||||
@@ -151,8 +152,62 @@ Response
|
||||
- description: action_description
|
||||
- input_parameters: action_input_parameters
|
||||
- links: links
|
||||
- status_message: action_status_message
|
||||
|
||||
**Example JSON representation of an Action:**
|
||||
|
||||
.. literalinclude:: samples/actions-show-response.json
|
||||
:language: javascript
|
||||
|
||||
Skip Action
|
||||
===========
|
||||
|
||||
.. rest_method:: PATCH /v1/actions/{action_ident}
|
||||
|
||||
Skips an Action resource by changing its state to SKIPPED.
|
||||
|
||||
.. note::
|
||||
Only Actions in PENDING state can be skipped. The Action must belong to
|
||||
an Action Plan in RECOMMENDED or PENDING state. 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 Action skip request:**
|
||||
|
||||
.. literalinclude:: samples/action-skip-request.json
|
||||
:language: javascript
|
||||
|
||||
**Example Action skip request with custom status message:**
|
||||
|
||||
.. literalinclude:: samples/action-skip-request-with-message.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 a skipped Action:**
|
||||
|
||||
.. literalinclude:: samples/action-skip-response.json
|
||||
:language: javascript
|
||||
@@ -85,6 +85,7 @@ version 1:
|
||||
- start_time: audit_starttime_resp
|
||||
- end_time: audit_endtime_resp
|
||||
- force: audit_force
|
||||
- status_message: audit_status_message
|
||||
|
||||
**Example JSON representation of an Audit:**
|
||||
|
||||
@@ -184,6 +185,7 @@ Response
|
||||
- start_time: audit_starttime_resp
|
||||
- end_time: audit_endtime_resp
|
||||
- force: audit_force
|
||||
- status_message: audit_status_message
|
||||
|
||||
**Example JSON representation of an Audit:**
|
||||
|
||||
@@ -231,6 +233,7 @@ Response
|
||||
- start_time: audit_starttime_resp
|
||||
- end_time: audit_endtime_resp
|
||||
- force: audit_force
|
||||
- status_message: audit_status_message
|
||||
|
||||
**Example JSON representation of an Audit:**
|
||||
|
||||
@@ -286,6 +289,7 @@ version 1:
|
||||
- start_time: audit_starttime_resp
|
||||
- end_time: audit_endtime_resp
|
||||
- force: audit_force
|
||||
- status_message: audit_status_message
|
||||
|
||||
**Example JSON representation of an Audit:**
|
||||
|
||||
@@ -341,6 +345,7 @@ Response
|
||||
- start_time: audit_starttime_resp
|
||||
- end_time: audit_endtime_resp
|
||||
- force: audit_force
|
||||
- status_message: audit_status_message
|
||||
|
||||
**Example JSON representation of an Audit:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user