Use 'get_rpc_transport' for RPC clients and servers.
Currently uses 'get_notification_transport' for RPC. Notification transports are for oslo.messaging notifications, not RPC. Change-Id: I787c230e0eb3b1ce8500ec76b1319684520aa512 Closes-Bug: #1699597
This commit is contained in:
parent
0b13eaab4e
commit
d192827e29
|
@ -46,7 +46,7 @@ class BaseProducer(abstract_handler.BaseObjectHandler):
|
|||
|
||||
def __init__(self):
|
||||
topic = cfg.CONF.oslo_messaging.topic
|
||||
self.transport = messaging.get_notification_transport(cfg.CONF)
|
||||
self.transport = messaging.get_rpc_transport(cfg.CONF)
|
||||
self.target = messaging.Target(
|
||||
namespace=constants.RPC_NAMESPACE_CONTROLLER_AGENT,
|
||||
topic=topic, version="1.0", fanout=False)
|
||||
|
|
|
@ -35,7 +35,7 @@ class ConsumerService(cotyledon.Service):
|
|||
|
||||
def run(self):
|
||||
LOG.info('Starting consumer...')
|
||||
transport = messaging.get_notification_transport(self.conf)
|
||||
transport = messaging.get_rpc_transport(self.conf)
|
||||
target = messaging.Target(topic=self.topic, server=self.server,
|
||||
fanout=False)
|
||||
self.endpoints = [endpoint.Endpoint()]
|
||||
|
|
|
@ -60,7 +60,7 @@ class EventStreamerNeutron(EventStreamerBase):
|
|||
|
||||
def __init__(self):
|
||||
topic = cfg.CONF.oslo_messaging.event_stream_topic
|
||||
self.transport = oslo_messaging.get_notification_transport(cfg.CONF)
|
||||
self.transport = oslo_messaging.get_rpc_transport(cfg.CONF)
|
||||
self.target = oslo_messaging.Target(topic=topic, exchange="common",
|
||||
namespace='control', fanout=False,
|
||||
version='1.0')
|
||||
|
|
|
@ -23,7 +23,7 @@ from octavia.controller.queue import endpoint
|
|||
from octavia.tests.unit import base
|
||||
|
||||
|
||||
@mock.patch.object(messaging, 'get_notification_transport')
|
||||
@mock.patch.object(messaging, 'get_rpc_transport')
|
||||
@mock.patch.object(messaging, 'Target')
|
||||
@mock.patch.object(endpoint, 'Endpoint')
|
||||
@mock.patch.object(messaging, 'get_rpc_server')
|
||||
|
|
Loading…
Reference in New Issue