diff options
| author | Russell Bryant <rbryant@redhat.com> | 2012-08-03 16:28:00 -0400 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2012-08-06 15:09:33 -0400 |
| commit | 0cee422e2e452d31a6aad1644cf38c2a669e99cb (patch) | |
| tree | 6debc0013c261e3afd41ee879b140ee0fdc4676f /nova/tests | |
| parent | ce2da5e52b743a15d87bab8b7546449ceb4e6871 (diff) | |
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
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_compute.py | 8 |
1 files changed, 5 insertions, 3 deletions
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) |
