summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-xtools/compileconfig.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py
index b5e5053..28d01b0 100755
--- a/tools/compileconfig.py
+++ b/tools/compileconfig.py
@@ -365,6 +365,7 @@ def gen_config(nodename, config, localconfig):
(Symbol("allowed_clients"), list(allowed_clients)),
(Symbol("allowed_servers"), list(allowed_servers)),
(Symbol("apikeys"), apikeys),
+ (Symbol("version"), config["version"]),
]
erlangconfig = [
@@ -405,12 +406,21 @@ def gen_testmakefile(config, testmakefile, machines, shellvars=False):
configfile.close()
+def printnodenames(config):
+ frontendnodenames = set([node["name"] for node in config["frontendnodes"]])
+ storagenodenames = set([node["name"] for node in config["storagenodes"]])
+ signingnodenames = set([node["name"] for node in config["signingnodes"]])
+ mergenodenames = set([node["name"] for node in config["mergenodes"]])
+
+ print " ".join(frontendnodenames|storagenodenames|signingnodenames|mergenodenames)
+
def main():
parser = argparse.ArgumentParser(description="")
parser.add_argument('--config', help="System configuration", required=True)
parser.add_argument('--localconfig', help="Local configuration")
parser.add_argument("--testmakefile", metavar="file", help="Generate makefile variables for test")
parser.add_argument("--testshellvars", metavar="file", help="Generate shell variable file for test")
+ parser.add_argument("--getnodenames", action='store_true', help="Get list of node names")
parser.add_argument("--machines", type=int, metavar="n", help="Number of machines")
args = parser.parse_args()
@@ -420,6 +430,9 @@ def main():
elif args.testshellvars and args.machines:
config = readconfig.read_config(args.config)
gen_testmakefile(config, args.testshellvars, args.machines, shellvars=True)
+ elif args.getnodenames:
+ config = readconfig.read_config(args.config)
+ printnodenames(config)
elif args.localconfig:
localconfig = readconfig.read_config(args.localconfig)
config = readconfig.verify_and_read_config(args.config, localconfig["logadminkey"])