From 2aed75f987bdc8250a9838c2594c7f344c771b69 Mon Sep 17 00:00:00 2001 From: scottda Date: Tue, 30 Aug 2016 14:38:02 -0600 Subject: [PATCH] Add os-detach to api-ref os-detach was missing from api-ref. Change-Id: I1e2990178ff7fcf3c6953e35469af04a3bde6010 Closes-Bug: #1618609 --- api-ref/source/v2/parameters.yaml | 6 +++ .../v2/samples/volume-detach-request.json | 6 +++ .../source/v2/volumes-v2-volumes-actions.inc | 39 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 api-ref/source/v2/samples/volume-detach-request.json diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index 241507fee48..3b2a5b5b447 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -1007,6 +1007,12 @@ os-attach: in: body required: true type: object +os-detach: + description: | + The ``os-detach`` action. + in: body + required: true + type: object os-extend: description: | The ``os-extend`` action. diff --git a/api-ref/source/v2/samples/volume-detach-request.json b/api-ref/source/v2/samples/volume-detach-request.json new file mode 100644 index 00000000000..f2e9937a0af --- /dev/null +++ b/api-ref/source/v2/samples/volume-detach-request.json @@ -0,0 +1,6 @@ +{ + "os-detach": { + "attachment_id": "d8777f54-84cf-4809-a679-468ffed56cf1" + } +} + diff --git a/api-ref/source/v2/volumes-v2-volumes-actions.inc b/api-ref/source/v2/volumes-v2-volumes-actions.inc index f0b25ae8258..55b07118770 100644 --- a/api-ref/source/v2/volumes-v2-volumes-actions.inc +++ b/api-ref/source/v2/volumes-v2-volumes-actions.inc @@ -196,6 +196,45 @@ Request Example +Detach volume from a server +=========================== + +.. rest_method:: POST /v2/{tenant_id}/volumes/{volume_id}/action + +Detaches a volume from a server. Specify the ``os-detach`` action in the request body. + +Preconditions + +- Volume status must be ``in-use``. + +Normal response codes: 202, + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - attachment_id: attachment_id + - os-detach: os-detach + - tenant_id: tenant_id + - volume_id_1: volume_id + +Request Example +--------------- + +.. literalinclude:: ./samples/volume-detach-request.json + :language: javascript + + + + + + + + + + Unmanage volume ===============