Replace all `null` literals with `none` (valid Jinja2/Python) in all three
templates. Add explicit `is defined and is not none and .node is not none`
guards before accessing nested nodes on optional GraphQL relationships, to
avoid `Undefined is not JSON serializable` errors at render time.
Also add `| default(none)` on optional scalar attributes (speed, mode,
lacp_mode, mlag_id, mtu, description, virtual_router_address,
route_distinguisher, learn_restrict, vlan_type, trunk_groups) so that
Infrahub `Undefined` values from unset optional fields are safely coerced
to JSON null rather than crashing tojson serialization.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add three GraphQL queries, Jinja2 templates, and integration tests for
generating YANG-style JSON configuration payloads from Infrahub intent data,
suitable for gNMI Set operations on Arista EOS devices.
Queries (transforms/queries/):
- vlan_intent.gql: Fetches VLANs for a device via VTEP mappings and SVI
interfaces, including VNI associations.
- interface_intent.gql: Fetches all interface types (loopback, ethernet, vlan,
lag) with IP addresses and type-specific attributes.
- vxlan_intent.gql: Fetches VTEP config, VLAN-to-VNI mappings, and VRF-to-VNI
mappings (L3VNI) via VRF device assignments.
Templates (transforms/templates/):
- vlan_yang.j2: Merges VLANs from both VTEP and SVI sources, deduplicates by
vlan_id, and emits a sorted JSON array.
- interface_yang.j2: Emits a JSON array of interfaces sorted by name, with a
"type" discriminator field for each interface kind.
- vxlan_yang.j2: Emits a JSON object with vtep config, vlan_vni_mappings, and
vrf_vni_mappings sections.
Integration tests (transforms/tests/):
- One test directory per transform with input.json (sample GraphQL response for
leaf1), output.json (expected result), and test.yml config.
- Test data reflects the lab topology: leaf1 VTEP 10.0.255.11, VLAN 40 / VNI
110040, MLAG VLANs 4090/4091, underlay Ethernet11/12.
.infrahub.yml updated with queries and jinja2_transforms sections.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Refactored all interface references in IPAM configuration to use the
structured format with kind and data fields instead of simple lists.
This improves consistency and makes the configuration more maintainable.
Replace verbose interface definitions using node/kind objects with
concise [device, interface] array notation across all IPAM address
entries. This reduces verbosity and improves readability of the
IP address assignments for loopbacks and P2P underlay links.
Add interface node and kind to all IP address entries in the IPAM configuration file. This change enhances the IPAM configuration by explicitly associating each IP address with its corresponding interface, improving clarity and maintainability of the network configuration.
The changes include:
- Adding interface node and kind for all Router-ID Loopback0 addresses
- Adding interface node and kind for all VTEP Loopback1 addresses
- Adding interface node and kind for all spine and leaf P2P underlay addresses
- Maintaining consistent format across all IP address entries
The `evpn-lab.clab.yml.annotations.json` file was updated to remove all existing `freeTextAnnotations` (AS numbers) and `freeShapeAnnotations` (grouping rectangles). This effectively cleans up the visual overlay for the topology.
Refactor the .infrahub.yml configuration file to prefix all schema, menu, and object paths with the 'infrahub/' directory. This change aligns the configuration with the reorganized project structure where Infrahub resources have been moved into a dedicated subfolder.
Update configuration files for all leaf and spine switches to include a
new static route for the 100.64.0.0/10 prefix.
The route points to the next-hop gateway 172.16.0.254, ensuring proper
reachability for the Tailnet range across the network fabric.
This commit updates the management interface configuration across all leaf and spine switches to align with the target environment requirements.
Changes include:
- Changing the primary management interface from `Management1` to `Management0`.
- Removing the `vrf mgmt` assignment, moving the interface to the default global routing table.
- Explicitly configuring `lldp management-address Management0` to ensure the correct management IP is advertised to neighbors.
Enables the gNMI (gRPC Network Management Interface) API across all leaf
and spine switches to allow for telemetry streaming and programmatic
device management.
Configuration details:
- Transport: grpc default
- Provider: eos-native
Add SVG topology diagram and containerlab annotations file with AS number labels and node positioning for the EVPN VXLAN lab environment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Expanded the README to provide more details about the configuration,
including:
- AS Numbers
- IP Addressing (Management, Loopback, Underlay P2P, Host)
- VXLAN Network Identifiers (VNI)
- Features Implemented
- Test Connectivity
Document all critical fixes discovered during lab testing:
- Spine routing: ip routing command added
- MLAG: static LAG mode enabled
- Pending: port-channel access mode, host networking
Track status of each fix for deployment readiness.
This enables BGP and IP forwarding on spine switches. Without this command,
BGP sessions cannot be established and routing is disabled. This is essential
for the underlay fabric to function properly.
This enables BGP and IP forwarding on spine switches. Without this command,
BGP sessions cannot be established and routing is disabled. This is essential
for the underlay fabric to function properly.