Fix notifier options registration
Change-Id: I37082f6f349e89af6b74e6ec5e5c416902299263
This commit is contained in:
parent
52ccff7cbc
commit
050024f798
@ -90,9 +90,9 @@ class Driver(object):
|
||||
|
||||
def get_notification_transport(conf, url=None,
|
||||
allowed_remote_exmods=None, aliases=None):
|
||||
conf.register_opts(_notifier_opts,
|
||||
group='oslo_messaging_notifications')
|
||||
if url is None:
|
||||
conf.register_opts(_notifier_opts,
|
||||
group='oslo_messaging_notifications')
|
||||
url = conf.oslo_messaging_notifications.transport_url
|
||||
return msg_transport.get_transport(conf, url,
|
||||
allowed_remote_exmods, aliases)
|
||||
|
@ -281,16 +281,20 @@ def main():
|
||||
|
||||
_setup_logging(is_debug=args.debug)
|
||||
|
||||
if args.mode in ['rpc-server', 'rpc-client']:
|
||||
transport = messaging.get_transport(cfg.CONF, url=args.url)
|
||||
else:
|
||||
transport = messaging.get_notification_transport(cfg.CONF,
|
||||
url=args.url)
|
||||
cfg.CONF.oslo_messaging_notifications.topics = "notif"
|
||||
cfg.CONF.oslo_messaging_notifications.driver = "messaging"
|
||||
target = messaging.Target(topic=args.topic, server='profiler_server')
|
||||
|
||||
# oslo.config defaults
|
||||
cfg.CONF.heartbeat_interval = 5
|
||||
cfg.CONF.oslo_messaging_notifications.topics = "notif"
|
||||
cfg.CONF.oslo_messaging_notifications.driver = "messaging"
|
||||
cfg.CONF.prog = os.path.basename(__file__)
|
||||
cfg.CONF.project = 'oslo.messaging'
|
||||
|
||||
transport = messaging.get_transport(cfg.CONF, url=args.url)
|
||||
target = messaging.Target(topic=args.topic, server='profiler_server')
|
||||
|
||||
if args.mode == 'rpc-server':
|
||||
if args.url.startswith('zmq'):
|
||||
cfg.CONF.rpc_zmq_matchmaker = "redis"
|
||||
|
Loading…
Reference in New Issue
Block a user