db api: Remove check for security groups reference

security_group_in_use() should only be checking that a security
group is associated with running instances, not that other groups
are referencing it in their rules.  With this check in place, it
becomes impossible to delete self-referential security groups.

Fixes bug 956366.

Update: Remove obsolete test as well

Change-Id: I31f49c655b044dbaf0fb66dfaadb876c9dc3d167
This commit is contained in:
Adam Gandelman
2012-03-15 15:38:11 -07:00
committed by Vishvananda Ishaya
parent 018f7fd9c5
commit 52b52ee0e5

View File

@@ -572,15 +572,6 @@ class ApiEc2TestCase(test.TestCase):
self.expect_http()
self.mox.ReplayAll()
# Can not delete the group while it is still used by
# another group.
self.assertRaises(boto_exc.EC2ResponseError,
self.ec2.delete_security_group,
other_security_group_name)
self.expect_http()
self.mox.ReplayAll()
rv = self.ec2.get_all_security_groups()
for group in rv: