diff options
author | khilman <khilman@users.noreply.github.com> | 2018-09-05 14:34:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 14:34:33 -0700 |
commit | 633bfd4bf6b24cc555829620e96116e07b5561cc (patch) | |
tree | 02ded8d0b9ca7277815015ddd7dc2e2d35d17d93 /lavalab-gen.py | |
parent | e78393f83a78ec48808fc0540f9e64f978b327a6 (diff) | |
parent | e21ccee9df4afba55811e58e3d6943a076a56154 (diff) |
Merge pull request #42 from montjoie/fix_09_2018
Fix 09 2018
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-x | lavalab-gen.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py index 597bd1a..b327813 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -219,7 +219,7 @@ def main(): sys.exit(1) slaves = workers["slaves"] for slave in slaves: - keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret" ] + keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave" ] for keyword in slave: if not keyword in keywords_slaves: print("WARNING: unknown keyword %s" % keyword) @@ -331,29 +331,29 @@ def main(): for board in boards: board_name = board["name"] if "slave" in board: - slave_name = board["slave"] + worker_name = board["slave"] else: - slave_name = default_slave - print("\tFound %s on %s" % (board_name, slave_name)) + worker_name = default_slave + print("\tFound %s on %s" % (board_name, worker_name)) found_slave = False for fs in workers["slaves"]: - if fs["name"] == slave_name: + if fs["name"] == worker_name: slave = fs found_slave = True if not found_slave: - print("Cannot find slave %s" % slave_name) + print("Cannot find slave %s" % worker_name) sys.exit(1) if not "host" in slave: host = "local" else: host = slave["host"] - workerdir = "output/%s/%s" % (host, slave_name) + workerdir = "output/%s/%s" % (host, worker_name) dockcomposeymlpath = "output/%s/docker-compose.yml" % host fp = open(dockcomposeymlpath, "r") dockcomp = yaml.load(fp) fp.close() device_path = "%s/devices/" % workerdir - devices_path = "%s/devices/%s" % (workerdir, slave_name) + devices_path = "%s/devices/%s" % (workerdir, worker_name) devicetype = board["type"] device_line = template_device.substitute(devicetype=devicetype) if "pdu_generic" in board: |