diff options
| author | Russell Bryant <rbryant@redhat.com> | 2012-07-27 11:58:19 -0400 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2012-07-30 16:58:24 -0400 |
| commit | 96134f9e34faf7e4be1776b24c8d8d661a23342a (patch) | |
| tree | c4bbc4539eea23c198c454a8c576e7126005f4cd /nova/tests | |
| parent | 0e16133db77b434f8dc5b298ef8166aa05013630 (diff) | |
Send a full instance in remove_fixed_ip_from_instance.
Change the remove_fixed_ip_from_instance 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: Iee0daf068be9814ef0ba06a69111a45a2e198cbb
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_compute.py | 7 | ||||
| -rw-r--r-- | nova/tests/compute/test_rpcapi.py | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 8ce9212d7..87de08998 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -888,13 +888,12 @@ class ComputeTestCase(BaseTestCase): self.stubs.Set(nova.compute.manager.ComputeManager, 'reset_network', dummy) - instance = self._create_fake_instance() + instance = jsonutils.to_primitive(self._create_fake_instance()) instance_uuid = instance['uuid'] self.assertEquals(len(test_notifier.NOTIFICATIONS), 0) - self.compute.remove_fixed_ip_from_instance(self.context, - instance_uuid, - 1) + self.compute.remove_fixed_ip_from_instance(self.context, 1, + instance=instance) self.assertEquals(len(test_notifier.NOTIFICATIONS), 2) self.compute.terminate_instance(self.context, instance_uuid) diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py index 79b33f25d..e081c1455 100644 --- a/nova/tests/compute/test_rpcapi.py +++ b/nova/tests/compute/test_rpcapi.py @@ -57,7 +57,8 @@ class ComputeRpcAPITestCase(test.TestCase): 'inject_file', 'inject_network_info', 'pause_instance', 'post_live_migration_at_destination', 'power_off_instance', 'power_on_instance', 'pre_live_migration', 'reboot_instance', - 'rebuild_instance', 'start_instance', 'stop_instance', + 'rebuild_instance', 'remove_fixed_ip_from_instance', + 'start_instance', 'stop_instance', 'suspend_instance', 'unpause_instance' ] @@ -257,7 +258,7 @@ class ComputeRpcAPITestCase(test.TestCase): def test_remove_fixed_ip_from_instance(self): self._test_compute_api('remove_fixed_ip_from_instance', 'cast', - instance=self.fake_instance, address='addr') + instance=self.fake_instance, address='addr', version='1.25') def test_remove_volume_connection(self): self._test_compute_api('remove_volume_connection', 'call', |
