diff options
| author | Russell Bryant <rbryant@redhat.com> | 2013-04-10 00:59:03 +0200 |
|---|---|---|
| committer | Russell Bryant <rbryant@redhat.com> | 2013-04-24 15:02:56 -0400 |
| commit | ddb3199318bf91e76b4c4e7330956ee581c91ccc (patch) | |
| tree | 5e9789b714483481d6d1b68d94debb92ed42ab0c /nova/console | |
| parent | a025d7eee28026cb21cb0e732e6510d5d9b7d96f (diff) | |
| download | nova-ddb3199318bf91e76b4c4e7330956ee581c91ccc.tar.gz nova-ddb3199318bf91e76b4c4e7330956ee581c91ccc.tar.xz nova-ddb3199318bf91e76b4c4e7330956ee581c91ccc.zip | |
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
Diffstat (limited to 'nova/console')
| -rw-r--r-- | nova/console/api.py | 5 | ||||
| -rw-r--r-- | nova/console/manager.py | 2 | ||||
| -rw-r--r-- | nova/console/rpcapi.py | 4 |
3 files changed, 2 insertions, 9 deletions
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') |
