summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-09-26 08:34:14 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2011-09-26 08:34:48 -0700
commit114ca0b2dc090270d8d20bd10b6e1e7a0b451db2 (patch)
treea05dbbce37ca05f95986e5f9c399bf0a8ac4cfc5 /nova
parent1c8957abd216d983b56bde0bdf3338ca5a730b15 (diff)
Fix the grantee group loading for source groups
Fixes bug 859679. Change-Id: Ia0b90b8373a02955f23b6dda0495f01511762822
Diffstat (limited to 'nova')
-rw-r--r--nova/db/sqlalchemy/api.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index df09aebaf..e6c841048 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -2801,14 +2801,13 @@ def security_group_rule_get_by_security_group(context, security_group_id,
result = session.query(models.SecurityGroupIngressRule).\
filter_by(deleted=can_read_deleted(context)).\
filter_by(parent_group_id=security_group_id).\
- options(joinedload_all('grantee_group')).\
+ options(joinedload_all('grantee_group.instances')).\
all()
else:
- # TODO(vish): Join to group and check for project_id
result = session.query(models.SecurityGroupIngressRule).\
filter_by(deleted=False).\
filter_by(parent_group_id=security_group_id).\
- options(joinedload_all('grantee_group')).\
+ options(joinedload_all('grantee_group.instances')).\
all()
return result