Merge "Fixes usage of migrate_instance_start"
This commit is contained in:
commit
c40c512534
@ -351,7 +351,7 @@ class API(base.Base):
|
|||||||
if self._is_multi_host(context, instance):
|
if self._is_multi_host(context, instance):
|
||||||
args['floating_addresses'] = \
|
args['floating_addresses'] = \
|
||||||
self._get_floating_ip_addresses(context, instance)
|
self._get_floating_ip_addresses(context, instance)
|
||||||
args['host'] = migration['dest_compute']
|
args['host'] = migration['source_compute']
|
||||||
|
|
||||||
self.network_rpcapi.migrate_instance_start(context, **args)
|
self.network_rpcapi.migrate_instance_start(context, **args)
|
||||||
|
|
||||||
|
@ -117,7 +117,6 @@ class ApiTestCase(test.TestCase):
|
|||||||
'project_id': 'fake_project_id',
|
'project_id': 'fake_project_id',
|
||||||
'floating_addresses': None}
|
'floating_addresses': None}
|
||||||
if multi_host:
|
if multi_host:
|
||||||
expected['host'] = 'fake_compute_dest'
|
|
||||||
expected['floating_addresses'] = ['fake_float1', 'fake_float2']
|
expected['floating_addresses'] = ['fake_float1', 'fake_float2']
|
||||||
return fake_instance, fake_migration, expected
|
return fake_instance, fake_migration, expected
|
||||||
|
|
||||||
@ -125,6 +124,7 @@ class ApiTestCase(test.TestCase):
|
|||||||
info = {'kwargs': {}}
|
info = {'kwargs': {}}
|
||||||
arg1, arg2, expected = self._stub_migrate_instance_calls(
|
arg1, arg2, expected = self._stub_migrate_instance_calls(
|
||||||
'migrate_instance_start', True, info)
|
'migrate_instance_start', True, info)
|
||||||
|
expected['host'] = 'fake_compute_source'
|
||||||
self.network_api.migrate_instance_start(self.context, arg1, arg2)
|
self.network_api.migrate_instance_start(self.context, arg1, arg2)
|
||||||
self.assertEqual(info['kwargs'], expected)
|
self.assertEqual(info['kwargs'], expected)
|
||||||
|
|
||||||
@ -139,6 +139,7 @@ class ApiTestCase(test.TestCase):
|
|||||||
info = {'kwargs': {}}
|
info = {'kwargs': {}}
|
||||||
arg1, arg2, expected = self._stub_migrate_instance_calls(
|
arg1, arg2, expected = self._stub_migrate_instance_calls(
|
||||||
'migrate_instance_finish', True, info)
|
'migrate_instance_finish', True, info)
|
||||||
|
expected['host'] = 'fake_compute_dest'
|
||||||
self.network_api.migrate_instance_finish(self.context, arg1, arg2)
|
self.network_api.migrate_instance_finish(self.context, arg1, arg2)
|
||||||
self.assertEqual(info['kwargs'], expected)
|
self.assertEqual(info['kwargs'], expected)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user