diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-08-06 23:18:20 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-08-06 23:18:20 +0000 |
| commit | f7fbc678ab00ad598e62905621595eaacbc91c81 (patch) | |
| tree | c955ea1756d441ec0d3abd637e26da57ea9beb78 /nova/tests | |
| parent | d31685a20d2e2344cd87b7a86233fda3a6cc4301 (diff) | |
| parent | ce2da5e52b743a15d87bab8b7546449ceb4e6871 (diff) | |
Merge "Remove topic from scheduler run_instance."
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/scheduler/test_chance_scheduler.py | 6 | ||||
| -rw-r--r-- | nova/tests/scheduler/test_filter_scheduler.py | 6 | ||||
| -rw-r--r-- | nova/tests/scheduler/test_rpcapi.py | 8 | ||||
| -rw-r--r-- | nova/tests/scheduler/test_scheduler.py | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/nova/tests/scheduler/test_chance_scheduler.py b/nova/tests/scheduler/test_chance_scheduler.py index 0a27375df..e7f06e4e1 100644 --- a/nova/tests/scheduler/test_chance_scheduler.py +++ b/nova/tests/scheduler/test_chance_scheduler.py @@ -118,7 +118,7 @@ class ChanceSchedulerTestCase(test_scheduler.SchedulerTestCase): driver.encode_instance(instance2).AndReturn(instance2_encoded) self.mox.ReplayAll() - result = self.driver.schedule_run_instance(ctxt, None, request_spec, + result = self.driver.schedule_run_instance(ctxt, request_spec, None, None, None, None, {}, reservations) expected = [instance1_encoded, instance2_encoded] self.assertEqual(result, expected) @@ -178,7 +178,7 @@ class ChanceSchedulerTestCase(test_scheduler.SchedulerTestCase): driver.encode_instance(instance2).AndReturn(instance2) self.mox.ReplayAll() - self.driver.schedule_run_instance(ctxt, '', request_spec, None, None, + self.driver.schedule_run_instance(ctxt, request_spec, None, None, None, None, {}, None) def test_basic_schedule_run_instance_no_hosts(self): @@ -200,7 +200,7 @@ class ChanceSchedulerTestCase(test_scheduler.SchedulerTestCase): self.mox.ReplayAll() self.assertRaises(exception.NoValidHost, - self.driver.schedule_run_instance, ctxt, '', request_spec, + self.driver.schedule_run_instance, ctxt, request_spec, None, None, None, None, {}, None) def test_basic_schedule_fallback(self): diff --git a/nova/tests/scheduler/test_filter_scheduler.py b/nova/tests/scheduler/test_filter_scheduler.py index 4de0bb645..acfb82b18 100644 --- a/nova/tests/scheduler/test_filter_scheduler.py +++ b/nova/tests/scheduler/test_filter_scheduler.py @@ -50,7 +50,7 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): 'ephemeral_gb': 0}, 'instance_properties': {'project_id': 1}} self.assertRaises(exception.NoValidHost, sched.schedule_run_instance, - fake_context, '', request_spec, None, None, None, + fake_context, request_spec, None, None, None, None, {}, None) def test_run_instance_non_admin(self): @@ -72,7 +72,7 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): request_spec = {'instance_type': {'memory_mb': 1, 'local_gb': 1}, 'instance_properties': {'project_id': 1}} self.assertRaises(exception.NoValidHost, sched.schedule_run_instance, - fake_context, '', request_spec, None, None, None, + fake_context, request_spec, None, None, None, None, {}, None) self.assertTrue(self.was_admin) @@ -127,7 +127,7 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase): {}, None, None, None, None).AndReturn(instance2) self.mox.ReplayAll() - self.driver.schedule_run_instance(context_fake, '', request_spec, + self.driver.schedule_run_instance(context_fake, request_spec, None, None, None, None, {}, None) def test_schedule_happy_day(self): diff --git a/nova/tests/scheduler/test_rpcapi.py b/nova/tests/scheduler/test_rpcapi.py index c881bc306..20874c365 100644 --- a/nova/tests/scheduler/test_rpcapi.py +++ b/nova/tests/scheduler/test_rpcapi.py @@ -66,19 +66,19 @@ class SchedulerRpcAPITestCase(test.TestCase): def test_run_instance_call(self): self._test_scheduler_api('run_instance', rpc_method='call', - topic='fake_topic', request_spec='fake_request_spec', + request_spec='fake_request_spec', admin_password='pw', injected_files='fake_injected_files', requested_networks='fake_requested_networks', is_first_time=True, filter_properties='fake_filter_properties', - reservations=None) + reservations=None, version='1.2') def test_run_instance_cast(self): self._test_scheduler_api('run_instance', rpc_method='cast', - topic='fake_topic', request_spec='fake_request_spec', + request_spec='fake_request_spec', admin_password='pw', injected_files='fake_injected_files', requested_networks='fake_requested_networks', is_first_time=True, filter_properties='fake_filter_properties', - reservations=None) + reservations=None, version='1.2') def test_prep_resize(self): self._test_scheduler_api('prep_resize', rpc_method='cast', diff --git a/nova/tests/scheduler/test_scheduler.py b/nova/tests/scheduler/test_scheduler.py index baf6b3f64..0c416dc72 100644 --- a/nova/tests/scheduler/test_scheduler.py +++ b/nova/tests/scheduler/test_scheduler.py @@ -221,14 +221,14 @@ class SchedulerManagerTestCase(test.TestCase): request_spec = {'instance_properties': {'uuid': fake_instance_uuid}} - self.manager.driver.schedule_run_instance(self.context, self.topic, + self.manager.driver.schedule_run_instance(self.context, request_spec, None, None, None, None, {}, None).AndRaise( exception.NoValidHost(reason="")) db.instance_update_and_get_original(self.context, fake_instance_uuid, {"vm_state": vm_states.ERROR}).AndReturn((inst, inst)) self.mox.ReplayAll() - self.manager.run_instance(self.context, self.topic, request_spec, + self.manager.run_instance(self.context, request_spec, None, None, None, None, {}, None) def test_prep_resize_no_valid_host_back_in_active_state(self): @@ -771,7 +771,7 @@ class SchedulerDriverBaseTestCase(SchedulerTestCase): self.assertRaises(NotImplementedError, self.driver.schedule_run_instance, - self.context, '', fake_request_spec, None, None, None, + self.context, fake_request_spec, None, None, None, None, None, None) def test_unimplemented_schedule_prep_resize(self): |
