fffdac20c2
Some request details provided information about the other JSON value while others didn't. To make things consistent and to make sure API consumers understand how the requests need to be structured, this adds missing instances. It also reorders some parameter lists to be a little more logical, so even though we can't show the nested nature of some of these, it at least doesn't show inner values before outer ones. This also corrects many errors seen while going through the API ref. This is by no means exhaustive, and is already somewhat out of the scope for this patch, so it is expected that there are some (many) cases that are not addressed by this patch. Those will be fixed with ongoing effort in future patches. Partial-bug: #1713517 Change-Id: I30964ba8d829778fd01174d639d44ba07e4b77a6
142 lines
2.9 KiB
ReStructuredText
142 lines
2.9 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
Snapshot manage extension (manageable_snapshots)
|
|
================================================
|
|
|
|
Creates or lists snapshots by using existing storage instead of allocating new
|
|
storage.
|
|
|
|
|
|
Manage an existing snapshot
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: POST /v3/{project_id}/manageable_snapshots
|
|
|
|
Creates a snapshot by using existing storage rather than allocating new
|
|
storage.
|
|
|
|
The caller must specify a reference to an existing storage volume
|
|
in the ref parameter in the request. Although each storage driver
|
|
might interpret this reference differently, the driver should
|
|
accept a reference structure that contains either a source-id
|
|
or source-name element, if possible.
|
|
|
|
The API chooses the size of the snapshot by rounding up the size of
|
|
the existing snapshot to the next gibibyte (GiB).
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- snapshot: snapshot_1
|
|
- description: description
|
|
- metadata: metadata_7
|
|
- name: name_5
|
|
- ref: ref
|
|
- volume_id: volume_id
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/snapshot-manage-request.json
|
|
:language: javascript
|
|
|
|
|
|
|
|
List summary of snapshots available to manage
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{project_id}/manageable_snapshots
|
|
|
|
Search a volume backend and list summary of snapshots which are available to
|
|
manage.
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- sort: sort
|
|
- offset: offset
|
|
- limit: limit
|
|
- marker: marker
|
|
- host: host_query
|
|
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- manageable-snapshots: manageable-snapshots
|
|
- source_reference: source_reference
|
|
- safe_to_manage: safe_to_manage
|
|
- reference: reference
|
|
- source-name: source-name
|
|
- size: size
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/snapshot-manage-list-response.json
|
|
:language: javascript
|
|
|
|
|
|
|
|
List detail of snapshots available to manage
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{project_id}/manageable_snapshots/detail
|
|
|
|
Search a volume backend and list detail of snapshots which are available to
|
|
manage.
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- sort: sort
|
|
- offset: offset
|
|
- limit: limit
|
|
- marker: marker
|
|
- host: host_query
|
|
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- manageable-snapshots: manageable-snapshots
|
|
- cinder_id: cinder_id
|
|
- source_reference: source_reference
|
|
- safe_to_manage: safe_to_manage
|
|
- reason_not_safe: reason_not_safe
|
|
- reference: reference
|
|
- source-name: source-name
|
|
- size: size
|
|
- extra_info: extra_info
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/snapshot-manage-list-detail-response.json
|
|
:language: javascript
|