From 7855afe5f32ff865de9bf56ea1c62e77541216df Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 14 Jan 2013 12:33:30 -0500 Subject: Move migration_get_..._by_host_and_node to conductor This moves the remaining migration-related database call out of the resource tracker to conductor: migration_get_in_progress_by_host_and_node() Related to blueprint no-db-compute Change-Id: I9bdf9fbbc3131964bf6078d19bf1cd9053a7e224 --- nova/tests/conductor/test_conductor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nova/tests/conductor/test_conductor.py') diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index cc3dbfcc0..5fc4caaea 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -130,6 +130,16 @@ class _BaseTestCase(object): 'fake-window', 'fake-host') + def test_migration_get_in_progress_by_host_and_node(self): + self.mox.StubOutWithMock(db, + 'migration_get_in_progress_by_host_and_node') + db.migration_get_in_progress_by_host_and_node( + self.context, 'fake-host', 'fake-node').AndReturn('fake-result') + self.mox.ReplayAll() + result = self.conductor.migration_get_in_progress_by_host_and_node( + self.context, 'fake-host', 'fake-node') + self.assertEqual(result, 'fake-result') + def test_migration_create(self): inst = {'uuid': 'fake-uuid', 'host': 'fake-host', -- cgit