summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorzhangbailin <zhangbailin@inspur.com>2019-06-07 15:11:29 +0800
committerMatt Riedemann <mriedem.os@gmail.com>2019-08-27 12:57:10 -0400
commit27b6c18c666389ee68935f28cf340b7673879d6f (patch)
tree08eb43baa47fefba9dc46a4d6bf4935718dfb82e /api-ref
parent912a46c9d4d3a8cc63724adff70acf8a4fc34d9b (diff)
downloadnova-27b6c18c666389ee68935f28cf340b7673879d6f.tar.gz
Specify availability_zone to unshelve
This adds support, in a new microversion, for specifying an availability zone to the unshelve server action when the server is shelved offloaded. Note that the functional test changes are due to those tests using the "latest" microversion where an empty dict is not allowed for unshelve with 2.77 so the value is changed from an empty dict to None. Implements: blueprint support-specifying-az-when-restore-shelved-server Closes-Bug: #1723880 Change-Id: I4b13483eef42bed91d69eabf1f30762d6866f957
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/parameters.yaml9
-rw-r--r--api-ref/source/servers-action-shelve.inc8
2 files changed, 16 insertions, 1 deletions
diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml
index 7337a3a381..82f9ef8801 100644
--- a/api-ref/source/parameters.yaml
+++ b/api-ref/source/parameters.yaml
@@ -1799,6 +1799,15 @@ availability_zone_state:
in: body
required: true
type: object
+availability_zone_unshelve:
+ description: |
+ The availability zone name. Specifying an availability zone is only
+ allowed when the server status is ``SHELVED_OFFLOADED`` otherwise a
+ 409 HTTPConflict response is returned.
+ in: body
+ required: false
+ type: string
+ min_version: 2.77
available:
description: |
Returns true if the availability zone is available.
diff --git a/api-ref/source/servers-action-shelve.inc b/api-ref/source/servers-action-shelve.inc
index b024031cdf..4bb63ceb7e 100644
--- a/api-ref/source/servers-action-shelve.inc
+++ b/api-ref/source/servers-action-shelve.inc
@@ -138,7 +138,7 @@ If the server status does not change to ``ACTIVE``, the unshelve operation faile
Normal response codes: 202
-Error response codes: unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
+Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
Request
-------
@@ -147,6 +147,7 @@ Request
- server_id: server_id_path
- unshelve: unshelve
+ - availability_zone: availability_zone_unshelve
|
@@ -155,6 +156,11 @@ Request
.. literalinclude:: ../../doc/api_samples/os-shelve/os-unshelve.json
:language: javascript
+**Example Unshelve server (unshelve Action) (v2.77)**
+
+.. literalinclude:: ../../doc/api_samples/os-shelve/v2.77/os-unshelve.json
+ :language: javascript
+
Response
--------