From 3829bb17f59853e9c148ec352ca5652f17ab89ef Mon Sep 17 00:00:00 2001 From: "Sean M. Collins" Date: Mon, 15 Oct 2012 12:24:26 -0400 Subject: Use more specific SecurityGroupHandler calls Instead of calling trigger_security_group_members_refresh, have NetworkManager and derived classes call more specific methods when an instance is created or destroyed. Methods such as the trigger_instance_add_security_group_refresh and trigger_instance_remove_security_group_refresh, instead of just having trigger_security_group_members_refresh get called and forcing implementors to try and figure out if it's an add or delete blueprint trigger-specific-sgh-functions Change-Id: Iefef9180972db3277ae6fc0c2c9abf518b00e2a4 --- nova/tests/network/test_manager.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/network/test_manager.py b/nova/tests/network/test_manager.py index 9c4b29049..bfc3ca6ef 100644 --- a/nova/tests/network/test_manager.py +++ b/nova/tests/network/test_manager.py @@ -296,6 +296,9 @@ class FlatNetworkTestCase(test.TestCase): db.instance_get(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn({'security_groups': [{'id': 0}]}) + db.instance_get(mox.IgnoreArg(), + mox.IgnoreArg()).AndReturn({'security_groups': + [{'id':0, 'name':'test'}]}) db.fixed_ip_associate_pool(mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg()).AndReturn('192.168.0.101') @@ -328,6 +331,10 @@ class FlatNetworkTestCase(test.TestCase): db.instance_get(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn({'security_groups': [{'id': 0}]}) + db.instance_get(mox.IgnoreArg(), + mox.IgnoreArg()).AndReturn({'security_groups': + [{'id':0, 'name':'test'}]}) + db.fixed_ip_associate_pool(mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg()).AndReturn('192.168.0.101') @@ -394,6 +401,9 @@ class FlatNetworkTestCase(test.TestCase): db.instance_get(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn({'security_groups': [{'id': 0}]}) + db.instance_get(mox.IgnoreArg(), + mox.IgnoreArg()).AndReturn({'security_groups': + [{'id':0, 'name':'test'}]}) db.fixed_ip_associate_pool(mox.IgnoreArg(), mox.IgnoreArg(), -- cgit