Skip to content

Commit

Permalink
Fix #1309
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jul 11, 2019
1 parent ae9d81e commit 56f66f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libcloud/compute/drivers/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ def ex_resize(self, node, size):
:rtype: ``bool``
"""
server_params = self._create_args_to_params(node, size=size)
server_params = {'flavorRef': size.id}
resp = self._node_action(node, 'resize', **server_params)
return resp.status == httplib.ACCEPTED

Expand Down
5 changes: 4 additions & 1 deletion libcloud/test/compute/test_openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,10 @@ def _v1_0_slug_servers_444222_action(self, method, url, body, headers):
body = u(body)
if body.find('resize') != -1:
# test_ex_resize_server
return (httplib.ACCEPTED, "", headers, httplib.responses[httplib.NO_CONTENT])
if body == '<resize flavorId="1" xmlns="http://docs.rackspacecloud.com/servers/api/v1.0" />':
return (httplib.ACCEPTED, "", headers, httplib.responses[httplib.NO_CONTENT])
else:
return httplib.BAD_REQUEST
elif body.find('confirmResize') != -1:
# test_ex_confirm_resize
return (httplib.NO_CONTENT, "", headers, httplib.responses[httplib.NO_CONTENT])
Expand Down

0 comments on commit 56f66f2

Please sign in to comment.