summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-05-29 21:11:21 -0400
committerRussell Bryant <rbryant@redhat.com>2012-05-31 15:19:31 -0400
commitf9986b8be0d577e9e44cae1c8a9afe308af868f9 (patch)
tree6d4a3c419cbcc286e52fdfa9beb0c5a8b38da85b /nova/tests
parent093bdd6edff7ec391145018a0d3ce8e9dc1f84ff (diff)
Add post_live_migration_at_destination() to compute rpcapi.
Part of bug 1006467. This patch adds the "post_live_migration_at_destination method to the compute rpcapi. It is used by the compute manager. Change-Id: I964d3b149e10c927657d0b239835335eb240b6e4
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/compute/test_compute.py3
-rw-r--r--nova/tests/compute/test_rpcapi.py8
2 files changed, 9 insertions, 2 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
index e218fe60b..70d9cdd08 100644
--- a/nova/tests/compute/test_compute.py
+++ b/nova/tests/compute/test_compute.py
@@ -1528,7 +1528,8 @@ class ComputeTestCase(BaseTestCase):
self.mox.StubOutWithMock(rpc, 'call')
rpc.call(c, rpc.queue_get_for(c, FLAGS.compute_topic, dest),
{"method": "post_live_migration_at_destination",
- "args": {'instance_id': i_ref['id'], 'block_migration': False}})
+ "args": {'instance_id': i_ref['id'], 'block_migration': False},
+ "version": compute_rpcapi.ComputeAPI.RPC_API_VERSION}, None)
self.mox.StubOutWithMock(self.compute.driver, 'unplug_vifs')
self.compute.driver.unplug_vifs(i_ref, [])
rpc.call(c, 'network', {'method': 'setup_networks_on_host',
diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py
index b817d04af..3f5e63d35 100644
--- a/nova/tests/compute/test_rpcapi.py
+++ b/nova/tests/compute/test_rpcapi.py
@@ -58,7 +58,8 @@ class ComputeRpcAPITestCase(test.TestCase):
instance = expected_msg['args']['instance']
del expected_msg['args']['instance']
if method in ['rollback_live_migration_at_destination',
- 'pre_live_migration']:
+ 'pre_live_migration',
+ 'post_live_migration_at_destination']:
expected_msg['args']['instance_id'] = instance['id']
else:
expected_msg['args']['instance_uuid'] = instance['uuid']
@@ -161,6 +162,11 @@ class ComputeRpcAPITestCase(test.TestCase):
self._test_compute_api('lock_instance', 'cast',
instance=self.fake_instance)
+ def test_post_live_migration_at_destination(self):
+ self._test_compute_api('post_live_migration_at_destination', 'call',
+ instance=self.fake_instance, block_migration='block_migration',
+ host='host')
+
def test_pause_instance(self):
self._test_compute_api('pause_instance', 'cast',
instance=self.fake_instance)