From 33803f02a3b4bd16d394363179a8b91b7f295318 Mon Sep 17 00:00:00 2001 From: Ryan Lane Date: Thu, 20 Jan 2011 01:17:51 +0000 Subject: Fetches the security group from ID, allowing the object to be used properly, later. --- nova/compute/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index a6b99c1cb..3c232152e 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -246,7 +246,10 @@ class API(base.Base): # ..then we distill the security groups to which they belong.. security_groups = set() for rule in security_group_rules: - security_groups.add(rule['parent_group_id']) + security_group = self.db.security_group_get( + context, + rule['parent_group_id']) + security_groups.add(security_group) # ..then we find the instances that are members of these groups.. instances = set() -- cgit From 7511b1b50b9a3f9d7dc7f3aaec6187577d97f194 Mon Sep 17 00:00:00 2001 From: Ryan Lane Date: Thu, 20 Jan 2011 19:33:37 +0000 Subject: Fixing another instance of getting a list of ids instead of a list of objects. --- nova/compute/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index 3c232152e..6a3fe08b6 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -255,7 +255,7 @@ class API(base.Base): instances = set() for security_group in security_groups: for instance in security_group['instances']: - instances.add(instance['id']) + instances.add(instance) # ...then we find the hosts where they live... hosts = set() -- cgit