diff options
author | Devaev Maxim <[email protected]> | 2020-10-02 10:22:43 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-09 03:51:19 +0300 |
commit | 5bfde6ceae5af9c47c7a86a6ee1d9fb180b39b54 (patch) | |
tree | 7d02fbc1b2170c009c4be099d1e5a75f35bc32e9 /kvmd/apps/__init__.py | |
parent | 3c4d38f7551c9bd69ac4646d7704fc271e32bdc3 (diff) |
otgnet stubs
Diffstat (limited to 'kvmd/apps/__init__.py')
-rw-r--r-- | kvmd/apps/__init__.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py index 10a331da..a882e0d7 100644 --- a/kvmd/apps/__init__.py +++ b/kvmd/apps/__init__.py @@ -77,7 +77,9 @@ 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_net from ..validators.net import valid_port +from ..validators.net import valid_ports_list from ..validators.net import valid_mac from ..validators.net import valid_ssl_ciphers @@ -426,6 +428,26 @@ def _get_config_scheme() -> Dict: }, }, + "otgnet": { + "iface": { + "net": Option("169.254.0.100/31", type=functools.partial(valid_net, v6=False)), + }, + + "firewall": { + "allow_tcp": Option([], type=valid_ports_list), + "allow_udp": Option([], type=valid_ports_list), + }, + + "dhcp": { + "enabled": Option(True, type=valid_bool), + }, + + "commands": { + "ip_cmd": Option(["/usr/bin/ip"], type=valid_command), + "iptables_cmd": Option(["/usr/bin/iptables"], type=valid_command), + }, + }, + "ipmi": { "server": { "host": Option("::", type=valid_ip_or_host), |