Move files to new locations for oslo.messaging

This commit is contained in:
Mark McLoughlin 2013-06-15 07:43:39 +01:00
parent be649d1d74
commit cbfb1452a4
31 changed files with 67 additions and 66 deletions

View File

@ -4,8 +4,8 @@ import threading
from oslo.config import cfg from oslo.config import cfg
from openstack.common import log as logging from oslo.messaging.openstack.common import log as logging
from openstack.common import messaging from oslo import messaging
logging.setup('test-blocking') logging.setup('test-blocking')

View File

@ -8,9 +8,9 @@ import socket
from oslo.config import cfg from oslo.config import cfg
from openstack.common import log as logging from oslo.messaging.openstack.common import log as logging
from openstack.common import messaging from oslo import messaging
from openstack.common.messaging import eventlet as evmsg from oslo.messaging import eventlet as evmsg
logging.setup('test-eventlet') logging.setup('test-eventlet')

View File

@ -13,14 +13,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common.messaging import exceptions from oslo.messaging import exceptions
from openstack.common.messaging.rpc import client from oslo.messaging.rpc import client
from openstack.common.messaging.rpc import dispatcher as rpc_dispatcher from oslo.messaging.rpc import dispatcher as rpc_dispatcher
from openstack.common.messaging.rpc import server as rpc_server from oslo.messaging.rpc import server as rpc_server
from openstack.common.messaging import serializer from oslo.messaging import serializer
from openstack.common.messaging import server from oslo.messaging import server
from openstack.common.messaging import target from oslo.messaging import target
from openstack.common.messaging import transport from oslo.messaging import transport
get_transport = transport.get_transport get_transport = transport.get_transport

View File

@ -15,7 +15,7 @@
import abc import abc
from openstack.common.messaging import exceptions from oslo.messaging import exceptions
class TransportDriverError(exceptions.MessagingException): class TransportDriverError(exceptions.MessagingException):

View File

@ -19,9 +19,9 @@ import json
import Queue import Queue
import time import time
from openstack.common import messaging from oslo import messaging
from openstack.common.messaging._drivers import base from oslo.messaging._drivers import base
from openstack.common.messaging import _utils as utils from oslo.messaging import _utils as utils
class InvalidTarget(base.TransportDriverError, ValueError): class InvalidTarget(base.TransportDriverError, ValueError):

View File

@ -15,8 +15,8 @@
import abc import abc
import sys import sys
from openstack.common.gettextutils import _ from oslo.messaging.openstack.common.gettextutils import _
from openstack.common import log as logging from oslo.messaging.openstack.common import log as logging
_LOG = logging.getLogger(__name__) _LOG = logging.getLogger(__name__)

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common.messaging._executors import base from oslo.messaging._executors import base
class BlockingExecutor(base.ExecutorBase): class BlockingExecutor(base.ExecutorBase):

View File

@ -19,7 +19,7 @@ import greenlet
from oslo.config import cfg from oslo.config import cfg
from openstack.common.messaging._executors import base from oslo.messaging._executors import base
_eventlet_opts = [ _eventlet_opts = [
cfg.IntOpt('rpc_thread_pool_size', cfg.IntOpt('rpc_thread_pool_size',

View File

@ -15,14 +15,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common import jsonutils from oslo.messaging.notify import notifier
from openstack.common import log as logging from oslo.messaging.openstack.common import jsonutils
from openstack.common.messaging.notify import notifier from oslo.messaging.openstack.common import log as logging
class LogDriver(notifier._Driver): class LogDriver(notifier._Driver):
LOGGER_BASE = 'openstack.common.notification' LOGGER_BASE = 'oslo.messaging.notification'
def notify(self, context, message, priority): def notify(self, context, message, priority):
logger = logging.getLogger('%s.%s' % (self.LOGGER_BASE, logger = logging.getLogger('%s.%s' % (self.LOGGER_BASE,

View File

@ -15,10 +15,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common.gettextutils import _ from oslo import messaging
from openstack.common import log as logging from oslo.messaging.notify import notifier
from openstack.common import messaging from oslo.messaging.openstack.common.gettextutils import _
from openstack.common.messaging.notify import notifier from oslo.messaging.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common.messaging.notify import notifier from oslo.messaging.notify import notifier
class NoOpDriver(notifier._Driver): class NoOpDriver(notifier._Driver):

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common.messaging.notify import notifier from oslo.messaging.notify import notifier
class TestDriver(notifier._Driver): class TestDriver(notifier._Driver):

View File

@ -20,11 +20,11 @@ import abc
from oslo.config import cfg from oslo.config import cfg
from stevedore import named from stevedore import named
from openstack.common.gettextutils import _ from oslo import messaging
from openstack.common import log as logging from oslo.messaging.openstack.common.gettextutils import _
from openstack.common import messaging from oslo.messaging.openstack.common import log as logging
from openstack.common import timeutils from oslo.messaging.openstack.common import timeutils
from openstack.common import uuidutils from oslo.messaging.openstack.common import uuidutils
_notifier_opts = [ _notifier_opts = [
cfg.MultiStrOpt('notification_driver', cfg.MultiStrOpt('notification_driver',
@ -71,7 +71,7 @@ class Notifier(object):
self._transport = transport or messaging.get_transport(conf) self._transport = transport or messaging.get_transport(conf)
self._driver_mgr = named.NamedExtensionManager( self._driver_mgr = named.NamedExtensionManager(
'openstack.common.notify.drivers', 'oslo.messaging.notify.drivers',
names=self._driver_names, names=self._driver_names,
invoke_on_load=True, invoke_on_load=True,
invoke_args=[self.conf], invoke_args=[self.conf],

View File

@ -20,10 +20,10 @@ import inspect
from oslo.config import cfg from oslo.config import cfg
from openstack.common import log as logging from oslo.messaging import _utils as utils
from openstack.common.messaging import _utils as utils from oslo.messaging import exceptions
from openstack.common.messaging import exceptions from oslo.messaging.openstack.common import log as logging
from openstack.common.messaging import serializer as msg_serializer from oslo.messaging import serializer as msg_serializer
_client_opts = [ _client_opts = [
cfg.IntOpt('rpc_response_timeout', cfg.IntOpt('rpc_response_timeout',

View File

@ -16,11 +16,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common import log as logging from oslo.messaging import _utils as utils
from openstack.common.messaging import _utils as utils from oslo.messaging.openstack.common import log as logging
from openstack.common.messaging import serializer as msg_serializer from oslo.messaging import serializer as msg_serializer
from openstack.common.messaging import server as msg_server from oslo.messaging import server as msg_server
from openstack.common.messaging import target from oslo.messaging import target
_LOG = logging.getLogger(__name__) _LOG = logging.getLogger(__name__)

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common.messaging.rpc import dispatcher as rpc_dispatcher from oslo.messaging.rpc import dispatcher as rpc_dispatcher
from openstack.common.messaging import server as msg_server from oslo.messaging import server as msg_server
""" """
An RPC server exposes a number of endpoints, each of which contain a set of 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: A simple example of an RPC server with multiple endpoints might be:
from oslo.config import cfg from oslo.config import cfg
from openstack.common import messaging from oslo import messaging
class ServerControlEndpoint(object): class ServerControlEndpoint(object):

View File

@ -18,9 +18,10 @@
from stevedore import driver from stevedore import driver
from openstack.common import log as logging from oslo.messaging._drivers import base as driver_base
from openstack.common.messaging._drivers import base as driver_base from oslo.messaging import exceptions
from openstack.common.messaging import exceptions from oslo.messaging.openstack.common import log as logging
_LOG = logging.getLogger(__name__) _LOG = logging.getLogger(__name__)
@ -84,7 +85,7 @@ class MessageHandlingServer(object):
self.executor = executor self.executor = executor
try: try:
mgr = driver.DriverManager('openstack.common.messaging.executors', mgr = driver.DriverManager('oslo.messaging.executors',
self.executor) self.executor)
except RuntimeError as ex: except RuntimeError as ex:
raise ExecutorLoadFailure(self.executor, ex) raise ExecutorLoadFailure(self.executor, ex)

View File

@ -21,7 +21,7 @@ import urlparse
from oslo.config import cfg from oslo.config import cfg
from stevedore import driver from stevedore import driver
from openstack.common.messaging import exceptions from oslo.messaging import exceptions
_transport_opts = [ _transport_opts = [
@ -133,7 +133,7 @@ def get_transport(conf, url=None):
kwargs['url'] = url kwargs['url'] = url
try: try:
mgr = driver.DriverManager('openstack.common.messaging.drivers', mgr = driver.DriverManager('oslo.messaging.drivers',
rpc_backend, rpc_backend,
invoke_on_load=True, invoke_on_load=True,
invoke_args=[conf], invoke_args=[conf],

View File

@ -15,9 +15,9 @@
from oslo.config import cfg from oslo.config import cfg
from openstack.common import messaging from oslo import messaging
from openstack.common.messaging.rpc import client as rpc_client from oslo.messaging.rpc import client as rpc_client
from openstack.common.messaging import serializer as msg_serializer from oslo.messaging import serializer as msg_serializer
from tests import utils as test_utils from tests import utils as test_utils
# FIXME(markmc): I'm having touble using testscenarios with nose # FIXME(markmc): I'm having touble using testscenarios with nose

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common import messaging from oslo import messaging
from openstack.common.messaging import serializer as msg_serializer from oslo.messaging import serializer as msg_serializer
from tests import utils as test_utils from tests import utils as test_utils
# FIXME(markmc): I'm having touble using testscenarios with nose # FIXME(markmc): I'm having touble using testscenarios with nose

View File

@ -17,7 +17,7 @@ import threading
from oslo.config import cfg from oslo.config import cfg
from openstack.common import messaging from oslo import messaging
from tests import utils as test_utils from tests import utils as test_utils

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstack.common import messaging from oslo import messaging
from tests import utils as test_utils from tests import utils as test_utils
# FIXME(markmc): I'm having touble using testscenarios with nose # FIXME(markmc): I'm having touble using testscenarios with nose

View File

@ -20,8 +20,8 @@ import mox
from oslo.config import cfg from oslo.config import cfg
from stevedore import driver from stevedore import driver
from openstack.common import messaging from oslo import messaging
from openstack.common.messaging import transport from oslo.messaging import transport
from tests import utils as test_utils from tests import utils as test_utils
# FIXME(markmc): I'm having touble using testscenarios with nose # 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'] invoke_kwds['url'] = self.expect['url']
drvr = _FakeDriver(self.conf) drvr = _FakeDriver(self.conf)
driver.DriverManager('openstack.common.messaging.drivers', driver.DriverManager('oslo.messaging.drivers',
self.expect['backend'], self.expect['backend'],
invoke_on_load=True, invoke_on_load=True,
invoke_args=invoke_args, invoke_args=invoke_args,
@ -166,7 +166,7 @@ class GetTransportTestCase(test_utils.BaseTestCase):
if self.expect['url']: if self.expect['url']:
invoke_kwds['url'] = self.expect['url'] invoke_kwds['url'] = self.expect['url']
driver.DriverManager('openstack.common.messaging.drivers', driver.DriverManager('oslo.messaging.drivers',
self.expect['backend'], self.expect['backend'],
invoke_on_load=True, invoke_on_load=True,
invoke_args=invoke_args, invoke_args=invoke_args,