Merge "Remove topic from scheduler run_instance."

This commit is contained in:
Jenkins
2012-08-06 23:18:20 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 7 deletions

View File

@@ -36,6 +36,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
- remove instance_uuid, add instance
- remove instance_type_id, add instance_type
- remove topic, it was unused
1.2 - Remove topic from run_instance, it was unused
'''
BASE_RPC_API_VERSION = '1.0'
@@ -44,17 +45,17 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
super(SchedulerAPI, self).__init__(topic=FLAGS.scheduler_topic,
default_version=self.BASE_RPC_API_VERSION)
def run_instance(self, ctxt, topic, request_spec, admin_password,
def run_instance(self, ctxt, request_spec, admin_password,
injected_files, requested_networks, is_first_time,
filter_properties, reservations, call=True):
rpc_method = self.call if call else self.cast
return rpc_method(ctxt, self.make_msg('run_instance', topic=topic,
return rpc_method(ctxt, self.make_msg('run_instance',
request_spec=request_spec, admin_password=admin_password,
injected_files=injected_files,
requested_networks=requested_networks,
is_first_time=is_first_time,
filter_properties=filter_properties,
reservations=reservations))
reservations=reservations), version='1.2')
def prep_resize(self, ctxt, instance, instance_type, image,
update_db, request_spec, filter_properties):

View File

@@ -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',