summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorLorin Hochstein <lorin@isi.edu>2011-06-25 00:05:38 -0400
committerLorin Hochstein <lorin@isi.edu>2011-06-25 00:05:38 -0400
commitaf4e663dee05c907d7ccddc3bb929ff114e876cc (patch)
treee4850217a69d7ce57a1b02d18d8c723c0a22f506 /nova/db
parent706bfc7e3f1cb1d5c56e988abf264c71c54ac0ce (diff)
downloadnova-af4e663dee05c907d7ccddc3bb929ff114e876cc.tar.gz
nova-af4e663dee05c907d7ccddc3bb929ff114e876cc.tar.xz
nova-af4e663dee05c907d7ccddc3bb929ff114e876cc.zip
Updated _dict_with_extra_specs docstring
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/api.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 38fe2e2c6..55f4bf072 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -2624,7 +2624,14 @@ def instance_type_create(_context, values):
def _dict_with_extra_specs(inst_type_query):
"""Takes an instance type query returned by sqlalchemy
and returns it as a dictionary, converting the extra_specs
- from a list of key/value pairs to a dictionary
+ entry from a list of dicts:
+
+ 'extra_specs' : [{'key': 'k1', 'value': 'v1', ...}, ...]
+
+ to a single dict:
+
+ 'extra_specs' : {'k1': 'v1'}
+
"""
inst_type_dict = dict(inst_type_query)
extra_specs = dict([(x['key'], x['value']) for x in \