Merge "Change oslo.messaging to oslo_messaging"

This commit is contained in:
Jenkins 2015-02-09 23:22:15 +00:00 committed by Gerrit Code Review
commit 89dac6262d
4 changed files with 20 additions and 7 deletions

View File

@ -13,7 +13,7 @@
# under the License.
from oslo.config import cfg
from oslo import messaging
import oslo_messaging
_DEFAULT_AUTH_METHODS = ['external', 'password', 'token']
@ -967,7 +967,7 @@ FILE_OPTIONS = {
CONF = cfg.CONF
messaging.set_transport_defaults(control_exchange='keystone')
oslo_messaging.set_transport_defaults(control_exchange='keystone')
def _register_auth_plugin_opt(conf, option):

View File

@ -399,8 +399,8 @@ class CheckForLoggingIssues(BaseASTChecker):
def check_oslo_namespace_imports(logical_line, blank_before, filename):
oslo_namespace_imports = re.compile(
r"(((from)|(import))\s+oslo\.((serialization)|(utils)))|"
"(from\s+oslo\s+import\s+((serialization)|(utils)))")
r"(((from)|(import))\s+oslo\.((messaging)|(serialization)|(utils)))|"
"(from\s+oslo\s+import\s+((messaging)|(serialization)|(utils)))")
if re.match(oslo_namespace_imports, logical_line):
msg = ("K333: '%s' must be used instead of '%s'.") % (

View File

@ -20,7 +20,7 @@ import logging
import socket
from oslo.config import cfg
from oslo import messaging
import oslo_messaging
import pycadf
from pycadf import cadftaxonomy as taxonomy
from pycadf import cadftype
@ -198,8 +198,9 @@ def _get_notifier():
if _notifier is None:
host = CONF.default_publisher_id or socket.gethostname()
try:
transport = messaging.get_transport(CONF)
_notifier = messaging.Notifier(transport, "identity.%s" % host)
transport = oslo_messaging.get_transport(CONF)
_notifier = oslo_messaging.Notifier(transport,
"identity.%s" % host)
except Exception:
LOG.exception(_LE("Failed to construct notifier"))
_notifier = False

View File

@ -196,6 +196,14 @@ class HackingCode(fixtures.Fixture):
from oslo import serialization
from oslo.serialization import jsonutils
from oslo_serialization import jsonutils
import oslo.messaging
import oslo_messaging
import oslo.messaging.conffixture
import oslo_messaging.conffixture
from oslo import messaging
from oslo.messaging import conffixture
from oslo_messaging import conffixture
""",
'expected_errors': [
(1, 0, 'K333'),
@ -206,6 +214,10 @@ class HackingCode(fixtures.Fixture):
(11, 0, 'K333'),
(13, 0, 'K333'),
(14, 0, 'K333'),
(17, 0, 'K333'),
(19, 0, 'K333'),
(21, 0, 'K333'),
(22, 0, 'K333'),
],
}