diff options
author | Magnus Ahltorp <map@kth.se> | 2017-07-18 09:23:54 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2017-07-18 09:23:54 +0200 |
commit | b7074968b4f02a5201ce1092351ee36277fa3953 (patch) | |
tree | 9f4c2182d995284144fcceff2fd063b7bd678e14 /tools/configschema.py | |
parent | bb67c23918ba22be498537a29c01b696732d5b3b (diff) |
Added formalized config defaults
Refactor reading of config
Move config schemas to separate file
Diffstat (limited to 'tools/configschema.py')
-rw-r--r-- | tools/configschema.py | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tools/configschema.py b/tools/configschema.py new file mode 100644 index 0000000..9bb4b15 --- /dev/null +++ b/tools/configschema.py @@ -0,0 +1,65 @@ +# Copyright (c) 2017, NORDUnet A/S. +# See LICENSE for licensing information. + +localconfigschema = [ + ("nodename", "string", "nodename"), + ("frontendaddress", "string", "ip address"), + ("ctapiaddress", "string", "ip address"), + ("storageaddress", "string", "ip address"), + ("signingaddress", "string", "ip address"), + ("mergeaddress", "string", "ip address"), + ("publichttpaddress", "string", "ip address"), + ("configurl", "string", "url"), + ("logadminkey", "string", "key"), + ("dbbackend", "string", ["permdb", "fsdb"]), + ("paths/configdir", "string", "path"), + ("paths/db", "string", "path"), + ("paths/https_cacertfile", "string", "path"), + ("paths/https_certfile", "string", "path"), + ("paths/https_keyfile", "string", "path"), + ("paths/knownroots", "string", "path"), + ("paths/logpublickey", "string", "path"), + ("paths/privatekeys", "string", "path"), + ("paths/public_cacertfile", "string", "path"), + ("paths/publickeys", "string", "path"), + ("paths/verifycert_bin", "string", "path"), + ("paths/mergedb", "string", "path"), + ("paths/logprivatekey", "string", "path"), + ("ratelimits/add_chain", "string", "rate"), + ("merge/min-delay", "integer", "seconds"), + ("merge/backup-window-size", "integer", "number of entries"), + ("merge/backup-sendlog-chunksize", "integer", "number of entries"), + ("merge/backup-sendentries-chunksize", "integer", "number of entries"), + ("merge/dist-window-size", "integer", "number of entries"), + ("merge/dist-sendlog-chunksize", "integer", "number of entries"), + ("merge/dist-sendentries-chunksize", "integer", "number of entries"), +] + +globalconfigschema = [ + ("frontendnodes/[]/name", "string", "nodename"), + ("frontendnodes/[]/address", "string", "ip address"), + ("frontendnodes/[]/publicaddress", "string", "ip address"), + ("mergenodes/[]/name", "string", "nodename"), + ("mergenodes/[]/address", "string", "ip address"), + ("signingnodes/[]/name", "string", "nodename"), + ("signingnodes/[]/address", "string", "ip address"), + ("storagenodes/[]/name", "string", "nodename"), + ("storagenodes/[]/address", "string", "ip address"), + ("statusservers/[]/name", "string", "nodename"), + ("statusservers/[]/address", "string", "ip address"), + ("statusservers/[]/publicaddress", "string", "ip address"), + ("apikeys/[]/nodename", "string", "nodename"), + ("apikeys/[]/publickey", "string", "key"), + ("baseurl", "string", "url"), + ("primarymergenode", "string", "nodename"), + ("storage-quorum-size", "integer", "number of nodes"), + ("backup-quorum-size", "integer", "number of nodes"), + ("logpublickey", "string", "key"), + ("cafingerprint", "string", "fingerprint"), + ("version", "integer", "version"), + ("mmd", "integer", "seconds"), +] + +globalconfigdefaults = [ + ("statusservers", []), +] |