summaryrefslogtreecommitdiffstats
path: root/nova/cert
diff options
context:
space:
mode:
authorMatthew Treinish <treinish@linux.vnet.ibm.com>2012-12-19 17:38:52 -0500
committerMatthew Treinish <treinish@linux.vnet.ibm.com>2012-12-19 17:38:52 -0500
commit576a561dd89ab27f4d91e402609d3cca69e298d6 (patch)
tree087fd66437974c81a520863ed69370375a26d5ef /nova/cert
parent276fded4972a357db40f7a72e1bf67d4f846a95a (diff)
downloadnova-576a561dd89ab27f4d91e402609d3cca69e298d6.tar.gz
nova-576a561dd89ab27f4d91e402609d3cca69e298d6.tar.xz
nova-576a561dd89ab27f4d91e402609d3cca69e298d6.zip
Add get_backdoor_port to cert.
This adds a get_backdoor_port function to the cert service which enables returning the eventlet_backdoor port from rpc for the service. Change-Id: Iea2b1f9587ea2749c2def921d6a0d1e86f1645ee
Diffstat (limited to 'nova/cert')
-rw-r--r--nova/cert/manager.py5
-rw-r--r--nova/cert/rpcapi.py5
2 files changed, 9 insertions, 1 deletions
diff --git a/nova/cert/manager.py b/nova/cert/manager.py
index 2d17a675a..3a00c47a6 100644
--- a/nova/cert/manager.py
+++ b/nova/cert/manager.py
@@ -34,7 +34,7 @@ LOG = logging.getLogger(__name__)
class CertManager(manager.Manager):
- RPC_API_VERSION = '1.0'
+ RPC_API_VERSION = '1.1'
def init_host(self):
crypto.ensure_ca_filesystem()
@@ -66,3 +66,6 @@ class CertManager(manager.Manager):
def decrypt_text(self, context, project_id, text):
"""Decrypt base64 encoded text using the projects private key."""
return crypto.decrypt_text(project_id, base64.b64decode(text))
+
+ def get_backdoor_port(self, context):
+ return self.backdoor_port
diff --git a/nova/cert/rpcapi.py b/nova/cert/rpcapi.py
index 35d02b643..79b136571 100644
--- a/nova/cert/rpcapi.py
+++ b/nova/cert/rpcapi.py
@@ -31,6 +31,7 @@ class CertAPI(nova.openstack.common.rpc.proxy.RpcProxy):
API version history:
1.0 - Initial version.
+ 1.1 - Added get_backdoor_port()
'''
#
@@ -78,3 +79,7 @@ class CertAPI(nova.openstack.common.rpc.proxy.RpcProxy):
return self.call(ctxt, self.make_msg('decrypt_text',
project_id=project_id,
text=text))
+
+ def get_backdoor_port(self, context, host):
+ return self.call(context, self.make_msg('get_backdoor_port'),
+ version='1.1')