From 6e134c9df2ec05ebce9f62c6d85988ece18620ad Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 1 Aug 2012 16:48:03 -0400 Subject: Updates to the prep_resize scheduler rpc call. I started looking at this because of the prep_resize rpc call in the compute manager. An API server calls prep_resize on the scheduler which then calls it on a compute node. I will need to make the same changes on the compute side, but this is the first step. The prep_resize call was taking two object IDs, an instance UUID and an instance_type ID. Both of these have been converted. It now takes an instance dict and an instance_type dict, instead. It can also handle receiving the old IDs for backwards compatibility. prep_resize also took a topic argument that was unused, so it has just been removed. There are a number of changes in the scheduler code tied up in this to make it more explicit about exactly what arguments are expected instead of just using *args, **kwargs. Part of blueprint no-db-messaging. Change-Id: I4af18e5575e2bb60a410fc8edabf3d607c72aabc --- nova/tests/scheduler/test_chance_scheduler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nova/tests/scheduler/test_chance_scheduler.py') diff --git a/nova/tests/scheduler/test_chance_scheduler.py b/nova/tests/scheduler/test_chance_scheduler.py index ec853594b..eabfa93dc 100644 --- a/nova/tests/scheduler/test_chance_scheduler.py +++ b/nova/tests/scheduler/test_chance_scheduler.py @@ -149,7 +149,8 @@ class ChanceSchedulerTestCase(test_scheduler.SchedulerTestCase): self.mox.StubOutWithMock(driver, 'cast_to_compute_host') self.mox.StubOutWithMock(driver, 'encode_instance') # instance 1 - self.driver._schedule(ctxt, 'compute', request_spec).AndReturn('host') + self.driver._schedule(ctxt, 'compute', request_spec, + {}).AndReturn('host') self.driver.create_instance_db_entry( ctxt, mox.Func(_has_launch_index(0)), None ).WithSideEffects(_add_uuid(1)).AndReturn(instance1) @@ -157,7 +158,8 @@ class ChanceSchedulerTestCase(test_scheduler.SchedulerTestCase): instance_uuid=instance1['uuid']) driver.encode_instance(instance1).AndReturn(instance1) # instance 2 - self.driver._schedule(ctxt, 'compute', request_spec).AndReturn('host') + self.driver._schedule(ctxt, 'compute', request_spec, + {}).AndReturn('host') self.driver.create_instance_db_entry( ctxt, mox.Func(_has_launch_index(1)), None ).WithSideEffects(_add_uuid(2)).AndReturn(instance2) -- cgit