Merge "Forces flavorRef to be string in servers resize api"

This commit is contained in:
Jenkins 2013-02-13 08:16:29 +00:00 committed by Gerrit Code Review
commit b0b5132f37

View File

@ -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)