diff options
| author | Yunhong, Jiang <yunhong.jiang@intel.com> | 2012-07-31 18:15:59 +0800 |
|---|---|---|
| committer | Yunhong, Jiang <yunhong.jiang@intel.com> | 2012-08-06 18:26:15 +0800 |
| commit | 9575a426fa4adcd79f1fa0c3a1d1008d8010c44c (patch) | |
| tree | ee4dd1bf68d5b97e5ee0f147809eba9f5d14ff6a /bin | |
| parent | 9142e11580e901875617400c62e9f18aeb7d3b21 (diff) | |
Flavor extra specs extension use instance_type id
bug 1031263
The nova database API use instance_type id as parameter to access flavor
extra spec. However, the flavor extra_specs API extension use flavor_id as
parameter wrongly.
As the instance_type ID is a purely nova internal ID, the database should
not expose it and instead use flavor_id as the parameter
Change-Id: I5f509cb7c4457d8c399df32f559a874d498be762
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 1bd0691f4..020cebbb1 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -1003,9 +1003,10 @@ class InstanceTypeCommands(object): ctxt = context.get_admin_context() ext_spec = {key: value} - db.instance_type_extra_specs_update_or_create(ctxt, - inst_type["id"], - ext_spec) + db.instance_type_extra_specs_update_or_create( + ctxt, + inst_type["flavorid"], + ext_spec) print _("Key %(key)s set to %(value)s on instance" " type %(name)s") % locals() except exception.DBError, e: @@ -1025,7 +1026,10 @@ class InstanceTypeCommands(object): sys.exit(2) ctxt = context.get_admin_context() - db.instance_type_extra_specs_delete(ctxt, inst_type["id"], key) + db.instance_type_extra_specs_delete( + ctxt, + inst_type["flavorid"], + key) print _("Key %(key)s on instance type %(name)s unset") % locals() except exception.DBError, e: |
