Merge "Fixes backwards compatible rpc schedule_run"

This commit is contained in:
Jenkins 2012-08-28 02:26:07 +00:00 committed by Gerrit Code Review
commit 2907ddfffc
2 changed files with 5 additions and 2 deletions

View File

@ -34,6 +34,7 @@ from nova.openstack.common import importutils
from nova.openstack.common import log as logging
from nova.openstack.common import rpc
from nova.openstack.common import timeutils
from nova import quota
from nova import utils
@ -173,7 +174,9 @@ class Scheduler(object):
instance = self.compute_api.create_db_entry_for_new_instance(
context, instance_type, image, base_options,
security_group, block_device_mapping, reservations)
security_group, block_device_mapping)
if reservations:
quota.QUOTAS.commit(context, reservations)
# NOTE(comstud): This needs to be set for the generic exception
# checking in scheduler manager, so that it'll set this instance
# to ERROR properly.

View File

@ -368,7 +368,7 @@ class SchedulerTestCase(test.TestCase):
self.driver.compute_api.create_db_entry_for_new_instance(
self.context, instance_type, image, base_options,
security_group,
block_device_mapping, None).AndReturn(fake_instance)
block_device_mapping).AndReturn(fake_instance)
self.mox.ReplayAll()
instance = self.driver.create_instance_db_entry(self.context,
request_spec, None)