From e9acdab68795e9e4716aabb2d8035fbb12062765 Mon Sep 17 00:00:00 2001 From: luqitao <qtlu@fiberhome.com> Date: Fri, 2 Jun 2017 05:08:00 -0400 Subject: [PATCH] [api-ref]Adds API documentation for 'os-set_bootable' action There is no document about update a volume's bootable status, so add the missing doc. Change-Id: If706205678cfd7a803e2d7733bec34494b47fc66 Partial-Bug: #1607539 --- api-ref/source/v2/parameters.yaml | 6 ++++ ...volume-bootable-status-update-request.json | 5 +++ .../source/v2/volumes-v2-volumes-actions.inc | 31 ++++++++++++++++++ api-ref/source/v3/parameters.yaml | 6 ++++ ...volume-bootable-status-update-request.json | 5 +++ .../source/v3/volumes-v3-volumes-actions.inc | 32 +++++++++++++++++++ 6 files changed, 85 insertions(+) create mode 100644 api-ref/source/v2/samples/volume-bootable-status-update-request.json create mode 100644 api-ref/source/v3/samples/volume-bootable-status-update-request.json diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index c1cd55f8081..1337236d079 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -1199,6 +1199,12 @@ OS-SCH-HNT:scheduler_hints: in: body required: false type: object +os-set_bootable: + description: | + The ``os-set_bootable`` action. + in: body + required: true + type: object os-set_image_metadata: description: | The ``os-set_image_metadata`` action. diff --git a/api-ref/source/v2/samples/volume-bootable-status-update-request.json b/api-ref/source/v2/samples/volume-bootable-status-update-request.json new file mode 100644 index 00000000000..abcdf3deb82 --- /dev/null +++ b/api-ref/source/v2/samples/volume-bootable-status-update-request.json @@ -0,0 +1,5 @@ +{ + "os-set_bootable": { + "bootable": "True" + } +} diff --git a/api-ref/source/v2/volumes-v2-volumes-actions.inc b/api-ref/source/v2/volumes-v2-volumes-actions.inc index 3041274e000..9f70d9ff00a 100644 --- a/api-ref/source/v2/volumes-v2-volumes-actions.inc +++ b/api-ref/source/v2/volumes-v2-volumes-actions.inc @@ -369,3 +369,34 @@ Request Example :language: javascript + + + + + +Update volume bootable status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: POST /v2/{tenant_id}/volumes/{volume_id}/action + +Update the bootable status for a volume, mark it as a bootable volume. Specify the ``os-set_bootable`` action in the request body. + +Normal response codes: 200 + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - tenant_id: tenant_id + - volume_id: volume_id_path + - os-set_bootable: os-set_bootable + - bootable: bootable + +Request Example +--------------- + +.. literalinclude:: ./samples/volume-bootable-status-update-request.json + :language: javascript + diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 3188a02ded0..5e48821a294 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -1437,6 +1437,12 @@ OS-SCH-HNT:scheduler_hints: in: body required: false type: object +os-set_bootable: + description: | + The ``os-set_bootable`` action. + in: body + required: true + type: object os-set_image_metadata: description: | The ``os-set_image_metadata`` action. diff --git a/api-ref/source/v3/samples/volume-bootable-status-update-request.json b/api-ref/source/v3/samples/volume-bootable-status-update-request.json new file mode 100644 index 00000000000..abcdf3deb82 --- /dev/null +++ b/api-ref/source/v3/samples/volume-bootable-status-update-request.json @@ -0,0 +1,5 @@ +{ + "os-set_bootable": { + "bootable": "True" + } +} diff --git a/api-ref/source/v3/volumes-v3-volumes-actions.inc b/api-ref/source/v3/volumes-v3-volumes-actions.inc index 15252246520..681d47f50ab 100644 --- a/api-ref/source/v3/volumes-v3-volumes-actions.inc +++ b/api-ref/source/v3/volumes-v3-volumes-actions.inc @@ -365,3 +365,35 @@ Request Example .. literalinclude:: ./samples/volume-force-delete-request.json :language: javascript + + + + + + +Update a volume's bootable status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: POST /v3/{project_id}/volumes/{volume_id}/action + +Update the bootable status for a volume, mark it as a bootable volume. Specify the ``os-set_bootable`` action in the request body. + +Normal response codes: 200 + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - project_id: project_id_path + - volume_id: volume_id_path + - os-set_bootable: os-set_bootable + - bootable: bootable + +Request Example +--------------- + +.. literalinclude:: ./samples/volume-bootable-status-update-request.json + :language: javascript +