Move files to new locations for oslo.messaging
This commit is contained in:
parent
be649d1d74
commit
cbfb1452a4
@ -4,8 +4,8 @@ import threading
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from openstack.common import log as logging
|
||||
from openstack.common import messaging
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
from oslo import messaging
|
||||
|
||||
logging.setup('test-blocking')
|
||||
|
||||
|
@ -8,9 +8,9 @@ import socket
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from openstack.common import log as logging
|
||||
from openstack.common import messaging
|
||||
from openstack.common.messaging import eventlet as evmsg
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
from oslo import messaging
|
||||
from oslo.messaging import eventlet as evmsg
|
||||
|
||||
logging.setup('test-eventlet')
|
||||
|
||||
|
@ -13,14 +13,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common.messaging import exceptions
|
||||
from openstack.common.messaging.rpc import client
|
||||
from openstack.common.messaging.rpc import dispatcher as rpc_dispatcher
|
||||
from openstack.common.messaging.rpc import server as rpc_server
|
||||
from openstack.common.messaging import serializer
|
||||
from openstack.common.messaging import server
|
||||
from openstack.common.messaging import target
|
||||
from openstack.common.messaging import transport
|
||||
from oslo.messaging import exceptions
|
||||
from oslo.messaging.rpc import client
|
||||
from oslo.messaging.rpc import dispatcher as rpc_dispatcher
|
||||
from oslo.messaging.rpc import server as rpc_server
|
||||
from oslo.messaging import serializer
|
||||
from oslo.messaging import server
|
||||
from oslo.messaging import target
|
||||
from oslo.messaging import transport
|
||||
|
||||
|
||||
get_transport = transport.get_transport
|
@ -15,7 +15,7 @@
|
||||
|
||||
import abc
|
||||
|
||||
from openstack.common.messaging import exceptions
|
||||
from oslo.messaging import exceptions
|
||||
|
||||
|
||||
class TransportDriverError(exceptions.MessagingException):
|
@ -19,9 +19,9 @@ import json
|
||||
import Queue
|
||||
import time
|
||||
|
||||
from openstack.common import messaging
|
||||
from openstack.common.messaging._drivers import base
|
||||
from openstack.common.messaging import _utils as utils
|
||||
from oslo import messaging
|
||||
from oslo.messaging._drivers import base
|
||||
from oslo.messaging import _utils as utils
|
||||
|
||||
|
||||
class InvalidTarget(base.TransportDriverError, ValueError):
|
@ -15,8 +15,8 @@
|
||||
import abc
|
||||
import sys
|
||||
|
||||
from openstack.common.gettextutils import _
|
||||
from openstack.common import log as logging
|
||||
from oslo.messaging.openstack.common.gettextutils import _
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
|
||||
_LOG = logging.getLogger(__name__)
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common.messaging._executors import base
|
||||
from oslo.messaging._executors import base
|
||||
|
||||
|
||||
class BlockingExecutor(base.ExecutorBase):
|
@ -19,7 +19,7 @@ import greenlet
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from openstack.common.messaging._executors import base
|
||||
from oslo.messaging._executors import base
|
||||
|
||||
_eventlet_opts = [
|
||||
cfg.IntOpt('rpc_thread_pool_size',
|
@ -15,14 +15,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common import jsonutils
|
||||
from openstack.common import log as logging
|
||||
from openstack.common.messaging.notify import notifier
|
||||
from oslo.messaging.notify import notifier
|
||||
from oslo.messaging.openstack.common import jsonutils
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
|
||||
|
||||
class LogDriver(notifier._Driver):
|
||||
|
||||
LOGGER_BASE = 'openstack.common.notification'
|
||||
LOGGER_BASE = 'oslo.messaging.notification'
|
||||
|
||||
def notify(self, context, message, priority):
|
||||
logger = logging.getLogger('%s.%s' % (self.LOGGER_BASE,
|
@ -15,10 +15,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common.gettextutils import _
|
||||
from openstack.common import log as logging
|
||||
from openstack.common import messaging
|
||||
from openstack.common.messaging.notify import notifier
|
||||
from oslo import messaging
|
||||
from oslo.messaging.notify import notifier
|
||||
from oslo.messaging.openstack.common.gettextutils import _
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -15,7 +15,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common.messaging.notify import notifier
|
||||
from oslo.messaging.notify import notifier
|
||||
|
||||
|
||||
class NoOpDriver(notifier._Driver):
|
@ -15,7 +15,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common.messaging.notify import notifier
|
||||
from oslo.messaging.notify import notifier
|
||||
|
||||
|
||||
class TestDriver(notifier._Driver):
|
@ -20,11 +20,11 @@ import abc
|
||||
from oslo.config import cfg
|
||||
from stevedore import named
|
||||
|
||||
from openstack.common.gettextutils import _
|
||||
from openstack.common import log as logging
|
||||
from openstack.common import messaging
|
||||
from openstack.common import timeutils
|
||||
from openstack.common import uuidutils
|
||||
from oslo import messaging
|
||||
from oslo.messaging.openstack.common.gettextutils import _
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
from oslo.messaging.openstack.common import timeutils
|
||||
from oslo.messaging.openstack.common import uuidutils
|
||||
|
||||
_notifier_opts = [
|
||||
cfg.MultiStrOpt('notification_driver',
|
||||
@ -71,7 +71,7 @@ class Notifier(object):
|
||||
self._transport = transport or messaging.get_transport(conf)
|
||||
|
||||
self._driver_mgr = named.NamedExtensionManager(
|
||||
'openstack.common.notify.drivers',
|
||||
'oslo.messaging.notify.drivers',
|
||||
names=self._driver_names,
|
||||
invoke_on_load=True,
|
||||
invoke_args=[self.conf],
|
@ -20,10 +20,10 @@ import inspect
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from openstack.common import log as logging
|
||||
from openstack.common.messaging import _utils as utils
|
||||
from openstack.common.messaging import exceptions
|
||||
from openstack.common.messaging import serializer as msg_serializer
|
||||
from oslo.messaging import _utils as utils
|
||||
from oslo.messaging import exceptions
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
from oslo.messaging import serializer as msg_serializer
|
||||
|
||||
_client_opts = [
|
||||
cfg.IntOpt('rpc_response_timeout',
|
@ -16,11 +16,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common import log as logging
|
||||
from openstack.common.messaging import _utils as utils
|
||||
from openstack.common.messaging import serializer as msg_serializer
|
||||
from openstack.common.messaging import server as msg_server
|
||||
from openstack.common.messaging import target
|
||||
from oslo.messaging import _utils as utils
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
from oslo.messaging import serializer as msg_serializer
|
||||
from oslo.messaging import server as msg_server
|
||||
from oslo.messaging import target
|
||||
|
||||
_LOG = logging.getLogger(__name__)
|
||||
|
@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common.messaging.rpc import dispatcher as rpc_dispatcher
|
||||
from openstack.common.messaging import server as msg_server
|
||||
from oslo.messaging.rpc import dispatcher as rpc_dispatcher
|
||||
from oslo.messaging import server as msg_server
|
||||
|
||||
"""
|
||||
An RPC server exposes a number of endpoints, each of which contain a set of
|
||||
@ -49,7 +49,7 @@ Currently BlockingRPCServer and eventlet.RPCServer are available.
|
||||
A simple example of an RPC server with multiple endpoints might be:
|
||||
|
||||
from oslo.config import cfg
|
||||
from openstack.common import messaging
|
||||
from oslo import messaging
|
||||
|
||||
class ServerControlEndpoint(object):
|
||||
|
@ -18,9 +18,10 @@
|
||||
|
||||
from stevedore import driver
|
||||
|
||||
from openstack.common import log as logging
|
||||
from openstack.common.messaging._drivers import base as driver_base
|
||||
from openstack.common.messaging import exceptions
|
||||
from oslo.messaging._drivers import base as driver_base
|
||||
from oslo.messaging import exceptions
|
||||
from oslo.messaging.openstack.common import log as logging
|
||||
|
||||
|
||||
_LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -84,7 +85,7 @@ class MessageHandlingServer(object):
|
||||
self.executor = executor
|
||||
|
||||
try:
|
||||
mgr = driver.DriverManager('openstack.common.messaging.executors',
|
||||
mgr = driver.DriverManager('oslo.messaging.executors',
|
||||
self.executor)
|
||||
except RuntimeError as ex:
|
||||
raise ExecutorLoadFailure(self.executor, ex)
|
@ -21,7 +21,7 @@ import urlparse
|
||||
from oslo.config import cfg
|
||||
from stevedore import driver
|
||||
|
||||
from openstack.common.messaging import exceptions
|
||||
from oslo.messaging import exceptions
|
||||
|
||||
|
||||
_transport_opts = [
|
||||
@ -133,7 +133,7 @@ def get_transport(conf, url=None):
|
||||
kwargs['url'] = url
|
||||
|
||||
try:
|
||||
mgr = driver.DriverManager('openstack.common.messaging.drivers',
|
||||
mgr = driver.DriverManager('oslo.messaging.drivers',
|
||||
rpc_backend,
|
||||
invoke_on_load=True,
|
||||
invoke_args=[conf],
|
@ -15,9 +15,9 @@
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from openstack.common import messaging
|
||||
from openstack.common.messaging.rpc import client as rpc_client
|
||||
from openstack.common.messaging import serializer as msg_serializer
|
||||
from oslo import messaging
|
||||
from oslo.messaging.rpc import client as rpc_client
|
||||
from oslo.messaging import serializer as msg_serializer
|
||||
from tests import utils as test_utils
|
||||
|
||||
# FIXME(markmc): I'm having touble using testscenarios with nose
|
@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common import messaging
|
||||
from openstack.common.messaging import serializer as msg_serializer
|
||||
from oslo import messaging
|
||||
from oslo.messaging import serializer as msg_serializer
|
||||
from tests import utils as test_utils
|
||||
|
||||
# FIXME(markmc): I'm having touble using testscenarios with nose
|
@ -17,7 +17,7 @@ import threading
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from openstack.common import messaging
|
||||
from oslo import messaging
|
||||
from tests import utils as test_utils
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.common import messaging
|
||||
from oslo import messaging
|
||||
from tests import utils as test_utils
|
||||
|
||||
# FIXME(markmc): I'm having touble using testscenarios with nose
|
@ -20,8 +20,8 @@ import mox
|
||||
from oslo.config import cfg
|
||||
from stevedore import driver
|
||||
|
||||
from openstack.common import messaging
|
||||
from openstack.common.messaging import transport
|
||||
from oslo import messaging
|
||||
from oslo.messaging import transport
|
||||
from tests import utils as test_utils
|
||||
|
||||
# FIXME(markmc): I'm having touble using testscenarios with nose
|
||||
@ -138,7 +138,7 @@ class GetTransportTestCase(test_utils.BaseTestCase):
|
||||
invoke_kwds['url'] = self.expect['url']
|
||||
|
||||
drvr = _FakeDriver(self.conf)
|
||||
driver.DriverManager('openstack.common.messaging.drivers',
|
||||
driver.DriverManager('oslo.messaging.drivers',
|
||||
self.expect['backend'],
|
||||
invoke_on_load=True,
|
||||
invoke_args=invoke_args,
|
||||
@ -166,7 +166,7 @@ class GetTransportTestCase(test_utils.BaseTestCase):
|
||||
if self.expect['url']:
|
||||
invoke_kwds['url'] = self.expect['url']
|
||||
|
||||
driver.DriverManager('openstack.common.messaging.drivers',
|
||||
driver.DriverManager('oslo.messaging.drivers',
|
||||
self.expect['backend'],
|
||||
invoke_on_load=True,
|
||||
invoke_args=invoke_args,
|
Loading…
x
Reference in New Issue
Block a user