Skip to content

Commit 5450f77

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Follow up for specifying az to unshelve"
2 parents 7446155 + 25074cb commit 5450f77

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nova/api/openstack/compute/rest_api_version_history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,5 +996,6 @@ through ``GET /servers/{server_id}/os-instance-actions`` and
996996

997997
2.77
998998
----
999+
9991000
API microversion 2.77 adds support for specifying availability zone when
10001001
unshelving a shelved offloaded server.

nova/api/openstack/compute/shelve.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ def _unshelve(self, req, id, body):
8787

8888
new_az = None
8989
unshelve_dict = body['unshelve']
90-
if unshelve_dict and 'availability_zone' in unshelve_dict:
91-
support_az = api_version_request.is_supported(req, '2.77')
92-
if support_az:
93-
new_az = unshelve_dict['availability_zone']
90+
support_az = api_version_request.is_supported(req, '2.77')
91+
if support_az and unshelve_dict:
92+
new_az = unshelve_dict['availability_zone']
9493

9594
# We could potentially move this check to conductor and avoid the
9695
# extra API call to neutron when we support move operations with ports

0 commit comments

Comments
 (0)