
Nowadays "project" and "project_id" are used instead of "tenant" in the OpenStack world. See [1] and [2]. - Replace "tenant_id" in the API paths to "project_id" - For most manila resources, the "project_id" in an API response body refers to the project that owns the resource. So, create a unified parameter and share that across the APIs. - Fix path variable names, and their order - Fix usage of "UUID" to refer to project and user IDs - Fix query parameters [1] https://docs.openstack.org/operations-guide/ops-projects-users.html [2] https://developer.openstack.org/api-ref/identity/v3/index.html#projects Partial-Bug: #1760644 Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com> Change-Id: I64e4ef8ad258d07c7d80d11a4d015c4b82156722
188 lines
2.8 KiB
ReStructuredText
188 lines
2.8 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
==============
|
|
Share metadata
|
|
==============
|
|
|
|
Shows, sets, updates, and unsets share metadata.
|
|
|
|
|
|
Show share metadata
|
|
===================
|
|
|
|
.. rest_method:: GET /v2/{project_id}/shares/{share_id}/metadata
|
|
|
|
Shows the metadata for a share.
|
|
|
|
Response codes
|
|
--------------
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
- 200
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
- 400
|
|
- 401
|
|
- 403
|
|
- 404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- share_id: share_id
|
|
|
|
Response parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- metadata: metadata_3
|
|
|
|
Response example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/share-show-metadata-response.json
|
|
:language: javascript
|
|
|
|
|
|
Set share metadata
|
|
==================
|
|
|
|
.. rest_method:: POST /v2/{project_id}/shares/{share_id}/metadata
|
|
|
|
Sets the metadata on a share.
|
|
|
|
Response codes
|
|
--------------
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
- 200
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
- 400
|
|
- 401
|
|
- 403
|
|
- 404
|
|
- 409
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- share_id: share_id
|
|
- metadata: metadata_2
|
|
|
|
|
|
Request example
|
|
---------------
|
|
|
|
.. literalinclude:: samples/share-set-metadata-request.json
|
|
:language: javascript
|
|
|
|
Response parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- metadata: metadata
|
|
|
|
Response example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/share-set-metadata-response.json
|
|
:language: javascript
|
|
|
|
|
|
Update share metadata
|
|
=====================
|
|
|
|
.. rest_method:: PUT /v2/{project_id}/shares/{share_id}/metadata
|
|
|
|
Updates the metadata for a share.
|
|
|
|
Response codes
|
|
--------------
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
- 200
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
- 400
|
|
- 401
|
|
- 403
|
|
- 404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- share_id: share_id
|
|
- metadata: metadata_2
|
|
|
|
|
|
Request example
|
|
---------------
|
|
|
|
.. literalinclude:: samples/share-update-metadata-request.json
|
|
:language: javascript
|
|
|
|
Response parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- metadata: metadata_3
|
|
|
|
Response example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/share-update-metadata-response.json
|
|
:language: javascript
|
|
|
|
|
|
Unset share metadata
|
|
====================
|
|
|
|
.. rest_method:: DELETE /v2/{project_id}/shares/{share_id}/metadata/{key}
|
|
|
|
Un-sets the metadata on a share.
|
|
|
|
To unset a metadata key value, specify only the key name in the
|
|
URI.
|
|
|
|
Response codes
|
|
--------------
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
- 200
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
- 400
|
|
- 401
|
|
- 403
|
|
- 404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- share_id: share_id
|
|
- key: metadata_key_request
|