Deprecate network_migrate_instance_* from conductor
This deprecates network_migrate_instance_start() and network_migrate_instance_finish() from conductor, which are no longer used. Related to blueprint compute-manager-objects-juno Change-Id: I01d7d502e8e8016cef3006ceddbcb31bccc4baf8
This commit is contained in:
parent
010e9dbd12
commit
c0246af3c9
|
@ -242,16 +242,6 @@ class LocalAPI(object):
|
|||
return self._manager.security_groups_trigger_members_refresh(context,
|
||||
group_ids)
|
||||
|
||||
def network_migrate_instance_start(self, context, instance, migration):
|
||||
return self._manager.network_migrate_instance_start(context,
|
||||
instance,
|
||||
migration)
|
||||
|
||||
def network_migrate_instance_finish(self, context, instance, migration):
|
||||
return self._manager.network_migrate_instance_finish(context,
|
||||
instance,
|
||||
migration)
|
||||
|
||||
def get_ec2_ids(self, context, instance):
|
||||
return self._manager.get_ec2_ids(context, instance)
|
||||
|
||||
|
|
|
@ -1017,10 +1017,12 @@ class _ConductorManagerV2Proxy(object):
|
|||
return self.manager.security_groups_trigger_members_refresh(context,
|
||||
group_ids)
|
||||
|
||||
# TODO(danms): This can be removed in version 3.0 of the RPC API
|
||||
def network_migrate_instance_start(self, context, instance, migration):
|
||||
return self.manager.network_migrate_instance_start(context, instance,
|
||||
migration)
|
||||
|
||||
# TODO(danms): This can be removed in version 3.0 of the RPC API
|
||||
def network_migrate_instance_finish(self, context, instance, migration):
|
||||
return self.manager.network_migrate_instance_finish(context, instance,
|
||||
migration)
|
||||
|
|
|
@ -135,6 +135,8 @@ class ConductorAPI(object):
|
|||
2.0 - Drop backwards compatibility
|
||||
... - Remove quota_rollback() and quota_commit()
|
||||
... - Remove aggregate_host_add() and aggregate_host_delete()
|
||||
... - Remove network_migrate_instance_start() and
|
||||
network_migrate_instance_finish()
|
||||
"""
|
||||
|
||||
VERSION_ALIASES = {
|
||||
|
@ -364,20 +366,6 @@ class ConductorAPI(object):
|
|||
return cctxt.call(context, 'security_groups_trigger_members_refresh',
|
||||
group_ids=group_ids)
|
||||
|
||||
def network_migrate_instance_start(self, context, instance, migration):
|
||||
instance_p = jsonutils.to_primitive(instance)
|
||||
migration_p = jsonutils.to_primitive(migration)
|
||||
cctxt = self.client.prepare()
|
||||
return cctxt.call(context, 'network_migrate_instance_start',
|
||||
instance=instance_p, migration=migration_p)
|
||||
|
||||
def network_migrate_instance_finish(self, context, instance, migration):
|
||||
instance_p = jsonutils.to_primitive(instance)
|
||||
migration_p = jsonutils.to_primitive(migration)
|
||||
cctxt = self.client.prepare()
|
||||
return cctxt.call(context, 'network_migrate_instance_finish',
|
||||
instance=instance_p, migration=migration_p)
|
||||
|
||||
def get_ec2_ids(self, context, instance):
|
||||
instance_p = jsonutils.to_primitive(instance)
|
||||
cctxt = self.client.prepare()
|
||||
|
|
|
@ -400,27 +400,6 @@ class _BaseTestCase(object):
|
|||
self.conductor.security_groups_trigger_members_refresh(self.context,
|
||||
[1, 2, 3])
|
||||
|
||||
def test_network_migrate_instance_start(self):
|
||||
self.mox.StubOutWithMock(self.conductor_manager.network_api,
|
||||
'migrate_instance_start')
|
||||
self.conductor_manager.network_api.migrate_instance_start(self.context,
|
||||
'instance',
|
||||
'migration')
|
||||
self.mox.ReplayAll()
|
||||
self.conductor.network_migrate_instance_start(self.context,
|
||||
'instance',
|
||||
'migration')
|
||||
|
||||
def test_network_migrate_instance_finish(self):
|
||||
self.mox.StubOutWithMock(self.conductor_manager.network_api,
|
||||
'migrate_instance_finish')
|
||||
self.conductor_manager.network_api.migrate_instance_finish(
|
||||
self.context, 'instance', 'migration')
|
||||
self.mox.ReplayAll()
|
||||
self.conductor.network_migrate_instance_finish(self.context,
|
||||
'instance',
|
||||
'migration')
|
||||
|
||||
def test_get_ec2_ids(self):
|
||||
expected = {
|
||||
'instance-id': 'ec2-inst-id',
|
||||
|
@ -918,6 +897,27 @@ class ConductorTestCase(_BaseTestCase, test.TestCase):
|
|||
|
||||
db.aggregate_delete(self.context.elevated(), aggregate_ref['id'])
|
||||
|
||||
def test_network_migrate_instance_start(self):
|
||||
self.mox.StubOutWithMock(self.conductor_manager.network_api,
|
||||
'migrate_instance_start')
|
||||
self.conductor_manager.network_api.migrate_instance_start(self.context,
|
||||
'instance',
|
||||
'migration')
|
||||
self.mox.ReplayAll()
|
||||
self.conductor.network_migrate_instance_start(self.context,
|
||||
'instance',
|
||||
'migration')
|
||||
|
||||
def test_network_migrate_instance_finish(self):
|
||||
self.mox.StubOutWithMock(self.conductor_manager.network_api,
|
||||
'migrate_instance_finish')
|
||||
self.conductor_manager.network_api.migrate_instance_finish(
|
||||
self.context, 'instance', 'migration')
|
||||
self.mox.ReplayAll()
|
||||
self.conductor.network_migrate_instance_finish(self.context,
|
||||
'instance',
|
||||
'migration')
|
||||
|
||||
|
||||
class ConductorRPCAPITestCase(_BaseTestCase, test.TestCase):
|
||||
"""Conductor RPC API Tests."""
|
||||
|
|
Loading…
Reference in New Issue