Deprecate instance_get_active_by_window_joined() from conductor

This deprecates the instance_get_active_by_window_joined() method
from conductor which is no longer used.

Related to blueprint compute-manager-objects-juno

Change-Id: Ia9ce0cf49180806da64cc034ad12ddf2b3f1c424
This commit is contained in:
Dan Smith 2014-04-11 15:35:38 -07:00
parent d73d62c261
commit 16f4c5bf97
4 changed files with 11 additions and 21 deletions

View File

@ -78,11 +78,6 @@ class LocalAPI(object):
def instance_get_all_by_host_and_node(self, context, host, node):
return self._manager.instance_get_all_by_host(context, host, node)
def instance_get_active_by_window_joined(self, context, begin, end=None,
project_id=None, host=None):
return self._manager.instance_get_active_by_window_joined(
context, begin, end, project_id, host)
def instance_info_cache_delete(self, context, instance):
return self._manager.instance_info_cache_delete(context, instance)

View File

@ -936,6 +936,7 @@ class _ConductorManagerV2Proxy(object):
return self.manager.instance_get_all_by_filters(context, filters,
sort_key, sort_dir, columns_to_join, use_slave)
# TODO(danms): This can be removed in version 3.0 of the RPC API
def instance_get_active_by_window_joined(self, context, begin, end,
project_id, host):
return self.manager.instance_get_active_by_window_joined(context,

View File

@ -144,6 +144,7 @@ class ConductorAPI(object):
... - Remove instance_destroy()
... - Remove compute_unrescue()
... - Remove instance_get_all_by_filters()
... - Remove instance_get_active_by_window_joined()
"""
VERSION_ALIASES = {
@ -227,13 +228,6 @@ class ConductorAPI(object):
return cctxt.call(context, 'block_device_mapping_get_all_by_instance',
instance=instance_p, legacy=legacy)
def instance_get_active_by_window_joined(self, context, begin, end=None,
project_id=None, host=None):
cctxt = self.client.prepare()
return cctxt.call(context, 'instance_get_active_by_window_joined',
begin=begin, end=end, project_id=project_id,
host=host)
def instance_info_cache_delete(self, context, instance):
instance_p = jsonutils.to_primitive(instance)
cctxt = self.client.prepare()

View File

@ -210,15 +210,6 @@ class _BaseTestCase(object):
self.context, fake_inst, legacy=False)
self.assertEqual(result, 'fake-result')
def test_instance_get_active_by_window_joined(self):
self.mox.StubOutWithMock(db, 'instance_get_active_by_window_joined')
db.instance_get_active_by_window_joined(self.context, 'fake-begin',
'fake-end', 'fake-proj',
'fake-host')
self.mox.ReplayAll()
self.conductor.instance_get_active_by_window_joined(
self.context, 'fake-begin', 'fake-end', 'fake-proj', 'fake-host')
def test_instance_info_cache_delete(self):
self.mox.StubOutWithMock(db, 'instance_info_cache_delete')
db.instance_info_cache_delete(self.context, 'fake-uuid')
@ -918,6 +909,15 @@ class ConductorTestCase(_BaseTestCase, test.TestCase):
'fake-key', 'fake-sort',
use_slave=True)
def test_instance_get_active_by_window_joined(self):
self.mox.StubOutWithMock(db, 'instance_get_active_by_window_joined')
db.instance_get_active_by_window_joined(self.context, 'fake-begin',
'fake-end', 'fake-proj',
'fake-host')
self.mox.ReplayAll()
self.conductor.instance_get_active_by_window_joined(
self.context, 'fake-begin', 'fake-end', 'fake-proj', 'fake-host')
class ConductorRPCAPITestCase(_BaseTestCase, test.TestCase):
"""Conductor RPC API Tests."""