summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-15 13:32:48 +0000
committerGerrit Code Review <review@openstack.org>2016-02-15 13:32:49 +0000
commitb80fdc850dd76b3ef45b2d2deaa2d5d24678d1f8 (patch)
treeaf22ac89332712d93517b3b9f79eb9ad107ea307 /tools
parenta9b09c8c957b27559a0e71673c8b8d2d3b9505df (diff)
parent3c0a48aacea94e78a977a3edea919b741df19995 (diff)
downloadoslo-messaging-b80fdc850dd76b3ef45b2d2deaa2d5d24678d1f8.tar.gz
Merge "simulator.py improvements"4.3.0
Diffstat (limited to 'tools')
-rwxr-xr-xtools/simulator.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/simulator.py b/tools/simulator.py
index 8c5c85e..c693c83 100755
--- a/tools/simulator.py
+++ b/tools/simulator.py
@@ -363,7 +363,7 @@ def main():
help='number of call per threads')
client.add_argument('-w', dest='wait_after_msg', type=int, default=-1,
help='sleep time between two messages')
- client.add_argument('-t', dest='timeout', type=int, default=3,
+ client.add_argument('--timeout', dest='timeout', type=int, default=3,
help='client timeout')
server = subparsers.add_parser('rpc-server')
@@ -381,13 +381,15 @@ def main():
help='number of call per threads')
client.add_argument('-w', dest='wait_after_msg', type=int, default=-1,
help='sleep time between two messages')
- client.add_argument('-t', dest='timeout', type=int, default=3,
+ client.add_argument('--timeout', dest='timeout', type=int, default=3,
help='client timeout')
client.add_argument('--exit-wait', dest='exit_wait', type=int, default=0,
help='Keep connections open N seconds after calls '
'have been done')
client.add_argument('--is-cast', dest='is_cast', type=bool, default=False,
help='Use `call` or `cast` RPC methods')
+ client.add_argument('--is-fanout', dest='is_fanout', type=bool,
+ default=False, help='fanout=True for CAST messages')
args = parser.parse_args()
@@ -401,8 +403,6 @@ def main():
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"
# oslo.config defaults
cfg.CONF.heartbeat_interval = 5
@@ -426,8 +426,9 @@ def main():
init_msg(args.messages)
targets = [target.partition('.')[::2] for target in args.targets]
start = datetime.datetime.now()
- targets = [messaging.Target(topic=topic, server=server_name) for topic,
- server_name in targets]
+ targets = [messaging.Target(
+ topic=topic, server=server_name, fanout=args.is_fanout) for
+ topic, server_name in targets]
spawn_rpc_clients(args.threads, transport, targets,
args.wait_after_msg, args.timeout, args.is_cast,
args.messages, args.duration)