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
102 lines
2.1 KiB
ReStructuredText
102 lines
2.1 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
Volume type access (volumes)
|
|
============================
|
|
|
|
Private volume type access to project.
|
|
|
|
By default, volumes types are public. To create a private volume
|
|
type, set the ``is_public`` boolean field to ``false`` at volume
|
|
type creation time. To control access to a private volume type,
|
|
user needs to add a project to or remove a project from the volume
|
|
type. Private volume types without projects are only accessible by
|
|
users with the administrative role and context.
|
|
|
|
|
|
Add private volume type access to project
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: POST /v3/{project_id}/types/{volume_type}/action
|
|
|
|
Adds private volume type access to a project.
|
|
|
|
Normal response codes: 202
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project: project
|
|
- project_id: project_id_path
|
|
- volume_type: volume_type
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/volume-type-access-add-request.json
|
|
:language: javascript
|
|
|
|
|
|
Remove private volume type access from project
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: POST /v3/{project_id}/types/{volume_type}/action
|
|
|
|
Removes private volume type access from a project.
|
|
|
|
Normal response codes: 202
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project: project
|
|
- project_id: project_id_path
|
|
- volume_type: volume_type
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/volume-type-access-delete-request.json
|
|
:language: javascript
|
|
|
|
|
|
List private volume type access detail
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{project_id}/types/{volume_type}/os-volume-type-access
|
|
|
|
Lists project IDs that have access to private volume type.
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- volume_type: volume_type
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id
|
|
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/volume-type-access-list-response.json
|
|
:language: javascript
|