Remove entry point lists from the public API

Before the move to pbr, I thought it would be cute to include the lists
of entry points in the public API. After pbr, the entry points are only
in a config file, so it doesn't make much sense.
This commit is contained in:
Mark McLoughlin 2013-05-20 07:24:53 +01:00
parent ab26987133
commit d559a86ec9
3 changed files with 2 additions and 74 deletions

View File

@ -1,43 +0,0 @@
# Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
NAMESPACE = 'openstack.common.messaging.drivers'
def _driver(module, name):
return 'openstack.common.messaging._drivers.impl_%s:%s' % (module, name)
_RABBIT_DRIVER = _driver('rabbit', 'RabbitDriver')
_QPID_DRIVER = _driver('qpid', 'QpidDriver')
_ZMQ_DRIVER = _driver('zmq', 'ZmqDriver')
_FAKE_DRIVER = _driver('fake', 'FakeDriver')
TRANSPORT_DRIVERS = [
'rabbit = ' + _RABBIT_DRIVER,
'qpid = ' + _QPID_DRIVER,
'zmq = ' + _ZMQ_DRIVER,
# To avoid confusion
'kombu = ' + _RABBIT_DRIVER,
# For backwards compat
'openstack.common.rpc.impl_kombu = ' + _RABBIT_DRIVER,
'openstack.common.rpc.impl_qpid = ' + _QPID_DRIVER,
'openstack.common.rpc.impl_zmq = ' + _ZMQ_DRIVER,
# This is just for internal testing
'fake = ' + _FAKE_DRIVER,
]

View File

@ -36,33 +36,6 @@ _notifier_opts = [
]
def _driver(module, name):
return 'openstack.common.messaging.notify._impl_%s:%s' % (module, name)
_MESSAGING_V2_DRIVER = _driver('messaging', 'MessagingV2Driver')
_MESSAGING_DRIVER = _driver('messaging', 'MessagingDriver')
_LOG_DRIVER = _driver('log', 'LogDriver')
_TEST_DRIVER = _driver('test', 'TestDriver')
_NOOP_DRIVER = _driver('noop', 'NoOpDriver')
NOTIFIER_DRIVERS = [
'messagingv2 = ' + _MESSAGING_V2_DRIVER,
'messaging = ' + _MESSAGING_DRIVER,
'log = ' + _LOG_DRIVER,
'test = ' + _TEST_DRIVER,
'noop = ' + _NOOP_DRIVER,
# For backwards compat
'openstack.common.notify.rpc2_notifier = ' + _MESSAGING_V2_DRIVER,
'openstack.common.notify.rpc_notifier = ' + _MESSAGING_DRIVER,
'openstack.common.notify.log_notifier = ' + _LOG_DRIVER,
'openstack.common.notify.test_notifier = ' + _TEST_DRIVER,
'openstack.common.notify.no_op_notifier = ' + _NOOP_DRIVER,
]
NAMESPACE = 'openstack.common.notify.drivers'
class _Driver(object):
__metaclass__ = abc.ABCMeta
@ -102,7 +75,7 @@ class Notifier(object):
kwargs = dict(topics=self._topics, transport=self._transport)
for driver in self._driver_names:
mgr = driver.DriverManager(NAMESPACE,
mgr = driver.DriverManager('openstack.common.notify.drivers',
driver,
invoke_on_load=True,
invoke_args=[self.conf],

View File

@ -21,8 +21,6 @@ import urlparse
from oslo.config import cfg
from stevedore import driver
from openstack.common.messaging import drivers
_transport_opts = [
cfg.StrOpt('transport_url',
default=None,
@ -76,7 +74,7 @@ def get_transport(conf, url=None):
if url is not None:
kwargs['url'] = url
mgr = driver.DriverManager(drivers.NAMESPACE,
mgr = driver.DriverManager('openstack.common.messaging.drivers',
rpc_backend,
invoke_on_load=True,
invoke_args=[conf],