From ddb3199318bf91e76b4c4e7330956ee581c91ccc Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 10 Apr 2013 00:59:03 +0200 Subject: Move get_backdoor_port to base rpc API. Each service implemented the get_backdoor_port method individually. This patch moves the implementation of this method to the base rpc API instead, and removes the now unnecessary code from each of the services. The server side method was left on all of the managers for rpc backwards copmatibility. They can be removed on the next major rpc version bump of those APIs. Part of blueprint base-rpc-api. Change-Id: Ia8838fafd80eb86a1c2d66f5e97370042d8d8c53 --- nova/console/api.py | 5 ----- nova/console/manager.py | 2 ++ nova/console/rpcapi.py | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'nova/console') diff --git a/nova/console/api.py b/nova/console/api.py index 91966a7ff..32bf27009 100644 --- a/nova/console/api.py +++ b/nova/console/api.py @@ -69,8 +69,3 @@ class API(base.Base): else: instance = self.db.instance_get(context, instance_uuid) return instance - - def get_backdoor_port(self, context, host): - topic = self._get_console_topic(context, host) - rpcapi = console_rpcapi.ConsoleAPI(topic=topic) - return rpcapi.get_backdoor_port(context, host) diff --git a/nova/console/manager.py b/nova/console/manager.py index 777f051bb..382689381 100644 --- a/nova/console/manager.py +++ b/nova/console/manager.py @@ -133,5 +133,7 @@ class ConsoleProxyManager(manager.Manager): pool = self.db.console_pool_create(context, pool_info) return pool + # NOTE(russellb) This method can be removed in 2.0 of this API. It is + # deprecated in favor of the method in the base API. def get_backdoor_port(self, context): return self.backdoor_port diff --git a/nova/console/rpcapi.py b/nova/console/rpcapi.py index 78c0c9c1a..86debae32 100644 --- a/nova/console/rpcapi.py +++ b/nova/console/rpcapi.py @@ -62,7 +62,3 @@ class ConsoleAPI(nova.openstack.common.rpc.proxy.RpcProxy): def remove_console(self, ctxt, console_id): self.cast(ctxt, self.make_msg('remove_console', console_id=console_id)) - - def get_backdoor_port(self, ctxt, host): - return self.call(ctxt, self.make_msg('get_backdoor_port'), - version='1.1') -- cgit