Remove code that used nova-cert

Change-Id: I744ca2901e2a77557ab54c2c9a37196e458a85c9
This commit is contained in:
tikitavi 2017-07-06 13:34:07 +03:00
parent 22d8fa90ad
commit 8104481c84
7 changed files with 3 additions and 59 deletions

View File

@ -1,8 +1,5 @@
# Devstack settings
# Enable Nova Cert service
enable_service n-crt
# we have to add ec2-api to enabled services for screen_it to work
enable_service ec2-api
enable_service ec2-api-metadata

View File

@ -72,6 +72,8 @@ CONF.register_opts(s3_opts)
rpcapi_opts = [
cfg.StrOpt('cert_topic',
default='cert',
deprecated_for_removal=True,
deprecated_reason='"nova_cert" service is removed',
help='The topic cert nodes listen on'),
]

View File

@ -23,7 +23,6 @@ from novaclient import api_versions as nova_api_versions
from novaclient import client as novaclient
from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging as messaging
from ec2api.i18n import _
@ -137,11 +136,6 @@ def keystone(context):
session=context.session)
def nova_cert(context):
_cert_api = _rpcapi_CertAPI(context)
return _cert_api
def _get_nova_api_version(context):
client = novaclient.Client(REQUIRED_NOVA_API_VERSION,
session=context.session,
@ -182,48 +176,6 @@ def _get_nova_api_version(context):
return REQUIRED_NOVA_API_MICROVERSION
class _rpcapi_CertAPI(object):
'''Client side of the cert rpc API.'''
def __init__(self, context):
super(_rpcapi_CertAPI, self).__init__()
target = messaging.Target(topic=CONF.cert_topic, version='2.0')
self.client = _rpc_get_client(target)
self.context = context
def decrypt_text(self, text):
cctxt = self.client.prepare()
return cctxt.call(self.context, 'decrypt_text',
project_id=self.context.project_id,
text=text)
_rpc_TRANSPORT = None
def _rpc_init(conf):
global _rpc_TRANSPORT
# NOTE(ft): set control_exchange parameter to use Nova cert topic
messaging.set_transport_defaults('nova')
_rpc_TRANSPORT = messaging.get_transport(conf)
def _rpc_get_client(target):
if not _rpc_TRANSPORT:
_rpc_init(CONF)
assert _rpc_TRANSPORT is not None
serializer = _rpc_RequestContextSerializer()
return messaging.RPCClient(_rpc_TRANSPORT,
target,
serializer=serializer)
class _rpc_RequestContextSerializer(messaging.NoOpSerializer):
def serialize_context(self, context):
return context.to_dict()
_admin_session = None

View File

@ -26,7 +26,7 @@ _DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('ec2api.sqlite')
_DEFAULT_LOG_LEVELS = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN',
'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO',
'oslo.messaging=INFO', 'iso8601=WARN',
'iso8601=WARN',
'requests.packages.urllib3.connectionpool=WARN',
'urllib3.connectionpool=WARN', 'websocket=WARN',
'keystonemiddleware=WARN', 'routes.middleware=WARN',

View File

@ -7,7 +7,6 @@ namespace = ec2api.api
namespace = ec2api.metadata
namespace = ec2api.s3
namespace = oslo.log
namespace = oslo.messaging
namespace = oslo.service.service
namespace = oslo.db
namespace = oslo.concurrency

View File

@ -303,11 +303,6 @@ if [[ -f "$NOVA_CONF" ]]; then
copynovaopt s3_affix_tenant DEFAULT
copynovaopt s3_use_ssl DEFAULT
fi
copynovaopt cert_topic DEFAULT
copynovaopt rabbit_hosts oslo_messaging_rabbit
copynovaopt rabbit_password oslo_messaging_rabbit
copynovaopt rabbit_userid oslo_messaging_rabbit
# TODO(ft): it's necessary to support other available messaging implementations
nova_state_path=$(iniget $NOVA_CONF DEFAULT state_path)
root_state_path=$(dirname $nova_state_path)

View File

@ -15,7 +15,6 @@ oslo.concurrency>=3.8.0 # Apache-2.0
oslo.context>=2.14.0 # Apache-2.0
oslo.db>=4.23.0 # Apache-2.0
oslo.log>=3.22.0 # Apache-2.0
oslo.messaging!=5.25.0,>=5.24.2 # Apache-2.0
oslo.serialization>=1.10.0 # Apache-2.0
oslo.service>=1.10.0 # Apache-2.0
oslo.utils>=3.20.0 # Apache-2.0