Allow unshelve to a specific host (REST API part)

This adds support to the REST API, in a new microversion, for specifying
a destination host to unshelve server action when the server
is shelved offloaded.
This patch also supports the ability to unpin the availability_zone of an
instance that is bound to it.

Note that the functional test changes are due to those tests using the
"latest" microversion 2.91.

Implements: blueprint unshelve-to-host
Change-Id: I9e95428c208582741e6cd99bd3260d6742fcc6b7
This commit is contained in:
René Ribaud
2022-06-13 15:22:43 +02:00
parent a263fa46f8
commit 09239fc2ea
30 changed files with 1318 additions and 57 deletions
+14 -2
View File
@@ -1858,8 +1858,11 @@ availability_zone_state:
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.
allowed when the server status is ``SHELVED_OFFLOADED`` otherwise
HTTP 409 conflict response is returned.
Since microversion 2.91 ``"availability_zone":null`` allows unpinning the
instance from any availability_zone it is pinned to.
in: body
required: false
type: string
@@ -3690,6 +3693,15 @@ host_status_update_rebuild:
required: false
type: string
min_version: 2.75
host_unshelve:
description: |
The destination host name. Specifying a destination host is by default only
allowed to project_admin, if it not the case HTTP 403 forbidden response
is returned.
in: body
required: false
type: string
min_version: 2.91
host_zone:
description: |
The available zone of the host.