Remove deprecated oslo_messaging.get_transport

DeprecationWarning:
Using method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport.
Replace get_transport with get_rpc_transport.

Change-Id: I437650a4a3f16e20922d5010fd73765035c3e95b
This commit is contained in:
ritesh.arya 2017-06-30 17:28:45 +05:30 committed by Ritesh
parent 110002a7e8
commit 62ca33fc03
4 changed files with 5 additions and 5 deletions

View File

@ -29,6 +29,6 @@ class BaseController(rest.RestController):
def __init__(self):
super(BaseController, self).__init__()
transport = messaging.get_transport(cfg.CONF)
transport = messaging.get_rpc_transport(cfg.CONF)
target = messaging.Target(topic='test_rpc', server='server1')
self.client = messaging.RPCClient(transport, target)

View File

@ -151,7 +151,7 @@ class CerberusManager(service.CerberusService):
self.notification_server = None
super(CerberusManager, self).start()
transport = messaging.get_transport(cfg.CONF)
transport = messaging.get_rpc_transport(cfg.CONF)
self.notifier = notifications._get_notifier()
targets = []
plugins = []

View File

@ -16,7 +16,7 @@
import socket
from oslo.config import cfg
from oslo import messaging
import oslo_messaging as messaging
from cerberus.openstack.common.gettextutils import _ # noqa
from cerberus.openstack.common import log
@ -50,7 +50,7 @@ def _get_notifier():
if _notifier is None:
host = cfg.CONF.default_publisher_id or socket.gethostname()
try:
transport = messaging.get_transport(cfg.CONF)
transport = messaging.get_rpc_transport(cfg.CONF)
_notifier = messaging.Notifier(transport, "security.%s" % host,
topic=cfg.CONF.notifier_topic)
except Exception:

View File

@ -9,7 +9,7 @@ greenlet>=0.3.2,<=0.4.5
lockfile>=0.8,<=0.10.2
MySQL-python<=1.2.5
oslo.config>=1.2.0,<1.5
oslo.messaging>=1.3.0,<1.5
oslo.messaging!=5.25.0,>=5.24.2
oslo.utils<2.0.0
oslo.serialization<1.7.0
pecan>=0.4.5,<=0.8.3