merge: refresh runtime configuration PR 1305

This commit is contained in:
Andreas
2026-09-16 18:10:39 +02:00
3 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -807,9 +807,7 @@ class ConfigEOS(SingletonMixin, SettingsEOSDefaults):
)
elif isinstance(setting, list):
setting = [
item.model_dump(
exclude_none=True, exclude_unset=True, exclude_computed_fields=True
)
item.model_dump(exclude_none=True, exclude_unset=True, exclude_computed_fields=True)
if isinstance(item, SettingsBaseModel)
else item
for item in setting
-1
View File
@@ -113,7 +113,6 @@ def merge_models(source: BaseModel, update_dict: dict[str, Any]) -> dict[str, An
Returns:
dict[str, Any]: Merged dictionary representing combined model data.
"""
source_dict = source.model_dump(
exclude_unset=True,
exclude_computed_fields=True,
+1 -2
View File
@@ -81,8 +81,7 @@ def validate_ip_or_hostname(value: str) -> str:
raise ValueError(f"Not a valid hostname: {value}")
hostname_regex = re.compile(
r"^(?=.{1,253}$)(?!-)[A-Z\d-]{1,63}(?<!-)"
r"(?:\.(?!-)[A-Z\d-]{1,63}(?<!-))*\.?$",
r"^(?=.{1,253}$)(?!-)[A-Z\d-]{1,63}(?<!-)" r"(?:\.(?!-)[A-Z\d-]{1,63}(?<!-))*\.?$",
re.IGNORECASE,
)
if not bool(hostname_regex.fullmatch(value)):