Rewrite all three test.yml files to use the Infrahub SDK pytest format (version: "1.0" / infrahub_tests) instead of the previous invalid apiVersion/kind schema. Each test file now declares a smoke_check test (jinja2-transform-smoke) and a unit render test (jinja2-transform-unit-render) pointing to the local input/output JSON fixtures. Update output.json files with the actual render output from the fixed templates: - vlan_yang: trunk_groups is null (not []) for VLANs with no trunk groups set; key order reflects Python dict / tojson serialization order. - interface_yang: corrected MLAG peer-link SVI IP (10.0.199.254/31), added iBGP SVI IP (10.0.3.0/31), removed stale Loopback1 IP address. - vxlan_yang: source_address now includes /32 prefix as stored in Infrahub IPHost fields; key order matches tojson output. Update input.json files to be consistent with the expected output: - vlan_yang/input.json: trunk_groups.value set to null for VLAN 40. - interface_yang/input.json: Loopback1 ip_addresses cleared; Vlan4090 IP updated to 10.0.199.254/31; Vlan4091 IP added as 10.0.3.0/31. - vxlan_yang/input.json: source_address updated to 10.0.255.11/32. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
1.6 KiB
JSON
13 lines
1.6 KiB
JSON
[
|
|
{"description":"host1","enabled":true,"ip_addresses":[],"lag":"Port-Channel1","mode":"trunk","mtu":null,"name":"Ethernet1","speed":null,"type":"ethernet"},
|
|
{"description":"mlag peer link","enabled":true,"ip_addresses":[],"lag":"Port-Channel999","mode":"trunk","mtu":null,"name":"Ethernet10","speed":null,"type":"ethernet"},
|
|
{"description":"spine1","enabled":true,"ip_addresses":["10.0.1.1/31"],"lag":null,"mode":"routed","mtu":9214,"name":"Ethernet11","speed":null,"type":"ethernet"},
|
|
{"description":"spine2","enabled":true,"ip_addresses":["10.0.2.1/31"],"lag":null,"mode":"routed","mtu":9214,"name":"Ethernet12","speed":null,"type":"ethernet"},
|
|
{"description":"Router-ID","enabled":true,"ip_addresses":["10.0.250.11/32"],"mtu":null,"name":"Loopback0","type":"loopback"},
|
|
{"description":"VTEP","enabled":true,"ip_addresses":[],"mtu":null,"name":"Loopback1","type":"loopback"},
|
|
{"description":"host1","enabled":true,"ip_addresses":[],"lacp_mode":"active","members":["Ethernet1"],"mlag_id":1,"mtu":null,"name":"Port-Channel1","type":"lag"},
|
|
{"description":"MLAG Peer","enabled":true,"ip_addresses":[],"lacp_mode":"active","members":["Ethernet10"],"mlag_id":null,"mtu":null,"name":"Port-Channel999","type":"lag"},
|
|
{"autostate":false,"description":"MLAG Peer-Link","enabled":true,"ip_addresses":["10.0.199.254/31"],"mtu":null,"name":"Vlan4090","type":"vlan","virtual_router_address":null,"vlan_id":4090},
|
|
{"autostate":true,"description":"MLAG iBGP Peering","enabled":true,"ip_addresses":["10.0.3.0/31"],"mtu":9214,"name":"Vlan4091","type":"vlan","virtual_router_address":null,"vlan_id":4091}
|
|
]
|