fix for VPC revoking of rules related to groups

This commit is contained in:
Jon Haddad 2014-03-20 17:53:39 -07:00
parent 2b4fe552d1
commit ecaf53fd28

View File

@ -448,6 +448,11 @@ class SecurityGroupBackend(object):
if source_group: if source_group:
source_groups.append(source_group) source_groups.append(source_group)
for source_group_id in source_group_ids:
source_group = self.get_security_group_from_id(source_group_id)
if source_group:
source_groups.append(source_group)
security_rule = SecurityRule(ip_protocol, from_port, to_port, ip_ranges, source_groups) security_rule = SecurityRule(ip_protocol, from_port, to_port, ip_ranges, source_groups)
if security_rule in group.ingress_rules: if security_rule in group.ingress_rules:
group.ingress_rules.remove(security_rule) group.ingress_rules.remove(security_rule)