summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2011-08-12 14:38:49 +0000
committerTarmac <>2011-08-12 14:38:49 +0000
commitd5dbbb55e7740c8441c60d15737c0f21d9e2e8e2 (patch)
tree10f13dc2b31160711d6eda0182183a4f5d81a0ef /nova
parentc1deb4b35107eff13d0d614fef28fb9af04c7b88 (diff)
parentc398d6cf85dcb30b8cd499f410618b88a0b5c8c9 (diff)
API needs virtual_interfaces.instance joined when pulling instances from the DB. Updated instance_get_all() to match instance_get_all_by_filters() even though the former is only used by nova-manage now. (The latter is used by the API).
Diffstat (limited to 'nova')
-rw-r--r--nova/db/sqlalchemy/api.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index 8119cdfb8..e5d35a20b 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1139,7 +1139,10 @@ def instance_get_all(context):
session = get_session()
return session.query(models.Instance).\
options(joinedload_all('fixed_ips.floating_ips')).\
- options(joinedload('virtual_interfaces')).\
+ options(joinedload_all('virtual_interfaces.network')).\
+ options(joinedload_all(
+ 'virtual_interfaces.fixed_ips.floating_ips')).\
+ options(joinedload('virtual_interfaces.instance')).\
options(joinedload('security_groups')).\
options(joinedload_all('fixed_ips.network')).\
options(joinedload('metadata')).\
@@ -1202,6 +1205,7 @@ def instance_get_all_by_filters(context, filters):
options(joinedload_all('virtual_interfaces.network')).\
options(joinedload_all(
'virtual_interfaces.fixed_ips.floating_ips')).\
+ options(joinedload('virtual_interfaces.instance')).\
options(joinedload('security_groups')).\
options(joinedload_all('fixed_ips.network')).\
options(joinedload('metadata')).\