From 8dac75fa0b6bb16adfdca2198703031249722f3d Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 25 Jul 2012 14:19:40 -0400 Subject: Send a full instance via rpc for attach_volume. Change the attach_volume method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. Part of blueprint no-db-messaging. Change-Id: I85ad29e84b5e97a3f918059b10e2309312756050 --- nova/tests/compute/test_rpcapi.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py index b5319d257..ee74f2c6b 100644 --- a/nova/tests/compute/test_rpcapi.py +++ b/nova/tests/compute/test_rpcapi.py @@ -49,8 +49,9 @@ class ComputeRpcAPITestCase(test.TestCase): ctxt = context.RequestContext('fake_user', 'fake_project') methods_with_instance = [ - 'add_fixed_ip_to_instance', 'get_console_output', 'pause_instance', - 'reboot_instance', 'suspend_instance', 'unpause_instance' + 'add_fixed_ip_to_instance', 'attach_volume', 'get_console_output', + 'pause_instance', 'reboot_instance', 'suspend_instance', + 'unpause_instance' ] if 'rpcapi_class' in kwargs: @@ -126,7 +127,8 @@ class ComputeRpcAPITestCase(test.TestCase): def test_attach_volume(self): self._test_compute_api('attach_volume', 'cast', - instance=self.fake_instance, volume_id='id', mountpoint='mp') + instance=self.fake_instance, volume_id='id', mountpoint='mp', + version='1.9') def test_check_can_live_migrate_destination(self): self._test_compute_api('check_can_live_migrate_destination', 'call', -- cgit