summaryrefslogtreecommitdiff
path: root/kvmd/validators
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-30 08:29:12 +0300
committerDevaev Maxim <[email protected]>2020-09-30 08:52:00 +0300
commit4bdb06f108543239b7cb3a547f3ace853b590274 (patch)
tree3def9304403be40e6c19d5bc9e1046099555898f /kvmd/validators
parent1b62570466804a2fe0a21bbdccd7a289c8974496 (diff)
configurable ethernet driver
Diffstat (limited to 'kvmd/validators')
-rw-r--r--kvmd/validators/hw.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmd/validators/hw.py b/kvmd/validators/hw.py
index 59a0363d..287786df 100644
--- a/kvmd/validators/hw.py
+++ b/kvmd/validators/hw.py
@@ -23,6 +23,7 @@
from typing import Any
from . import check_in_list
+from . import check_string_in_list
from . import check_re_match
from . import check_len
@@ -51,3 +52,7 @@ def valid_otg_gadget(arg: Any) -> str:
def valid_otg_id(arg: Any) -> int:
return int(valid_number(arg, min=0, max=65535, name="OTG ID"))
+
+
+def valid_otg_ethernet(arg: Any) -> str:
+ return check_string_in_list(arg, "OTG Ethernet driver", ["ecm", "eem", "ncm", "rndis"])