Remove cert 1.X rpc api
A previous change adding support for the 2.x rpc interface but retained compatibility with 1.x as a transition point. This commit removes the old API from the server side. UpgradeImpact Part of blueprint rpc-major-version-updates-icehouse Change-Id: I0a5d14fc3cbf374744049269883fc14a4850f597
This commit is contained in:
parent
25af2fa784
commit
4bd2444c98
@ -31,18 +31,12 @@ from nova import manager
|
||||
|
||||
|
||||
class CertManager(manager.Manager):
|
||||
RPC_API_VERSION = '1.1'
|
||||
RPC_API_VERSION = '2.0'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CertManager, self).__init__(service_name='cert',
|
||||
*args, **kwargs)
|
||||
|
||||
def create_rpc_dispatcher(self, backdoor_port=None, additional_apis=None):
|
||||
additional_apis = additional_apis or []
|
||||
additional_apis.append(_CertV2Proxy(self))
|
||||
return super(CertManager, self).create_rpc_dispatcher(
|
||||
backdoor_port, additional_apis)
|
||||
|
||||
def init_host(self):
|
||||
crypto.ensure_ca_filesystem()
|
||||
|
||||
@ -73,38 +67,3 @@ 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))
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
class _CertV2Proxy(object):
|
||||
|
||||
RPC_API_VERSION = '2.0'
|
||||
|
||||
def __init__(self, manager):
|
||||
self.manager = manager
|
||||
|
||||
def revoke_certs_by_user(self, context, user_id):
|
||||
return self.manager.revoke_certs_by_user(context, user_id)
|
||||
|
||||
def revoke_certs_by_project(self, context, project_id):
|
||||
return self.manager.revoke_certs_by_project(context, project_id)
|
||||
|
||||
def revoke_certs_by_user_and_project(self, context, user_id, project_id):
|
||||
return self.manager.revoke_certs_by_user_and_project(context, user_id,
|
||||
project_id)
|
||||
|
||||
def generate_x509_cert(self, context, user_id, project_id):
|
||||
return self.manager.generate_x509_cert(context, user_id, project_id)
|
||||
|
||||
def fetch_ca(self, context, project_id):
|
||||
return self.manager.fetch_ca(context, project_id)
|
||||
|
||||
def fetch_crl(self, context, project_id):
|
||||
return self.manager.fetch_crl(context, project_id)
|
||||
|
||||
def decrypt_text(self, context, project_id, text):
|
||||
return self.manager.decrypt_text(context, project_id, text)
|
||||
|
Loading…
x
Reference in New Issue
Block a user