summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-12-09 15:49:02 +0000
committerGerrit Code Review <review@openstack.org>2015-12-09 15:49:02 +0000
commitbdd6353c9175db0a314e217d90f9e79d03cf2cad (patch)
treedc660f0cc24bcedcc2a4222073cd69baef79500a
parent251df0ec1b859b5c9756185f985004c7ec23fced (diff)
parent050024f7984397010c38cbfb8626112d33cbec43 (diff)
downloadoslo-messaging-bdd6353c9175db0a314e217d90f9e79d03cf2cad.tar.gz
Merge "Fix notifier options registration"
-rw-r--r--oslo_messaging/notify/notifier.py4
-rwxr-xr-xtools/simulator.py14
2 files changed, 11 insertions, 7 deletions
diff --git a/oslo_messaging/notify/notifier.py b/oslo_messaging/notify/notifier.py
index fb84164..cc4f2eb 100644
--- a/oslo_messaging/notify/notifier.py
+++ b/oslo_messaging/notify/notifier.py
@@ -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)
diff --git a/tools/simulator.py b/tools/simulator.py
index 3c587d5..03afe08 100755
--- a/tools/simulator.py
+++ b/tools/simulator.py
@@ -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"