Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1309 #2

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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