refactor: move transforms/ into infrahub/ and update all paths (#20)
Move transforms/{queries,templates,tests} under infrahub/transforms/ so all
Infrahub-managed content lives under the dedicated infrahub/ directory,
consistent with schemas/, objects/, and menus/.
Updated paths:
- .infrahub.yml: file_path and template_path entries now prefixed with
infrahub/transforms/
- infrahub/transforms/tests/*/test.yml: directory references updated from
transforms/tests/* to infrahub/transforms/tests/*
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
62
infrahub/transforms/tests/vxlan_yang/input.json
Normal file
62
infrahub/transforms/tests/vxlan_yang/input.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"data": {
|
||||
"InfraVTEP": {
|
||||
"edges": [
|
||||
{
|
||||
"node": {
|
||||
"source_address": {
|
||||
"value": "10.0.255.11/32"
|
||||
},
|
||||
"udp_port": {
|
||||
"value": 4789
|
||||
},
|
||||
"learn_restrict": {
|
||||
"value": "any"
|
||||
},
|
||||
"source_interface": {
|
||||
"node": {
|
||||
"name": {
|
||||
"value": "Loopback1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"vlan_vni_mappings": {
|
||||
"edges": [
|
||||
{
|
||||
"node": {
|
||||
"description": {
|
||||
"value": "VLAN 40 <-> VNI 110040"
|
||||
},
|
||||
"vlan": {
|
||||
"node": {
|
||||
"vlan_id": {
|
||||
"value": 40
|
||||
},
|
||||
"name": {
|
||||
"value": "test-l2-vxlan"
|
||||
}
|
||||
}
|
||||
},
|
||||
"vni": {
|
||||
"node": {
|
||||
"vni": {
|
||||
"value": 110040
|
||||
},
|
||||
"vni_type": {
|
||||
"value": "l2vni"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"InfraVRFDeviceAssignment": {
|
||||
"edges": []
|
||||
}
|
||||
}
|
||||
}
|
||||
12
infrahub/transforms/tests/vxlan_yang/output.json
Normal file
12
infrahub/transforms/tests/vxlan_yang/output.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"vtep": {
|
||||
"learn_restrict": "any",
|
||||
"source_address": "10.0.255.11/32",
|
||||
"source_interface": "Loopback1",
|
||||
"udp_port": 4789,
|
||||
"vlan_vni_mappings": [
|
||||
{"vlan_id": 40, "vlan_name": "test-l2-vxlan", "vni": 110040, "vni_type": "l2vni"}
|
||||
],
|
||||
"vrf_vni_mappings": []
|
||||
}
|
||||
}
|
||||
15
infrahub/transforms/tests/vxlan_yang/test.yml
Normal file
15
infrahub/transforms/tests/vxlan_yang/test.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
version: "1.0"
|
||||
infrahub_tests:
|
||||
- resource: Jinja2Transform
|
||||
resource_name: vxlan_yang_transform
|
||||
tests:
|
||||
- name: smoke_check
|
||||
spec:
|
||||
kind: jinja2-transform-smoke
|
||||
- name: render_leaf1
|
||||
spec:
|
||||
kind: jinja2-transform-unit-render
|
||||
directory: infrahub/transforms/tests/vxlan_yang
|
||||
input: input.json
|
||||
output: output.json
|
||||
Reference in New Issue
Block a user