diff options
author | Soren Hansen <soren@linux2go.dk> | 2011-01-12 22:45:44 +0100 |
---|---|---|
committer | Soren Hansen <soren@linux2go.dk> | 2011-01-12 22:45:44 +0100 |
commit | a58fe1849ad7473f7e437e07611aa9c9611cf5e6 (patch) | |
tree | fd4bf05bddea6b73485c9ef7bc881c367b9068d5 | |
parent | ef86d16f15276581932ab50029e895c9cbf655af (diff) | |
download | nova-a58fe1849ad7473f7e437e07611aa9c9611cf5e6.tar.gz nova-a58fe1849ad7473f7e437e07611aa9c9611cf5e6.tar.xz nova-a58fe1849ad7473f7e437e07611aa9c9611cf5e6.zip |
Do joinedload_all('fixed_ip.floating_ips') instead of joinedload('fixed_ip')
-rw-r--r-- | nova/db/sqlalchemy/api.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index cee6121a9..e00f31cbe 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -756,14 +756,14 @@ def instance_get_by_id(context, instance_id): if is_admin_context(context): result = session.query(models.Instance).\ options(joinedload('security_groups')).\ - options(joinedload('fixed_ip')).\ + options(joinedload_all('fixed_ip.floating_ips')).\ filter_by(id=instance_id).\ filter_by(deleted=can_read_deleted(context)).\ first() elif is_user_context(context): result = session.query(models.Instance).\ options(joinedload('security_groups')).\ - options(joinedload('fixed_ip')).\ + options(joinedload_all('fixed_ip.floating_ips')).\ filter_by(project_id=context.project_id).\ filter_by(id=instance_id).\ filter_by(deleted=False).\ |