Merge "Deprecate instance_fault_create() from conductor"
This commit is contained in:
@@ -81,9 +81,6 @@ class LocalAPI(object):
|
|||||||
def instance_info_cache_delete(self, context, instance):
|
def instance_info_cache_delete(self, context, instance):
|
||||||
return self._manager.instance_info_cache_delete(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):
|
def migration_get_in_progress_by_host_and_node(self, context, host, node):
|
||||||
return self._manager.migration_get_in_progress_by_host_and_node(
|
return self._manager.migration_get_in_progress_by_host_and_node(
|
||||||
context, host, node)
|
context, host, node)
|
||||||
|
@@ -964,6 +964,7 @@ class _ConductorManagerV2Proxy(object):
|
|||||||
return self.manager.instance_get_all_by_host(context, host, node,
|
return self.manager.instance_get_all_by_host(context, host, node,
|
||||||
columns_to_join)
|
columns_to_join)
|
||||||
|
|
||||||
|
# TODO(danms): This can be removed in version 3.0 of the RPC API
|
||||||
def instance_fault_create(self, context, values):
|
def instance_fault_create(self, context, values):
|
||||||
return self.manager.instance_fault_create(context, values)
|
return self.manager.instance_fault_create(context, values)
|
||||||
|
|
||||||
|
@@ -145,6 +145,7 @@ class ConductorAPI(object):
|
|||||||
... - Remove compute_unrescue()
|
... - Remove compute_unrescue()
|
||||||
... - Remove instance_get_all_by_filters()
|
... - Remove instance_get_all_by_filters()
|
||||||
... - Remove instance_get_active_by_window_joined()
|
... - Remove instance_get_active_by_window_joined()
|
||||||
|
... - Remove instance_fault_create()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSION_ALIASES = {
|
VERSION_ALIASES = {
|
||||||
@@ -263,10 +264,6 @@ class ConductorAPI(object):
|
|||||||
host=host, node=node,
|
host=host, node=node,
|
||||||
columns_to_join=columns_to_join)
|
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):
|
def action_event_start(self, context, values):
|
||||||
values_p = jsonutils.to_primitive(values)
|
values_p = jsonutils.to_primitive(values)
|
||||||
cctxt = self.client.prepare()
|
cctxt = self.client.prepare()
|
||||||
|
@@ -296,15 +296,6 @@ class _BaseTestCase(object):
|
|||||||
result = self.conductor.compute_node_delete(self.context, node)
|
result = self.conductor.compute_node_delete(self.context, node)
|
||||||
self.assertIsNone(result)
|
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):
|
def test_task_log_get(self):
|
||||||
self.mox.StubOutWithMock(db, 'task_log_get')
|
self.mox.StubOutWithMock(db, 'task_log_get')
|
||||||
db.task_log_get(self.context, 'task', 'begin', 'end', 'host',
|
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.conductor.instance_get_active_by_window_joined(
|
||||||
self.context, 'fake-begin', 'fake-end', 'fake-proj', 'fake-host')
|
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):
|
class ConductorRPCAPITestCase(_BaseTestCase, test.TestCase):
|
||||||
"""Conductor RPC API Tests."""
|
"""Conductor RPC API Tests."""
|
||||||
|
Reference in New Issue
Block a user