diff options
| author | Sean M. Collins <sean@coreitpro.com> | 2012-10-15 12:24:26 -0400 |
|---|---|---|
| committer | Sean M. Collins <sean@coreitpro.com> | 2012-11-21 11:08:50 -0500 |
| commit | 3829bb17f59853e9c148ec352ca5652f17ab89ef (patch) | |
| tree | 8fa15113813446dc56e745a1bc1260db51441793 /nova/tests | |
| parent | d468507833fdbae23cb2747c43281332840a0067 (diff) | |
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
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/network/test_manager.py | 10 |
1 files changed, 10 insertions, 0 deletions
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(), |
