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>
117 lines
2.9 KiB
JSON
117 lines
2.9 KiB
JSON
{
|
|
"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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|