Browse Source

Allow separate URLs for omsimulator client and server

Ilya Shakhat 3 years ago
parent
commit
9e496e5d67
2 changed files with 10 additions and 1 deletions
  1. 5
    0
      performa/modules/omsimulator.py
  2. 5
    1
      performa/scenarios/mq/omsimulator-ha-call.yaml

+ 5
- 0
performa/modules/omsimulator.py View File

@@ -110,11 +110,14 @@ def run(module):
110 110
     params['server_file'] = SERVER_FILE_NAME
111 111
     params['client_file'] = CLIENT_FILE_NAME
112 112
 
113
+    params['url'] = params['server_url'] or params['url']
113 114
     server = ('%(python)s simulator.py '
114 115
               # '--topic %(topic)s '
115 116
               '--url %(url)s '
116 117
               '--json %(server_file)s '
117 118
               '%(server_tool)s ') % params
119
+
120
+    params['url'] = params['client_url'] or params['url']
118 121
     client = ('%(python)s simulator.py '
119 122
               # '--topic %(topic)s '
120 123
               '--url=%(url)s '
@@ -178,6 +181,8 @@ def main():
178 181
             mode=dict(required=True,
179 182
                       choices=['call', 'cast', 'fanout', 'notify']),
180 183
             url=dict(required=True),
184
+            client_url=dict(),
185
+            server_url=dict(),
181 186
             threads=dict(type='int', default=10),
182 187
             duration=dict(type='int', default=10),
183 188
             timeout=dict(type='int', default=5),

+ 5
- 1
performa/scenarios/mq/omsimulator-ha-call.yaml View File

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

Loading…
Cancel
Save