summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Smith <code@term.ie>2011-01-07 16:42:38 -0800
committerAndy Smith <code@term.ie>2011-01-07 16:42:38 -0800
commitd79600c1029ab91de8a81809df9efddc762351c0 (patch)
treecd4bd0d6303d691f2c5e5fa8c4d15bef4cf080c7
parent8fe01c087943ca9b46d25c84d4408b752461e6bd (diff)
small cleanups
-rw-r--r--nova/api/openstack/servers.py2
-rw-r--r--nova/db/sqlalchemy/models.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 0953b01ed..3f0fdc575 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -49,7 +49,7 @@ def _translate_detail_keys(inst):
power_state.SHUTOFF: 'active',
power_state.CRASHED: 'error'}
inst_dict = {}
- print inst
+
mapped_keys = dict(status='state', imageId='image_id',
flavorId='instance_type', name='display_name', id='id')
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index 14cf7f617..d730a0ebc 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -90,7 +90,9 @@ class NovaBase(object):
setattr(self, k, v)
def iteritems(self):
- """Make the model object behave like a dict"""
+ """Make the model object behave like a dict.
+
+ Includes attributes from joins."""
local = dict(self)
joined = dict([(k, v) for k, v in self.__dict__.iteritems()
if not k[0] == '_'])