Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make epuharness dashi sysname aware

  • Loading branch information...
commit ad814dfdb3da7dc299d6a3efa2e2f31b732611f5 1 parent 42f0767
@oldpatricka oldpatricka authored
Showing with 6 additions and 2 deletions.
  1. +3 −1 epuharness/cli.py
  2. +3 −1 epuharness/harness.py
View
4 epuharness/cli.py
@@ -28,12 +28,14 @@ def main(argv=None):
parser.add_argument('-c', '--config', metavar='CONFIG_FILE', default=None)
parser.add_argument('-x', '--exchange', metavar='EXCHANGE_NAME',
default=None)
+ parser.add_argument('-s', '--sysname', metavar='SYSNAME',
+ default=None)
parser.add_argument('action', metavar='ACTION', help='start or stop')
parser.add_argument('extras', help='deployment config file for start, or services to stop',
default=[], nargs='*')
args = parser.parse_args(argv)
- epuharness = EPUHarness(exchange=args.exchange, config=args.config)
+ epuharness = EPUHarness(exchange=args.exchange, config=args.config, sysname=args.sysname)
action = args.action.lower()
if action == 'start':
View
4 epuharness/harness.py
@@ -28,13 +28,14 @@ class EPUHarness(object):
"""EPUHarness. Sets up Process Dispatchers and EEAgents for testing.
"""
- def __init__(self, exchange=None, pidantic_dir=None, amqp_uri=None, config=None):
+ def __init__(self, exchange=None, pidantic_dir=None, amqp_uri=None, config=None, sysname=None):
configs = ["epuharness"]
config_files = get_config_paths(configs)
if config:
config_files.append(config)
self.CFG = bootstrap.configure(config_files)
+ self.sysname = sysname
self.logdir = self.CFG.epuharness.logdir
self.pidantic_dir = (pidantic_dir or
@@ -42,6 +43,7 @@ def __init__(self, exchange=None, pidantic_dir=None, amqp_uri=None, config=None)
self.CFG.epuharness.pidantic_dir)
self.exchange = exchange or self.CFG.server.amqp.get('exchange', None) or str(uuid.uuid4())
self.CFG.server.amqp.exchange = self.exchange
+ self.CFG.dashi.sysname = sysname
self.dashi = bootstrap.dashi_connect(self.CFG.dashi.topic, self.CFG, amqp_uri=amqp_uri)
self.amqp_cfg = dict(self.CFG.server.amqp)
Please sign in to comment.
Something went wrong with that request. Please try again.