1.5 KiB
1.5 KiB
Claude Code Instructions — Schema Refinement
Project Context
This is a fabric-orchestrator project managing Arista EVPN-VXLAN fabrics.
Branch: feature/41-infrahub-schema
Schema files are in schemas/ directory (Infrahub YAML format).
Reference Topology (from overlaid.net)
- 2 spines (AS 65000), 8 leafs in 4 MLAG pairs (AS 65001-65004)
- Loopback0: BGP router-id, Loopback1: shared VTEP IP per MLAG pair
- VLANs 4090/4091: MLAG peering with trunk groups
- EVPN overlay via eBGP multihop on loopbacks
- L2VXLAN (Type-2) and L3VXLAN (Type-5) with VRFs
Infrahub Schema Rules
human_friendly_idattributes MUST haveunique: true- If human_friendly_id needs to be scoped per-device, traverse Parent
relationships:
parent_rel__parent_attr__value - Parent relationships need
optional: falseexplicitly - Self-referencing relationships need
direction: outbound - Multiple relationships to same peer type need unique
identifier - Validate with:
infrahubctl schema check schemas/
Commit Convention
- Reference issue:
fix(schema): description — refs #41 - One logical change per commit
- Run schema validation before committing
Files
schemas/base.yml— Device, Interfaces, IPAddressschemas/bgp.yml— AS, BGPRouterConfig, PeerGroup, Session, AFschemas/vlan_vxlan.yml— VLAN, VNI, VTEP, VlanVniMapping, EVPNschemas/vrf.yml— VRF, RouteTarget, VRFDeviceAssignmentschemas/mlag.yml— MlagDomain, MlagPeerConfig, MlagInterfaceschemas/extensions.yml— UnderlayLink, HostConnection, FabricSettings