Move oslo.messaging to the oslo_messaging namespace

This is the sixth in a series of changes to move to using
the new oslo_<library> namespace that is being used for
oslo libraries.

There is currently a shim in place that is allowing the old
oslo.<library> imports to work, but we need to be prepared for
when the shims go away.  Thus we need patches like this one to
move to the new namespace.

This patch also updates our hacking check to ensure that no
instances of oslo.messaging sneak back in.

Change-Id: Id028f8968717bed49386864081cf150397a6ec5f
Partial-bug: 1409733
This commit is contained in:
Jay S. Bryant 2015-03-02 21:31:46 -06:00
parent 2abbe19ee3
commit 00cb3734ae
17 changed files with 22 additions and 22 deletions

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
from oslo import messaging import oslo_messaging as messaging
from oslo_utils import strutils from oslo_utils import strutils
import webob import webob

View File

@ -33,8 +33,8 @@ Volume backups can be created, restored, deleted and listed.
""" """
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import importutils from oslo_utils import importutils

View File

@ -18,8 +18,8 @@ Client side of the volume backup RPC API.
""" """
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from cinder.openstack.common import log as logging from cinder.openstack.common import log as logging
from cinder import rpc from cinder import rpc

View File

@ -61,9 +61,9 @@ import warnings
warnings.simplefilter('once', DeprecationWarning) warnings.simplefilter('once', DeprecationWarning)
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
from oslo_db.sqlalchemy import migration from oslo_db.sqlalchemy import migration
import oslo_messaging as messaging
from oslo_utils import uuidutils from oslo_utils import uuidutils
from cinder import i18n from cinder import i18n

View File

@ -52,8 +52,8 @@ This module provides Manager, a base class for managers.
""" """
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from cinder.db import base from cinder.db import base
from cinder.openstack.common import log as logging from cinder.openstack.common import log as logging

View File

@ -26,8 +26,8 @@ __all__ = [
'TRANSPORT_ALIASES', 'TRANSPORT_ALIASES',
] ]
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from osprofiler import profiler from osprofiler import profiler

View File

@ -19,8 +19,8 @@
Scheduler Service Scheduler Service
""" """
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import importutils from oslo_utils import importutils

View File

@ -16,8 +16,8 @@
Client side of the scheduler manager RPC API. Client side of the scheduler manager RPC API.
""" """
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from cinder.objects import base as objects_base from cinder.objects import base as objects_base

View File

@ -22,10 +22,10 @@ import inspect
import os import os
import random import random
from oslo import messaging
from oslo_concurrency import processutils from oslo_concurrency import processutils
from oslo_config import cfg from oslo_config import cfg
from oslo_db import exception as db_exc from oslo_db import exception as db_exc
import oslo_messaging as messaging
from oslo_utils import importutils from oslo_utils import importutils
import osprofiler.notifier import osprofiler.notifier
from osprofiler import profiler from osprofiler import profiler

View File

@ -29,10 +29,10 @@ import uuid
import fixtures import fixtures
import mock import mock
import mox import mox
from oslo.messaging import conffixture as messaging_conffixture
from oslo_concurrency import lockutils from oslo_concurrency import lockutils
from oslo_config import cfg from oslo_config import cfg
from oslo_config import fixture as config_fixture from oslo_config import fixture as config_fixture
from oslo_messaging import conffixture as messaging_conffixture
from oslo_utils import strutils from oslo_utils import strutils
from oslo_utils import timeutils from oslo_utils import timeutils
import stubout import stubout

View File

@ -17,8 +17,8 @@ import json
import uuid import uuid
import mock import mock
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
import webob import webob

View File

@ -16,7 +16,7 @@ import collections
import functools import functools
import anyjson import anyjson
from oslo import messaging import oslo_messaging as messaging
from cinder import rpc from cinder import rpc

View File

@ -402,7 +402,7 @@ class TestCinderManageCmd(test.TestCase):
@mock.patch('cinder.rpc.get_client') @mock.patch('cinder.rpc.get_client')
@mock.patch('cinder.rpc.init') @mock.patch('cinder.rpc.init')
@mock.patch('cinder.rpc.initialized', return_value=False) @mock.patch('cinder.rpc.initialized', return_value=False)
@mock.patch('oslo.messaging.Target') @mock.patch('oslo_messaging.Target')
def test_volume_commands_init(self, messaging_target, rpc_initialized, def test_volume_commands_init(self, messaging_target, rpc_initialized,
rpc_init, get_client, object_serializer): rpc_init, get_client, object_serializer):
CONF.set_override('volume_topic', 'fake-topic') CONF.set_override('volume_topic', 'fake-topic')

View File

@ -17,8 +17,8 @@
"""Tests for the testing base code.""" """Tests for the testing base code."""
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from cinder import rpc from cinder import rpc
from cinder import test from cinder import test

View File

@ -39,8 +39,8 @@ intact.
import time import time
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import importutils from oslo_utils import importutils

View File

@ -16,8 +16,8 @@
Client side of the volume RPC API. Client side of the volume RPC API.
""" """
from oslo import messaging
from oslo_config import cfg from oslo_config import cfg
import oslo_messaging as messaging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from cinder.objects import base as objects_base from cinder.objects import base as objects_base

View File

@ -53,12 +53,12 @@ console_scripts =
cinder-volume = cinder.cmd.volume:main cinder-volume = cinder.cmd.volume:main
cinder-volume-usage-audit = cinder.cmd.volume_usage_audit:main cinder-volume-usage-audit = cinder.cmd.volume_usage_audit:main
# These are for backwards compat with Havana notification_driver configuration values # These are for backwards compat with Havana notification_driver configuration values
oslo.messaging.notify.drivers = oslo_messaging.notify.drivers =
cinder.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver cinder.openstack.common.notifier.log_notifier = oslo_messaging.notify._impl_log:LogDriver
cinder.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver cinder.openstack.common.notifier.no_op_notifier = oslo_messaging.notify._impl_noop:NoOpDriver
cinder.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver cinder.openstack.common.notifier.rpc_notifier2 = oslo_messaging.notify._impl_messaging:MessagingV2Driver
cinder.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver cinder.openstack.common.notifier.rpc_notifier = oslo_messaging.notify._impl_messaging:MessagingDriver
cinder.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver cinder.openstack.common.notifier.test_notifier = oslo_messaging.notify._impl_test:TestDriver
cinder.database.migration_backend = cinder.database.migration_backend =
sqlalchemy = oslo_db.sqlalchemy.migration sqlalchemy = oslo_db.sqlalchemy.migration