From 843af52d49554f15c13e5617b9eb672c35c7fe51 Mon Sep 17 00:00:00 2001 From: Alessandro Tagliapietra Date: Tue, 11 Sep 2012 19:39:13 +0200 Subject: Check flavor id on resize. Actually it checks for memory size changes so you can't change just cpu or hdd when resizing instances. Fixes bug 1049195 Change-Id: I793d19dbf5f1d89d365e63ab61b4edb983fdb11c --- nova/api/openstack/compute/servers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index fc4905a11..ba23cb50b 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -949,8 +949,8 @@ class Controller(wsgi.Controller): except exception.FlavorNotFound: msg = _("Unable to locate requested flavor.") raise exc.HTTPBadRequest(explanation=msg) - except exception.CannotResizeToSameSize: - msg = _("Resize requires a change in size.") + except exception.CannotResizeToSameFlavor: + msg = _("Resize requires a flavor change.") raise exc.HTTPBadRequest(explanation=msg) except exception.InstanceInvalidState as state_error: common.raise_http_conflict_for_instance_invalid_state(state_error, -- cgit