diff options
| author | Dan Smith <danms@us.ibm.com> | 2012-12-12 13:06:30 -0800 |
|---|---|---|
| committer | Dan Smith <danms@us.ibm.com> | 2012-12-15 08:08:33 -0800 |
| commit | 20f0c601fe5bd59c2a2f07a8be428ddca995afc5 (patch) | |
| tree | 546d0ad030f38cfd1bff3f06472841ab334f07f3 /nova/tests | |
| parent | 20811e9298e11d99f9d4b5f48abad32d8736ccdc (diff) | |
Move provider_fw_rule_get_all to conductor
This patch moves the compute/manager's use of the
provider_fw_rule_get_all() method to the conductor.
Related to blueprint no-db-compute-manager
Change-Id: I963fc65046d29b6eb92b82d559593a64ff775632
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_virtapi.py | 4 | ||||
| -rw-r--r-- | nova/tests/conductor/test_conductor.py | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nova/tests/compute/test_virtapi.py b/nova/tests/compute/test_virtapi.py index 22ddd8ca5..ceeacbc9d 100644 --- a/nova/tests/compute/test_virtapi.py +++ b/nova/tests/compute/test_virtapi.py @@ -140,9 +140,9 @@ class ComputeVirtAPITest(VirtAPIBaseTest): 'aggregate_metadata_delete', 'security_group_get_by_instance', 'security_group_rule_get_by_security_group', + 'provider_fw_rule_get_all', ] - self.db_methods = ['provider_fw_rule_get_all', - 'agent_build_get_by_triple', + self.db_methods = ['agent_build_get_by_triple', ] def assertExpected(self, method, *args, **kwargs): diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index 8d811e27c..6acbe7ef6 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -243,6 +243,14 @@ class _BaseTestCase(object): self.context, fake_secgroup) self.assertEqual(result, 'it worked') + def test_provider_fw_rule_get_all(self): + fake_rules = ['a', 'b', 'c'] + self.mox.StubOutWithMock(db, 'provider_fw_rule_get_all') + db.provider_fw_rule_get_all(self.context).AndReturn(fake_rules) + self.mox.ReplayAll() + result = self.conductor.provider_fw_rule_get_all(self.context) + self.assertEqual(result, fake_rules) + class ConductorTestCase(_BaseTestCase, test.TestCase): """Conductor Manager Tests""" |
