From 1747cc366dd93534db78ca393ec8e39a7652dc27 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Mon, 12 Mar 2012 20:13:39 +0000 Subject: Move (cast|call)_compute_message methods back into compute API class Those calls need to be able to be overridden in a subclass to support compute cells, at least initially. A prior patch that moved them to module functions broke the cells work. Change-Id: I6c35fa1ac646fe686bbc2c5eed2da7e286d32a15 --- nova/tests/test_compute.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index f30fefeba..a291b2c80 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -2434,7 +2434,8 @@ class ComputeAPITestCase(BaseTestCase): self.assertEqual(instance_properties['host'], 'host2') self.assertIn('host2', filter_properties['ignore_hosts']) - self.stubs.Set(compute.api, '_cast_scheduler_message', _fake_cast) + self.stubs.Set(self.compute_api, '_cast_scheduler_message', + _fake_cast) context = self.context.elevated() instance = self._create_fake_instance(dict(host='host2')) @@ -2453,7 +2454,8 @@ class ComputeAPITestCase(BaseTestCase): self.assertEqual(instance_properties['host'], 'host2') self.assertNotIn('host2', filter_properties['ignore_hosts']) - self.stubs.Set(compute.api, '_cast_scheduler_message', _fake_cast) + self.stubs.Set(self.compute_api, '_cast_scheduler_message', + _fake_cast) self.flags(allow_resize_to_same_host=True) context = self.context.elevated() -- cgit