modified: netbox_services/engine/__init__.py

modified:   netbox_services/engine/allocators.py
modified:   netbox_services/engine/context.py
new file:   netbox_services/engine/mappers.py
modified:   netbox_services/engine/resolver.py
new file:   netbox_services/engine/templating.py
modified:   netbox_services/forms.py
modified:   netbox_services/models.py
modified:   netbox_services/tests/test_allocators.py
new file:   netbox_services/tests/test_mappers.py
modified:   netbox_services/tests/test_resolver.py
new file:   netbox_services/tests/test_templating.py
Simplify layout to template and service instances
This commit is contained in:
sven committed 2026-08-17 15:12:42 +02:00
1 parent 4ff9eac274
commit b1c9c7a40b
12 files changed
+1133 -33

No files matched your search

+2
View File
@@ -112,6 +112,8 @@ def validate_tree(tree):
raise ValidationError({"tree": _(f"Node '{name}': selector must be a dict.")})
if allocation and not isinstance(allocation, dict):
raise ValidationError({"tree": _(f"Node '{name}': allocation must be a dict.")})
if allocation and "attrs" in allocation and not isinstance(allocation["attrs"], dict):
raise ValidationError({"tree": _(f"Node '{name}': allocation.attrs must be a dict.")})
scope = node.get("scope", "parent")
if scope not in RequirementScopeChoices.values():