1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
.. -*- rst -*-
=======
Actions
=======
An ``Action`` is what enables Watcher to transform the current state of a
``Cluster`` after an ``Audit``.
An ``Action`` is an atomic task which changes the current state of a target
Managed resource of the OpenStack ``Cluster`` such as:
- Live migration of an instance from one compute node to another compute
node with Nova
- Changing the power level of a compute node (ACPI level, ...)
- Changing the current state of a compute node (enable or disable) with Nova
In most cases, an ``Action`` triggers some concrete commands on an existing
OpenStack module (Nova, Neutron, Cinder, Ironic, etc.).
An ``Action`` has a life-cycle and its current state may be one of the
following:
- **PENDING** : the ``Action`` has not been executed yet by the
``Watcher Applier``.
- **ONGOING** : the ``Action`` is currently being processed by the
``Watcher Applier``.
- **SUCCEEDED** : the ``Action`` has been executed successfully
- **FAILED** : an error occurred while trying to execute the ``Action``.
- **DELETED** : the ``Action`` is still stored in the ``Watcher database``
but is not returned any more through the Watcher APIs.
- **CANCELLED** : the ``Action`` was in **PENDING** or **ONGOING** state and
was cancelled by the ``Administrator``
``Actions`` are created by ``Watcher Planner`` as result of Audit's execution.
``Action`` can't be created, modified or deleted by user.
List Action
===========
.. rest_method:: GET /v1/actions
Returns a list of Action resources.
Normal response codes: 200
Error codes: 400,401
Request
-------
.. rest_parameters:: parameters.yaml
- action_plan_uuid: r_action_plan
- audit_uuid: r_audit
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- action_type: action_type
- state: action_state
- action_plan_uuid: action_action_plan_uuid
- parents: action_parents
- links: links
**Example JSON representation of an Action:**
.. literalinclude:: samples/actions-list-response.json
:language: javascript
List Action Detailed
====================
.. rest_method:: GET /v1/actions/detail
Returns a list of Action resources with complete details.
Normal response codes: 200
Error codes: 400,401
Request
-------
.. rest_parameters:: parameters.yaml
- action_plan_uuid: r_action_plan
- audit_uuid: r_audit
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
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
**Example JSON representation of an Action:**
.. literalinclude:: samples/actions-list-detailed-response.json
:language: javascript
Show Action
===========
.. rest_method:: GET /v1/actions/{action_ident}
Shows details for an Action.
Normal response codes: 200
Error codes: 404
Request
-------
.. rest_parameters:: parameters.yaml
- action_ident: action_ident
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
**Example JSON representation of an Action:**
.. literalinclude:: samples/actions-show-response.json
:language: javascript
|