summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
Diffstat (limited to 'nova')
-rw-r--r--nova/compute/instance_types.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/compute/instance_types.py b/nova/compute/instance_types.py
index fa001f2cd..2bc470a41 100644
--- a/nova/compute/instance_types.py
+++ b/nova/compute/instance_types.py
@@ -66,7 +66,9 @@ def create(name, memory, vcpus, root_gb, ephemeral_gb, flavorid, swap=None,
raise exception.InvalidInput(reason=msg)
kwargs['name'] = name
- kwargs['flavorid'] = flavorid
+ # NOTE(vish): Internally, flavorid is stored as a string but it comes
+ # in through json as an integer, so we convert it here.
+ kwargs['flavorid'] = unicode(flavorid)
try:
return db.instance_type_create(context.get_admin_context(), kwargs)