diff --git a/nova/conductor/api.py b/nova/conductor/api.py index b1fa44065ec0..649e416a50f8 100644 --- a/nova/conductor/api.py +++ b/nova/conductor/api.py @@ -81,9 +81,6 @@ class LocalAPI(object): def instance_info_cache_delete(self, context, instance): return self._manager.instance_info_cache_delete(context, instance) - def instance_fault_create(self, context, values): - return self._manager.instance_fault_create(context, values) - def migration_get_in_progress_by_host_and_node(self, context, host, node): return self._manager.migration_get_in_progress_by_host_and_node( context, host, node) diff --git a/nova/conductor/manager.py b/nova/conductor/manager.py index e01824cfa229..90a4d40d9b0b 100644 --- a/nova/conductor/manager.py +++ b/nova/conductor/manager.py @@ -964,6 +964,7 @@ class _ConductorManagerV2Proxy(object): return self.manager.instance_get_all_by_host(context, host, node, columns_to_join) + # TODO(danms): This can be removed in version 3.0 of the RPC API def instance_fault_create(self, context, values): return self.manager.instance_fault_create(context, values) diff --git a/nova/conductor/rpcapi.py b/nova/conductor/rpcapi.py index 0b7d524376d1..6315d1a1b29e 100644 --- a/nova/conductor/rpcapi.py +++ b/nova/conductor/rpcapi.py @@ -145,6 +145,7 @@ class ConductorAPI(object): ... - Remove compute_unrescue() ... - Remove instance_get_all_by_filters() ... - Remove instance_get_active_by_window_joined() + ... - Remove instance_fault_create() """ VERSION_ALIASES = { @@ -263,10 +264,6 @@ class ConductorAPI(object): host=host, node=node, columns_to_join=columns_to_join) - def instance_fault_create(self, context, values): - cctxt = self.client.prepare() - return cctxt.call(context, 'instance_fault_create', values=values) - def action_event_start(self, context, values): values_p = jsonutils.to_primitive(values) cctxt = self.client.prepare() diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py index f664b446a778..c31cb76188a9 100644 --- a/nova/tests/conductor/test_conductor.py +++ b/nova/tests/conductor/test_conductor.py @@ -296,15 +296,6 @@ class _BaseTestCase(object): result = self.conductor.compute_node_delete(self.context, node) self.assertIsNone(result) - def test_instance_fault_create(self): - self.mox.StubOutWithMock(db, 'instance_fault_create') - db.instance_fault_create(self.context, 'fake-values').AndReturn( - 'fake-result') - self.mox.ReplayAll() - result = self.conductor.instance_fault_create(self.context, - 'fake-values') - self.assertEqual(result, 'fake-result') - def test_task_log_get(self): self.mox.StubOutWithMock(db, 'task_log_get') db.task_log_get(self.context, 'task', 'begin', 'end', 'host', @@ -918,6 +909,15 @@ class ConductorTestCase(_BaseTestCase, test.TestCase): self.conductor.instance_get_active_by_window_joined( self.context, 'fake-begin', 'fake-end', 'fake-proj', 'fake-host') + def test_instance_fault_create(self): + self.mox.StubOutWithMock(db, 'instance_fault_create') + db.instance_fault_create(self.context, 'fake-values').AndReturn( + 'fake-result') + self.mox.ReplayAll() + result = self.conductor.instance_fault_create(self.context, + 'fake-values') + self.assertEqual(result, 'fake-result') + class ConductorRPCAPITestCase(_BaseTestCase, test.TestCase): """Conductor RPC API Tests."""