From 0cee422e2e452d31a6aad1644cf38c2a669e99cb Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 3 Aug 2012 16:28:00 -0400 Subject: Use explicit arguments in compute manager run_instance. Use explicit arguments in functions in the run_instance code path of the compute manager. I think methods of the rpc API are better this way as we have to be careful when changing these functions so we handle versioning and backwards compatibility properly. Spelling out all of the arguments like this makes it easier to catch when things change and to make sure they are changed properly. This is in preparation of changing the instance_uuid to an instance dict, instead. Part of blueprint no-db-messaging. Change-Id: I1e141b471040b0fd4833d4e08d44166a9d12bcad --- nova/tests/compute/test_compute.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 5d41cd7c6..443a25e6c 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -4459,7 +4459,7 @@ class ComputeReschedulingTestCase(BaseTestCase): return functools.partial(self.compute._reschedule, self.context, uuid, requested_networks, admin_password, injected_files, - is_first_time) + is_first_time, request_spec=None, filter_properties={}) def test_reschedule_no_filter_properties(self): """no filter_properties will disable re-scheduling""" @@ -4507,7 +4507,8 @@ class ComputeReschedulingExceptionTestCase(BaseTestCase): """Spawn fails and re-scheduling is disabled.""" # this won't be re-scheduled: self.assertRaises(ThatsNoOrdinaryRabbitException, - self.compute._run_instance, self.context, self.instance_uuid) + self.compute._run_instance, self.context, self.instance_uuid, + None, {}, None, None, None, None) def test_exception_with_rescheduling_enabled(self): """Spawn fails and re-scheduling is enabled. Original exception @@ -4535,4 +4536,5 @@ class ComputeReschedulingExceptionTestCase(BaseTestCase): # the original exception should now be raised: self.assertRaises(ThatsNoOrdinaryRabbitException, - self.compute._run_instance, self.context, self.instance_uuid) + self.compute._run_instance, self.context, self.instance_uuid, + None, {}, None, None, None, None) -- cgit