diff options
| author | Tiago Mello <tmello@linux.vnet.ibm.com> | 2013-02-12 20:32:59 -0200 |
|---|---|---|
| committer | Tiago Mello <tmello@linux.vnet.ibm.com> | 2013-02-12 20:32:59 -0200 |
| commit | f59a0373834655346b50eac2a033c7cb31061c3a (patch) | |
| tree | fce00a5368b3b6ca3e7aeeb8551cf4e380c2abd5 /nova/api | |
| parent | 9994a9161d0acac216b3441233eae1f7238db889 (diff) | |
Forces flavorRef to be string in servers resize api
flavorid column is a string in the database model and
MySQL silently accepts either integer or string as
data type. However PostgreSQL expects the right data
type. So we force it to be string as early as possible
in the api.
Fixes Bug 1123525
Change-Id: Id117868b3a2f840f5d7ab463f3b79b6631b3b514
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 723997eba..5858ad640 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -1202,7 +1202,7 @@ class Controller(wsgi.Controller): def _action_resize(self, req, id, body): """Resizes a given instance to the flavor size requested.""" try: - flavor_ref = body["resize"]["flavorRef"] + flavor_ref = str(body["resize"]["flavorRef"]) if not flavor_ref: msg = _("Resize request has invalid 'flavorRef' attribute.") raise exc.HTTPBadRequest(explanation=msg) |
