From 3f9967b99fc15d32b7f5df139af734fdec4f151d Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 3 Aug 2012 15:43:26 -0400 Subject: [PATCH] Remove topic from scheduler run_instance. This argument to run_instance was unused, so just remove it. Change-Id: I42366514285a2355f647c776af140effc1618b7d --- nova/scheduler/rpcapi.py | 7 ++++--- nova/tests/scheduler/test_rpcapi.py | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py index 60de98c9..a553b202 100644 --- a/nova/scheduler/rpcapi.py +++ b/nova/scheduler/rpcapi.py @@ -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): diff --git a/nova/tests/scheduler/test_rpcapi.py b/nova/tests/scheduler/test_rpcapi.py index c881bc30..20874c36 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',