diff --git a/oslo_messaging/_drivers/protocols/__init__.py b/oslo_messaging/_drivers/amqp1_driver/__init__.py similarity index 100% rename from oslo_messaging/_drivers/protocols/__init__.py rename to oslo_messaging/_drivers/amqp1_driver/__init__.py diff --git a/oslo_messaging/_drivers/protocols/amqp/controller.py b/oslo_messaging/_drivers/amqp1_driver/controller.py similarity index 99% rename from oslo_messaging/_drivers/protocols/amqp/controller.py rename to oslo_messaging/_drivers/amqp1_driver/controller.py index 2c115a865..25e22d5f1 100644 --- a/oslo_messaging/_drivers/protocols/amqp/controller.py +++ b/oslo_messaging/_drivers/amqp1_driver/controller.py @@ -34,8 +34,8 @@ import proton import pyngus from six import moves -from oslo_messaging._drivers.protocols.amqp import eventloop -from oslo_messaging._drivers.protocols.amqp import opts +from oslo_messaging._drivers.amqp1_driver import eventloop +from oslo_messaging._drivers.amqp1_driver import opts from oslo_messaging._i18n import _LE, _LI, _LW from oslo_messaging import exceptions from oslo_messaging import transport diff --git a/oslo_messaging/_drivers/protocols/amqp/drivertasks.py b/oslo_messaging/_drivers/amqp1_driver/drivertasks.py similarity index 98% rename from oslo_messaging/_drivers/protocols/amqp/drivertasks.py rename to oslo_messaging/_drivers/amqp1_driver/drivertasks.py index 0addc0758..c36cce597 100644 --- a/oslo_messaging/_drivers/protocols/amqp/drivertasks.py +++ b/oslo_messaging/_drivers/amqp1_driver/drivertasks.py @@ -16,7 +16,7 @@ import logging import threading import time -from oslo_messaging._drivers.protocols.amqp import controller +from oslo_messaging._drivers.amqp1_driver import controller from oslo_messaging._i18n import _LW from oslo_messaging import exceptions diff --git a/oslo_messaging/_drivers/protocols/amqp/eventloop.py b/oslo_messaging/_drivers/amqp1_driver/eventloop.py similarity index 100% rename from oslo_messaging/_drivers/protocols/amqp/eventloop.py rename to oslo_messaging/_drivers/amqp1_driver/eventloop.py diff --git a/oslo_messaging/_drivers/protocols/amqp/opts.py b/oslo_messaging/_drivers/amqp1_driver/opts.py similarity index 100% rename from oslo_messaging/_drivers/protocols/amqp/opts.py rename to oslo_messaging/_drivers/amqp1_driver/opts.py diff --git a/oslo_messaging/_drivers/protocols/amqp/driver.py b/oslo_messaging/_drivers/impl_amqp1.py similarity index 99% rename from oslo_messaging/_drivers/protocols/amqp/driver.py rename to oslo_messaging/_drivers/impl_amqp1.py index 50d0036a9..792152cf0 100644 --- a/oslo_messaging/_drivers/protocols/amqp/driver.py +++ b/oslo_messaging/_drivers/impl_amqp1.py @@ -39,10 +39,10 @@ from oslo_messaging import target as messaging_target proton = importutils.try_import('proton') controller = importutils.try_import( - 'oslo_messaging._drivers.protocols.amqp.controller' + 'oslo_messaging._drivers.amqp1_driver.controller' ) drivertasks = importutils.try_import( - 'oslo_messaging._drivers.protocols.amqp.drivertasks' + 'oslo_messaging._drivers.amqp1_driver.drivertasks' ) LOG = logging.getLogger(__name__) diff --git a/oslo_messaging/_drivers/protocols/amqp/__init__.py b/oslo_messaging/_drivers/protocols/amqp/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/oslo_messaging/conffixture.py b/oslo_messaging/conffixture.py index bb037b8db..c6edddd07 100644 --- a/oslo_messaging/conffixture.py +++ b/oslo_messaging/conffixture.py @@ -55,7 +55,7 @@ class ConfFixture(fixtures.Fixture): 'oslo_messaging._drivers.amqp', 'amqp_opts', 'oslo_messaging_qpid') _import_opts(self.conf, - 'oslo_messaging._drivers.protocols.amqp.opts', + 'oslo_messaging._drivers.amqp1_driver.opts', 'amqp1_opts', 'oslo_messaging_amqp') _import_opts(self.conf, 'oslo_messaging._drivers.impl_zmq', 'zmq_opts') diff --git a/oslo_messaging/opts.py b/oslo_messaging/opts.py index 068774336..b04768a28 100644 --- a/oslo_messaging/opts.py +++ b/oslo_messaging/opts.py @@ -21,12 +21,12 @@ import copy import itertools from oslo_messaging._drivers import amqp +from oslo_messaging._drivers.amqp1_driver import opts as amqp_opts from oslo_messaging._drivers import base as drivers_base from oslo_messaging._drivers import impl_pika from oslo_messaging._drivers import impl_rabbit from oslo_messaging._drivers import impl_zmq from oslo_messaging._drivers.pika_driver import pika_connection_factory -from oslo_messaging._drivers.protocols.amqp import opts as amqp_opts from oslo_messaging._drivers.zmq_driver.matchmaker import matchmaker_redis from oslo_messaging.notify import notifier from oslo_messaging.rpc import client diff --git a/oslo_messaging/tests/test_amqp_driver.py b/oslo_messaging/tests/drivers/test_amqp_driver.py similarity index 99% rename from oslo_messaging/tests/test_amqp_driver.py rename to oslo_messaging/tests/drivers/test_amqp_driver.py index af6724dba..d6e92558c 100644 --- a/oslo_messaging/tests/test_amqp_driver.py +++ b/oslo_messaging/tests/drivers/test_amqp_driver.py @@ -36,7 +36,7 @@ from oslo_messaging.tests import utils as test_utils # are available in the base repos for all supported platforms. pyngus = importutils.try_import("pyngus") if pyngus: - from oslo_messaging._drivers.protocols.amqp import driver as amqp_driver + import oslo_messaging._drivers.impl_amqp1 as amqp_driver # The Cyrus-based SASL tests can only be run if the installed version of proton # has been built with Cyrus SASL support. diff --git a/setup.cfg b/setup.cfg index 05c0f3d1c..aa6f2d55c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ console_scripts = oslo.messaging.drivers = rabbit = oslo_messaging._drivers.impl_rabbit:RabbitDriver zmq = oslo_messaging._drivers.impl_zmq:ZmqDriver - amqp = oslo_messaging._drivers.protocols.amqp.driver:ProtonDriver + amqp = oslo_messaging._drivers.impl_amqp1:ProtonDriver # This driver is supporting for only notification usage kafka = oslo_messaging._drivers.impl_kafka:KafkaDriver