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:
Damien
2026-02-28 18:37:07 +01:00
parent a492aa3c39
commit 87748329c8
16 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,116 @@
{
"data": {
"InfraVTEP": {
"edges": [
{
"node": {
"source_address": {
"value": "10.0.255.11"
},
"udp_port": {
"value": 4789
},
"vlan_vni_mappings": {
"edges": [
{
"node": {
"vlan": {
"node": {
"vlan_id": {
"value": 40
},
"name": {
"value": "test-l2-vxlan"
},
"status": {
"value": "active"
},
"vlan_type": {
"value": "standard"
},
"trunk_groups": {
"value": null
},
"stp_enabled": {
"value": true
},
"vni": {
"node": {
"vni": {
"value": 110040
},
"vni_type": {
"value": "l2vni"
}
}
}
}
}
}
}
]
}
}
}
]
},
"InfraInterfaceVlan": {
"edges": [
{
"node": {
"vlan": {
"node": {
"vlan_id": {
"value": 4090
},
"name": {
"value": "mlag-peer"
},
"status": {
"value": "active"
},
"vlan_type": {
"value": "mlag_peer"
},
"trunk_groups": {
"value": ["mlag-peer"]
},
"stp_enabled": {
"value": false
},
"vni": null
}
}
}
},
{
"node": {
"vlan": {
"node": {
"vlan_id": {
"value": 4091
},
"name": {
"value": "mlag-ibgp"
},
"status": {
"value": "active"
},
"vlan_type": {
"value": "mlag_ibgp"
},
"trunk_groups": {
"value": ["mlag-peer"]
},
"stp_enabled": {
"value": false
},
"vni": null
}
}
}
}
]
}
}
}

View File

@@ -0,0 +1,32 @@
[
{
"name": "test-l2-vxlan",
"status": "ACTIVE",
"stp_enabled": true,
"trunk_groups": null,
"vlan_id": 40,
"vlan_type": "standard",
"vni": 110040,
"vni_type": "l2vni"
},
{
"name": "mlag-peer",
"status": "ACTIVE",
"stp_enabled": false,
"trunk_groups": ["mlag-peer"],
"vlan_id": 4090,
"vlan_type": "mlag_peer",
"vni": null,
"vni_type": null
},
{
"name": "mlag-ibgp",
"status": "ACTIVE",
"stp_enabled": false,
"trunk_groups": ["mlag-peer"],
"vlan_id": 4091,
"vlan_type": "mlag_ibgp",
"vni": null,
"vni_type": null
}
]

View File

@@ -0,0 +1,15 @@
---
version: "1.0"
infrahub_tests:
- resource: Jinja2Transform
resource_name: vlan_yang_transform
tests:
- name: smoke_check
spec:
kind: jinja2-transform-smoke
- name: render_leaf1
spec:
kind: jinja2-transform-unit-render
directory: infrahub/transforms/tests/vlan_yang
input: input.json
output: output.json