summaryrefslogtreecommitdiff
path: root/kvmd/apps
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-04-10 21:40:34 +0300
committerDevaev Maxim <[email protected]>2019-04-10 21:40:34 +0300
commit07c59485fcef43a8a3dc122d05c7352a3da8aa15 (patch)
treeed03ed4c9a314f1be301f90cc5bba64eff4ecbc7 /kvmd/apps
parent4eb89c9399d3bd440577d275a9c07578c2f47484 (diff)
moar validators
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index 77a9644b..3a653d11 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -51,9 +51,12 @@ from ..validators.basic import valid_number
from ..validators.basic import valid_int_f1
from ..validators.basic import valid_float_f01
+from ..validators.auth import valid_users_list
+
from ..validators.fs import valid_abs_path
from ..validators.fs import valid_abs_path_exists
from ..validators.fs import valid_unix_mode
+from ..validators.fs import valid_command
from ..validators.net import valid_ip_or_host
from ..validators.net import valid_port
@@ -150,7 +153,7 @@ def _get_config_scheme() -> Dict:
},
"auth": {
- "internal_users": Option([]),
+ "internal_users": Option([], type=valid_users_list),
"internal_type": Option("htpasswd"),
"external_type": Option(""),
# "internal": {},
@@ -222,7 +225,7 @@ def _get_config_scheme() -> Dict:
"unix": Option("", type=valid_abs_path, only_if="!port", unpack_as="unix_path"),
"timeout": Option(2.0, type=valid_float_f01),
- "cmd": Option(["/bin/true"]), # TODO: Validator
+ "cmd": Option(["/bin/true"], type=valid_command),
},
},