Still need to work on validation

This commit is contained in:
Donald Zou
2025-08-16 01:51:18 +08:00
parent 3e3047f23e
commit 88f40b244a
4 changed files with 152 additions and 10 deletions

View File

@@ -1109,6 +1109,13 @@ class WireguardConfiguration:
def updateConfigurationInfo(self, key: str, value) -> tuple[bool, str] | tuple[bool, None]:
if key == "Description":
self.configurationInfo.Description = value
elif key == "OverridePeerSettings":
for key in value.keys():
if key == "DNS" and value.get("DNS"):
pass
self.configurationInfo.OverridePeerSettings = (
self.configurationInfo.OverridePeerSettings.model_validate(value))
else:
return False, "Key does not exist"