summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-01-27 16:11:11 +0100
committerLinus Nordberg <linus@nordu.net>2017-02-01 10:46:27 +0100
commitc0d8aceccb0961a25ee58a163441bbcbe6d6ea3d (patch)
tree90c98ad5f286a2475c1dd04ca7ddd70df6669aea /tools/compileconfig.py
parent50667bc5c4896557415ab28269d2aea3ac534bf4 (diff)
Verify config file signature
Read log key from config file in more places. Check STH signature in storagegc.py
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-xtools/compileconfig.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py
index 0ee3fab..b5e5053 100755
--- a/tools/compileconfig.py
+++ b/tools/compileconfig.py
@@ -5,7 +5,7 @@
import argparse
import sys
-import yaml
+import readconfig
import re
import base64
@@ -405,7 +405,6 @@ def gen_testmakefile(config, testmakefile, machines, shellvars=False):
configfile.close()
-
def main():
parser = argparse.ArgumentParser(description="")
parser.add_argument('--config', help="System configuration", required=True)
@@ -415,13 +414,16 @@ def main():
parser.add_argument("--machines", type=int, metavar="n", help="Number of machines")
args = parser.parse_args()
- config = yaml.load(open(args.config))
if args.testmakefile and args.machines:
+ config = readconfig.read_config(args.config)
gen_testmakefile(config, args.testmakefile, args.machines)
elif args.testshellvars and args.machines:
+ config = readconfig.read_config(args.config)
gen_testmakefile(config, args.testshellvars, args.machines, shellvars=True)
elif args.localconfig:
- localconfig = yaml.load(open(args.localconfig))
+ localconfig = readconfig.read_config(args.localconfig)
+ config = readconfig.verify_and_read_config(args.config, localconfig["logadminkey"])
+
localnodes = localconfig["localnodes"]
for localnode in localnodes:
gen_config(localnode, config, localconfig)