Skip to content

Commit

Permalink
Merge "Follow up for specifying az to unshelve"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Aug 30, 2019
2 parents 7446155 + 25074cb commit 5450f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions nova/api/openstack/compute/rest_api_version_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -996,5 +996,6 @@ through ``GET /servers/{server_id}/os-instance-actions`` and

2.77
----

API microversion 2.77 adds support for specifying availability zone when
unshelving a shelved offloaded server.
7 changes: 3 additions & 4 deletions nova/api/openstack/compute/shelve.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ def _unshelve(self, req, id, body):

new_az = None
unshelve_dict = body['unshelve']
if unshelve_dict and 'availability_zone' in unshelve_dict:
support_az = api_version_request.is_supported(req, '2.77')
if support_az:
new_az = unshelve_dict['availability_zone']
support_az = api_version_request.is_supported(req, '2.77')
if support_az and unshelve_dict:
new_az = unshelve_dict['availability_zone']

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

0 comments on commit 5450f77

Please sign in to comment.