From 52b52ee0e5359dad02d69f675e29a114c2ef7491 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Thu, 15 Mar 2012 15:38:11 -0700 Subject: [PATCH] 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 --- nova/tests/test_api.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py index 473e1d5f..5735a7dc 100644 --- a/nova/tests/test_api.py +++ b/nova/tests/test_api.py @@ -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: