nova/api-ref/source/os-instance-actions.inc
Mathieu Gagné bbe0f313bd Add ability to signal and perform online volume size change
Allow Cinder to use external events to signal a volume extension.

1) Nova will then call os-brick to perform the volume extension
   so the host can detect its new size.
2) Compute driver will resize the device in QEMU so instance can detect
   the new disk size without rebooting.

This change:

* Adds the 'volume-extended' external event.
  The event tag needs to be the extended volume id.
* Bumps the latest microversion to 2.51.
* Exposes non-traceback instance action event details for
  non-admins on the microversion. This is needed for the
  non-admin API user that initiated the volume extend
  operation to be able to tell when the nova-compute side
  is complete.

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Blueprint: nova-support-attached-volume-extend

Change-Id: If10cffd0dc4c9879f6754ce39bee5fae1d04f474
2017-07-12 11:53:20 -04:00

115 lines
2.8 KiB
ReStructuredText

.. -*- rst -*-
================================================
Servers actions (servers, os-instance-actions)
================================================
List actions and action details for a server.
List Actions For Server
=======================
.. rest_method:: GET /servers/{server_id}/os-instance-actions
Lists actions for a server.
Action information of deleted instances can be returned for requests later
than microversion 2.21.
Policy defaults enable only users with the administrative role or the owner of
the server to perform this operation. Cloud providers can change these permissions
through the ``policy.json`` file.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- server_id: server_id_path
Response
--------
.. rest_parameters:: parameters.yaml
- instanceActions: instanceActions
- action: action
- instance_uuid: instance_id_body
- message: message
- project_id: project_id_instance_action
- request_id: request_id_body
- start_time: start_time
- user_id: user_id
**Example List Actions For Server: JSON response**
.. literalinclude:: ../../doc/api_samples/os-instance-actions/instance-actions-list-resp.json
:language: javascript
Show Server Action Details
==========================
.. rest_method:: GET /servers/{server_id}/os-instance-actions/{request_id}
Shows details for a server action.
Action details of deleted instances can be returned for requests later
than microversion 2.21.
Policy defaults enable only users with the administrative role or the owner of
the server to perform this operation. Cloud providers can change these permissions
through the ``policy.json`` file.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- server_id: server_id_path
- request_id: request_id
Response
--------
.. rest_parameters:: parameters.yaml
- instanceAction: instanceAction
- action: action
- instance_uuid: instance_id_body
- message: message
- project_id: project_id_instance_action
- request_id: request_id_body
- start_time: start_time
- user_id: user_id
- events: instance_action_events_2_50
- events: instance_action_events_2_51
- events.event: event
- events.start_time: event_start_time
- events.finish_time: event_finish_time
- events.result: event_result
- events.traceback: event_traceback
**Example Show Server Action Details For Admin (v2.1)**
.. literalinclude:: ../../doc/api_samples/os-instance-actions/instance-action-get-resp.json
:language: javascript
**Example Show Server Action Details For Non-Admin (v2.51)**
.. literalinclude:: ../../doc/api_samples/os-instance-actions/v2.51/instance-action-get-non-admin-resp.json
:language: javascript