api-ref: Adds os-update_readonly_flag API

This patch adds "os-update_readonly_flag" volume action API.

Change-Id: Idad24f9a17af3323a26ed487f1f0d20306bf935f
Closes-Bug: #1775915
Closes-Bug: #1771390
This commit is contained in:
Dongcan Ye 2018-06-16 03:16:08 +00:00
parent 7ff3505a68
commit cb0cb208e3
3 changed files with 51 additions and 0 deletions

View File

@ -2059,6 +2059,13 @@ os-unset_image_metadata:
in: body
required: true
type: object
os-update_readonly_flag:
description: |
The ``os-update_readonly_flag`` action. This action
enables or disables update of volume to read-only access mode.
in: body
required: true
type: object
os-update_snapshot_status:
description: |
The ``os-update_snapshot_status`` action.
@ -2237,6 +2244,13 @@ rate:
in: body
required: true
type: array
readonly:
description: |
Enables or disables read-only access mode.
This value can be True, true, False, false.
in: body
required: true
type: boolean
reason_not_safe:
description: |
The reason why the resource can't be managed.

View File

@ -0,0 +1,5 @@
{
"os-update_readonly_flag": {
"readonly": true
}
}

View File

@ -796,3 +796,35 @@ Request Example
.. literalinclude:: ./samples/volume-initialize-connection-request.json
:language: javascript
Updates volume read-only access-mode flag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v3/{project_id}/volumes/{volume_id}/action
Enables or disables update of volume to read-only access mode.
Specify the ``os-update_readonly_flag`` action in the request body.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 202
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- volume_id: volume_id_path
- os-update_readonly_flag: os-update_readonly_flag
- readonly: readonly
Request Example
---------------
.. literalinclude:: ./samples/volume-readonly-update-request.json
:language: javascript