Allow separate URLs for omsimulator client and server

This commit is contained in:
Ilya Shakhat 2016-03-23 13:14:08 +03:00
parent 52e5dc905f
commit 9e496e5d67
2 changed files with 10 additions and 1 deletions

View File

@ -110,11 +110,14 @@ def run(module):
params['server_file'] = SERVER_FILE_NAME params['server_file'] = SERVER_FILE_NAME
params['client_file'] = CLIENT_FILE_NAME params['client_file'] = CLIENT_FILE_NAME
params['url'] = params['server_url'] or params['url']
server = ('%(python)s simulator.py ' server = ('%(python)s simulator.py '
# '--topic %(topic)s ' # '--topic %(topic)s '
'--url %(url)s ' '--url %(url)s '
'--json %(server_file)s ' '--json %(server_file)s '
'%(server_tool)s ') % params '%(server_tool)s ') % params
params['url'] = params['client_url'] or params['url']
client = ('%(python)s simulator.py ' client = ('%(python)s simulator.py '
# '--topic %(topic)s ' # '--topic %(topic)s '
'--url=%(url)s ' '--url=%(url)s '
@ -178,6 +181,8 @@ def main():
mode=dict(required=True, mode=dict(required=True,
choices=['call', 'cast', 'fanout', 'notify']), choices=['call', 'cast', 'fanout', 'notify']),
url=dict(required=True), url=dict(required=True),
client_url=dict(),
server_url=dict(),
threads=dict(type='int', default=10), threads=dict(type='int', default=10),
duration=dict(type='int', default=10), duration=dict(type='int', default=10),
timeout=dict(type='int', default=5), timeout=dict(type='int', default=5),

View File

@ -5,7 +5,9 @@ description:
parameters: parameters:
tester_hosts: List of hosts were omsimulator will be executed tester_hosts: List of hosts were omsimulator will be executed
rabbit_url: RabbitMQ address rabbit_url: RabbitMQ address used by both server and client
client_url: RabbitMQ address used by the client
server_url: RabbitMQ address used by the server
setup: setup:
- -
@ -40,6 +42,8 @@ execution:
threads: 1 threads: 1
host_count: 1 host_count: 1
url: {{ rabbit_url }} url: {{ rabbit_url }}
client_url: {{ client_url }}
server_url: {{ server_url }}
report: report:
template: omsimulator-ha-call.rst template: omsimulator-ha-call.rst