diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-01-24 20:52:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-01-24 20:52:57 +0000 |
| commit | ef50dd412b3e0ab569c85abc1b3637ff0f3f819d (patch) | |
| tree | 44c8ce804c5f16a8f21feb0efbe6a63b21bc1eed /nova/db | |
| parent | 8dfd968e83cbcdc0796caa44289144d38a6a5ce8 (diff) | |
| parent | 35b3c08a463dd35a41f3c44f3fa8273b915cb378 (diff) | |
Merge "Add an API extension for creating+deleting flavors"
Diffstat (limited to 'nova/db')
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 0a30199c1..0c8637225 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -3365,13 +3365,13 @@ def instance_type_create(context, values): instance_type_ref.save() except Exception, e: raise exception.DBError(e) - return instance_type_ref + return _dict_with_extra_specs(instance_type_ref) def _dict_with_extra_specs(inst_type_query): - """Takes an instance OR volume type query returned by sqlalchemy - and returns it as a dictionary, converting the extra_specs - entry from a list of dicts: + """Takes an instance, volume, or instance type query returned + by sqlalchemy and returns it as a dictionary, converting the + extra_specs entry from a list of dicts: 'extra_specs' : [{'key': 'k1', 'value': 'v1', ...}, ...] |
