summaryrefslogtreecommitdiff
path: root/kvmd/apps/__init__.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-11-29 01:35:38 +0300
committerDevaev Maxim <[email protected]>2019-11-29 01:35:38 +0300
commit3d8f16b9c60cc2ef8547e62f968b5faedf1d8094 (patch)
tree4addbab851f2ad68932d88249ea812ac74b1d957 /kvmd/apps/__init__.py
parent51e15d01c28556f47be849604ee5e52f18ffdd5d (diff)
wake-on-lan back
Diffstat (limited to 'kvmd/apps/__init__.py')
-rw-r--r--kvmd/apps/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index 1654ec4c..d06e09a3 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -66,7 +66,9 @@ from ..validators.os import valid_unix_mode
from ..validators.os import valid_command
from ..validators.net import valid_ip_or_host
+from ..validators.net import valid_ip
from ..validators.net import valid_port
+from ..validators.net import valid_mac
from ..validators.kvm import valid_stream_quality
from ..validators.kvm import valid_stream_fps
@@ -212,6 +214,12 @@ def _get_config_scheme() -> Dict:
"extras": Option("/usr/share/kvmd/extras", type=valid_abs_dir, unpack_as="extras_path"),
},
+ "wol": {
+ "ip": Option("255.255.255.255", type=(lambda arg: valid_ip(arg, v6=False))),
+ "port": Option(9, type=valid_port),
+ "mac": Option("", type=(lambda arg: (valid_mac(arg) if arg else ""))),
+ },
+
"hid": {
"type": Option("", type=valid_stripped_string_not_empty),
# Dynamic content