Api-ref: add documentation for v2/v3 backup 'os-reset_status' action

There is no document about v2/v3 backup 'os-reset_status' action. This
action explicitly updates the backup state. So add the missing content.

Change-Id: Ie0dd2b4e184d09e957c4ba296544f5019d05fda3
Partial-Bug: #1607539
This commit is contained in:
lihaijing 2017-06-26 15:18:09 +08:00
parent bd33bbffb7
commit 57330a12a8
6 changed files with 90 additions and 9 deletions

View File

@ -3,7 +3,7 @@
Backup actions (backups, action)
================================
Force-deletes a backup.
Force-deletes a backup and reset status for a backup.
Force-delete backup
@ -18,9 +18,8 @@ This operations deletes the backup and any backup data.
The backup driver returns the ``405`` status code if it does not
support this operation.
Normal response codes: 202,
Error response codes:404,405,
Normal response codes: 202
Error response codes: itemNotFound(404), badMethod(405)
Request
@ -37,3 +36,33 @@ Request Example
.. literalinclude:: ./samples/backup-force-delete-request.json
:language: javascript
Reset backup's status
~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v2/{tenant_id}/backups/{backup_id}/action
Reset a backup's status. Specify the ``os-reset_status`` action in the request body.
Normal response codes: 202
Error response codes: badRequest(400), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- status: status_7
- os-reset_status: os-reset_status
- tenant_id: tenant_id
- backup_id: backup_id
Request Example
---------------
.. literalinclude:: ./samples/backup-reset-status-request.json
:language: javascript

View File

@ -17,7 +17,7 @@ backup_id:
description: |
The UUID for a backup.
in: path
required: false
required: true
type: string
cascade:
description: |
@ -1571,6 +1571,12 @@ status_6:
in: body
required: false
type: string
status_7:
description: |
The status for the backup.
in: body
required: true
type: string
storage_protocol:
description: |
The storage back end for the back-end volume. For

View File

@ -0,0 +1,5 @@
{
"os-reset_status": {
"status": "available"
}
}

View File

@ -3,7 +3,7 @@
Backup actions (backups, action)
================================
Force-deletes a backup.
Force-deletes a backup and reset status for a backup.
Force-delete a backup
@ -18,8 +18,8 @@ This operations deletes the backup and any backup data.
The backup driver returns the ``405`` status code if it does not
support this operation.
Error response codes:404,405,202,
Normal response codes: 202
Error response codes: itemNotFound(404), badMethod(405)
Request
-------
@ -35,3 +35,33 @@ Request Example
.. literalinclude:: ./samples/backup-force-delete-request.json
:language: javascript
Reset a backup's status
~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v3/{project_id}/backups/{backup_id}/action
Reset a backup's status. Specify the ``os-reset_status`` action in the request body.
Normal response codes: 202
Error response codes: badRequest(400), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- status: status_10
- os-reset_status: os-reset_status
- project_id: project_id_path
- backup_id: backup_id
Request Example
---------------
.. literalinclude:: ./samples/backup-reset-status-request.json
:language: javascript

View File

@ -29,7 +29,7 @@ backup_id:
description: |
The UUID for a backup.
in: path
required: false
required: true
type: string
cascade:
description: |
@ -1875,6 +1875,12 @@ status_1:
in: body
required: true
type: string
status_10:
description: |
The status for the backup.
in: body
required: true
type: string
status_2:
description: |
The status for the snapshot.

View File

@ -0,0 +1,5 @@
{
"os-reset_status": {
"status": "available"
}
}