summaryrefslogtreecommitdiffstats
path: root/nova/db/sqlalchemy/models.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2013-03-12 10:49:21 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2013-03-12 14:52:20 -0700
commitedf57ca3f4e822e45300f50471fbb90f14f1ab94 (patch)
tree151edc50814e837ea6e6705bccea8479d5ff42d7 /nova/db/sqlalchemy/models.py
parent562b0787421b145c4a91ccbbcacfc74c340cead8 (diff)
downloadnova-edf57ca3f4e822e45300f50471fbb90f14f1ab94.tar.gz
nova-edf57ca3f4e822e45300f50471fbb90f14f1ab94.tar.xz
nova-edf57ca3f4e822e45300f50471fbb90f14f1ab94.zip
Don't load system_metadata when it isn't joined.
If we always load system_metadata, it will throw a sqlalchemy error if it isn't joined in the column. Rather than putting it in extra keys we need to explicitly join it if it is missing. Adds a test to make sure that system_metadata is returned properly from the migration call even though the extra keys parameter was removed. Fixes bug 1146000 Change-Id: I05365906ed528a06fe5704449dab72c857fefa65
Diffstat (limited to 'nova/db/sqlalchemy/models.py')
-rw-r--r--nova/db/sqlalchemy/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index a675357df..c287cc0c5 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -154,7 +154,7 @@ class Instance(BASE, NovaBase):
return base_name
def _extra_keys(self):
- return ['name', 'system_metadata']
+ return ['name']
user_id = Column(String(255))
project_id = Column(String(255))