Merge "Update events and actions API doc"

This commit is contained in:
Jenkins 2017-07-21 08:36:32 +00:00 committed by Gerrit Code Review
commit 20be493e9d
9 changed files with 71 additions and 32 deletions

View File

@ -41,6 +41,9 @@ Request Parameters
- action: action_action_query
- status: action_status_query
The sorting keys include ``name``, ``target``, ``action``, ``created_at``
and ``status``.
Response Parameters
-------------------
@ -50,8 +53,8 @@ Response Parameters
- actions: actions
- action: action_action
- cause: cause
- context: action_context
- created_at: created_at
- data: action_data
- depended_by: depended_by
- depends_on: depends_on
- start_time: start_time
@ -62,11 +65,13 @@ Response Parameters
- name: name
- outputs: outputs
- owner: action_owner
- project: project
- status: action_status
- status_reason: status_reason
- target: action_target
- timeout: action_timeout
- updated_at: updated_at
- user: user
Response Example
----------------
@ -112,8 +117,8 @@ Response Parameters:
- X-OpenStack-Request-ID: request_id
- action: action_action
- cause: cause
- context: action_context
- created_at: created_at
- data: action_data
- depended_by: depended_by
- depends_on: depends_on
- start_time: start_time
@ -124,11 +129,13 @@ Response Parameters:
- name: name
- outputs: outputs
- owner: action_owner
- project: project
- status: action_status
- status_reason: status_reason
- target: action_target
- timeout: action_timeout
- updated_at: updated_at
- user: user
Response Example
----------------

View File

@ -32,6 +32,7 @@ Request Parameters
- OpenStack-API-Version: microversion
- limit: limit
- level: event_level_req
- marker: marker
- sort: sort
- global_project: global_project
@ -41,6 +42,9 @@ Request Parameters
- cluster_id: cluster_identity_query
- action: action_name_query
The sorting keys include ``timestamp``, ``level``, ``otype``, ``oname``,
``action``, ``status``, ``oid`` and ``cluster_id``.
Response Parameters
-------------------

View File

@ -301,13 +301,12 @@ action_action:
description: |
A string representation of the action for execution.
action_context:
action_data:
type: object
in: body
required: True
description: |
A collection of key-value pairs that are used as security context when
executing the action.
A structured representation of data associated with a action object.
action_id:
type: UUID
@ -729,6 +728,13 @@ event_level:
description: |
The level of an event object.
event_level_req:
type: string
in: body
required: False
description: |
The level of an event object.
event_status:
type: string
in: body

View File

@ -1,21 +1,25 @@
{
"action": "CLUSTER_DELETE",
"cause": "RPC Request",
"context": {},
"created_at": "2015-06-27T05:09:43",
"depended_by": [],
"depends_on": [],
"end_time": 1423570000.0,
"id": "ffbb9175-d510-4bc1-b676-c6aba2a4ca81",
"inputs": {},
"interval": -1,
"name": "cluster_delete_fcc9b635",
"outputs": {},
"owner": null,
"start_time": 1423570000.0,
"status": "FAILED",
"status_reason": "Cluster action FAILED",
"target": "fcc9b635-52e3-490b-99f2-87b1640e4e89",
"timeout": 3600,
"updated_at": null
"action": {
"action": "CLUSTER_DELETE",
"cause": "RPC Request",
"created_at": "2015-06-27T05:09:43Z",
"data": {},
"depended_by": [],
"depends_on": [],
"end_time": 1423570000.0,
"id": "ffbb9175-d510-4bc1-b676-c6aba2a4ca81",
"inputs": {},
"interval": -1,
"name": "cluster_delete_fcc9b635",
"outputs": {},
"owner": null,
"project": "f1fe61dcda2f4618a14c10dc7abc214d",
"start_time": 1423570000.0,
"status": "FAILED",
"status_reason": "Cluster action FAILED",
"target": "fcc9b635-52e3-490b-99f2-87b1640e4e89",
"timeout": 3600,
"updated_at": null,
"user": "8bcd2cdca7684c02afc9e4f2fc0f0c79"
}
}

View File

@ -3,8 +3,8 @@
{
"action": "NODE_CREATE",
"cause": "RPC Request",
"context": {},
"created_at": "2015-12-04T04:54:41",
"created_at": "2015-12-04T04:54:41Z",
"data": {},
"depended_by": [],
"depends_on": [],
"end_time": 1425550000.0,
@ -14,18 +14,20 @@
"name": "node_create_0df0931b",
"outputs": {},
"owner": null,
"project": "f1fe61dcda2f4618a14c10dc7abc214d",
"start_time": 1425550000.0,
"status": "SUCCEEDED",
"status_reason": "Action completed successfully.",
"target": "0df0931b-e251-4f2e-8719-4ebfda3627ba",
"timeout": 3600,
"updated_at": null
"updated_at": null,
"user": "8bcd2cdca7684c02afc9e4f2fc0f0c79"
},
{
"action": "NODE_DELETE",
"cause": "RPC Request",
"context": {},
"created_at": "2015-11-04T05:21:41",
"created_at": "2015-11-04T05:21:41Z",
"data": {},
"depended_by": [],
"depends_on": [],
"end_time": 1425550000.0,
@ -35,12 +37,14 @@
"name": "node_delete_f0de9b9c",
"outputs": {},
"owner": null,
"project": "f1fe61dcda2f4618a14c10dc7abc214d",
"start_time": 1425550000.0,
"status": "SUCCEEDED",
"status_reason": "Action completed successfully.",
"target": "f0de9b9c-6d48-4a46-af21-2ca8607777fe",
"timeout": 3600,
"updated_at": null
"updated_at": null,
"user": "8bcd2cdca7684c02afc9e4f2fc0f0c79"
}
]
}

View File

@ -1,16 +1,18 @@
{
"event": {
"action": "create",
"cluster": null,
"cluster_id": null,
"id": "2d255b9c-8f36-41a2-a137-c0175ccc29c3",
"level": "20",
"meta_data": {},
"oid": "0df0931b-e251-4f2e-8719-4ebfda3627ba",
"oname": "node009",
"otype": "NODE",
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"status": "CREATING",
"status_reason": "Initializing",
"timestamp": "2015-03-05T08:53:15",
"timestamp": "2015-03-05T08:53:15Z",
"user": "a21ded6060534d99840658a777c2af5a"
}
}

View File

@ -2,16 +2,18 @@
"events": [
{
"action": "create",
"cluster": null,
"cluster_id": null,
"id": "2d255b9c-8f36-41a2-a137-c0175ccc29c3",
"level": "20",
"meta_data": {},
"oid": "0df0931b-e251-4f2e-8719-4ebfda3627ba",
"oname": "node009",
"otype": "NODE",
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
"status": "CREATING",
"status_reason": "Initializing",
"timestamp": "2015-03-05T08:53:15",
"timestamp": "2015-03-05T08:53:15Z",
"user": "a21ded6060534d99840658a777c2af5a"
}
]

View File

@ -0,0 +1,3 @@
{
"action": "290c44fa-c60f-4d75-a0eb-87433ba982a3"
}

View File

@ -41,3 +41,10 @@ Response Parameters
- X-OpenStack-Request-Id: request_id
- Location: location
- action: action_action
Response Example
----------------
.. literalinclude:: samples/webhook-action-response.json
:language: javascript