cinder/api-ref/source/v1/volumes-v1-volumes.inc
Eric Harney 52e0f003fb Revert "Remove v1 API reference"
The v1 API is still in the tree, even if it is off by
default and deprecated.  We need to keep documentation on
how it works at least until we remove the code.  This was
published to [1] which was the primary way to find this
information, and it is now missing.

[1] https://developer.openstack.org/api-ref/block-storage/v1/

This marks v1 as deprecated in the toctree.

This reverts commit 8139f7f108.

Change-Id: Ic9d0fcce5ca0f8455c212292664b8f9694edfce3
2017-03-15 17:04:22 -04:00

234 lines
4.3 KiB
ReStructuredText

.. -*- rst -*-
Volumes
=======
The ``snapshot_id`` and ``source_volid`` parameters specify the ID
of the snapshot or volume from which the volume originates. If the
volume was not created from a snapshot or source volume, these
values are null.
List volumes, with details (v1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1/{tenant_id}/volumes/detail
Lists all volumes, with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- migration_status: migration_status
- attachments: attachments
- links: links
- availability_zone: availability_zone
- encrypted: encrypted
- updated_at: updated_at
- replication_status: replication_status
- snapshot_id: snapshot_id
- id: id
- size: size
- user_id: user_id
- metadata: metadata
- status: status
- description: description
- multiattach: multiattach
- source_volid: source_volid
- consistencygroup_id: consistencygroup_id
- name: name
- bootable: bootable
- created_at: created_at
- volume_type: volume_type
- volumes: volumes
Response Example
----------------
.. literalinclude:: ./samples/volumes-list-response.json
:language: javascript
Create volume (v1)
~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1/{tenant_id}/volumes
Creates a volume.
Normal response codes: 201,
Request
-------
.. rest_parameters:: parameters.yaml
- size: size
- description: description
- imageRef: imageRef
- multiattach: multiattach
- availability_zone: availability_zone
- source_volid: source_volid
- name: name
- volume: volume
- consistencygroup_id: consistencygroup_id
- volume_type: volume_type
- snapshot_id: snapshot_id
- OS-SCH-HNT:scheduler_hints: OS-SCH-HNT:scheduler_hints
- source_replica: source_replica
- metadata: metadata
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/volume-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- description: description
- imageRef: imageRef
- multiattach: multiattach
- created_at: created_at
- availability_zone: availability_zone
- source_volid: source_volid
- name: name
- volume: volume
- volume_type: volume_type
- snapshot_id: snapshot_id
- size: size
- metadata: metadata
List volumes (v1)
~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1/{tenant_id}/volumes
Lists all volumes.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- volumes: volumes
- id: id
- links: links
- name: name
Response Example
----------------
.. literalinclude:: ./samples/volumes-list-response.json
:language: javascript
Show volume details (v1)
~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1/{tenant_id}/volumes/{volume_id}
Shows details for a volume.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_id: volume_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- migration_status: migration_status
- attachments: attachments
- links: links
- availability_zone: availability_zone
- encrypted: encrypted
- updated_at: updated_at
- replication_status: replication_status
- snapshot_id: snapshot_id
- id: id
- size: size
- user_id: user_id
- metadata: metadata
- status: status
- description: description
- multiattach: multiattach
- source_volid: source_volid
- volume: volume
- consistencygroup_id: consistencygroup_id
- name: name
- bootable: bootable
- created_at: created_at
- volume_type: volume_type
Response Example
----------------
.. literalinclude:: ./samples/volume-show-response.json
:language: javascript
Delete volume (v1)
~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v1/{tenant_id}/volumes/{volume_id}
Deletes a volume.
Normal response codes: 202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- volume_id: volume_id