From 5a335b37e6ecd57cbbf1469d0238503c47b8cb13 Mon Sep 17 00:00:00 2001 From: Damien Arnodo Date: Fri, 13 Feb 2026 19:47:57 +0000 Subject: [PATCH 01/29] =?UTF-8?q?docs:=20update=20CLAUDE.md=20for=20issue?= =?UTF-8?q?=20#52=20object=20files=20task=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 171 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 125 insertions(+), 46 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4c28566..bf22f71 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,34 @@ Fabric-orchestrator manages Arista EVPN-VXLAN fabrics using Infrahub as the source of truth. Gitea: https://gitea.arnodo.fr/Damien/fabric-orchestrator -Branch: `feature/41-infrahub-schema` +Branch: `feature/52-object-files` + +## Current Task: Issue #52 — Create Infrahub Object Files + +Create YAML object files to load the reference topology data into Infrahub. +Object files use the `apiVersion: infrahub.app/v1` format and are loaded via `infrahubctl object load`. + +### Data Sources (read-only references) + +- **Arista configs**: https://gitea.arnodo.fr/Damien/arista-evpn-vxlan-clab (`configs/*.cfg`) +- **Reference article**: overlaid.net EVPN Configuration Example (document `arista-bgp-evpn-configuration-example-overlaid.md` if available locally) +- **These configs are the source of truth** — extract all IPs, ASNs, peer groups, VLANs, VNIs from them + +### Target Structure + +``` +objects/ +├── 01-foundation.yml # InfraFabric, InfraAutonomousSystem +├── 02-devices.yml # InfraDevice (10 devices) +├── 03-interfaces.yml # InterfaceLoopback, InterfaceEthernet, InterfaceLag, InterfaceVlan +├── 04-ipam.yml # InfraIPAddress (all /31, /32, /24 assignments) +├── 05-vlans-vxlan.yml # InfraVLAN, InfraVNI, InfraVTEP, InfraVlanVniMapping, InfraEVPNInstance +├── 06-bgp.yml # InfraBGPRouterConfig, InfraBGPPeerGroup, InfraBGPSession, InfraBGPAddressFamily +├── 07-vrfs.yml # InfraVRF, InfraRouteTarget +└── 08-mlag.yml # InfraMlagDomain, InfraMlagPeerConfig +``` + +**Order matters**: files are loaded sequentially, dependencies must be satisfied (devices before interfaces, interfaces before IPs, etc.). ## Reference Topology (overlaid.net) @@ -12,71 +39,123 @@ Branch: `feature/41-infrahub-schema` - Loopback0: BGP router-id per device, Loopback1: shared VTEP IP per MLAG pair - VLANs 4090 (MLAG peer) / 4091 (MLAG iBGP) with trunk groups - Underlay: eBGP point-to-point (spine↔leaf) + iBGP (leaf↔leaf peer) -- Overlay: EVPN eBGP multihop on loopbacks, spines as route-reflectors with next-hop-unchanged -- L2VXLAN (EVPN Type-2): VLAN→VNI mapping, redistribute learned -- L3VXLAN (EVPN Type-5): VRF→VNI mapping, redistribute connected +- Overlay: EVPN eBGP multihop on loopbacks, spines with next-hop-unchanged +- L2VXLAN: VLAN 40 → VNI 110040, redistribute learned +- L3VXLAN: VRF gold → VNI 100001, redistribute connected (leaf3-4, leaf7-8) - Border peering: BGP sessions inside VRF (leaf7/8 → AS 64999 in VRF gold) -## Schema Files (Infrahub YAML format, in `schemas/`) +### IP Addressing Quick Reference -| File | Content | -| ---------------- | ----------------------------------------------------------------------------- | -| `base.yml` | Device, Interfaces (Ethernet, Loopback, Vlan, Lag, Vxlan), IPAddress | -| `bgp.yml` | AutonomousSystem, BGPRouterConfig, BGPPeerGroup, BGPSession, BGPAddressFamily | -| `vlan_vxlan.yml` | VLAN, VNI, VTEP, VlanVniMapping, EVPNInstance | -| `vrf.yml` | VRFConfig, RouteTarget, VRFDeviceAssignment | -| `mlag.yml` | MlagDomain, MlagPeerConfig, MlagInterface | -| `extensions.yml` | UnderlayLink, HostConnection, FabricSettings | +| Device | Lo0 (router-id) | Lo1 (VTEP) | AS | +|---------|------------------|--------------|-------| +| spine1 | 10.0.250.1 | — | 65000 | +| spine2 | 10.0.250.2 | — | 65000 | +| leaf1 | 10.0.250.11 | 10.0.255.11 | 65001 | +| leaf2 | 10.0.250.12 | 10.0.255.11 | 65001 | +| leaf3 | 10.0.250.13 | 10.0.255.12 | 65002 | +| leaf4 | 10.0.250.14 | 10.0.255.12 | 65002 | +| leaf5 | 10.0.250.15 | 10.0.255.13 | 65003 | +| leaf6 | 10.0.250.16 | 10.0.255.13 | 65003 | +| leaf7 | 10.0.250.17 | 10.0.255.14 | 65004 | +| leaf8 | 10.0.250.18 | 10.0.255.14 | 65004 | -## Infrahub Schema Rules +### P2P Addressing Pattern -1. `human_friendly_id` fields MUST have `unique: true` — globally unique across all instances -2. To scope human_friendly_id per-device, traverse Parent relationships: - `parent_rel__parent_attr__value` (e.g. `device__name__value`) -3. Parent relationships (`kind: Parent`) need `optional: false` explicitly -4. Self-referencing relationships need `direction: outbound` -5. Multiple relationships to the same peer type need distinct `identifier` values -6. Don't model the same concept twice (e.g. VTEP source_address vs InterfaceVxlan source_interface) -7. `kind: Attribute` for association, `kind: Component` for ownership (lifecycle-coupled) -8. `kind: Parent` implies the child cannot exist without the parent +- spine1→leaf{N}: `10.0.1.{(N-1)*2}/31` (spine side) / `10.0.1.{(N-1)*2+1}/31` (leaf side) +- spine2→leaf{N}: `10.0.2.{(N-1)*2}/31` (spine side) / `10.0.2.{(N-1)*2+1}/31` (leaf side) +- MLAG iBGP: leaf pairs on `10.0.3.{pair_offset}/31` +- MLAG peer: leaf pairs on `10.0.199.254/31` and `10.0.199.255/31` + +## Infrahub Object File Format + +```yaml +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraDevice + data: + - name: spine1 + role: spine + platform: arista_eos # References InfraPlatform by HFID +``` + +### Key Rules + +1. **Reference existing objects by their `human_friendly_id` (HFID)** — not by ID +2. For relationships with cardinality one, use the HFID value directly: `site: "dc1"` +3. For relationships with cardinality many, use a list: `vlans: ["40", "4090"]` +4. For nested objects (Component kind), use inline `data:` blocks +5. For multi-field HFIDs, use list format: `device: ["spine1", "Loopback0"]` → references `device__name + interface__name` + +### Schema human_friendly_id Reference (critical for references) + +| Node | HFID fields | +|-----------------------|------------------------------------------------| +| InfraDevice | `name__value` | +| InfraAutonomousSystem | `asn__value` | +| InfraInterfaceEthernet| `device__name__value` + `name__value` | +| InfraInterfaceLoopback| `device__name__value` + `name__value` | +| InfraInterfaceVlan | `device__name__value` + `name__value` | +| InfraInterfaceLag | `device__name__value` + `name__value` | +| InfraIPAddress | `address__value` | +| InfraVLAN | `vlan_id__value` | +| InfraVNI | `vni__value` | +| InfraVTEP | `device__name__value` | +| InfraBGPRouterConfig | `device__name__value` | +| InfraBGPPeerGroup | `bgp_config__router_id__value` + `name__value` | +| InfraBGPSession | `bgp_config__router_id__value` + `peer_address__value` | +| InfraVLAN | `vlan_id__value` | +| InfraFabric | `name__value` | +| LocationSite | `name__value` | +| InfraPlatform | `name__value` | + +## Schema Files (in `schemas/`) + +| File | Content | +|-------------------|-----------------------------------------------------------------------| +| `base.yml` | Device, Interfaces (Ethernet, Loopback, Vlan, Lag), IPAddress, Site, Platform | +| `bgp.yml` | AutonomousSystem, BGPRouterConfig, BGPPeerGroup, BGPSession, BGPAddressFamily | +| `vlan_vxlan.yml` | VLAN, VNI, VTEP, VlanVniMapping, EVPNInstance | +| `vrf.yml` | VRFConfig, RouteTarget, VRFDeviceAssignment | +| `mlag.yml` | MlagDomain, MlagPeerConfig, MlagInterface | +| `extensions.yml` | Fabric, UnderlayLink, HostConnection | ## Validation ```bash -infrahubctl schema check schemas/ +# Validate object file format +infrahubctl object validate objects/01-foundation.yml + +# Load objects sequentially +infrahubctl object load objects/01-foundation.yml +infrahubctl object load objects/02-devices.yml +# ... etc. ``` -Always run before committing. Fix any errors before pushing. +Always validate before committing. Fix any errors before pushing. ## Commit Convention ``` -fix(schema): short description — refs # -feat(schema): short description — refs # +feat(objects): short description — refs #52 ``` -- One logical change per commit -- Reference the Gitea issue number -- Comment on the issue after implementation with changes summary - -## Open Issues (prioritized) - -Check https://gitea.arnodo.fr/Damien/fabric-orchestrator/issues for current backlog. -Critical issues (blocking data load) take priority over functional improvements. -Dependency chain: resolve critical → significant → minor sequentially. +- One logical file per commit (or group of closely related files) +- Reference issue #52 ## Workflow -1. Read the issue description fully before starting -2. Read relevant schema files to understand current state -3. Make minimal, targeted changes -4. Validate with `infrahubctl schema check schemas/` -5. Commit with proper message referencing the issue -6. Comment on the Gitea issue with what was changed +1. Read the relevant schema file to understand required fields and relationships +2. Extract data from the clab configs (configs/*.cfg) or the reference topology doc +3. Create the object file respecting the Infrahub Object File format +4. Validate with `infrahubctl object validate` +5. Commit with proper message ## Don'ts -- Don't add fields not needed by the reference topology -- Don't change `human_friendly_id` without checking uniqueness implications -- Don't remove existing relationships without checking reverse dependencies -- Don't create new schema files without discussing first +- Don't invent data not present in the reference topology configs +- Don't create schema modifications — the schema is frozen for this task +- Don't skip optional fields that have data in the configs (description, mtu, etc.) +- Don't forget the dependency order: foundation → devices → interfaces → IPs → rest +- Don't use `id` references — always use human_friendly_id (HFID) strings -- 2.53.0 From 009b6ebc75d7deb5076b228fb4dfa495c681e3c8 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:02:40 +0100 Subject: [PATCH 02/29] =?UTF-8?q?feat(objects):=20add=20foundation=20objec?= =?UTF-8?q?ts=20(fabric,=20platform,=20site,=20ASNs)=20=E2=80=94=20refs=20?= =?UTF-8?q?#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/01-foundation.yml | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 objects/01-foundation.yml diff --git a/objects/01-foundation.yml b/objects/01-foundation.yml new file mode 100644 index 0000000..73267e7 --- /dev/null +++ b/objects/01-foundation.yml @@ -0,0 +1,58 @@ +# Foundation objects: Fabric, Platform, Site, Autonomous Systems +# Must be loaded first — referenced by all subsequent files +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: LocationSite + data: + - name: dc1 + description: Primary data center +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraPlatform + data: + - name: arista_eos + description: Arista EOS + napalm_driver: eos + netmiko_device_type: arista_eos +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraAutonomousSystem + data: + - asn: 64999 + description: External border peer + as_type: private + - asn: 65000 + description: Spine AS + as_type: private + - asn: 65001 + description: Leaf pair 1 (leaf1/leaf2) + as_type: private + - asn: 65002 + description: Leaf pair 2 (leaf3/leaf4) + as_type: private + - asn: 65003 + description: Leaf pair 3 (leaf5/leaf6) + as_type: private + - asn: 65004 + description: Leaf pair 4 (leaf7/leaf8) + as_type: private +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraFabric + data: + - name: evpn-fabric + description: Arista EVPN-VXLAN reference fabric + underlay_protocol: ebgp + overlay_protocol: evpn + anycast_gateway_mac: "c001.cafe.babe" + spine_asn: "65000" + sites: + - dc1 -- 2.53.0 From d3275d1ecc7b3ee26ece3c2a14e6008aca73dc82 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:02:46 +0100 Subject: [PATCH 03/29] =?UTF-8?q?feat(objects):=20add=2010=20devices=20(2?= =?UTF-8?q?=20spines,=208=20leafs)=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/02-devices.yml | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 objects/02-devices.yml diff --git a/objects/02-devices.yml b/objects/02-devices.yml new file mode 100644 index 0000000..2d7603d --- /dev/null +++ b/objects/02-devices.yml @@ -0,0 +1,83 @@ +# Devices: 2 spines + 8 leafs +# Depends on: 01-foundation (Platform, Site, AutonomousSystem) +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraDevice + data: + # Spines + - name: spine1 + description: Spine1 - BGP EVPN Spine + role: spine + status: active + platform: arista_eos + site: dc1 + asn: "65000" + - name: spine2 + description: Spine2 - BGP EVPN Spine + role: spine + status: active + platform: arista_eos + site: dc1 + asn: "65000" + # Leaf pair 1 (VTEP1) + - name: leaf1 + description: Leaf1 - VTEP1 + role: leaf + status: active + platform: arista_eos + site: dc1 + asn: "65001" + - name: leaf2 + description: Leaf2 - VTEP1 + role: leaf + status: active + platform: arista_eos + site: dc1 + asn: "65001" + # Leaf pair 2 (VTEP2) + - name: leaf3 + description: Leaf3 - VTEP2 + role: leaf + status: active + platform: arista_eos + site: dc1 + asn: "65002" + - name: leaf4 + description: Leaf4 - VTEP2 + role: leaf + status: active + platform: arista_eos + site: dc1 + asn: "65002" + # Leaf pair 3 (VTEP3) + - name: leaf5 + description: Leaf5 - VTEP3 + role: leaf + status: active + platform: arista_eos + site: dc1 + asn: "65003" + - name: leaf6 + description: Leaf6 - VTEP3 + role: leaf + status: active + platform: arista_eos + site: dc1 + asn: "65003" + # Leaf pair 4 (VTEP4) + - name: leaf7 + description: Leaf7 - VTEP4 + role: border_leaf + status: active + platform: arista_eos + site: dc1 + asn: "65004" + - name: leaf8 + description: Leaf8 - VTEP4 + role: border_leaf + status: active + platform: arista_eos + site: dc1 + asn: "65004" -- 2.53.0 From dc382bf6de296053c956af2e4192caaf0490f44e Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:02:50 +0100 Subject: [PATCH 04/29] =?UTF-8?q?feat(objects):=20add=20interfaces=20(loop?= =?UTF-8?q?back,=20ethernet,=20LAG,=20VLAN=20SVIs)=20=E2=80=94=20refs=20#5?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/03-interfaces.yml | 632 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 632 insertions(+) create mode 100644 objects/03-interfaces.yml diff --git a/objects/03-interfaces.yml b/objects/03-interfaces.yml new file mode 100644 index 0000000..526959c --- /dev/null +++ b/objects/03-interfaces.yml @@ -0,0 +1,632 @@ +# Interfaces: Loopback, Ethernet, LAG (Port-Channel), VLAN SVIs +# Depends on: 02-devices +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraInterfaceLoopback + data: + # Spine loopbacks (Lo0 only) + - device: spine1 + name: Loopback0 + description: Router-ID + enabled: true + - device: spine2 + name: Loopback0 + description: Router-ID + enabled: true + # Leaf loopbacks (Lo0 + Lo1) + - device: leaf1 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf1 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf2 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf2 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf3 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf3 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf4 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf4 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf5 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf5 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf6 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf6 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf7 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf7 + name: Loopback1 + description: VTEP + enabled: true + - device: leaf8 + name: Loopback0 + description: Router-ID + enabled: true + - device: leaf8 + name: Loopback1 + description: VTEP + enabled: true +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraInterfaceEthernet + data: + # ============================================================ + # Spine1 Ethernet interfaces (underlay to leafs) + # ============================================================ + - device: spine1 + name: Ethernet1 + description: leaf1 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet2 + description: leaf2 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet3 + description: leaf3 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet4 + description: leaf4 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet5 + description: leaf5 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet6 + description: leaf6 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet7 + description: leaf7 + enabled: true + mtu: 9214 + mode: routed + - device: spine1 + name: Ethernet8 + description: leaf8 + enabled: true + mtu: 9214 + mode: routed + # ============================================================ + # Spine2 Ethernet interfaces (underlay to leafs) + # ============================================================ + - device: spine2 + name: Ethernet1 + description: leaf1 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet2 + description: leaf2 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet3 + description: leaf3 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet4 + description: leaf4 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet5 + description: leaf5 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet6 + description: leaf6 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet7 + description: leaf7 + enabled: true + mtu: 9214 + mode: routed + - device: spine2 + name: Ethernet8 + description: leaf8 + enabled: true + mtu: 9214 + mode: routed + # ============================================================ + # Leaf Ethernet interfaces + # Each leaf has: Ethernet1 (host), Ethernet10 (mlag peer-link), + # Ethernet11 (spine1), Ethernet12 (spine2) + # ============================================================ + # Leaf1 + - device: leaf1 + name: Ethernet1 + description: host1 + enabled: true + mode: trunk + lag: ["leaf1", "Port-Channel1"] + - device: leaf1 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf1", "Port-Channel999"] + - device: leaf1 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf1 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf2 + - device: leaf2 + name: Ethernet1 + description: host1 + enabled: true + mode: trunk + lag: ["leaf2", "Port-Channel1"] + - device: leaf2 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf2", "Port-Channel999"] + - device: leaf2 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf2 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf3 + - device: leaf3 + name: Ethernet1 + description: host2 + enabled: true + mode: trunk + lag: ["leaf3", "Port-Channel1"] + - device: leaf3 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf3", "Port-Channel999"] + - device: leaf3 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf3 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf4 + - device: leaf4 + name: Ethernet1 + description: host2 + enabled: true + mode: trunk + lag: ["leaf4", "Port-Channel1"] + - device: leaf4 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf4", "Port-Channel999"] + - device: leaf4 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf4 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf5 + - device: leaf5 + name: Ethernet1 + description: host3 + enabled: true + mode: trunk + lag: ["leaf5", "Port-Channel1"] + - device: leaf5 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf5", "Port-Channel999"] + - device: leaf5 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf5 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf6 + - device: leaf6 + name: Ethernet1 + description: host3 + enabled: true + mode: trunk + lag: ["leaf6", "Port-Channel1"] + - device: leaf6 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf6", "Port-Channel999"] + - device: leaf6 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf6 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf7 + - device: leaf7 + name: Ethernet1 + description: host4 + enabled: true + mode: trunk + lag: ["leaf7", "Port-Channel1"] + - device: leaf7 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf7", "Port-Channel999"] + - device: leaf7 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf7 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed + # Leaf8 + - device: leaf8 + name: Ethernet1 + description: host4 + enabled: true + mode: trunk + lag: ["leaf8", "Port-Channel1"] + - device: leaf8 + name: Ethernet10 + description: mlag peer link + enabled: true + mode: trunk + lag: ["leaf8", "Port-Channel999"] + - device: leaf8 + name: Ethernet11 + description: spine1 + enabled: true + mtu: 9214 + mode: routed + - device: leaf8 + name: Ethernet12 + description: spine2 + enabled: true + mtu: 9214 + mode: routed +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraInterfaceLag + data: + # Port-Channel999 — MLAG peer-link (all leafs) + - device: leaf1 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf2 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf3 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf4 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf5 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf6 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf7 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: leaf8 + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + # Port-Channel1 — Host-facing MLAG LAG (all leafs) + - device: leaf1 + name: Port-Channel1 + description: host1 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf2 + name: Port-Channel1 + description: host1 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf3 + name: Port-Channel1 + description: host2 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf4 + name: Port-Channel1 + description: host2 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf5 + name: Port-Channel1 + description: host3 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf6 + name: Port-Channel1 + description: host3 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf7 + name: Port-Channel1 + description: host4 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: leaf8 + name: Port-Channel1 + description: host4 + enabled: true + lacp_mode: active + mlag_id: 1 +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraInterfaceVlan + data: + # Vlan4090 — MLAG Peer-Link SVI (all leafs) + - device: leaf1 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf2 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf3 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf4 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf5 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf6 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf7 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + - device: leaf8 + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: "4090" + # Vlan4091 — MLAG iBGP Peering SVI (all leafs) + - device: leaf1 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf2 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf3 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf4 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf5 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf6 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf7 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + - device: leaf8 + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: "4091" + # Vlan34 — VRF gold subnet (leaf3/leaf4) + - device: leaf3 + name: Vlan34 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.34.34.1" + vlan: "34" + - device: leaf4 + name: Vlan34 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.34.34.1" + vlan: "34" + # Vlan78 — VRF gold subnet (leaf7/leaf8) + - device: leaf7 + name: Vlan78 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.78.78.1" + vlan: "78" + - device: leaf8 + name: Vlan78 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.78.78.1" + vlan: "78" + # Vlan900 — BGP border peering (leaf7/leaf8) + - device: leaf7 + name: Vlan900 + description: BGP border peering + enabled: true + vlan: "900" + - device: leaf8 + name: Vlan900 + description: BGP border peering + enabled: true + vlan: "900" -- 2.53.0 From 537df72f858b469de1a25d21159b0b57c73d7cd6 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:02:53 +0100 Subject: [PATCH 05/29] =?UTF-8?q?feat(objects):=20add=20IP=20addresses=20(?= =?UTF-8?q?72=20assignments:=20loopbacks,=20P2P,=20MLAG,=20VRF)=20?= =?UTF-8?q?=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/04-ipam.yml | 259 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 objects/04-ipam.yml diff --git a/objects/04-ipam.yml b/objects/04-ipam.yml new file mode 100644 index 0000000..a56a1b3 --- /dev/null +++ b/objects/04-ipam.yml @@ -0,0 +1,259 @@ +# IP Addresses: Loopbacks, P2P underlay links, MLAG SVIs, VRF SVIs +# Depends on: 03-interfaces +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraIPAddress + data: + # ============================================================ + # Loopback0 addresses (Router-ID) — /32 + # ============================================================ + - address: "10.0.250.1/32" + description: spine1 Router-ID + interface: ["spine1", "Loopback0"] + - address: "10.0.250.2/32" + description: spine2 Router-ID + interface: ["spine2", "Loopback0"] + - address: "10.0.250.11/32" + description: leaf1 Router-ID + interface: ["leaf1", "Loopback0"] + - address: "10.0.250.12/32" + description: leaf2 Router-ID + interface: ["leaf2", "Loopback0"] + - address: "10.0.250.13/32" + description: leaf3 Router-ID + interface: ["leaf3", "Loopback0"] + - address: "10.0.250.14/32" + description: leaf4 Router-ID + interface: ["leaf4", "Loopback0"] + - address: "10.0.250.15/32" + description: leaf5 Router-ID + interface: ["leaf5", "Loopback0"] + - address: "10.0.250.16/32" + description: leaf6 Router-ID + interface: ["leaf6", "Loopback0"] + - address: "10.0.250.17/32" + description: leaf7 Router-ID + interface: ["leaf7", "Loopback0"] + - address: "10.0.250.18/32" + description: leaf8 Router-ID + interface: ["leaf8", "Loopback0"] + # ============================================================ + # Loopback1 addresses (VTEP) — /32 + # ============================================================ + - address: "10.0.255.11/32" + description: leaf1 VTEP (shared VTEP1) + interface: ["leaf1", "Loopback1"] + - address: "10.0.255.11/32" + description: leaf2 VTEP (shared VTEP1) + interface: ["leaf2", "Loopback1"] + - address: "10.0.255.12/32" + description: leaf3 VTEP (shared VTEP2) + interface: ["leaf3", "Loopback1"] + - address: "10.0.255.12/32" + description: leaf4 VTEP (shared VTEP2) + interface: ["leaf4", "Loopback1"] + - address: "10.0.255.13/32" + description: leaf5 VTEP (shared VTEP3) + interface: ["leaf5", "Loopback1"] + - address: "10.0.255.13/32" + description: leaf6 VTEP (shared VTEP3) + interface: ["leaf6", "Loopback1"] + - address: "10.0.255.14/32" + description: leaf7 VTEP (shared VTEP4) + interface: ["leaf7", "Loopback1"] + - address: "10.0.255.14/32" + description: leaf8 VTEP (shared VTEP4) + interface: ["leaf8", "Loopback1"] + # ============================================================ + # Spine1 P2P underlay — /31 + # ============================================================ + - address: "10.0.1.0/31" + description: spine1 Ethernet1 to leaf1 + interface: ["spine1", "Ethernet1"] + - address: "10.0.1.2/31" + description: spine1 Ethernet2 to leaf2 + interface: ["spine1", "Ethernet2"] + - address: "10.0.1.4/31" + description: spine1 Ethernet3 to leaf3 + interface: ["spine1", "Ethernet3"] + - address: "10.0.1.6/31" + description: spine1 Ethernet4 to leaf4 + interface: ["spine1", "Ethernet4"] + - address: "10.0.1.8/31" + description: spine1 Ethernet5 to leaf5 + interface: ["spine1", "Ethernet5"] + - address: "10.0.1.10/31" + description: spine1 Ethernet6 to leaf6 + interface: ["spine1", "Ethernet6"] + - address: "10.0.1.12/31" + description: spine1 Ethernet7 to leaf7 + interface: ["spine1", "Ethernet7"] + - address: "10.0.1.14/31" + description: spine1 Ethernet8 to leaf8 + interface: ["spine1", "Ethernet8"] + # ============================================================ + # Spine2 P2P underlay — /31 + # ============================================================ + - address: "10.0.2.0/31" + description: spine2 Ethernet1 to leaf1 + interface: ["spine2", "Ethernet1"] + - address: "10.0.2.2/31" + description: spine2 Ethernet2 to leaf2 + interface: ["spine2", "Ethernet2"] + - address: "10.0.2.4/31" + description: spine2 Ethernet3 to leaf3 + interface: ["spine2", "Ethernet3"] + - address: "10.0.2.6/31" + description: spine2 Ethernet4 to leaf4 + interface: ["spine2", "Ethernet4"] + - address: "10.0.2.8/31" + description: spine2 Ethernet5 to leaf5 + interface: ["spine2", "Ethernet5"] + - address: "10.0.2.10/31" + description: spine2 Ethernet6 to leaf6 + interface: ["spine2", "Ethernet6"] + - address: "10.0.2.12/31" + description: spine2 Ethernet7 to leaf7 + interface: ["spine2", "Ethernet7"] + - address: "10.0.2.14/31" + description: spine2 Ethernet8 to leaf8 + interface: ["spine2", "Ethernet8"] + # ============================================================ + # Leaf P2P underlay (leaf side) — /31 + # ============================================================ + # Leaf1 + - address: "10.0.1.1/31" + description: leaf1 Ethernet11 to spine1 + interface: ["leaf1", "Ethernet11"] + - address: "10.0.2.1/31" + description: leaf1 Ethernet12 to spine2 + interface: ["leaf1", "Ethernet12"] + # Leaf2 + - address: "10.0.1.3/31" + description: leaf2 Ethernet11 to spine1 + interface: ["leaf2", "Ethernet11"] + - address: "10.0.2.3/31" + description: leaf2 Ethernet12 to spine2 + interface: ["leaf2", "Ethernet12"] + # Leaf3 + - address: "10.0.1.5/31" + description: leaf3 Ethernet11 to spine1 + interface: ["leaf3", "Ethernet11"] + - address: "10.0.2.5/31" + description: leaf3 Ethernet12 to spine2 + interface: ["leaf3", "Ethernet12"] + # Leaf4 + - address: "10.0.1.7/31" + description: leaf4 Ethernet11 to spine1 + interface: ["leaf4", "Ethernet11"] + - address: "10.0.2.7/31" + description: leaf4 Ethernet12 to spine2 + interface: ["leaf4", "Ethernet12"] + # Leaf5 + - address: "10.0.1.9/31" + description: leaf5 Ethernet11 to spine1 + interface: ["leaf5", "Ethernet11"] + - address: "10.0.2.9/31" + description: leaf5 Ethernet12 to spine2 + interface: ["leaf5", "Ethernet12"] + # Leaf6 + - address: "10.0.1.11/31" + description: leaf6 Ethernet11 to spine1 + interface: ["leaf6", "Ethernet11"] + - address: "10.0.2.11/31" + description: leaf6 Ethernet12 to spine2 + interface: ["leaf6", "Ethernet12"] + # Leaf7 + - address: "10.0.1.13/31" + description: leaf7 Ethernet11 to spine1 + interface: ["leaf7", "Ethernet11"] + - address: "10.0.2.13/31" + description: leaf7 Ethernet12 to spine2 + interface: ["leaf7", "Ethernet12"] + # Leaf8 + - address: "10.0.1.15/31" + description: leaf8 Ethernet11 to spine1 + interface: ["leaf8", "Ethernet11"] + - address: "10.0.2.15/31" + description: leaf8 Ethernet12 to spine2 + interface: ["leaf8", "Ethernet12"] + # ============================================================ + # MLAG Peer-Link SVI (Vlan4090) — /31 + # ============================================================ + - address: "10.0.199.254/31" + description: leaf1 MLAG peer-link + interface: ["leaf1", "Vlan4090"] + - address: "10.0.199.255/31" + description: leaf2 MLAG peer-link + interface: ["leaf2", "Vlan4090"] + - address: "10.0.199.252/31" + description: leaf3 MLAG peer-link + interface: ["leaf3", "Vlan4090"] + - address: "10.0.199.253/31" + description: leaf4 MLAG peer-link + interface: ["leaf4", "Vlan4090"] + - address: "10.0.199.250/31" + description: leaf5 MLAG peer-link + interface: ["leaf5", "Vlan4090"] + - address: "10.0.199.251/31" + description: leaf6 MLAG peer-link + interface: ["leaf6", "Vlan4090"] + - address: "10.0.199.248/31" + description: leaf7 MLAG peer-link + interface: ["leaf7", "Vlan4090"] + - address: "10.0.199.249/31" + description: leaf8 MLAG peer-link + interface: ["leaf8", "Vlan4090"] + # ============================================================ + # MLAG iBGP Peering SVI (Vlan4091) — /31 + # ============================================================ + - address: "10.0.3.0/31" + description: leaf1 MLAG iBGP peering + interface: ["leaf1", "Vlan4091"] + - address: "10.0.3.1/31" + description: leaf2 MLAG iBGP peering + interface: ["leaf2", "Vlan4091"] + - address: "10.0.3.2/31" + description: leaf3 MLAG iBGP peering + interface: ["leaf3", "Vlan4091"] + - address: "10.0.3.3/31" + description: leaf4 MLAG iBGP peering + interface: ["leaf4", "Vlan4091"] + - address: "10.0.3.4/31" + description: leaf5 MLAG iBGP peering + interface: ["leaf5", "Vlan4091"] + - address: "10.0.3.5/31" + description: leaf6 MLAG iBGP peering + interface: ["leaf6", "Vlan4091"] + - address: "10.0.3.6/31" + description: leaf7 MLAG iBGP peering + interface: ["leaf7", "Vlan4091"] + - address: "10.0.3.7/31" + description: leaf8 MLAG iBGP peering + interface: ["leaf8", "Vlan4091"] + # ============================================================ + # VRF gold SVI addresses — /24 + # ============================================================ + # Vlan34 (leaf3/leaf4) + - address: "10.34.34.2/24" + description: leaf3 Vlan34 VRF gold + interface: ["leaf3", "Vlan34"] + - address: "10.34.34.3/24" + description: leaf4 Vlan34 VRF gold + interface: ["leaf4", "Vlan34"] + # Vlan78 (leaf7/leaf8) + - address: "10.78.78.2/24" + description: leaf7 Vlan78 VRF gold + interface: ["leaf7", "Vlan78"] + - address: "10.78.78.3/24" + description: leaf8 Vlan78 VRF gold + interface: ["leaf8", "Vlan78"] + # Vlan900 — BGP border (leaf7/leaf8) + - address: "10.90.90.2/29" + description: leaf7 Vlan900 BGP border + interface: ["leaf7", "Vlan900"] + - address: "10.90.90.3/29" + description: leaf8 Vlan900 BGP border + interface: ["leaf8", "Vlan900"] -- 2.53.0 From 89f77b764e4c141854c6980bd17172e78a547c3d Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:02:57 +0100 Subject: [PATCH 06/29] =?UTF-8?q?feat(objects):=20add=20VLANs,=20VNIs,=20V?= =?UTF-8?q?TEPs,=20mappings,=20EVPN=20instances=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/05-vlans-vxlan.yml | 167 +++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 objects/05-vlans-vxlan.yml diff --git a/objects/05-vlans-vxlan.yml b/objects/05-vlans-vxlan.yml new file mode 100644 index 0000000..edfb4c2 --- /dev/null +++ b/objects/05-vlans-vxlan.yml @@ -0,0 +1,167 @@ +# VLANs, VNIs, VTEPs, VLAN-VNI mappings, EVPN instances +# Depends on: 02-devices, 03-interfaces +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraVLAN + data: + - vlan_id: 34 + name: vrf-gold-subnet + description: VRF gold L3 subnet (leaf3/leaf4) + status: active + vlan_type: standard + - vlan_id: 40 + name: test-l2-vxlan + description: L2 VXLAN test VLAN + status: active + vlan_type: standard + - vlan_id: 78 + name: vrf-gold-subnet + description: VRF gold L3 subnet (leaf7/leaf8) + status: active + vlan_type: standard + - vlan_id: 900 + name: bgp-border + description: BGP border peering VLAN + status: active + vlan_type: standard + - vlan_id: 4090 + name: mlag-peer + description: MLAG peer-link control + status: active + vlan_type: mlag_peer + trunk_groups: + - mlag-peer + stp_enabled: false + - vlan_id: 4091 + name: mlag-ibgp + description: MLAG iBGP peering + status: active + vlan_type: mlag_ibgp + trunk_groups: + - mlag-peer + stp_enabled: false +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraVNI + data: + - vni: 110040 + description: L2VNI for VLAN 40 (test-l2-vxlan) + vni_type: l2vni + vlan: "40" + - vni: 100001 + description: L3VNI for VRF gold + vni_type: l3vni +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraVTEP + data: + # VTEP on leaf1 (shared VTEP1 IP 10.0.255.11) + - device: leaf1 + source_address: "10.0.255.11" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf1", "Loopback1"] + # VTEP on leaf2 (shared VTEP1 IP 10.0.255.11) + - device: leaf2 + source_address: "10.0.255.11" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf2", "Loopback1"] + # VTEP on leaf3 (shared VTEP2 IP 10.0.255.12) + - device: leaf3 + source_address: "10.0.255.12" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf3", "Loopback1"] + # VTEP on leaf4 (shared VTEP2 IP 10.0.255.12) + - device: leaf4 + source_address: "10.0.255.12" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf4", "Loopback1"] + # VTEP on leaf5 (shared VTEP3 IP 10.0.255.13) + - device: leaf5 + source_address: "10.0.255.13" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf5", "Loopback1"] + # VTEP on leaf6 (shared VTEP3 IP 10.0.255.13) + - device: leaf6 + source_address: "10.0.255.13" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf6", "Loopback1"] + # VTEP on leaf7 (shared VTEP4 IP 10.0.255.14) + - device: leaf7 + source_address: "10.0.255.14" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf7", "Loopback1"] + # VTEP on leaf8 (shared VTEP4 IP 10.0.255.14) + - device: leaf8 + source_address: "10.0.255.14" + udp_port: 4789 + learn_restrict: any + source_interface: ["leaf8", "Loopback1"] +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraVlanVniMapping + data: + # VLAN 40 <-> VNI 110040 on leaf1/2/5/6 (L2 VXLAN leafs) + - vtep: leaf1 + vlan: "40" + vni: "110040" + description: "VLAN 40 <-> VNI 110040" + - vtep: leaf2 + vlan: "40" + vni: "110040" + description: "VLAN 40 <-> VNI 110040" + - vtep: leaf5 + vlan: "40" + vni: "110040" + description: "VLAN 40 <-> VNI 110040" + - vtep: leaf6 + vlan: "40" + vni: "110040" + description: "VLAN 40 <-> VNI 110040" +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraEVPNInstance + data: + # EVPN instance for VLAN 40 on L2 VXLAN leafs + # leaf1: rd 65001:110040, rt both 40:110040 + - device: leaf1 + vlan: "40" + route_distinguisher: "65001:110040" + route_target_import: "40:110040" + route_target_export: "40:110040" + redistribute_learned: true + - device: leaf2 + vlan: "40" + route_distinguisher: "65001:110040" + route_target_import: "40:110040" + route_target_export: "40:110040" + redistribute_learned: true + # leaf5/6: rd 65003:110040, rt both 40:110040 + - device: leaf5 + vlan: "40" + route_distinguisher: "65003:110040" + route_target_import: "40:110040" + route_target_export: "40:110040" + redistribute_learned: true + - device: leaf6 + vlan: "40" + route_distinguisher: "65003:110040" + route_target_import: "40:110040" + route_target_export: "40:110040" + redistribute_learned: true -- 2.53.0 From 17ff22f49721e1161d9a450e41c71d8d6b267990 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:03:00 +0100 Subject: [PATCH 07/29] =?UTF-8?q?feat(objects):=20add=20BGP=20config,=20pe?= =?UTF-8?q?er=20groups,=2074=20sessions,=20address=20families=20=E2=80=94?= =?UTF-8?q?=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/06-bgp.yml | 980 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 980 insertions(+) create mode 100644 objects/06-bgp.yml diff --git a/objects/06-bgp.yml b/objects/06-bgp.yml new file mode 100644 index 0000000..7a0edc5 --- /dev/null +++ b/objects/06-bgp.yml @@ -0,0 +1,980 @@ +# BGP: RouterConfig, PeerGroups, Sessions, AddressFamilies +# Depends on: 01-foundation (ASNs), 02-devices, 04-ipam +# +# Spine BGP: no named peer-groups in config (neighbors defined directly), +# but evpn peer-group is defined. Underlay neighbors are direct. +# Leaf BGP: underlay, underlay_ibgp, evpn peer-groups. +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraBGPRouterConfig + data: + # ============================================================ + # Spine1 BGP — AS 65000, router-id 10.0.250.1 + # ============================================================ + - device: spine1 + router_id: "10.0.250.1" + local_asn: "65000" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Spine2 BGP — AS 65000, router-id 10.0.250.2 + # ============================================================ + - device: spine2 + router_id: "10.0.250.2" + local_asn: "65000" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf1 BGP — AS 65001, router-id 10.0.250.11 + # ============================================================ + - device: leaf1 + router_id: "10.0.250.11" + local_asn: "65001" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf2 BGP — AS 65001, router-id 10.0.250.12 + # ============================================================ + - device: leaf2 + router_id: "10.0.250.12" + local_asn: "65001" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf3 BGP — AS 65002, router-id 10.0.250.13 + # ============================================================ + - device: leaf3 + router_id: "10.0.250.13" + local_asn: "65002" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf4 BGP — AS 65002, router-id 10.0.250.14 + # ============================================================ + - device: leaf4 + router_id: "10.0.250.14" + local_asn: "65002" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf5 BGP — AS 65003, router-id 10.0.250.15 + # ============================================================ + - device: leaf5 + router_id: "10.0.250.15" + local_asn: "65003" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf6 BGP — AS 65003, router-id 10.0.250.16 + # ============================================================ + - device: leaf6 + router_id: "10.0.250.16" + local_asn: "65003" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf7 BGP — AS 65004, router-id 10.0.250.17 + # ============================================================ + - device: leaf7 + router_id: "10.0.250.17" + local_asn: "65004" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 + # ============================================================ + # Leaf8 BGP — AS 65004, router-id 10.0.250.18 + # ============================================================ + - device: leaf8 + router_id: "10.0.250.18" + local_asn: "65004" + default_ipv4_unicast: false + log_neighbor_changes: true + ecmp_max_paths: 4 + ecmp_max_ecmp: 64 + ebgp_distance: 20 + ibgp_distance: 200 + local_distance: 200 +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraBGPPeerGroup + data: + # ============================================================ + # Spine peer-groups (evpn only — underlay neighbors are direct) + # ============================================================ + # Spine1 — evpn peer-group + - bgp_config: spine1 + name: evpn + description: EVPN overlay to leaf loopbacks + peer_group_type: evpn + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + next_hop_unchanged: true + maximum_routes: 12000 + maximum_routes_warning_only: true + # Spine2 — evpn peer-group + - bgp_config: spine2 + name: evpn + description: EVPN overlay to leaf loopbacks + peer_group_type: evpn + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + next_hop_unchanged: true + maximum_routes: 12000 + maximum_routes_warning_only: true + # ============================================================ + # Leaf peer-groups (underlay, underlay_ibgp, evpn) + # ============================================================ + # Leaf1 + - bgp_config: leaf1 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf1 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65001" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf1 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf2 + - bgp_config: leaf2 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf2 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65001" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf2 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf3 + - bgp_config: leaf3 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf3 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65002" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf3 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf4 + - bgp_config: leaf4 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf4 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65002" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf4 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf5 + - bgp_config: leaf5 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf5 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65003" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf5 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf6 + - bgp_config: leaf6 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf6 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65003" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf6 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf7 + - bgp_config: leaf7 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf7 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65004" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf7 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true + # Leaf8 + - bgp_config: leaf8 + name: underlay + description: Underlay eBGP to spines + peer_group_type: underlay + remote_asn: "65000" + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf8 + name: underlay_ibgp + description: MLAG iBGP peering + peer_group_type: underlay_ibgp + remote_asn: "65004" + next_hop_self: true + maximum_routes: 12000 + maximum_routes_warning_only: true + - bgp_config: leaf8 + name: evpn + description: EVPN overlay to spines + peer_group_type: evpn + remote_asn: "65000" + update_source: Loopback0 + ebgp_multihop: 3 + send_community: extended + maximum_routes: 12000 + maximum_routes_warning_only: true +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraBGPSession + data: + # ============================================================ + # Spine1 sessions + # ============================================================ + # Spine1 underlay (direct neighbors, no peer-group — use remote_asn) + - bgp_config: spine1 + peer_address: "10.0.1.1" + description: "underlay to leaf1" + remote_asn: "65001" + peer_device: leaf1 + - bgp_config: spine1 + peer_address: "10.0.1.3" + description: "underlay to leaf2" + remote_asn: "65001" + peer_device: leaf2 + - bgp_config: spine1 + peer_address: "10.0.1.5" + description: "underlay to leaf3" + remote_asn: "65002" + peer_device: leaf3 + - bgp_config: spine1 + peer_address: "10.0.1.7" + description: "underlay to leaf4" + remote_asn: "65002" + peer_device: leaf4 + - bgp_config: spine1 + peer_address: "10.0.1.9" + description: "underlay to leaf5" + remote_asn: "65003" + peer_device: leaf5 + - bgp_config: spine1 + peer_address: "10.0.1.11" + description: "underlay to leaf6" + remote_asn: "65003" + peer_device: leaf6 + - bgp_config: spine1 + peer_address: "10.0.1.13" + description: "underlay to leaf7" + remote_asn: "65004" + peer_device: leaf7 + - bgp_config: spine1 + peer_address: "10.0.1.15" + description: "underlay to leaf8" + remote_asn: "65004" + peer_device: leaf8 + # Spine1 EVPN (via evpn peer-group) + - bgp_config: spine1 + peer_address: "10.0.250.11" + description: "EVPN to leaf1" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65001" + peer_device: leaf1 + - bgp_config: spine1 + peer_address: "10.0.250.12" + description: "EVPN to leaf2" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65001" + peer_device: leaf2 + - bgp_config: spine1 + peer_address: "10.0.250.13" + description: "EVPN to leaf3" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65002" + peer_device: leaf3 + - bgp_config: spine1 + peer_address: "10.0.250.14" + description: "EVPN to leaf4" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65002" + peer_device: leaf4 + - bgp_config: spine1 + peer_address: "10.0.250.15" + description: "EVPN to leaf5" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65003" + peer_device: leaf5 + - bgp_config: spine1 + peer_address: "10.0.250.16" + description: "EVPN to leaf6" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65003" + peer_device: leaf6 + - bgp_config: spine1 + peer_address: "10.0.250.17" + description: "EVPN to leaf7" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65004" + peer_device: leaf7 + - bgp_config: spine1 + peer_address: "10.0.250.18" + description: "EVPN to leaf8" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: "65004" + peer_device: leaf8 + # ============================================================ + # Spine2 sessions + # ============================================================ + # Spine2 underlay + - bgp_config: spine2 + peer_address: "10.0.2.1" + description: "underlay to leaf1" + remote_asn: "65001" + peer_device: leaf1 + - bgp_config: spine2 + peer_address: "10.0.2.3" + description: "underlay to leaf2" + remote_asn: "65001" + peer_device: leaf2 + - bgp_config: spine2 + peer_address: "10.0.2.5" + description: "underlay to leaf3" + remote_asn: "65002" + peer_device: leaf3 + - bgp_config: spine2 + peer_address: "10.0.2.7" + description: "underlay to leaf4" + remote_asn: "65002" + peer_device: leaf4 + - bgp_config: spine2 + peer_address: "10.0.2.9" + description: "underlay to leaf5" + remote_asn: "65003" + peer_device: leaf5 + - bgp_config: spine2 + peer_address: "10.0.2.11" + description: "underlay to leaf6" + remote_asn: "65003" + peer_device: leaf6 + - bgp_config: spine2 + peer_address: "10.0.2.13" + description: "underlay to leaf7" + remote_asn: "65004" + peer_device: leaf7 + - bgp_config: spine2 + peer_address: "10.0.2.15" + description: "underlay to leaf8" + remote_asn: "65004" + peer_device: leaf8 + # Spine2 EVPN + - bgp_config: spine2 + peer_address: "10.0.250.11" + description: "EVPN to leaf1" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65001" + peer_device: leaf1 + - bgp_config: spine2 + peer_address: "10.0.250.12" + description: "EVPN to leaf2" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65001" + peer_device: leaf2 + - bgp_config: spine2 + peer_address: "10.0.250.13" + description: "EVPN to leaf3" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65002" + peer_device: leaf3 + - bgp_config: spine2 + peer_address: "10.0.250.14" + description: "EVPN to leaf4" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65002" + peer_device: leaf4 + - bgp_config: spine2 + peer_address: "10.0.250.15" + description: "EVPN to leaf5" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65003" + peer_device: leaf5 + - bgp_config: spine2 + peer_address: "10.0.250.16" + description: "EVPN to leaf6" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65003" + peer_device: leaf6 + - bgp_config: spine2 + peer_address: "10.0.250.17" + description: "EVPN to leaf7" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65004" + peer_device: leaf7 + - bgp_config: spine2 + peer_address: "10.0.250.18" + description: "EVPN to leaf8" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: "65004" + peer_device: leaf8 + # ============================================================ + # Leaf1 sessions + # ============================================================ + - bgp_config: leaf1 + peer_address: "10.0.1.0" + description: "underlay to spine1" + peer_group: ["10.0.250.11", "underlay"] + peer_device: spine1 + - bgp_config: leaf1 + peer_address: "10.0.2.0" + description: "underlay to spine2" + peer_group: ["10.0.250.11", "underlay"] + peer_device: spine2 + - bgp_config: leaf1 + peer_address: "10.0.3.1" + description: "iBGP to leaf2" + peer_group: ["10.0.250.11", "underlay_ibgp"] + peer_device: leaf2 + - bgp_config: leaf1 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.11", "evpn"] + peer_device: spine1 + - bgp_config: leaf1 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.11", "evpn"] + peer_device: spine2 + # ============================================================ + # Leaf2 sessions + # ============================================================ + - bgp_config: leaf2 + peer_address: "10.0.1.2" + description: "underlay to spine1" + peer_group: ["10.0.250.12", "underlay"] + peer_device: spine1 + - bgp_config: leaf2 + peer_address: "10.0.2.2" + description: "underlay to spine2" + peer_group: ["10.0.250.12", "underlay"] + peer_device: spine2 + - bgp_config: leaf2 + peer_address: "10.0.3.0" + description: "iBGP to leaf1" + peer_group: ["10.0.250.12", "underlay_ibgp"] + peer_device: leaf1 + - bgp_config: leaf2 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.12", "evpn"] + peer_device: spine1 + - bgp_config: leaf2 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.12", "evpn"] + peer_device: spine2 + # ============================================================ + # Leaf3 sessions + # ============================================================ + - bgp_config: leaf3 + peer_address: "10.0.1.4" + description: "underlay to spine1" + peer_group: ["10.0.250.13", "underlay"] + peer_device: spine1 + - bgp_config: leaf3 + peer_address: "10.0.2.4" + description: "underlay to spine2" + peer_group: ["10.0.250.13", "underlay"] + peer_device: spine2 + - bgp_config: leaf3 + peer_address: "10.0.3.3" + description: "iBGP to leaf4" + peer_group: ["10.0.250.13", "underlay_ibgp"] + peer_device: leaf4 + - bgp_config: leaf3 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.13", "evpn"] + peer_device: spine1 + - bgp_config: leaf3 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.13", "evpn"] + peer_device: spine2 + # ============================================================ + # Leaf4 sessions + # ============================================================ + - bgp_config: leaf4 + peer_address: "10.0.1.6" + description: "underlay to spine1" + peer_group: ["10.0.250.14", "underlay"] + peer_device: spine1 + - bgp_config: leaf4 + peer_address: "10.0.2.6" + description: "underlay to spine2" + peer_group: ["10.0.250.14", "underlay"] + peer_device: spine2 + - bgp_config: leaf4 + peer_address: "10.0.3.2" + description: "iBGP to leaf3" + peer_group: ["10.0.250.14", "underlay_ibgp"] + peer_device: leaf3 + - bgp_config: leaf4 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.14", "evpn"] + peer_device: spine1 + - bgp_config: leaf4 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.14", "evpn"] + peer_device: spine2 + # ============================================================ + # Leaf5 sessions + # ============================================================ + - bgp_config: leaf5 + peer_address: "10.0.1.8" + description: "underlay to spine1" + peer_group: ["10.0.250.15", "underlay"] + peer_device: spine1 + - bgp_config: leaf5 + peer_address: "10.0.2.8" + description: "underlay to spine2" + peer_group: ["10.0.250.15", "underlay"] + peer_device: spine2 + - bgp_config: leaf5 + peer_address: "10.0.3.5" + description: "iBGP to leaf6" + peer_group: ["10.0.250.15", "underlay_ibgp"] + peer_device: leaf6 + - bgp_config: leaf5 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.15", "evpn"] + peer_device: spine1 + - bgp_config: leaf5 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.15", "evpn"] + peer_device: spine2 + # ============================================================ + # Leaf6 sessions + # ============================================================ + - bgp_config: leaf6 + peer_address: "10.0.1.10" + description: "underlay to spine1" + peer_group: ["10.0.250.16", "underlay"] + peer_device: spine1 + - bgp_config: leaf6 + peer_address: "10.0.2.10" + description: "underlay to spine2" + peer_group: ["10.0.250.16", "underlay"] + peer_device: spine2 + - bgp_config: leaf6 + peer_address: "10.0.3.4" + description: "iBGP to leaf5" + peer_group: ["10.0.250.16", "underlay_ibgp"] + peer_device: leaf5 + - bgp_config: leaf6 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.16", "evpn"] + peer_device: spine1 + - bgp_config: leaf6 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.16", "evpn"] + peer_device: spine2 + # ============================================================ + # Leaf7 sessions (+ VRF gold border session) + # ============================================================ + - bgp_config: leaf7 + peer_address: "10.0.1.12" + description: "underlay to spine1" + peer_group: ["10.0.250.17", "underlay"] + peer_device: spine1 + - bgp_config: leaf7 + peer_address: "10.0.2.12" + description: "underlay to spine2" + peer_group: ["10.0.250.17", "underlay"] + peer_device: spine2 + - bgp_config: leaf7 + peer_address: "10.0.3.7" + description: "iBGP to leaf8" + peer_group: ["10.0.250.17", "underlay_ibgp"] + peer_device: leaf8 + - bgp_config: leaf7 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.17", "evpn"] + peer_device: spine1 + - bgp_config: leaf7 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.17", "evpn"] + peer_device: spine2 + # Border session in VRF gold + - bgp_config: leaf7 + peer_address: "10.90.90.1" + description: "VRF gold border to AS 64999" + remote_asn: "64999" + vrf: gold + # ============================================================ + # Leaf8 sessions (+ VRF gold border session) + # ============================================================ + - bgp_config: leaf8 + peer_address: "10.0.1.14" + description: "underlay to spine1" + peer_group: ["10.0.250.18", "underlay"] + peer_device: spine1 + - bgp_config: leaf8 + peer_address: "10.0.2.14" + description: "underlay to spine2" + peer_group: ["10.0.250.18", "underlay"] + peer_device: spine2 + - bgp_config: leaf8 + peer_address: "10.0.3.6" + description: "iBGP to leaf7" + peer_group: ["10.0.250.18", "underlay_ibgp"] + peer_device: leaf7 + - bgp_config: leaf8 + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.18", "evpn"] + peer_device: spine1 + - bgp_config: leaf8 + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.18", "evpn"] + peer_device: spine2 + # Border session in VRF gold + - bgp_config: leaf8 + peer_address: "10.90.90.1" + description: "VRF gold border to AS 64999" + remote_asn: "64999" + vrf: gold +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraBGPAddressFamily + data: + # ============================================================ + # Spine1 address families + # ============================================================ + - bgp_config: spine1 + afi: ipv4 + safi: unicast + networks: + - "10.0.250.1/32" + - bgp_config: spine1 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.1", "evpn"] + # ============================================================ + # Spine2 address families + # ============================================================ + - bgp_config: spine2 + afi: ipv4 + safi: unicast + networks: + - "10.0.250.2/32" + - bgp_config: spine2 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.2", "evpn"] + # ============================================================ + # Leaf1 address families + # ============================================================ + - bgp_config: leaf1 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.11", "underlay"] + - ["10.0.250.11", "underlay_ibgp"] + networks: + - "10.0.250.11/32" + - "10.0.255.11/32" + - bgp_config: leaf1 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.11", "evpn"] + # ============================================================ + # Leaf2 address families + # ============================================================ + - bgp_config: leaf2 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.12", "underlay"] + - ["10.0.250.12", "underlay_ibgp"] + networks: + - "10.0.250.12/32" + - "10.0.255.11/32" + - bgp_config: leaf2 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.12", "evpn"] + # ============================================================ + # Leaf3 address families + # ============================================================ + - bgp_config: leaf3 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.13", "underlay"] + - ["10.0.250.13", "underlay_ibgp"] + networks: + - "10.0.250.13/32" + - "10.0.255.12/32" + - bgp_config: leaf3 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.13", "evpn"] + # ============================================================ + # Leaf4 address families + # ============================================================ + - bgp_config: leaf4 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.14", "underlay"] + - ["10.0.250.14", "underlay_ibgp"] + networks: + - "10.0.250.14/32" + - "10.0.255.12/32" + - bgp_config: leaf4 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.14", "evpn"] + # ============================================================ + # Leaf5 address families + # ============================================================ + - bgp_config: leaf5 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.15", "underlay"] + - ["10.0.250.15", "underlay_ibgp"] + networks: + - "10.0.250.15/32" + - "10.0.255.13/32" + - bgp_config: leaf5 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.15", "evpn"] + # ============================================================ + # Leaf6 address families + # ============================================================ + - bgp_config: leaf6 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.16", "underlay"] + - ["10.0.250.16", "underlay_ibgp"] + networks: + - "10.0.250.16/32" + - "10.0.255.13/32" + - bgp_config: leaf6 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.16", "evpn"] + # ============================================================ + # Leaf7 address families + # ============================================================ + - bgp_config: leaf7 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.17", "underlay"] + - ["10.0.250.17", "underlay_ibgp"] + networks: + - "10.0.250.17/32" + - "10.0.255.14/32" + - bgp_config: leaf7 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.17", "evpn"] + # ============================================================ + # Leaf8 address families + # ============================================================ + - bgp_config: leaf8 + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.18", "underlay"] + - ["10.0.250.18", "underlay_ibgp"] + networks: + - "10.0.250.18/32" + - "10.0.255.14/32" + - bgp_config: leaf8 + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.18", "evpn"] -- 2.53.0 From 4a13a6a33dbbf575c2af4a2b3b572e5a4410c878 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:03:04 +0100 Subject: [PATCH 08/29] =?UTF-8?q?feat(objects):=20add=20VRF=20gold,=20rout?= =?UTF-8?q?e=20targets,=20device=20assignments=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/07-vrfs.yml | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 objects/07-vrfs.yml diff --git a/objects/07-vrfs.yml b/objects/07-vrfs.yml new file mode 100644 index 0000000..fac035d --- /dev/null +++ b/objects/07-vrfs.yml @@ -0,0 +1,62 @@ +# VRFs, Route Targets, VRF Device Assignments +# Depends on: 02-devices, 03-interfaces, 05-vlans-vxlan (VNI 100001) +# +# VRF gold is used on leaf3/4 (VLAN 34) and leaf7/8 (VLAN 78 + border) +# L3VNI 100001 for symmetric IRB +# Route targets: import/export evpn 1:100001 +# Per-device RD: :1 +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraRouteTarget + data: + - target: "1:100001" + description: VRF gold EVPN route target +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraVRF + data: + - name: gold + description: VRF gold - L3 VXLAN with symmetric IRB + l3vni: "100001" + import_targets: + - "1:100001" + export_targets: + - "1:100001" +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraVRFDeviceAssignment + data: + - device: leaf3 + vrf: gold + route_distinguisher: "10.0.250.13:1" + import_targets: + - "1:100001" + export_targets: + - "1:100001" + - device: leaf4 + vrf: gold + route_distinguisher: "10.0.250.14:1" + import_targets: + - "1:100001" + export_targets: + - "1:100001" + - device: leaf7 + vrf: gold + route_distinguisher: "10.0.250.17:1" + import_targets: + - "1:100001" + export_targets: + - "1:100001" + - device: leaf8 + vrf: gold + route_distinguisher: "10.0.250.18:1" + import_targets: + - "1:100001" + export_targets: + - "1:100001" -- 2.53.0 From 825c5e44514e0d6ccd338c743d541d1f22f77148 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:03:07 +0100 Subject: [PATCH 09/29] =?UTF-8?q?feat(objects):=20add=204=20MLAG=20domains?= =?UTF-8?q?,=208=20peer=20configs=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/08-mlag.yml | 134 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 objects/08-mlag.yml diff --git a/objects/08-mlag.yml b/objects/08-mlag.yml new file mode 100644 index 0000000..d2e4809 --- /dev/null +++ b/objects/08-mlag.yml @@ -0,0 +1,134 @@ +# MLAG: Domains and Peer Configs +# Depends on: 02-devices, 03-interfaces (Vlan4090, Port-Channel999), 05-vlans-vxlan (VLAN 4090/4091) +# +# All 4 MLAG pairs share domain-id "leafs" and virtual-mac c001.cafe.babe +# but each is a separate MlagDomain object linking two devices. +# MLAG peer VLAN: 4090, MLAG iBGP VLAN: 4091 +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraMlagDomain + data: + # MLAG pair 1: leaf1 + leaf2 + - domain_id: leafs-1-2 + description: MLAG domain for leaf1/leaf2 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - leaf1 + - leaf2 + peer_vlan: "4090" + ibgp_vlan: "4091" + # MLAG pair 2: leaf3 + leaf4 + - domain_id: leafs-3-4 + description: MLAG domain for leaf3/leaf4 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - leaf3 + - leaf4 + peer_vlan: "4090" + ibgp_vlan: "4091" + # MLAG pair 3: leaf5 + leaf6 + - domain_id: leafs-5-6 + description: MLAG domain for leaf5/leaf6 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - leaf5 + - leaf6 + peer_vlan: "4090" + ibgp_vlan: "4091" + # MLAG pair 4: leaf7 + leaf8 + - domain_id: leafs-7-8 + description: MLAG domain for leaf7/leaf8 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - leaf7 + - leaf8 + peer_vlan: "4090" + ibgp_vlan: "4091" +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraMlagPeerConfig + data: + # Leaf1 MLAG peer config + - device: leaf1 + mlag_domain: leafs-1-2 + local_interface_ip: "10.0.199.254/31" + peer_address: "10.0.199.255" + heartbeat_peer_ip: "172.16.0.50" + local_interface: ["leaf1", "Vlan4090"] + peer_link: ["leaf1", "Port-Channel999"] + # Leaf2 MLAG peer config + - device: leaf2 + mlag_domain: leafs-1-2 + local_interface_ip: "10.0.199.255/31" + peer_address: "10.0.199.254" + heartbeat_peer_ip: "172.16.0.25" + local_interface: ["leaf2", "Vlan4090"] + peer_link: ["leaf2", "Port-Channel999"] + # Leaf3 MLAG peer config + - device: leaf3 + mlag_domain: leafs-3-4 + local_interface_ip: "10.0.199.252/31" + peer_address: "10.0.199.253" + heartbeat_peer_ip: "172.16.0.28" + local_interface: ["leaf3", "Vlan4090"] + peer_link: ["leaf3", "Port-Channel999"] + # Leaf4 MLAG peer config + - device: leaf4 + mlag_domain: leafs-3-4 + local_interface_ip: "10.0.199.253/31" + peer_address: "10.0.199.252" + heartbeat_peer_ip: "172.16.0.27" + local_interface: ["leaf4", "Vlan4090"] + peer_link: ["leaf4", "Port-Channel999"] + # Leaf5 MLAG peer config + - device: leaf5 + mlag_domain: leafs-5-6 + local_interface_ip: "10.0.199.250/31" + peer_address: "10.0.199.251" + heartbeat_peer_ip: "172.16.0.30" + local_interface: ["leaf5", "Vlan4090"] + peer_link: ["leaf5", "Port-Channel999"] + # Leaf6 MLAG peer config + - device: leaf6 + mlag_domain: leafs-5-6 + local_interface_ip: "10.0.199.251/31" + peer_address: "10.0.199.250" + heartbeat_peer_ip: "172.16.0.29" + local_interface: ["leaf6", "Vlan4090"] + peer_link: ["leaf6", "Port-Channel999"] + # Leaf7 MLAG peer config + - device: leaf7 + mlag_domain: leafs-7-8 + local_interface_ip: "10.0.199.248/31" + peer_address: "10.0.199.249" + heartbeat_peer_ip: "172.16.0.32" + local_interface: ["leaf7", "Vlan4090"] + peer_link: ["leaf7", "Port-Channel999"] + # Leaf8 MLAG peer config + - device: leaf8 + mlag_domain: leafs-7-8 + local_interface_ip: "10.0.199.249/31" + peer_address: "10.0.199.248" + heartbeat_peer_ip: "172.16.0.31" + local_interface: ["leaf8", "Vlan4090"] + peer_link: ["leaf8", "Port-Channel999"] -- 2.53.0 From 14ebedadcb5fc3d2a0b1d80ecf95e56deb400041 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 12:03:10 +0100 Subject: [PATCH 10/29] =?UTF-8?q?feat(objects):=20declare=20object=20files?= =?UTF-8?q?=20in=20.infrahub.yml=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .infrahub.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.infrahub.yml b/.infrahub.yml index 60b2cb5..de287ab 100644 --- a/.infrahub.yml +++ b/.infrahub.yml @@ -5,3 +5,13 @@ schemas: menus: - menus/fabric-menu.yml + +object_files: + - objects/01-foundation.yml + - objects/02-devices.yml + - objects/03-interfaces.yml + - objects/04-ipam.yml + - objects/05-vlans-vxlan.yml + - objects/06-bgp.yml + - objects/07-vrfs.yml + - objects/08-mlag.yml -- 2.53.0 From 3838169ff717137c8817a216d352c317584d46b6 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 15:03:47 +0100 Subject: [PATCH 11/29] =?UTF-8?q?fix(objects):=20remove=20AS=2064999,=20re?= =?UTF-8?q?name=20fabric=20to=20evpn-lab,=20simplify=20.infrahub.yml=20?= =?UTF-8?q?=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .infrahub.yml | 18 ++++-------------- objects/01-foundation.yml | 5 +---- objects/06-bgp.yml | 16 ++-------------- 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/.infrahub.yml b/.infrahub.yml index de287ab..a302738 100644 --- a/.infrahub.yml +++ b/.infrahub.yml @@ -1,17 +1,7 @@ -# yaml-language-server: $schema=https://schema.infrahub.app/python-sdk/repository-config/latest.json --- schemas: - - schemas/ - + - schemas menus: - - menus/fabric-menu.yml - -object_files: - - objects/01-foundation.yml - - objects/02-devices.yml - - objects/03-interfaces.yml - - objects/04-ipam.yml - - objects/05-vlans-vxlan.yml - - objects/06-bgp.yml - - objects/07-vrfs.yml - - objects/08-mlag.yml + - menus +objects: + - objects diff --git a/objects/01-foundation.yml b/objects/01-foundation.yml index 73267e7..0318c88 100644 --- a/objects/01-foundation.yml +++ b/objects/01-foundation.yml @@ -24,9 +24,6 @@ kind: Object spec: kind: InfraAutonomousSystem data: - - asn: 64999 - description: External border peer - as_type: private - asn: 65000 description: Spine AS as_type: private @@ -48,7 +45,7 @@ kind: Object spec: kind: InfraFabric data: - - name: evpn-fabric + - name: evpn-lab description: Arista EVPN-VXLAN reference fabric underlay_protocol: ebgp overlay_protocol: evpn diff --git a/objects/06-bgp.yml b/objects/06-bgp.yml index 7a0edc5..4564f9b 100644 --- a/objects/06-bgp.yml +++ b/objects/06-bgp.yml @@ -743,7 +743,7 @@ spec: peer_group: ["10.0.250.16", "evpn"] peer_device: spine2 # ============================================================ - # Leaf7 sessions (+ VRF gold border session) + # Leaf7 sessions # ============================================================ - bgp_config: leaf7 peer_address: "10.0.1.12" @@ -770,14 +770,8 @@ spec: description: "EVPN to spine2" peer_group: ["10.0.250.17", "evpn"] peer_device: spine2 - # Border session in VRF gold - - bgp_config: leaf7 - peer_address: "10.90.90.1" - description: "VRF gold border to AS 64999" - remote_asn: "64999" - vrf: gold # ============================================================ - # Leaf8 sessions (+ VRF gold border session) + # Leaf8 sessions # ============================================================ - bgp_config: leaf8 peer_address: "10.0.1.14" @@ -804,12 +798,6 @@ spec: description: "EVPN to spine2" peer_group: ["10.0.250.18", "evpn"] peer_device: spine2 - # Border session in VRF gold - - bgp_config: leaf8 - peer_address: "10.90.90.1" - description: "VRF gold border to AS 64999" - remote_asn: "64999" - vrf: gold --- apiVersion: infrahub.app/v1 kind: Object -- 2.53.0 From 5f071e5716f83d0f03e1691b55d249fbbff49509 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 15:18:40 +0100 Subject: [PATCH 12/29] =?UTF-8?q?fix(objects):=20split=20foundation/fabric?= =?UTF-8?q?=20and=20renumber=20files=20for=20load=20order=20=E2=80=94=20re?= =?UTF-8?q?fs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objects/01-foundation.yml | 16 +--------------- objects/02-fabric.yml | 15 +++++++++++++++ objects/{02-devices.yml => 03-devices.yml} | 0 objects/{03-interfaces.yml => 04-interfaces.yml} | 0 objects/{04-ipam.yml => 05-ipam.yml} | 0 .../{05-vlans-vxlan.yml => 06-vlans-vxlan.yml} | 0 objects/{06-bgp.yml => 07-bgp.yml} | 0 objects/{07-vrfs.yml => 08-vrfs.yml} | 0 objects/{08-mlag.yml => 09-mlag.yml} | 0 9 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 objects/02-fabric.yml rename objects/{02-devices.yml => 03-devices.yml} (100%) rename objects/{03-interfaces.yml => 04-interfaces.yml} (100%) rename objects/{04-ipam.yml => 05-ipam.yml} (100%) rename objects/{05-vlans-vxlan.yml => 06-vlans-vxlan.yml} (100%) rename objects/{06-bgp.yml => 07-bgp.yml} (100%) rename objects/{07-vrfs.yml => 08-vrfs.yml} (100%) rename objects/{08-mlag.yml => 09-mlag.yml} (100%) diff --git a/objects/01-foundation.yml b/objects/01-foundation.yml index 0318c88..b83029f 100644 --- a/objects/01-foundation.yml +++ b/objects/01-foundation.yml @@ -1,4 +1,4 @@ -# Foundation objects: Fabric, Platform, Site, Autonomous Systems +# Foundation objects: Site, Platform, Autonomous Systems # Must be loaded first — referenced by all subsequent files --- apiVersion: infrahub.app/v1 @@ -39,17 +39,3 @@ spec: - asn: 65004 description: Leaf pair 4 (leaf7/leaf8) as_type: private ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraFabric - data: - - name: evpn-lab - description: Arista EVPN-VXLAN reference fabric - underlay_protocol: ebgp - overlay_protocol: evpn - anycast_gateway_mac: "c001.cafe.babe" - spine_asn: "65000" - sites: - - dc1 diff --git a/objects/02-fabric.yml b/objects/02-fabric.yml new file mode 100644 index 0000000..7d7f8fc --- /dev/null +++ b/objects/02-fabric.yml @@ -0,0 +1,15 @@ +# Fabric definition — depends on LocationSite and InfraAutonomousSystem from 01-foundation +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraFabric + data: + - name: evpn-lab + description: Arista EVPN-VXLAN reference fabric + underlay_protocol: ebgp + overlay_protocol: evpn + anycast_gateway_mac: "c001.cafe.babe" + spine_asn: "65000" + sites: + - dc1 diff --git a/objects/02-devices.yml b/objects/03-devices.yml similarity index 100% rename from objects/02-devices.yml rename to objects/03-devices.yml diff --git a/objects/03-interfaces.yml b/objects/04-interfaces.yml similarity index 100% rename from objects/03-interfaces.yml rename to objects/04-interfaces.yml diff --git a/objects/04-ipam.yml b/objects/05-ipam.yml similarity index 100% rename from objects/04-ipam.yml rename to objects/05-ipam.yml diff --git a/objects/05-vlans-vxlan.yml b/objects/06-vlans-vxlan.yml similarity index 100% rename from objects/05-vlans-vxlan.yml rename to objects/06-vlans-vxlan.yml diff --git a/objects/06-bgp.yml b/objects/07-bgp.yml similarity index 100% rename from objects/06-bgp.yml rename to objects/07-bgp.yml diff --git a/objects/07-vrfs.yml b/objects/08-vrfs.yml similarity index 100% rename from objects/07-vrfs.yml rename to objects/08-vrfs.yml diff --git a/objects/08-mlag.yml b/objects/09-mlag.yml similarity index 100% rename from objects/08-mlag.yml rename to objects/09-mlag.yml -- 2.53.0 From 77b39027a31635aa90c120825cbd8949cd492e74 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 15:20:45 +0100 Subject: [PATCH 13/29] =?UTF-8?q?fix(objects):=20list=20object=20files=20e?= =?UTF-8?q?xplicitly=20for=20sequential=20loading=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .infrahub.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.infrahub.yml b/.infrahub.yml index a302738..7caca65 100644 --- a/.infrahub.yml +++ b/.infrahub.yml @@ -4,4 +4,12 @@ schemas: menus: - menus objects: - - objects + - objects/01-foundation.yml + - objects/02-fabric.yml + - objects/03-devices.yml + - objects/04-interfaces.yml + - objects/05-ipam.yml + - objects/06-vlans-vxlan.yml + - objects/07-bgp.yml + - objects/08-vrfs.yml + - objects/09-mlag.yml -- 2.53.0 From 30885b5a196dce5f93e00af3e7e7b6474056326a Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 15:37:20 +0100 Subject: [PATCH 14/29] =?UTF-8?q?fix(objects):=20wrap=20all=20relation=20r?= =?UTF-8?q?eferences=20as=20HFID=20lists=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All relation values now use the HFID list-of-strings format required by infrahubctl: - Cardinality one: device: ["spine1"], platform: ["arista_eos"] - Cardinality many: devices: - ["leaf1"], networks: - ["10.0.250.1/32"] - Composite HFIDs unchanged: peer_group: ["10.0.250.1", "evpn"] Files modified: 02-fabric, 03-devices, 04-interfaces, 06-vlans-vxlan, 07-bgp, 08-vrfs, 09-mlag (05-ipam already correct). --- objects/02-fabric.yml | 4 +- objects/03-devices.yml | 60 ++-- objects/04-interfaces.yml | 252 ++++++++-------- objects/06-vlans-vxlan.yml | 58 ++-- objects/07-bgp.yml | 568 ++++++++++++++++++------------------- objects/08-vrfs.yml | 38 +-- objects/09-mlag.yml | 64 ++--- 7 files changed, 522 insertions(+), 522 deletions(-) diff --git a/objects/02-fabric.yml b/objects/02-fabric.yml index 7d7f8fc..c0861f4 100644 --- a/objects/02-fabric.yml +++ b/objects/02-fabric.yml @@ -10,6 +10,6 @@ spec: underlay_protocol: ebgp overlay_protocol: evpn anycast_gateway_mac: "c001.cafe.babe" - spine_asn: "65000" + spine_asn: ["65000"] sites: - - dc1 + - ["dc1"] diff --git a/objects/03-devices.yml b/objects/03-devices.yml index 2d7603d..96da0e2 100644 --- a/objects/03-devices.yml +++ b/objects/03-devices.yml @@ -11,73 +11,73 @@ spec: description: Spine1 - BGP EVPN Spine role: spine status: active - platform: arista_eos - site: dc1 - asn: "65000" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65000"] - name: spine2 description: Spine2 - BGP EVPN Spine role: spine status: active - platform: arista_eos - site: dc1 - asn: "65000" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65000"] # Leaf pair 1 (VTEP1) - name: leaf1 description: Leaf1 - VTEP1 role: leaf status: active - platform: arista_eos - site: dc1 - asn: "65001" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65001"] - name: leaf2 description: Leaf2 - VTEP1 role: leaf status: active - platform: arista_eos - site: dc1 - asn: "65001" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65001"] # Leaf pair 2 (VTEP2) - name: leaf3 description: Leaf3 - VTEP2 role: leaf status: active - platform: arista_eos - site: dc1 - asn: "65002" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65002"] - name: leaf4 description: Leaf4 - VTEP2 role: leaf status: active - platform: arista_eos - site: dc1 - asn: "65002" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65002"] # Leaf pair 3 (VTEP3) - name: leaf5 description: Leaf5 - VTEP3 role: leaf status: active - platform: arista_eos - site: dc1 - asn: "65003" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65003"] - name: leaf6 description: Leaf6 - VTEP3 role: leaf status: active - platform: arista_eos - site: dc1 - asn: "65003" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65003"] # Leaf pair 4 (VTEP4) - name: leaf7 description: Leaf7 - VTEP4 role: border_leaf status: active - platform: arista_eos - site: dc1 - asn: "65004" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65004"] - name: leaf8 description: Leaf8 - VTEP4 role: border_leaf status: active - platform: arista_eos - site: dc1 - asn: "65004" + platform: ["arista_eos"] + site: ["dc1"] + asn: ["65004"] \ No newline at end of file diff --git a/objects/04-interfaces.yml b/objects/04-interfaces.yml index 526959c..9cccb06 100644 --- a/objects/04-interfaces.yml +++ b/objects/04-interfaces.yml @@ -7,76 +7,76 @@ spec: kind: InfraInterfaceLoopback data: # Spine loopbacks (Lo0 only) - - device: spine1 + - device: ["spine1"] name: Loopback0 description: Router-ID enabled: true - - device: spine2 + - device: ["spine2"] name: Loopback0 description: Router-ID enabled: true # Leaf loopbacks (Lo0 + Lo1) - - device: leaf1 + - device: ["leaf1"] name: Loopback0 description: Router-ID enabled: true - - device: leaf1 + - device: ["leaf1"] name: Loopback1 description: VTEP enabled: true - - device: leaf2 + - device: ["leaf2"] name: Loopback0 description: Router-ID enabled: true - - device: leaf2 + - device: ["leaf2"] name: Loopback1 description: VTEP enabled: true - - device: leaf3 + - device: ["leaf3"] name: Loopback0 description: Router-ID enabled: true - - device: leaf3 + - device: ["leaf3"] name: Loopback1 description: VTEP enabled: true - - device: leaf4 + - device: ["leaf4"] name: Loopback0 description: Router-ID enabled: true - - device: leaf4 + - device: ["leaf4"] name: Loopback1 description: VTEP enabled: true - - device: leaf5 + - device: ["leaf5"] name: Loopback0 description: Router-ID enabled: true - - device: leaf5 + - device: ["leaf5"] name: Loopback1 description: VTEP enabled: true - - device: leaf6 + - device: ["leaf6"] name: Loopback0 description: Router-ID enabled: true - - device: leaf6 + - device: ["leaf6"] name: Loopback1 description: VTEP enabled: true - - device: leaf7 + - device: ["leaf7"] name: Loopback0 description: Router-ID enabled: true - - device: leaf7 + - device: ["leaf7"] name: Loopback1 description: VTEP enabled: true - - device: leaf8 + - device: ["leaf8"] name: Loopback0 description: Router-ID enabled: true - - device: leaf8 + - device: ["leaf8"] name: Loopback1 description: VTEP enabled: true @@ -89,49 +89,49 @@ spec: # ============================================================ # Spine1 Ethernet interfaces (underlay to leafs) # ============================================================ - - device: spine1 + - device: ["spine1"] name: Ethernet1 description: leaf1 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet2 description: leaf2 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet3 description: leaf3 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet4 description: leaf4 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet5 description: leaf5 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet6 description: leaf6 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet7 description: leaf7 enabled: true mtu: 9214 mode: routed - - device: spine1 + - device: ["spine1"] name: Ethernet8 description: leaf8 enabled: true @@ -140,49 +140,49 @@ spec: # ============================================================ # Spine2 Ethernet interfaces (underlay to leafs) # ============================================================ - - device: spine2 + - device: ["spine2"] name: Ethernet1 description: leaf1 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet2 description: leaf2 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet3 description: leaf3 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet4 description: leaf4 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet5 description: leaf5 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet6 description: leaf6 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet7 description: leaf7 enabled: true mtu: 9214 mode: routed - - device: spine2 + - device: ["spine2"] name: Ethernet8 description: leaf8 enabled: true @@ -194,200 +194,200 @@ spec: # Ethernet11 (spine1), Ethernet12 (spine2) # ============================================================ # Leaf1 - - device: leaf1 + - device: ["leaf1"] name: Ethernet1 description: host1 enabled: true mode: trunk lag: ["leaf1", "Port-Channel1"] - - device: leaf1 + - device: ["leaf1"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf1", "Port-Channel999"] - - device: leaf1 + - device: ["leaf1"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf1 + - device: ["leaf1"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf2 - - device: leaf2 + - device: ["leaf2"] name: Ethernet1 description: host1 enabled: true mode: trunk lag: ["leaf2", "Port-Channel1"] - - device: leaf2 + - device: ["leaf2"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf2", "Port-Channel999"] - - device: leaf2 + - device: ["leaf2"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf2 + - device: ["leaf2"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf3 - - device: leaf3 + - device: ["leaf3"] name: Ethernet1 description: host2 enabled: true mode: trunk lag: ["leaf3", "Port-Channel1"] - - device: leaf3 + - device: ["leaf3"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf3", "Port-Channel999"] - - device: leaf3 + - device: ["leaf3"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf3 + - device: ["leaf3"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf4 - - device: leaf4 + - device: ["leaf4"] name: Ethernet1 description: host2 enabled: true mode: trunk lag: ["leaf4", "Port-Channel1"] - - device: leaf4 + - device: ["leaf4"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf4", "Port-Channel999"] - - device: leaf4 + - device: ["leaf4"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf4 + - device: ["leaf4"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf5 - - device: leaf5 + - device: ["leaf5"] name: Ethernet1 description: host3 enabled: true mode: trunk lag: ["leaf5", "Port-Channel1"] - - device: leaf5 + - device: ["leaf5"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf5", "Port-Channel999"] - - device: leaf5 + - device: ["leaf5"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf5 + - device: ["leaf5"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf6 - - device: leaf6 + - device: ["leaf6"] name: Ethernet1 description: host3 enabled: true mode: trunk lag: ["leaf6", "Port-Channel1"] - - device: leaf6 + - device: ["leaf6"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf6", "Port-Channel999"] - - device: leaf6 + - device: ["leaf6"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf6 + - device: ["leaf6"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf7 - - device: leaf7 + - device: ["leaf7"] name: Ethernet1 description: host4 enabled: true mode: trunk lag: ["leaf7", "Port-Channel1"] - - device: leaf7 + - device: ["leaf7"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf7", "Port-Channel999"] - - device: leaf7 + - device: ["leaf7"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf7 + - device: ["leaf7"] name: Ethernet12 description: spine2 enabled: true mtu: 9214 mode: routed # Leaf8 - - device: leaf8 + - device: ["leaf8"] name: Ethernet1 description: host4 enabled: true mode: trunk lag: ["leaf8", "Port-Channel1"] - - device: leaf8 + - device: ["leaf8"] name: Ethernet10 description: mlag peer link enabled: true mode: trunk lag: ["leaf8", "Port-Channel999"] - - device: leaf8 + - device: ["leaf8"] name: Ethernet11 description: spine1 enabled: true mtu: 9214 mode: routed - - device: leaf8 + - device: ["leaf8"] name: Ethernet12 description: spine2 enabled: true @@ -400,90 +400,90 @@ spec: kind: InfraInterfaceLag data: # Port-Channel999 — MLAG peer-link (all leafs) - - device: leaf1 + - device: ["leaf1"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf2 + - device: ["leaf2"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf3 + - device: ["leaf3"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf4 + - device: ["leaf4"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf5 + - device: ["leaf5"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf6 + - device: ["leaf6"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf7 + - device: ["leaf7"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active - - device: leaf8 + - device: ["leaf8"] name: Port-Channel999 description: MLAG Peer enabled: true lacp_mode: active # Port-Channel1 — Host-facing MLAG LAG (all leafs) - - device: leaf1 + - device: ["leaf1"] name: Port-Channel1 description: host1 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf2 + - device: ["leaf2"] name: Port-Channel1 description: host1 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf3 + - device: ["leaf3"] name: Port-Channel1 description: host2 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf4 + - device: ["leaf4"] name: Port-Channel1 description: host2 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf5 + - device: ["leaf5"] name: Port-Channel1 description: host3 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf6 + - device: ["leaf6"] name: Port-Channel1 description: host3 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf7 + - device: ["leaf7"] name: Port-Channel1 description: host4 enabled: true lacp_mode: active mlag_id: 1 - - device: leaf8 + - device: ["leaf8"] name: Port-Channel1 description: host4 enabled: true @@ -496,137 +496,137 @@ spec: kind: InfraInterfaceVlan data: # Vlan4090 — MLAG Peer-Link SVI (all leafs) - - device: leaf1 + - device: ["leaf1"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf2 + vlan: ["4090"] + - device: ["leaf2"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf3 + vlan: ["4090"] + - device: ["leaf3"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf4 + vlan: ["4090"] + - device: ["leaf4"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf5 + vlan: ["4090"] + - device: ["leaf5"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf6 + vlan: ["4090"] + - device: ["leaf6"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf7 + vlan: ["4090"] + - device: ["leaf7"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" - - device: leaf8 + vlan: ["4090"] + - device: ["leaf8"] name: Vlan4090 description: MLAG Peer-Link enabled: true autostate: false - vlan: "4090" + vlan: ["4090"] # Vlan4091 — MLAG iBGP Peering SVI (all leafs) - - device: leaf1 + - device: ["leaf1"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf2 + vlan: ["4091"] + - device: ["leaf2"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf3 + vlan: ["4091"] + - device: ["leaf3"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf4 + vlan: ["4091"] + - device: ["leaf4"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf5 + vlan: ["4091"] + - device: ["leaf5"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf6 + vlan: ["4091"] + - device: ["leaf6"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf7 + vlan: ["4091"] + - device: ["leaf7"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" - - device: leaf8 + vlan: ["4091"] + - device: ["leaf8"] name: Vlan4091 description: MLAG iBGP Peering enabled: true mtu: 9214 - vlan: "4091" + vlan: ["4091"] # Vlan34 — VRF gold subnet (leaf3/leaf4) - - device: leaf3 + - device: ["leaf3"] name: Vlan34 description: VRF gold subnet enabled: true virtual_router_address: "10.34.34.1" - vlan: "34" - - device: leaf4 + vlan: ["34"] + - device: ["leaf4"] name: Vlan34 description: VRF gold subnet enabled: true virtual_router_address: "10.34.34.1" - vlan: "34" + vlan: ["34"] # Vlan78 — VRF gold subnet (leaf7/leaf8) - - device: leaf7 + - device: ["leaf7"] name: Vlan78 description: VRF gold subnet enabled: true virtual_router_address: "10.78.78.1" - vlan: "78" - - device: leaf8 + vlan: ["78"] + - device: ["leaf8"] name: Vlan78 description: VRF gold subnet enabled: true virtual_router_address: "10.78.78.1" - vlan: "78" + vlan: ["78"] # Vlan900 — BGP border peering (leaf7/leaf8) - - device: leaf7 + - device: ["leaf7"] name: Vlan900 description: BGP border peering enabled: true - vlan: "900" - - device: leaf8 + vlan: ["900"] + - device: ["leaf8"] name: Vlan900 description: BGP border peering enabled: true - vlan: "900" + vlan: ["900"] \ No newline at end of file diff --git a/objects/06-vlans-vxlan.yml b/objects/06-vlans-vxlan.yml index edfb4c2..96a4ff8 100644 --- a/objects/06-vlans-vxlan.yml +++ b/objects/06-vlans-vxlan.yml @@ -51,7 +51,7 @@ spec: - vni: 110040 description: L2VNI for VLAN 40 (test-l2-vxlan) vni_type: l2vni - vlan: "40" + vlan: ["40"] - vni: 100001 description: L3VNI for VRF gold vni_type: l3vni @@ -62,49 +62,49 @@ spec: kind: InfraVTEP data: # VTEP on leaf1 (shared VTEP1 IP 10.0.255.11) - - device: leaf1 + - device: ["leaf1"] source_address: "10.0.255.11" udp_port: 4789 learn_restrict: any source_interface: ["leaf1", "Loopback1"] # VTEP on leaf2 (shared VTEP1 IP 10.0.255.11) - - device: leaf2 + - device: ["leaf2"] source_address: "10.0.255.11" udp_port: 4789 learn_restrict: any source_interface: ["leaf2", "Loopback1"] # VTEP on leaf3 (shared VTEP2 IP 10.0.255.12) - - device: leaf3 + - device: ["leaf3"] source_address: "10.0.255.12" udp_port: 4789 learn_restrict: any source_interface: ["leaf3", "Loopback1"] # VTEP on leaf4 (shared VTEP2 IP 10.0.255.12) - - device: leaf4 + - device: ["leaf4"] source_address: "10.0.255.12" udp_port: 4789 learn_restrict: any source_interface: ["leaf4", "Loopback1"] # VTEP on leaf5 (shared VTEP3 IP 10.0.255.13) - - device: leaf5 + - device: ["leaf5"] source_address: "10.0.255.13" udp_port: 4789 learn_restrict: any source_interface: ["leaf5", "Loopback1"] # VTEP on leaf6 (shared VTEP3 IP 10.0.255.13) - - device: leaf6 + - device: ["leaf6"] source_address: "10.0.255.13" udp_port: 4789 learn_restrict: any source_interface: ["leaf6", "Loopback1"] # VTEP on leaf7 (shared VTEP4 IP 10.0.255.14) - - device: leaf7 + - device: ["leaf7"] source_address: "10.0.255.14" udp_port: 4789 learn_restrict: any source_interface: ["leaf7", "Loopback1"] # VTEP on leaf8 (shared VTEP4 IP 10.0.255.14) - - device: leaf8 + - device: ["leaf8"] source_address: "10.0.255.14" udp_port: 4789 learn_restrict: any @@ -116,21 +116,21 @@ spec: kind: InfraVlanVniMapping data: # VLAN 40 <-> VNI 110040 on leaf1/2/5/6 (L2 VXLAN leafs) - - vtep: leaf1 - vlan: "40" - vni: "110040" + - vtep: ["leaf1"] + vlan: ["40"] + vni: ["110040"] description: "VLAN 40 <-> VNI 110040" - - vtep: leaf2 - vlan: "40" - vni: "110040" + - vtep: ["leaf2"] + vlan: ["40"] + vni: ["110040"] description: "VLAN 40 <-> VNI 110040" - - vtep: leaf5 - vlan: "40" - vni: "110040" + - vtep: ["leaf5"] + vlan: ["40"] + vni: ["110040"] description: "VLAN 40 <-> VNI 110040" - - vtep: leaf6 - vlan: "40" - vni: "110040" + - vtep: ["leaf6"] + vlan: ["40"] + vni: ["110040"] description: "VLAN 40 <-> VNI 110040" --- apiVersion: infrahub.app/v1 @@ -140,27 +140,27 @@ spec: data: # EVPN instance for VLAN 40 on L2 VXLAN leafs # leaf1: rd 65001:110040, rt both 40:110040 - - device: leaf1 - vlan: "40" + - device: ["leaf1"] + vlan: ["40"] route_distinguisher: "65001:110040" route_target_import: "40:110040" route_target_export: "40:110040" redistribute_learned: true - - device: leaf2 - vlan: "40" + - device: ["leaf2"] + vlan: ["40"] route_distinguisher: "65001:110040" route_target_import: "40:110040" route_target_export: "40:110040" redistribute_learned: true # leaf5/6: rd 65003:110040, rt both 40:110040 - - device: leaf5 - vlan: "40" + - device: ["leaf5"] + vlan: ["40"] route_distinguisher: "65003:110040" route_target_import: "40:110040" route_target_export: "40:110040" redistribute_learned: true - - device: leaf6 - vlan: "40" + - device: ["leaf6"] + vlan: ["40"] route_distinguisher: "65003:110040" route_target_import: "40:110040" route_target_export: "40:110040" diff --git a/objects/07-bgp.yml b/objects/07-bgp.yml index 4564f9b..9e9d215 100644 --- a/objects/07-bgp.yml +++ b/objects/07-bgp.yml @@ -13,9 +13,9 @@ spec: # ============================================================ # Spine1 BGP — AS 65000, router-id 10.0.250.1 # ============================================================ - - device: spine1 + - device: ["spine1"] router_id: "10.0.250.1" - local_asn: "65000" + local_asn: ["65000"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -26,9 +26,9 @@ spec: # ============================================================ # Spine2 BGP — AS 65000, router-id 10.0.250.2 # ============================================================ - - device: spine2 + - device: ["spine2"] router_id: "10.0.250.2" - local_asn: "65000" + local_asn: ["65000"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -39,9 +39,9 @@ spec: # ============================================================ # Leaf1 BGP — AS 65001, router-id 10.0.250.11 # ============================================================ - - device: leaf1 + - device: ["leaf1"] router_id: "10.0.250.11" - local_asn: "65001" + local_asn: ["65001"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -52,9 +52,9 @@ spec: # ============================================================ # Leaf2 BGP — AS 65001, router-id 10.0.250.12 # ============================================================ - - device: leaf2 + - device: ["leaf2"] router_id: "10.0.250.12" - local_asn: "65001" + local_asn: ["65001"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -65,9 +65,9 @@ spec: # ============================================================ # Leaf3 BGP — AS 65002, router-id 10.0.250.13 # ============================================================ - - device: leaf3 + - device: ["leaf3"] router_id: "10.0.250.13" - local_asn: "65002" + local_asn: ["65002"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -78,9 +78,9 @@ spec: # ============================================================ # Leaf4 BGP — AS 65002, router-id 10.0.250.14 # ============================================================ - - device: leaf4 + - device: ["leaf4"] router_id: "10.0.250.14" - local_asn: "65002" + local_asn: ["65002"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -91,9 +91,9 @@ spec: # ============================================================ # Leaf5 BGP — AS 65003, router-id 10.0.250.15 # ============================================================ - - device: leaf5 + - device: ["leaf5"] router_id: "10.0.250.15" - local_asn: "65003" + local_asn: ["65003"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -104,9 +104,9 @@ spec: # ============================================================ # Leaf6 BGP — AS 65003, router-id 10.0.250.16 # ============================================================ - - device: leaf6 + - device: ["leaf6"] router_id: "10.0.250.16" - local_asn: "65003" + local_asn: ["65003"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -117,9 +117,9 @@ spec: # ============================================================ # Leaf7 BGP — AS 65004, router-id 10.0.250.17 # ============================================================ - - device: leaf7 + - device: ["leaf7"] router_id: "10.0.250.17" - local_asn: "65004" + local_asn: ["65004"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -130,9 +130,9 @@ spec: # ============================================================ # Leaf8 BGP — AS 65004, router-id 10.0.250.18 # ============================================================ - - device: leaf8 + - device: ["leaf8"] router_id: "10.0.250.18" - local_asn: "65004" + local_asn: ["65004"] default_ipv4_unicast: false log_neighbor_changes: true ecmp_max_paths: 4 @@ -150,7 +150,7 @@ spec: # Spine peer-groups (evpn only — underlay neighbors are direct) # ============================================================ # Spine1 — evpn peer-group - - bgp_config: spine1 + - bgp_config: ["spine1"] name: evpn description: EVPN overlay to leaf loopbacks peer_group_type: evpn @@ -161,7 +161,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true # Spine2 — evpn peer-group - - bgp_config: spine2 + - bgp_config: ["spine2"] name: evpn description: EVPN overlay to leaf loopbacks peer_group_type: evpn @@ -175,208 +175,208 @@ spec: # Leaf peer-groups (underlay, underlay_ibgp, evpn) # ============================================================ # Leaf1 - - bgp_config: leaf1 + - bgp_config: ["leaf1"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf1 + - bgp_config: ["leaf1"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65001" + remote_asn: ["65001"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf1 + - bgp_config: ["leaf1"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf2 - - bgp_config: leaf2 + - bgp_config: ["leaf2"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf2 + - bgp_config: ["leaf2"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65001" + remote_asn: ["65001"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf2 + - bgp_config: ["leaf2"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf3 - - bgp_config: leaf3 + - bgp_config: ["leaf3"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf3 + - bgp_config: ["leaf3"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65002" + remote_asn: ["65002"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf3 + - bgp_config: ["leaf3"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf4 - - bgp_config: leaf4 + - bgp_config: ["leaf4"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf4 + - bgp_config: ["leaf4"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65002" + remote_asn: ["65002"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf4 + - bgp_config: ["leaf4"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf5 - - bgp_config: leaf5 + - bgp_config: ["leaf5"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf5 + - bgp_config: ["leaf5"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65003" + remote_asn: ["65003"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf5 + - bgp_config: ["leaf5"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf6 - - bgp_config: leaf6 + - bgp_config: ["leaf6"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf6 + - bgp_config: ["leaf6"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65003" + remote_asn: ["65003"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf6 + - bgp_config: ["leaf6"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf7 - - bgp_config: leaf7 + - bgp_config: ["leaf7"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf7 + - bgp_config: ["leaf7"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65004" + remote_asn: ["65004"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf7 + - bgp_config: ["leaf7"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true # Leaf8 - - bgp_config: leaf8 + - bgp_config: ["leaf8"] name: underlay description: Underlay eBGP to spines peer_group_type: underlay - remote_asn: "65000" + remote_asn: ["65000"] maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf8 + - bgp_config: ["leaf8"] name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp - remote_asn: "65004" + remote_asn: ["65004"] next_hop_self: true maximum_routes: 12000 maximum_routes_warning_only: true - - bgp_config: leaf8 + - bgp_config: ["leaf8"] name: evpn description: EVPN overlay to spines peer_group_type: evpn - remote_asn: "65000" + remote_asn: ["65000"] update_source: Loopback0 ebgp_multihop: 3 send_community: extended @@ -392,412 +392,412 @@ spec: # Spine1 sessions # ============================================================ # Spine1 underlay (direct neighbors, no peer-group — use remote_asn) - - bgp_config: spine1 + - bgp_config: ["spine1"] peer_address: "10.0.1.1" description: "underlay to leaf1" - remote_asn: "65001" - peer_device: leaf1 - - bgp_config: spine1 + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine1"] peer_address: "10.0.1.3" description: "underlay to leaf2" - remote_asn: "65001" - peer_device: leaf2 - - bgp_config: spine1 + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine1"] peer_address: "10.0.1.5" description: "underlay to leaf3" - remote_asn: "65002" - peer_device: leaf3 - - bgp_config: spine1 + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine1"] peer_address: "10.0.1.7" description: "underlay to leaf4" - remote_asn: "65002" - peer_device: leaf4 - - bgp_config: spine1 + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine1"] peer_address: "10.0.1.9" description: "underlay to leaf5" - remote_asn: "65003" - peer_device: leaf5 - - bgp_config: spine1 + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine1"] peer_address: "10.0.1.11" description: "underlay to leaf6" - remote_asn: "65003" - peer_device: leaf6 - - bgp_config: spine1 + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine1"] peer_address: "10.0.1.13" description: "underlay to leaf7" - remote_asn: "65004" - peer_device: leaf7 - - bgp_config: spine1 + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine1"] peer_address: "10.0.1.15" description: "underlay to leaf8" - remote_asn: "65004" - peer_device: leaf8 + remote_asn: ["65004"] + peer_device: ["leaf8"] # Spine1 EVPN (via evpn peer-group) - - bgp_config: spine1 + - bgp_config: ["spine1"] peer_address: "10.0.250.11" description: "EVPN to leaf1" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65001" - peer_device: leaf1 - - bgp_config: spine1 + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine1"] peer_address: "10.0.250.12" description: "EVPN to leaf2" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65001" - peer_device: leaf2 - - bgp_config: spine1 + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine1"] peer_address: "10.0.250.13" description: "EVPN to leaf3" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65002" - peer_device: leaf3 - - bgp_config: spine1 + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine1"] peer_address: "10.0.250.14" description: "EVPN to leaf4" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65002" - peer_device: leaf4 - - bgp_config: spine1 + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine1"] peer_address: "10.0.250.15" description: "EVPN to leaf5" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65003" - peer_device: leaf5 - - bgp_config: spine1 + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine1"] peer_address: "10.0.250.16" description: "EVPN to leaf6" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65003" - peer_device: leaf6 - - bgp_config: spine1 + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine1"] peer_address: "10.0.250.17" description: "EVPN to leaf7" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65004" - peer_device: leaf7 - - bgp_config: spine1 + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine1"] peer_address: "10.0.250.18" description: "EVPN to leaf8" peer_group: ["10.0.250.1", "evpn"] - remote_asn: "65004" - peer_device: leaf8 + remote_asn: ["65004"] + peer_device: ["leaf8"] # ============================================================ # Spine2 sessions # ============================================================ # Spine2 underlay - - bgp_config: spine2 + - bgp_config: ["spine2"] peer_address: "10.0.2.1" description: "underlay to leaf1" - remote_asn: "65001" - peer_device: leaf1 - - bgp_config: spine2 + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine2"] peer_address: "10.0.2.3" description: "underlay to leaf2" - remote_asn: "65001" - peer_device: leaf2 - - bgp_config: spine2 + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine2"] peer_address: "10.0.2.5" description: "underlay to leaf3" - remote_asn: "65002" - peer_device: leaf3 - - bgp_config: spine2 + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine2"] peer_address: "10.0.2.7" description: "underlay to leaf4" - remote_asn: "65002" - peer_device: leaf4 - - bgp_config: spine2 + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine2"] peer_address: "10.0.2.9" description: "underlay to leaf5" - remote_asn: "65003" - peer_device: leaf5 - - bgp_config: spine2 + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine2"] peer_address: "10.0.2.11" description: "underlay to leaf6" - remote_asn: "65003" - peer_device: leaf6 - - bgp_config: spine2 + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine2"] peer_address: "10.0.2.13" description: "underlay to leaf7" - remote_asn: "65004" - peer_device: leaf7 - - bgp_config: spine2 + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine2"] peer_address: "10.0.2.15" description: "underlay to leaf8" - remote_asn: "65004" - peer_device: leaf8 + remote_asn: ["65004"] + peer_device: ["leaf8"] # Spine2 EVPN - - bgp_config: spine2 + - bgp_config: ["spine2"] peer_address: "10.0.250.11" description: "EVPN to leaf1" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65001" - peer_device: leaf1 - - bgp_config: spine2 + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine2"] peer_address: "10.0.250.12" description: "EVPN to leaf2" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65001" - peer_device: leaf2 - - bgp_config: spine2 + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine2"] peer_address: "10.0.250.13" description: "EVPN to leaf3" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65002" - peer_device: leaf3 - - bgp_config: spine2 + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine2"] peer_address: "10.0.250.14" description: "EVPN to leaf4" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65002" - peer_device: leaf4 - - bgp_config: spine2 + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine2"] peer_address: "10.0.250.15" description: "EVPN to leaf5" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65003" - peer_device: leaf5 - - bgp_config: spine2 + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine2"] peer_address: "10.0.250.16" description: "EVPN to leaf6" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65003" - peer_device: leaf6 - - bgp_config: spine2 + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine2"] peer_address: "10.0.250.17" description: "EVPN to leaf7" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65004" - peer_device: leaf7 - - bgp_config: spine2 + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine2"] peer_address: "10.0.250.18" description: "EVPN to leaf8" peer_group: ["10.0.250.2", "evpn"] - remote_asn: "65004" - peer_device: leaf8 + remote_asn: ["65004"] + peer_device: ["leaf8"] # ============================================================ # Leaf1 sessions # ============================================================ - - bgp_config: leaf1 + - bgp_config: ["leaf1"] peer_address: "10.0.1.0" description: "underlay to spine1" peer_group: ["10.0.250.11", "underlay"] - peer_device: spine1 - - bgp_config: leaf1 + peer_device: ["spine1"] + - bgp_config: ["leaf1"] peer_address: "10.0.2.0" description: "underlay to spine2" peer_group: ["10.0.250.11", "underlay"] - peer_device: spine2 - - bgp_config: leaf1 + peer_device: ["spine2"] + - bgp_config: ["leaf1"] peer_address: "10.0.3.1" description: "iBGP to leaf2" peer_group: ["10.0.250.11", "underlay_ibgp"] - peer_device: leaf2 - - bgp_config: leaf1 + peer_device: ["leaf2"] + - bgp_config: ["leaf1"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.11", "evpn"] - peer_device: spine1 - - bgp_config: leaf1 + peer_device: ["spine1"] + - bgp_config: ["leaf1"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.11", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf2 sessions # ============================================================ - - bgp_config: leaf2 + - bgp_config: ["leaf2"] peer_address: "10.0.1.2" description: "underlay to spine1" peer_group: ["10.0.250.12", "underlay"] - peer_device: spine1 - - bgp_config: leaf2 + peer_device: ["spine1"] + - bgp_config: ["leaf2"] peer_address: "10.0.2.2" description: "underlay to spine2" peer_group: ["10.0.250.12", "underlay"] - peer_device: spine2 - - bgp_config: leaf2 + peer_device: ["spine2"] + - bgp_config: ["leaf2"] peer_address: "10.0.3.0" description: "iBGP to leaf1" peer_group: ["10.0.250.12", "underlay_ibgp"] - peer_device: leaf1 - - bgp_config: leaf2 + peer_device: ["leaf1"] + - bgp_config: ["leaf2"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.12", "evpn"] - peer_device: spine1 - - bgp_config: leaf2 + peer_device: ["spine1"] + - bgp_config: ["leaf2"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.12", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf3 sessions # ============================================================ - - bgp_config: leaf3 + - bgp_config: ["leaf3"] peer_address: "10.0.1.4" description: "underlay to spine1" peer_group: ["10.0.250.13", "underlay"] - peer_device: spine1 - - bgp_config: leaf3 + peer_device: ["spine1"] + - bgp_config: ["leaf3"] peer_address: "10.0.2.4" description: "underlay to spine2" peer_group: ["10.0.250.13", "underlay"] - peer_device: spine2 - - bgp_config: leaf3 + peer_device: ["spine2"] + - bgp_config: ["leaf3"] peer_address: "10.0.3.3" description: "iBGP to leaf4" peer_group: ["10.0.250.13", "underlay_ibgp"] - peer_device: leaf4 - - bgp_config: leaf3 + peer_device: ["leaf4"] + - bgp_config: ["leaf3"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.13", "evpn"] - peer_device: spine1 - - bgp_config: leaf3 + peer_device: ["spine1"] + - bgp_config: ["leaf3"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.13", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf4 sessions # ============================================================ - - bgp_config: leaf4 + - bgp_config: ["leaf4"] peer_address: "10.0.1.6" description: "underlay to spine1" peer_group: ["10.0.250.14", "underlay"] - peer_device: spine1 - - bgp_config: leaf4 + peer_device: ["spine1"] + - bgp_config: ["leaf4"] peer_address: "10.0.2.6" description: "underlay to spine2" peer_group: ["10.0.250.14", "underlay"] - peer_device: spine2 - - bgp_config: leaf4 + peer_device: ["spine2"] + - bgp_config: ["leaf4"] peer_address: "10.0.3.2" description: "iBGP to leaf3" peer_group: ["10.0.250.14", "underlay_ibgp"] - peer_device: leaf3 - - bgp_config: leaf4 + peer_device: ["leaf3"] + - bgp_config: ["leaf4"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.14", "evpn"] - peer_device: spine1 - - bgp_config: leaf4 + peer_device: ["spine1"] + - bgp_config: ["leaf4"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.14", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf5 sessions # ============================================================ - - bgp_config: leaf5 + - bgp_config: ["leaf5"] peer_address: "10.0.1.8" description: "underlay to spine1" peer_group: ["10.0.250.15", "underlay"] - peer_device: spine1 - - bgp_config: leaf5 + peer_device: ["spine1"] + - bgp_config: ["leaf5"] peer_address: "10.0.2.8" description: "underlay to spine2" peer_group: ["10.0.250.15", "underlay"] - peer_device: spine2 - - bgp_config: leaf5 + peer_device: ["spine2"] + - bgp_config: ["leaf5"] peer_address: "10.0.3.5" description: "iBGP to leaf6" peer_group: ["10.0.250.15", "underlay_ibgp"] - peer_device: leaf6 - - bgp_config: leaf5 + peer_device: ["leaf6"] + - bgp_config: ["leaf5"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.15", "evpn"] - peer_device: spine1 - - bgp_config: leaf5 + peer_device: ["spine1"] + - bgp_config: ["leaf5"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.15", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf6 sessions # ============================================================ - - bgp_config: leaf6 + - bgp_config: ["leaf6"] peer_address: "10.0.1.10" description: "underlay to spine1" peer_group: ["10.0.250.16", "underlay"] - peer_device: spine1 - - bgp_config: leaf6 + peer_device: ["spine1"] + - bgp_config: ["leaf6"] peer_address: "10.0.2.10" description: "underlay to spine2" peer_group: ["10.0.250.16", "underlay"] - peer_device: spine2 - - bgp_config: leaf6 + peer_device: ["spine2"] + - bgp_config: ["leaf6"] peer_address: "10.0.3.4" description: "iBGP to leaf5" peer_group: ["10.0.250.16", "underlay_ibgp"] - peer_device: leaf5 - - bgp_config: leaf6 + peer_device: ["leaf5"] + - bgp_config: ["leaf6"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.16", "evpn"] - peer_device: spine1 - - bgp_config: leaf6 + peer_device: ["spine1"] + - bgp_config: ["leaf6"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.16", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf7 sessions # ============================================================ - - bgp_config: leaf7 + - bgp_config: ["leaf7"] peer_address: "10.0.1.12" description: "underlay to spine1" peer_group: ["10.0.250.17", "underlay"] - peer_device: spine1 - - bgp_config: leaf7 + peer_device: ["spine1"] + - bgp_config: ["leaf7"] peer_address: "10.0.2.12" description: "underlay to spine2" peer_group: ["10.0.250.17", "underlay"] - peer_device: spine2 - - bgp_config: leaf7 + peer_device: ["spine2"] + - bgp_config: ["leaf7"] peer_address: "10.0.3.7" description: "iBGP to leaf8" peer_group: ["10.0.250.17", "underlay_ibgp"] - peer_device: leaf8 - - bgp_config: leaf7 + peer_device: ["leaf8"] + - bgp_config: ["leaf7"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.17", "evpn"] - peer_device: spine1 - - bgp_config: leaf7 + peer_device: ["spine1"] + - bgp_config: ["leaf7"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.17", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] # ============================================================ # Leaf8 sessions # ============================================================ - - bgp_config: leaf8 + - bgp_config: ["leaf8"] peer_address: "10.0.1.14" description: "underlay to spine1" peer_group: ["10.0.250.18", "underlay"] - peer_device: spine1 - - bgp_config: leaf8 + peer_device: ["spine1"] + - bgp_config: ["leaf8"] peer_address: "10.0.2.14" description: "underlay to spine2" peer_group: ["10.0.250.18", "underlay"] - peer_device: spine2 - - bgp_config: leaf8 + peer_device: ["spine2"] + - bgp_config: ["leaf8"] peer_address: "10.0.3.6" description: "iBGP to leaf7" peer_group: ["10.0.250.18", "underlay_ibgp"] - peer_device: leaf7 - - bgp_config: leaf8 + peer_device: ["leaf7"] + - bgp_config: ["leaf8"] peer_address: "10.0.250.1" description: "EVPN to spine1" peer_group: ["10.0.250.18", "evpn"] - peer_device: spine1 - - bgp_config: leaf8 + peer_device: ["spine1"] + - bgp_config: ["leaf8"] peer_address: "10.0.250.2" description: "EVPN to spine2" peer_group: ["10.0.250.18", "evpn"] - peer_device: spine2 + peer_device: ["spine2"] --- apiVersion: infrahub.app/v1 kind: Object @@ -807,12 +807,12 @@ spec: # ============================================================ # Spine1 address families # ============================================================ - - bgp_config: spine1 + - bgp_config: ["spine1"] afi: ipv4 safi: unicast networks: - - "10.0.250.1/32" - - bgp_config: spine1 + - ["10.0.250.1/32"] + - bgp_config: ["spine1"] afi: evpn safi: unicast active_peer_groups: @@ -820,12 +820,12 @@ spec: # ============================================================ # Spine2 address families # ============================================================ - - bgp_config: spine2 + - bgp_config: ["spine2"] afi: ipv4 safi: unicast networks: - - "10.0.250.2/32" - - bgp_config: spine2 + - ["10.0.250.2/32"] + - bgp_config: ["spine2"] afi: evpn safi: unicast active_peer_groups: @@ -833,16 +833,16 @@ spec: # ============================================================ # Leaf1 address families # ============================================================ - - bgp_config: leaf1 + - bgp_config: ["leaf1"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.11", "underlay"] - ["10.0.250.11", "underlay_ibgp"] networks: - - "10.0.250.11/32" - - "10.0.255.11/32" - - bgp_config: leaf1 + - ["10.0.250.11/32"] + - ["10.0.255.11/32"] + - bgp_config: ["leaf1"] afi: evpn safi: unicast active_peer_groups: @@ -850,16 +850,16 @@ spec: # ============================================================ # Leaf2 address families # ============================================================ - - bgp_config: leaf2 + - bgp_config: ["leaf2"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.12", "underlay"] - ["10.0.250.12", "underlay_ibgp"] networks: - - "10.0.250.12/32" - - "10.0.255.11/32" - - bgp_config: leaf2 + - ["10.0.250.12/32"] + - ["10.0.255.11/32"] + - bgp_config: ["leaf2"] afi: evpn safi: unicast active_peer_groups: @@ -867,16 +867,16 @@ spec: # ============================================================ # Leaf3 address families # ============================================================ - - bgp_config: leaf3 + - bgp_config: ["leaf3"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.13", "underlay"] - ["10.0.250.13", "underlay_ibgp"] networks: - - "10.0.250.13/32" - - "10.0.255.12/32" - - bgp_config: leaf3 + - ["10.0.250.13/32"] + - ["10.0.255.12/32"] + - bgp_config: ["leaf3"] afi: evpn safi: unicast active_peer_groups: @@ -884,16 +884,16 @@ spec: # ============================================================ # Leaf4 address families # ============================================================ - - bgp_config: leaf4 + - bgp_config: ["leaf4"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.14", "underlay"] - ["10.0.250.14", "underlay_ibgp"] networks: - - "10.0.250.14/32" - - "10.0.255.12/32" - - bgp_config: leaf4 + - ["10.0.250.14/32"] + - ["10.0.255.12/32"] + - bgp_config: ["leaf4"] afi: evpn safi: unicast active_peer_groups: @@ -901,16 +901,16 @@ spec: # ============================================================ # Leaf5 address families # ============================================================ - - bgp_config: leaf5 + - bgp_config: ["leaf5"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.15", "underlay"] - ["10.0.250.15", "underlay_ibgp"] networks: - - "10.0.250.15/32" - - "10.0.255.13/32" - - bgp_config: leaf5 + - ["10.0.250.15/32"] + - ["10.0.255.13/32"] + - bgp_config: ["leaf5"] afi: evpn safi: unicast active_peer_groups: @@ -918,16 +918,16 @@ spec: # ============================================================ # Leaf6 address families # ============================================================ - - bgp_config: leaf6 + - bgp_config: ["leaf6"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.16", "underlay"] - ["10.0.250.16", "underlay_ibgp"] networks: - - "10.0.250.16/32" - - "10.0.255.13/32" - - bgp_config: leaf6 + - ["10.0.250.16/32"] + - ["10.0.255.13/32"] + - bgp_config: ["leaf6"] afi: evpn safi: unicast active_peer_groups: @@ -935,16 +935,16 @@ spec: # ============================================================ # Leaf7 address families # ============================================================ - - bgp_config: leaf7 + - bgp_config: ["leaf7"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.17", "underlay"] - ["10.0.250.17", "underlay_ibgp"] networks: - - "10.0.250.17/32" - - "10.0.255.14/32" - - bgp_config: leaf7 + - ["10.0.250.17/32"] + - ["10.0.255.14/32"] + - bgp_config: ["leaf7"] afi: evpn safi: unicast active_peer_groups: @@ -952,16 +952,16 @@ spec: # ============================================================ # Leaf8 address families # ============================================================ - - bgp_config: leaf8 + - bgp_config: ["leaf8"] afi: ipv4 safi: unicast active_peer_groups: - ["10.0.250.18", "underlay"] - ["10.0.250.18", "underlay_ibgp"] networks: - - "10.0.250.18/32" - - "10.0.255.14/32" - - bgp_config: leaf8 + - ["10.0.250.18/32"] + - ["10.0.255.14/32"] + - bgp_config: ["leaf8"] afi: evpn safi: unicast active_peer_groups: diff --git a/objects/08-vrfs.yml b/objects/08-vrfs.yml index fac035d..9f5adb6 100644 --- a/objects/08-vrfs.yml +++ b/objects/08-vrfs.yml @@ -21,42 +21,42 @@ spec: data: - name: gold description: VRF gold - L3 VXLAN with symmetric IRB - l3vni: "100001" + l3vni: ["100001"] import_targets: - - "1:100001" + - ["1:100001"] export_targets: - - "1:100001" + - ["1:100001"] --- apiVersion: infrahub.app/v1 kind: Object spec: kind: InfraVRFDeviceAssignment data: - - device: leaf3 - vrf: gold + - device: ["leaf3"] + vrf: ["gold"] route_distinguisher: "10.0.250.13:1" import_targets: - - "1:100001" + - ["1:100001"] export_targets: - - "1:100001" - - device: leaf4 - vrf: gold + - ["1:100001"] + - device: ["leaf4"] + vrf: ["gold"] route_distinguisher: "10.0.250.14:1" import_targets: - - "1:100001" + - ["1:100001"] export_targets: - - "1:100001" - - device: leaf7 - vrf: gold + - ["1:100001"] + - device: ["leaf7"] + vrf: ["gold"] route_distinguisher: "10.0.250.17:1" import_targets: - - "1:100001" + - ["1:100001"] export_targets: - - "1:100001" - - device: leaf8 - vrf: gold + - ["1:100001"] + - device: ["leaf8"] + vrf: ["gold"] route_distinguisher: "10.0.250.18:1" import_targets: - - "1:100001" + - ["1:100001"] export_targets: - - "1:100001" + - ["1:100001"] diff --git a/objects/09-mlag.yml b/objects/09-mlag.yml index d2e4809..29b8e56 100644 --- a/objects/09-mlag.yml +++ b/objects/09-mlag.yml @@ -19,10 +19,10 @@ spec: dual_primary_delay: 10 dual_primary_action: errdisable devices: - - leaf1 - - leaf2 - peer_vlan: "4090" - ibgp_vlan: "4091" + - ["leaf1"] + - ["leaf2"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] # MLAG pair 2: leaf3 + leaf4 - domain_id: leafs-3-4 description: MLAG domain for leaf3/leaf4 pair @@ -32,10 +32,10 @@ spec: dual_primary_delay: 10 dual_primary_action: errdisable devices: - - leaf3 - - leaf4 - peer_vlan: "4090" - ibgp_vlan: "4091" + - ["leaf3"] + - ["leaf4"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] # MLAG pair 3: leaf5 + leaf6 - domain_id: leafs-5-6 description: MLAG domain for leaf5/leaf6 pair @@ -45,10 +45,10 @@ spec: dual_primary_delay: 10 dual_primary_action: errdisable devices: - - leaf5 - - leaf6 - peer_vlan: "4090" - ibgp_vlan: "4091" + - ["leaf5"] + - ["leaf6"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] # MLAG pair 4: leaf7 + leaf8 - domain_id: leafs-7-8 description: MLAG domain for leaf7/leaf8 pair @@ -58,10 +58,10 @@ spec: dual_primary_delay: 10 dual_primary_action: errdisable devices: - - leaf7 - - leaf8 - peer_vlan: "4090" - ibgp_vlan: "4091" + - ["leaf7"] + - ["leaf8"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] --- apiVersion: infrahub.app/v1 kind: Object @@ -69,64 +69,64 @@ spec: kind: InfraMlagPeerConfig data: # Leaf1 MLAG peer config - - device: leaf1 - mlag_domain: leafs-1-2 + - device: ["leaf1"] + mlag_domain: ["leafs-1-2"] local_interface_ip: "10.0.199.254/31" peer_address: "10.0.199.255" heartbeat_peer_ip: "172.16.0.50" local_interface: ["leaf1", "Vlan4090"] peer_link: ["leaf1", "Port-Channel999"] # Leaf2 MLAG peer config - - device: leaf2 - mlag_domain: leafs-1-2 + - device: ["leaf2"] + mlag_domain: ["leafs-1-2"] local_interface_ip: "10.0.199.255/31" peer_address: "10.0.199.254" heartbeat_peer_ip: "172.16.0.25" local_interface: ["leaf2", "Vlan4090"] peer_link: ["leaf2", "Port-Channel999"] # Leaf3 MLAG peer config - - device: leaf3 - mlag_domain: leafs-3-4 + - device: ["leaf3"] + mlag_domain: ["leafs-3-4"] local_interface_ip: "10.0.199.252/31" peer_address: "10.0.199.253" heartbeat_peer_ip: "172.16.0.28" local_interface: ["leaf3", "Vlan4090"] peer_link: ["leaf3", "Port-Channel999"] # Leaf4 MLAG peer config - - device: leaf4 - mlag_domain: leafs-3-4 + - device: ["leaf4"] + mlag_domain: ["leafs-3-4"] local_interface_ip: "10.0.199.253/31" peer_address: "10.0.199.252" heartbeat_peer_ip: "172.16.0.27" local_interface: ["leaf4", "Vlan4090"] peer_link: ["leaf4", "Port-Channel999"] # Leaf5 MLAG peer config - - device: leaf5 - mlag_domain: leafs-5-6 + - device: ["leaf5"] + mlag_domain: ["leafs-5-6"] local_interface_ip: "10.0.199.250/31" peer_address: "10.0.199.251" heartbeat_peer_ip: "172.16.0.30" local_interface: ["leaf5", "Vlan4090"] peer_link: ["leaf5", "Port-Channel999"] # Leaf6 MLAG peer config - - device: leaf6 - mlag_domain: leafs-5-6 + - device: ["leaf6"] + mlag_domain: ["leafs-5-6"] local_interface_ip: "10.0.199.251/31" peer_address: "10.0.199.250" heartbeat_peer_ip: "172.16.0.29" local_interface: ["leaf6", "Vlan4090"] peer_link: ["leaf6", "Port-Channel999"] # Leaf7 MLAG peer config - - device: leaf7 - mlag_domain: leafs-7-8 + - device: ["leaf7"] + mlag_domain: ["leafs-7-8"] local_interface_ip: "10.0.199.248/31" peer_address: "10.0.199.249" heartbeat_peer_ip: "172.16.0.32" local_interface: ["leaf7", "Vlan4090"] peer_link: ["leaf7", "Port-Channel999"] # Leaf8 MLAG peer config - - device: leaf8 - mlag_domain: leafs-7-8 + - device: ["leaf8"] + mlag_domain: ["leafs-7-8"] local_interface_ip: "10.0.199.249/31" peer_address: "10.0.199.248" heartbeat_peer_ip: "172.16.0.31" -- 2.53.0 From 50cdb911a4affd85ec5f07e735a20c4fd09e76b3 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 16:01:45 +0100 Subject: [PATCH 15/29] =?UTF-8?q?fix(objects):=20reorder=20interfaces=20?= =?UTF-8?q?=E2=80=94=20LAG=20before=20Ethernet=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit InfraInterfaceEthernet references InfraInterfaceLag (lag field), so LAG interfaces must be created first within the same file. New order: Loopback → Lag → Ethernet → Vlan SVI --- objects/04-interfaces.yml | 192 +++++++++++++++++++------------------- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/objects/04-interfaces.yml b/objects/04-interfaces.yml index 9cccb06..12ae0f7 100644 --- a/objects/04-interfaces.yml +++ b/objects/04-interfaces.yml @@ -83,6 +83,102 @@ spec: --- apiVersion: infrahub.app/v1 kind: Object +spec: + kind: InfraInterfaceLag + data: + # Port-Channel999 — MLAG peer-link (all leafs) + - device: ["leaf1"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf2"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf3"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf4"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf5"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf6"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf7"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + - device: ["leaf8"] + name: Port-Channel999 + description: MLAG Peer + enabled: true + lacp_mode: active + # Port-Channel1 — Host-facing MLAG LAG (all leafs) + - device: ["leaf1"] + name: Port-Channel1 + description: host1 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf2"] + name: Port-Channel1 + description: host1 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf3"] + name: Port-Channel1 + description: host2 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf4"] + name: Port-Channel1 + description: host2 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf5"] + name: Port-Channel1 + description: host3 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf6"] + name: Port-Channel1 + description: host3 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf7"] + name: Port-Channel1 + description: host4 + enabled: true + lacp_mode: active + mlag_id: 1 + - device: ["leaf8"] + name: Port-Channel1 + description: host4 + enabled: true + lacp_mode: active + mlag_id: 1 +--- +apiVersion: infrahub.app/v1 +kind: Object spec: kind: InfraInterfaceEthernet data: @@ -396,102 +492,6 @@ spec: --- apiVersion: infrahub.app/v1 kind: Object -spec: - kind: InfraInterfaceLag - data: - # Port-Channel999 — MLAG peer-link (all leafs) - - device: ["leaf1"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf2"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf3"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf4"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf5"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf6"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf7"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf8"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - # Port-Channel1 — Host-facing MLAG LAG (all leafs) - - device: ["leaf1"] - name: Port-Channel1 - description: host1 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf2"] - name: Port-Channel1 - description: host1 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf3"] - name: Port-Channel1 - description: host2 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf4"] - name: Port-Channel1 - description: host2 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf5"] - name: Port-Channel1 - description: host3 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf6"] - name: Port-Channel1 - description: host3 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf7"] - name: Port-Channel1 - description: host4 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf8"] - name: Port-Channel1 - description: host4 - enabled: true - lacp_mode: active - mlag_id: 1 ---- -apiVersion: infrahub.app/v1 -kind: Object spec: kind: InfraInterfaceVlan data: -- 2.53.0 From 97720d3d6d8e26f51773f5fd9a2d22c616ed1a19 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 16:04:42 +0100 Subject: [PATCH 16/29] =?UTF-8?q?fix(objects):=20split=20Vlan=20SVIs=20and?= =?UTF-8?q?=20IPs=20for=20load=20ordering=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit InfraInterfaceVlan references InfraVLAN objects (06-vlans-vxlan.yml), so Vlan SVIs must load after VLANs. Similarly, Vlan IP addresses reference Vlan SVIs. Changes: - Extract InfraInterfaceVlan from 04 into 07-interface-vlans.yml - Extract Vlan SVI IPs from 05 into 08-ipam-vlans.yml - Rename 07-bgp→09, 08-vrfs→10, 09-mlag→11 - Update .infrahub.yml with new 11-file load order Load order: foundation → fabric → devices → interfaces (Lo/Lag/Eth) → ipam (Lo/Eth) → vlans-vxlan → interface-vlans → ipam-vlans → bgp → vrfs → mlag --- .infrahub.yml | 8 +- objects/04-interfaces.yml | 142 +------------------------- objects/05-ipam.yml | 79 +-------------- objects/07-interface-vlans.yml | 143 +++++++++++++++++++++++++++ objects/08-ipam-vlans.yml | 86 ++++++++++++++++ objects/{07-bgp.yml => 09-bgp.yml} | 0 objects/{08-vrfs.yml => 10-vrfs.yml} | 0 objects/{09-mlag.yml => 11-mlag.yml} | 0 8 files changed, 236 insertions(+), 222 deletions(-) create mode 100644 objects/07-interface-vlans.yml create mode 100644 objects/08-ipam-vlans.yml rename objects/{07-bgp.yml => 09-bgp.yml} (100%) rename objects/{08-vrfs.yml => 10-vrfs.yml} (100%) rename objects/{09-mlag.yml => 11-mlag.yml} (100%) diff --git a/.infrahub.yml b/.infrahub.yml index 7caca65..7777ac8 100644 --- a/.infrahub.yml +++ b/.infrahub.yml @@ -10,6 +10,8 @@ objects: - objects/04-interfaces.yml - objects/05-ipam.yml - objects/06-vlans-vxlan.yml - - objects/07-bgp.yml - - objects/08-vrfs.yml - - objects/09-mlag.yml + - objects/07-interface-vlans.yml + - objects/08-ipam-vlans.yml + - objects/09-bgp.yml + - objects/10-vrfs.yml + - objects/11-mlag.yml diff --git a/objects/04-interfaces.yml b/objects/04-interfaces.yml index 12ae0f7..80ace90 100644 --- a/objects/04-interfaces.yml +++ b/objects/04-interfaces.yml @@ -489,144 +489,4 @@ spec: enabled: true mtu: 9214 mode: routed ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraInterfaceVlan - data: - # Vlan4090 — MLAG Peer-Link SVI (all leafs) - - device: ["leaf1"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf2"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf3"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf4"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf5"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf6"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf7"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf8"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - # Vlan4091 — MLAG iBGP Peering SVI (all leafs) - - device: ["leaf1"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf2"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf3"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf4"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf5"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf6"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf7"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf8"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - # Vlan34 — VRF gold subnet (leaf3/leaf4) - - device: ["leaf3"] - name: Vlan34 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.34.34.1" - vlan: ["34"] - - device: ["leaf4"] - name: Vlan34 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.34.34.1" - vlan: ["34"] - # Vlan78 — VRF gold subnet (leaf7/leaf8) - - device: ["leaf7"] - name: Vlan78 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.78.78.1" - vlan: ["78"] - - device: ["leaf8"] - name: Vlan78 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.78.78.1" - vlan: ["78"] - # Vlan900 — BGP border peering (leaf7/leaf8) - - device: ["leaf7"] - name: Vlan900 - description: BGP border peering - enabled: true - vlan: ["900"] - - device: ["leaf8"] - name: Vlan900 - description: BGP border peering - enabled: true - vlan: ["900"] \ No newline at end of file + diff --git a/objects/05-ipam.yml b/objects/05-ipam.yml index a56a1b3..b8d78bf 100644 --- a/objects/05-ipam.yml +++ b/objects/05-ipam.yml @@ -179,81 +179,4 @@ spec: - address: "10.0.2.15/31" description: leaf8 Ethernet12 to spine2 interface: ["leaf8", "Ethernet12"] - # ============================================================ - # MLAG Peer-Link SVI (Vlan4090) — /31 - # ============================================================ - - address: "10.0.199.254/31" - description: leaf1 MLAG peer-link - interface: ["leaf1", "Vlan4090"] - - address: "10.0.199.255/31" - description: leaf2 MLAG peer-link - interface: ["leaf2", "Vlan4090"] - - address: "10.0.199.252/31" - description: leaf3 MLAG peer-link - interface: ["leaf3", "Vlan4090"] - - address: "10.0.199.253/31" - description: leaf4 MLAG peer-link - interface: ["leaf4", "Vlan4090"] - - address: "10.0.199.250/31" - description: leaf5 MLAG peer-link - interface: ["leaf5", "Vlan4090"] - - address: "10.0.199.251/31" - description: leaf6 MLAG peer-link - interface: ["leaf6", "Vlan4090"] - - address: "10.0.199.248/31" - description: leaf7 MLAG peer-link - interface: ["leaf7", "Vlan4090"] - - address: "10.0.199.249/31" - description: leaf8 MLAG peer-link - interface: ["leaf8", "Vlan4090"] - # ============================================================ - # MLAG iBGP Peering SVI (Vlan4091) — /31 - # ============================================================ - - address: "10.0.3.0/31" - description: leaf1 MLAG iBGP peering - interface: ["leaf1", "Vlan4091"] - - address: "10.0.3.1/31" - description: leaf2 MLAG iBGP peering - interface: ["leaf2", "Vlan4091"] - - address: "10.0.3.2/31" - description: leaf3 MLAG iBGP peering - interface: ["leaf3", "Vlan4091"] - - address: "10.0.3.3/31" - description: leaf4 MLAG iBGP peering - interface: ["leaf4", "Vlan4091"] - - address: "10.0.3.4/31" - description: leaf5 MLAG iBGP peering - interface: ["leaf5", "Vlan4091"] - - address: "10.0.3.5/31" - description: leaf6 MLAG iBGP peering - interface: ["leaf6", "Vlan4091"] - - address: "10.0.3.6/31" - description: leaf7 MLAG iBGP peering - interface: ["leaf7", "Vlan4091"] - - address: "10.0.3.7/31" - description: leaf8 MLAG iBGP peering - interface: ["leaf8", "Vlan4091"] - # ============================================================ - # VRF gold SVI addresses — /24 - # ============================================================ - # Vlan34 (leaf3/leaf4) - - address: "10.34.34.2/24" - description: leaf3 Vlan34 VRF gold - interface: ["leaf3", "Vlan34"] - - address: "10.34.34.3/24" - description: leaf4 Vlan34 VRF gold - interface: ["leaf4", "Vlan34"] - # Vlan78 (leaf7/leaf8) - - address: "10.78.78.2/24" - description: leaf7 Vlan78 VRF gold - interface: ["leaf7", "Vlan78"] - - address: "10.78.78.3/24" - description: leaf8 Vlan78 VRF gold - interface: ["leaf8", "Vlan78"] - # Vlan900 — BGP border (leaf7/leaf8) - - address: "10.90.90.2/29" - description: leaf7 Vlan900 BGP border - interface: ["leaf7", "Vlan900"] - - address: "10.90.90.3/29" - description: leaf8 Vlan900 BGP border - interface: ["leaf8", "Vlan900"] + diff --git a/objects/07-interface-vlans.yml b/objects/07-interface-vlans.yml new file mode 100644 index 0000000..69ec20e --- /dev/null +++ b/objects/07-interface-vlans.yml @@ -0,0 +1,143 @@ +# VLAN SVI interfaces +# Depends on: 03-devices, 06-vlans-vxlan (VLANs must exist) +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraInterfaceVlan + data: + # Vlan4090 — MLAG Peer-Link SVI (all leafs) + - device: ["leaf1"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf2"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf3"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf4"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf5"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf6"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf7"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + - device: ["leaf8"] + name: Vlan4090 + description: MLAG Peer-Link + enabled: true + autostate: false + vlan: ["4090"] + # Vlan4091 — MLAG iBGP Peering SVI (all leafs) + - device: ["leaf1"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf2"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf3"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf4"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf5"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf6"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf7"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + - device: ["leaf8"] + name: Vlan4091 + description: MLAG iBGP Peering + enabled: true + mtu: 9214 + vlan: ["4091"] + # Vlan34 — VRF gold subnet (leaf3/leaf4) + - device: ["leaf3"] + name: Vlan34 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.34.34.1" + vlan: ["34"] + - device: ["leaf4"] + name: Vlan34 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.34.34.1" + vlan: ["34"] + # Vlan78 — VRF gold subnet (leaf7/leaf8) + - device: ["leaf7"] + name: Vlan78 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.78.78.1" + vlan: ["78"] + - device: ["leaf8"] + name: Vlan78 + description: VRF gold subnet + enabled: true + virtual_router_address: "10.78.78.1" + vlan: ["78"] + # Vlan900 — BGP border peering (leaf7/leaf8) + - device: ["leaf7"] + name: Vlan900 + description: BGP border peering + enabled: true + vlan: ["900"] + - device: ["leaf8"] + name: Vlan900 + description: BGP border peering + enabled: true + vlan: ["900"] \ No newline at end of file diff --git a/objects/08-ipam-vlans.yml b/objects/08-ipam-vlans.yml new file mode 100644 index 0000000..293f80a --- /dev/null +++ b/objects/08-ipam-vlans.yml @@ -0,0 +1,86 @@ +# IP Addresses for VLAN SVI interfaces +# Depends on: 07-interface-vlans (Vlan SVIs must exist) +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraIPAddress + data: + # ============================================================ + # MLAG Peer-Link SVI (Vlan4090) — /31 + # ============================================================ + - address: "10.0.199.254/31" + description: leaf1 MLAG peer-link + interface: ["leaf1", "Vlan4090"] + - address: "10.0.199.255/31" + description: leaf2 MLAG peer-link + interface: ["leaf2", "Vlan4090"] + - address: "10.0.199.252/31" + description: leaf3 MLAG peer-link + interface: ["leaf3", "Vlan4090"] + - address: "10.0.199.253/31" + description: leaf4 MLAG peer-link + interface: ["leaf4", "Vlan4090"] + - address: "10.0.199.250/31" + description: leaf5 MLAG peer-link + interface: ["leaf5", "Vlan4090"] + - address: "10.0.199.251/31" + description: leaf6 MLAG peer-link + interface: ["leaf6", "Vlan4090"] + - address: "10.0.199.248/31" + description: leaf7 MLAG peer-link + interface: ["leaf7", "Vlan4090"] + - address: "10.0.199.249/31" + description: leaf8 MLAG peer-link + interface: ["leaf8", "Vlan4090"] + # ============================================================ + # MLAG iBGP Peering SVI (Vlan4091) — /31 + # ============================================================ + - address: "10.0.3.0/31" + description: leaf1 MLAG iBGP peering + interface: ["leaf1", "Vlan4091"] + - address: "10.0.3.1/31" + description: leaf2 MLAG iBGP peering + interface: ["leaf2", "Vlan4091"] + - address: "10.0.3.2/31" + description: leaf3 MLAG iBGP peering + interface: ["leaf3", "Vlan4091"] + - address: "10.0.3.3/31" + description: leaf4 MLAG iBGP peering + interface: ["leaf4", "Vlan4091"] + - address: "10.0.3.4/31" + description: leaf5 MLAG iBGP peering + interface: ["leaf5", "Vlan4091"] + - address: "10.0.3.5/31" + description: leaf6 MLAG iBGP peering + interface: ["leaf6", "Vlan4091"] + - address: "10.0.3.6/31" + description: leaf7 MLAG iBGP peering + interface: ["leaf7", "Vlan4091"] + - address: "10.0.3.7/31" + description: leaf8 MLAG iBGP peering + interface: ["leaf8", "Vlan4091"] + # ============================================================ + # VRF gold SVI addresses — /24 + # ============================================================ + # Vlan34 (leaf3/leaf4) + - address: "10.34.34.2/24" + description: leaf3 Vlan34 VRF gold + interface: ["leaf3", "Vlan34"] + - address: "10.34.34.3/24" + description: leaf4 Vlan34 VRF gold + interface: ["leaf4", "Vlan34"] + # Vlan78 (leaf7/leaf8) + - address: "10.78.78.2/24" + description: leaf7 Vlan78 VRF gold + interface: ["leaf7", "Vlan78"] + - address: "10.78.78.3/24" + description: leaf8 Vlan78 VRF gold + interface: ["leaf8", "Vlan78"] + # Vlan900 — BGP border (leaf7/leaf8) + - address: "10.90.90.2/29" + description: leaf7 Vlan900 BGP border + interface: ["leaf7", "Vlan900"] + - address: "10.90.90.3/29" + description: leaf8 Vlan900 BGP border + interface: ["leaf8", "Vlan900"] diff --git a/objects/07-bgp.yml b/objects/09-bgp.yml similarity index 100% rename from objects/07-bgp.yml rename to objects/09-bgp.yml diff --git a/objects/08-vrfs.yml b/objects/10-vrfs.yml similarity index 100% rename from objects/08-vrfs.yml rename to objects/10-vrfs.yml diff --git a/objects/09-mlag.yml b/objects/11-mlag.yml similarity index 100% rename from objects/09-mlag.yml rename to objects/11-mlag.yml -- 2.53.0 From 4409dc5e8d9279a30e8c649c8ca74bb49e1301df Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 20:22:01 +0100 Subject: [PATCH 17/29] =?UTF-8?q?fix(objects):=20remove=20interface=20refs?= =?UTF-8?q?=20from=20IPs=20=E2=80=94=20InfraInterface=20has=20no=20HFID=20?= =?UTF-8?q?=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit InfraIPAddress.interface peers with the generic InfraInterface which has no human_friendly_id defined, so infrahubctl cannot resolve the HFID lookup. Remove interface references from all IP address objects. IP-to-interface associations can be established later via the reverse relationship (ip_addresses on interface objects) or by adding an HFID to the InfraInterface generic in a future schema update. --- objects/05-ipam.yml | 50 --------------------------------------- objects/08-ipam-vlans.yml | 22 ----------------- 2 files changed, 72 deletions(-) diff --git a/objects/05-ipam.yml b/objects/05-ipam.yml index b8d78bf..5cfa050 100644 --- a/objects/05-ipam.yml +++ b/objects/05-ipam.yml @@ -11,172 +11,122 @@ spec: # ============================================================ - address: "10.0.250.1/32" description: spine1 Router-ID - interface: ["spine1", "Loopback0"] - address: "10.0.250.2/32" description: spine2 Router-ID - interface: ["spine2", "Loopback0"] - address: "10.0.250.11/32" description: leaf1 Router-ID - interface: ["leaf1", "Loopback0"] - address: "10.0.250.12/32" description: leaf2 Router-ID - interface: ["leaf2", "Loopback0"] - address: "10.0.250.13/32" description: leaf3 Router-ID - interface: ["leaf3", "Loopback0"] - address: "10.0.250.14/32" description: leaf4 Router-ID - interface: ["leaf4", "Loopback0"] - address: "10.0.250.15/32" description: leaf5 Router-ID - interface: ["leaf5", "Loopback0"] - address: "10.0.250.16/32" description: leaf6 Router-ID - interface: ["leaf6", "Loopback0"] - address: "10.0.250.17/32" description: leaf7 Router-ID - interface: ["leaf7", "Loopback0"] - address: "10.0.250.18/32" description: leaf8 Router-ID - interface: ["leaf8", "Loopback0"] # ============================================================ # Loopback1 addresses (VTEP) — /32 # ============================================================ - address: "10.0.255.11/32" description: leaf1 VTEP (shared VTEP1) - interface: ["leaf1", "Loopback1"] - address: "10.0.255.11/32" description: leaf2 VTEP (shared VTEP1) - interface: ["leaf2", "Loopback1"] - address: "10.0.255.12/32" description: leaf3 VTEP (shared VTEP2) - interface: ["leaf3", "Loopback1"] - address: "10.0.255.12/32" description: leaf4 VTEP (shared VTEP2) - interface: ["leaf4", "Loopback1"] - address: "10.0.255.13/32" description: leaf5 VTEP (shared VTEP3) - interface: ["leaf5", "Loopback1"] - address: "10.0.255.13/32" description: leaf6 VTEP (shared VTEP3) - interface: ["leaf6", "Loopback1"] - address: "10.0.255.14/32" description: leaf7 VTEP (shared VTEP4) - interface: ["leaf7", "Loopback1"] - address: "10.0.255.14/32" description: leaf8 VTEP (shared VTEP4) - interface: ["leaf8", "Loopback1"] # ============================================================ # Spine1 P2P underlay — /31 # ============================================================ - address: "10.0.1.0/31" description: spine1 Ethernet1 to leaf1 - interface: ["spine1", "Ethernet1"] - address: "10.0.1.2/31" description: spine1 Ethernet2 to leaf2 - interface: ["spine1", "Ethernet2"] - address: "10.0.1.4/31" description: spine1 Ethernet3 to leaf3 - interface: ["spine1", "Ethernet3"] - address: "10.0.1.6/31" description: spine1 Ethernet4 to leaf4 - interface: ["spine1", "Ethernet4"] - address: "10.0.1.8/31" description: spine1 Ethernet5 to leaf5 - interface: ["spine1", "Ethernet5"] - address: "10.0.1.10/31" description: spine1 Ethernet6 to leaf6 - interface: ["spine1", "Ethernet6"] - address: "10.0.1.12/31" description: spine1 Ethernet7 to leaf7 - interface: ["spine1", "Ethernet7"] - address: "10.0.1.14/31" description: spine1 Ethernet8 to leaf8 - interface: ["spine1", "Ethernet8"] # ============================================================ # Spine2 P2P underlay — /31 # ============================================================ - address: "10.0.2.0/31" description: spine2 Ethernet1 to leaf1 - interface: ["spine2", "Ethernet1"] - address: "10.0.2.2/31" description: spine2 Ethernet2 to leaf2 - interface: ["spine2", "Ethernet2"] - address: "10.0.2.4/31" description: spine2 Ethernet3 to leaf3 - interface: ["spine2", "Ethernet3"] - address: "10.0.2.6/31" description: spine2 Ethernet4 to leaf4 - interface: ["spine2", "Ethernet4"] - address: "10.0.2.8/31" description: spine2 Ethernet5 to leaf5 - interface: ["spine2", "Ethernet5"] - address: "10.0.2.10/31" description: spine2 Ethernet6 to leaf6 - interface: ["spine2", "Ethernet6"] - address: "10.0.2.12/31" description: spine2 Ethernet7 to leaf7 - interface: ["spine2", "Ethernet7"] - address: "10.0.2.14/31" description: spine2 Ethernet8 to leaf8 - interface: ["spine2", "Ethernet8"] # ============================================================ # Leaf P2P underlay (leaf side) — /31 # ============================================================ # Leaf1 - address: "10.0.1.1/31" description: leaf1 Ethernet11 to spine1 - interface: ["leaf1", "Ethernet11"] - address: "10.0.2.1/31" description: leaf1 Ethernet12 to spine2 - interface: ["leaf1", "Ethernet12"] # Leaf2 - address: "10.0.1.3/31" description: leaf2 Ethernet11 to spine1 - interface: ["leaf2", "Ethernet11"] - address: "10.0.2.3/31" description: leaf2 Ethernet12 to spine2 - interface: ["leaf2", "Ethernet12"] # Leaf3 - address: "10.0.1.5/31" description: leaf3 Ethernet11 to spine1 - interface: ["leaf3", "Ethernet11"] - address: "10.0.2.5/31" description: leaf3 Ethernet12 to spine2 - interface: ["leaf3", "Ethernet12"] # Leaf4 - address: "10.0.1.7/31" description: leaf4 Ethernet11 to spine1 - interface: ["leaf4", "Ethernet11"] - address: "10.0.2.7/31" description: leaf4 Ethernet12 to spine2 - interface: ["leaf4", "Ethernet12"] # Leaf5 - address: "10.0.1.9/31" description: leaf5 Ethernet11 to spine1 - interface: ["leaf5", "Ethernet11"] - address: "10.0.2.9/31" description: leaf5 Ethernet12 to spine2 - interface: ["leaf5", "Ethernet12"] # Leaf6 - address: "10.0.1.11/31" description: leaf6 Ethernet11 to spine1 - interface: ["leaf6", "Ethernet11"] - address: "10.0.2.11/31" description: leaf6 Ethernet12 to spine2 - interface: ["leaf6", "Ethernet12"] # Leaf7 - address: "10.0.1.13/31" description: leaf7 Ethernet11 to spine1 - interface: ["leaf7", "Ethernet11"] - address: "10.0.2.13/31" description: leaf7 Ethernet12 to spine2 - interface: ["leaf7", "Ethernet12"] # Leaf8 - address: "10.0.1.15/31" description: leaf8 Ethernet11 to spine1 - interface: ["leaf8", "Ethernet11"] - address: "10.0.2.15/31" description: leaf8 Ethernet12 to spine2 - interface: ["leaf8", "Ethernet12"] diff --git a/objects/08-ipam-vlans.yml b/objects/08-ipam-vlans.yml index 293f80a..759a1f2 100644 --- a/objects/08-ipam-vlans.yml +++ b/objects/08-ipam-vlans.yml @@ -11,76 +11,54 @@ spec: # ============================================================ - address: "10.0.199.254/31" description: leaf1 MLAG peer-link - interface: ["leaf1", "Vlan4090"] - address: "10.0.199.255/31" description: leaf2 MLAG peer-link - interface: ["leaf2", "Vlan4090"] - address: "10.0.199.252/31" description: leaf3 MLAG peer-link - interface: ["leaf3", "Vlan4090"] - address: "10.0.199.253/31" description: leaf4 MLAG peer-link - interface: ["leaf4", "Vlan4090"] - address: "10.0.199.250/31" description: leaf5 MLAG peer-link - interface: ["leaf5", "Vlan4090"] - address: "10.0.199.251/31" description: leaf6 MLAG peer-link - interface: ["leaf6", "Vlan4090"] - address: "10.0.199.248/31" description: leaf7 MLAG peer-link - interface: ["leaf7", "Vlan4090"] - address: "10.0.199.249/31" description: leaf8 MLAG peer-link - interface: ["leaf8", "Vlan4090"] # ============================================================ # MLAG iBGP Peering SVI (Vlan4091) — /31 # ============================================================ - address: "10.0.3.0/31" description: leaf1 MLAG iBGP peering - interface: ["leaf1", "Vlan4091"] - address: "10.0.3.1/31" description: leaf2 MLAG iBGP peering - interface: ["leaf2", "Vlan4091"] - address: "10.0.3.2/31" description: leaf3 MLAG iBGP peering - interface: ["leaf3", "Vlan4091"] - address: "10.0.3.3/31" description: leaf4 MLAG iBGP peering - interface: ["leaf4", "Vlan4091"] - address: "10.0.3.4/31" description: leaf5 MLAG iBGP peering - interface: ["leaf5", "Vlan4091"] - address: "10.0.3.5/31" description: leaf6 MLAG iBGP peering - interface: ["leaf6", "Vlan4091"] - address: "10.0.3.6/31" description: leaf7 MLAG iBGP peering - interface: ["leaf7", "Vlan4091"] - address: "10.0.3.7/31" description: leaf8 MLAG iBGP peering - interface: ["leaf8", "Vlan4091"] # ============================================================ # VRF gold SVI addresses — /24 # ============================================================ # Vlan34 (leaf3/leaf4) - address: "10.34.34.2/24" description: leaf3 Vlan34 VRF gold - interface: ["leaf3", "Vlan34"] - address: "10.34.34.3/24" description: leaf4 Vlan34 VRF gold - interface: ["leaf4", "Vlan34"] # Vlan78 (leaf7/leaf8) - address: "10.78.78.2/24" description: leaf7 Vlan78 VRF gold - interface: ["leaf7", "Vlan78"] - address: "10.78.78.3/24" description: leaf8 Vlan78 VRF gold - interface: ["leaf8", "Vlan78"] # Vlan900 — BGP border (leaf7/leaf8) - address: "10.90.90.2/29" description: leaf7 Vlan900 BGP border - interface: ["leaf7", "Vlan900"] - address: "10.90.90.3/29" description: leaf8 Vlan900 BGP border - interface: ["leaf8", "Vlan900"] -- 2.53.0 From ccd882bcfd5604fc919a3263787af1e31022b7c2 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 20:23:07 +0100 Subject: [PATCH 18/29] =?UTF-8?q?fix(schema):=20change=20InfraIPAddress.ad?= =?UTF-8?q?dress=20from=20IPNetwork=20to=20IPHost=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IPNetwork with strict=True rejects host addresses like 10.0.1.1/31 (host bits set). Interface IP assignments are host addresses with a prefix length, which is exactly what IPHost accepts. --- schemas/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/base.yml b/schemas/base.yml index 7e33dc4..e08bb57 100644 --- a/schemas/base.yml +++ b/schemas/base.yml @@ -320,7 +320,7 @@ nodes: display_label: "{{ address__value }}" attributes: - name: address - kind: IPNetwork + kind: IPHost description: IP address with prefix (e.g., 10.0.1.1/31) - name: description kind: Text -- 2.53.0 From 2a2e0dfe73fd2ce4cdcfaeb1ca5c1cec7755aa46 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 20:25:36 +0100 Subject: [PATCH 19/29] =?UTF-8?q?fix(objects):=20split=20BGP=20sessions=20?= =?UTF-8?q?from=20peer=20groups=20for=20load=20ordering=20=E2=80=94=20refs?= =?UTF-8?q?=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit InfraBGPSession references InfraBGPPeerGroup via peer_group HFID, so peer groups must be committed before sessions are created. Split 09-bgp.yml into: - 09-bgp.yml: InfraBGPRouterConfig + InfraBGPPeerGroup - 10-bgp-sessions.yml: InfraBGPSession + InfraBGPAddressFamily Renamed: 10-vrfs→11, 11-mlag→12. Now 12 object files total. --- .infrahub.yml | 5 +- objects/09-bgp.yml | 585 +------------------------- objects/10-bgp-sessions.yml | 586 +++++++++++++++++++++++++++ objects/{10-vrfs.yml => 11-vrfs.yml} | 0 objects/{11-mlag.yml => 12-mlag.yml} | 0 5 files changed, 590 insertions(+), 586 deletions(-) create mode 100644 objects/10-bgp-sessions.yml rename objects/{10-vrfs.yml => 11-vrfs.yml} (100%) rename objects/{11-mlag.yml => 12-mlag.yml} (100%) diff --git a/.infrahub.yml b/.infrahub.yml index 7777ac8..f7f584e 100644 --- a/.infrahub.yml +++ b/.infrahub.yml @@ -13,5 +13,6 @@ objects: - objects/07-interface-vlans.yml - objects/08-ipam-vlans.yml - objects/09-bgp.yml - - objects/10-vrfs.yml - - objects/11-mlag.yml + - objects/10-bgp-sessions.yml + - objects/11-vrfs.yml + - objects/12-mlag.yml diff --git a/objects/09-bgp.yml b/objects/09-bgp.yml index 9e9d215..d6b7b55 100644 --- a/objects/09-bgp.yml +++ b/objects/09-bgp.yml @@ -382,587 +382,4 @@ spec: send_community: extended maximum_routes: 12000 maximum_routes_warning_only: true ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraBGPSession - data: - # ============================================================ - # Spine1 sessions - # ============================================================ - # Spine1 underlay (direct neighbors, no peer-group — use remote_asn) - - bgp_config: ["spine1"] - peer_address: "10.0.1.1" - description: "underlay to leaf1" - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.3" - description: "underlay to leaf2" - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.5" - description: "underlay to leaf3" - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.7" - description: "underlay to leaf4" - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.9" - description: "underlay to leaf5" - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.11" - description: "underlay to leaf6" - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.13" - description: "underlay to leaf7" - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine1"] - peer_address: "10.0.1.15" - description: "underlay to leaf8" - remote_asn: ["65004"] - peer_device: ["leaf8"] - # Spine1 EVPN (via evpn peer-group) - - bgp_config: ["spine1"] - peer_address: "10.0.250.11" - description: "EVPN to leaf1" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.12" - description: "EVPN to leaf2" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.13" - description: "EVPN to leaf3" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.14" - description: "EVPN to leaf4" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.15" - description: "EVPN to leaf5" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.16" - description: "EVPN to leaf6" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.17" - description: "EVPN to leaf7" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine1"] - peer_address: "10.0.250.18" - description: "EVPN to leaf8" - peer_group: ["10.0.250.1", "evpn"] - remote_asn: ["65004"] - peer_device: ["leaf8"] - # ============================================================ - # Spine2 sessions - # ============================================================ - # Spine2 underlay - - bgp_config: ["spine2"] - peer_address: "10.0.2.1" - description: "underlay to leaf1" - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.3" - description: "underlay to leaf2" - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.5" - description: "underlay to leaf3" - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.7" - description: "underlay to leaf4" - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.9" - description: "underlay to leaf5" - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.11" - description: "underlay to leaf6" - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.13" - description: "underlay to leaf7" - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine2"] - peer_address: "10.0.2.15" - description: "underlay to leaf8" - remote_asn: ["65004"] - peer_device: ["leaf8"] - # Spine2 EVPN - - bgp_config: ["spine2"] - peer_address: "10.0.250.11" - description: "EVPN to leaf1" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.12" - description: "EVPN to leaf2" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.13" - description: "EVPN to leaf3" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.14" - description: "EVPN to leaf4" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.15" - description: "EVPN to leaf5" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.16" - description: "EVPN to leaf6" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.17" - description: "EVPN to leaf7" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine2"] - peer_address: "10.0.250.18" - description: "EVPN to leaf8" - peer_group: ["10.0.250.2", "evpn"] - remote_asn: ["65004"] - peer_device: ["leaf8"] - # ============================================================ - # Leaf1 sessions - # ============================================================ - - bgp_config: ["leaf1"] - peer_address: "10.0.1.0" - description: "underlay to spine1" - peer_group: ["10.0.250.11", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf1"] - peer_address: "10.0.2.0" - description: "underlay to spine2" - peer_group: ["10.0.250.11", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf1"] - peer_address: "10.0.3.1" - description: "iBGP to leaf2" - peer_group: ["10.0.250.11", "underlay_ibgp"] - peer_device: ["leaf2"] - - bgp_config: ["leaf1"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.11", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf1"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.11", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf2 sessions - # ============================================================ - - bgp_config: ["leaf2"] - peer_address: "10.0.1.2" - description: "underlay to spine1" - peer_group: ["10.0.250.12", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf2"] - peer_address: "10.0.2.2" - description: "underlay to spine2" - peer_group: ["10.0.250.12", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf2"] - peer_address: "10.0.3.0" - description: "iBGP to leaf1" - peer_group: ["10.0.250.12", "underlay_ibgp"] - peer_device: ["leaf1"] - - bgp_config: ["leaf2"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.12", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf2"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.12", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf3 sessions - # ============================================================ - - bgp_config: ["leaf3"] - peer_address: "10.0.1.4" - description: "underlay to spine1" - peer_group: ["10.0.250.13", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf3"] - peer_address: "10.0.2.4" - description: "underlay to spine2" - peer_group: ["10.0.250.13", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf3"] - peer_address: "10.0.3.3" - description: "iBGP to leaf4" - peer_group: ["10.0.250.13", "underlay_ibgp"] - peer_device: ["leaf4"] - - bgp_config: ["leaf3"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.13", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf3"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.13", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf4 sessions - # ============================================================ - - bgp_config: ["leaf4"] - peer_address: "10.0.1.6" - description: "underlay to spine1" - peer_group: ["10.0.250.14", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf4"] - peer_address: "10.0.2.6" - description: "underlay to spine2" - peer_group: ["10.0.250.14", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf4"] - peer_address: "10.0.3.2" - description: "iBGP to leaf3" - peer_group: ["10.0.250.14", "underlay_ibgp"] - peer_device: ["leaf3"] - - bgp_config: ["leaf4"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.14", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf4"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.14", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf5 sessions - # ============================================================ - - bgp_config: ["leaf5"] - peer_address: "10.0.1.8" - description: "underlay to spine1" - peer_group: ["10.0.250.15", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf5"] - peer_address: "10.0.2.8" - description: "underlay to spine2" - peer_group: ["10.0.250.15", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf5"] - peer_address: "10.0.3.5" - description: "iBGP to leaf6" - peer_group: ["10.0.250.15", "underlay_ibgp"] - peer_device: ["leaf6"] - - bgp_config: ["leaf5"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.15", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf5"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.15", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf6 sessions - # ============================================================ - - bgp_config: ["leaf6"] - peer_address: "10.0.1.10" - description: "underlay to spine1" - peer_group: ["10.0.250.16", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf6"] - peer_address: "10.0.2.10" - description: "underlay to spine2" - peer_group: ["10.0.250.16", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf6"] - peer_address: "10.0.3.4" - description: "iBGP to leaf5" - peer_group: ["10.0.250.16", "underlay_ibgp"] - peer_device: ["leaf5"] - - bgp_config: ["leaf6"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.16", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf6"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.16", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf7 sessions - # ============================================================ - - bgp_config: ["leaf7"] - peer_address: "10.0.1.12" - description: "underlay to spine1" - peer_group: ["10.0.250.17", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf7"] - peer_address: "10.0.2.12" - description: "underlay to spine2" - peer_group: ["10.0.250.17", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf7"] - peer_address: "10.0.3.7" - description: "iBGP to leaf8" - peer_group: ["10.0.250.17", "underlay_ibgp"] - peer_device: ["leaf8"] - - bgp_config: ["leaf7"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.17", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf7"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.17", "evpn"] - peer_device: ["spine2"] - # ============================================================ - # Leaf8 sessions - # ============================================================ - - bgp_config: ["leaf8"] - peer_address: "10.0.1.14" - description: "underlay to spine1" - peer_group: ["10.0.250.18", "underlay"] - peer_device: ["spine1"] - - bgp_config: ["leaf8"] - peer_address: "10.0.2.14" - description: "underlay to spine2" - peer_group: ["10.0.250.18", "underlay"] - peer_device: ["spine2"] - - bgp_config: ["leaf8"] - peer_address: "10.0.3.6" - description: "iBGP to leaf7" - peer_group: ["10.0.250.18", "underlay_ibgp"] - peer_device: ["leaf7"] - - bgp_config: ["leaf8"] - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: ["10.0.250.18", "evpn"] - peer_device: ["spine1"] - - bgp_config: ["leaf8"] - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: ["10.0.250.18", "evpn"] - peer_device: ["spine2"] ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraBGPAddressFamily - data: - # ============================================================ - # Spine1 address families - # ============================================================ - - bgp_config: ["spine1"] - afi: ipv4 - safi: unicast - networks: - - ["10.0.250.1/32"] - - bgp_config: ["spine1"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.1", "evpn"] - # ============================================================ - # Spine2 address families - # ============================================================ - - bgp_config: ["spine2"] - afi: ipv4 - safi: unicast - networks: - - ["10.0.250.2/32"] - - bgp_config: ["spine2"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.2", "evpn"] - # ============================================================ - # Leaf1 address families - # ============================================================ - - bgp_config: ["leaf1"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.11", "underlay"] - - ["10.0.250.11", "underlay_ibgp"] - networks: - - ["10.0.250.11/32"] - - ["10.0.255.11/32"] - - bgp_config: ["leaf1"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.11", "evpn"] - # ============================================================ - # Leaf2 address families - # ============================================================ - - bgp_config: ["leaf2"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.12", "underlay"] - - ["10.0.250.12", "underlay_ibgp"] - networks: - - ["10.0.250.12/32"] - - ["10.0.255.11/32"] - - bgp_config: ["leaf2"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.12", "evpn"] - # ============================================================ - # Leaf3 address families - # ============================================================ - - bgp_config: ["leaf3"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.13", "underlay"] - - ["10.0.250.13", "underlay_ibgp"] - networks: - - ["10.0.250.13/32"] - - ["10.0.255.12/32"] - - bgp_config: ["leaf3"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.13", "evpn"] - # ============================================================ - # Leaf4 address families - # ============================================================ - - bgp_config: ["leaf4"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.14", "underlay"] - - ["10.0.250.14", "underlay_ibgp"] - networks: - - ["10.0.250.14/32"] - - ["10.0.255.12/32"] - - bgp_config: ["leaf4"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.14", "evpn"] - # ============================================================ - # Leaf5 address families - # ============================================================ - - bgp_config: ["leaf5"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.15", "underlay"] - - ["10.0.250.15", "underlay_ibgp"] - networks: - - ["10.0.250.15/32"] - - ["10.0.255.13/32"] - - bgp_config: ["leaf5"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.15", "evpn"] - # ============================================================ - # Leaf6 address families - # ============================================================ - - bgp_config: ["leaf6"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.16", "underlay"] - - ["10.0.250.16", "underlay_ibgp"] - networks: - - ["10.0.250.16/32"] - - ["10.0.255.13/32"] - - bgp_config: ["leaf6"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.16", "evpn"] - # ============================================================ - # Leaf7 address families - # ============================================================ - - bgp_config: ["leaf7"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.17", "underlay"] - - ["10.0.250.17", "underlay_ibgp"] - networks: - - ["10.0.250.17/32"] - - ["10.0.255.14/32"] - - bgp_config: ["leaf7"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.17", "evpn"] - # ============================================================ - # Leaf8 address families - # ============================================================ - - bgp_config: ["leaf8"] - afi: ipv4 - safi: unicast - active_peer_groups: - - ["10.0.250.18", "underlay"] - - ["10.0.250.18", "underlay_ibgp"] - networks: - - ["10.0.250.18/32"] - - ["10.0.255.14/32"] - - bgp_config: ["leaf8"] - afi: evpn - safi: unicast - active_peer_groups: - - ["10.0.250.18", "evpn"] + diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml new file mode 100644 index 0000000..7a7769b --- /dev/null +++ b/objects/10-bgp-sessions.yml @@ -0,0 +1,586 @@ +# BGP Sessions and Address Families +# Depends on: 09-bgp (RouterConfig and PeerGroups must exist) +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraBGPSession + data: + # ============================================================ + # Spine1 sessions + # ============================================================ + # Spine1 underlay (direct neighbors, no peer-group — use remote_asn) + - bgp_config: ["spine1"] + peer_address: "10.0.1.1" + description: "underlay to leaf1" + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.3" + description: "underlay to leaf2" + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.5" + description: "underlay to leaf3" + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.7" + description: "underlay to leaf4" + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.9" + description: "underlay to leaf5" + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.11" + description: "underlay to leaf6" + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.13" + description: "underlay to leaf7" + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine1"] + peer_address: "10.0.1.15" + description: "underlay to leaf8" + remote_asn: ["65004"] + peer_device: ["leaf8"] + # Spine1 EVPN (via evpn peer-group) + - bgp_config: ["spine1"] + peer_address: "10.0.250.11" + description: "EVPN to leaf1" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.12" + description: "EVPN to leaf2" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.13" + description: "EVPN to leaf3" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.14" + description: "EVPN to leaf4" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.15" + description: "EVPN to leaf5" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.16" + description: "EVPN to leaf6" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.17" + description: "EVPN to leaf7" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine1"] + peer_address: "10.0.250.18" + description: "EVPN to leaf8" + peer_group: ["10.0.250.1", "evpn"] + remote_asn: ["65004"] + peer_device: ["leaf8"] + # ============================================================ + # Spine2 sessions + # ============================================================ + # Spine2 underlay + - bgp_config: ["spine2"] + peer_address: "10.0.2.1" + description: "underlay to leaf1" + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.3" + description: "underlay to leaf2" + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.5" + description: "underlay to leaf3" + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.7" + description: "underlay to leaf4" + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.9" + description: "underlay to leaf5" + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.11" + description: "underlay to leaf6" + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.13" + description: "underlay to leaf7" + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine2"] + peer_address: "10.0.2.15" + description: "underlay to leaf8" + remote_asn: ["65004"] + peer_device: ["leaf8"] + # Spine2 EVPN + - bgp_config: ["spine2"] + peer_address: "10.0.250.11" + description: "EVPN to leaf1" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65001"] + peer_device: ["leaf1"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.12" + description: "EVPN to leaf2" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65001"] + peer_device: ["leaf2"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.13" + description: "EVPN to leaf3" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65002"] + peer_device: ["leaf3"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.14" + description: "EVPN to leaf4" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65002"] + peer_device: ["leaf4"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.15" + description: "EVPN to leaf5" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65003"] + peer_device: ["leaf5"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.16" + description: "EVPN to leaf6" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65003"] + peer_device: ["leaf6"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.17" + description: "EVPN to leaf7" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65004"] + peer_device: ["leaf7"] + - bgp_config: ["spine2"] + peer_address: "10.0.250.18" + description: "EVPN to leaf8" + peer_group: ["10.0.250.2", "evpn"] + remote_asn: ["65004"] + peer_device: ["leaf8"] + # ============================================================ + # Leaf1 sessions + # ============================================================ + - bgp_config: ["leaf1"] + peer_address: "10.0.1.0" + description: "underlay to spine1" + peer_group: ["10.0.250.11", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf1"] + peer_address: "10.0.2.0" + description: "underlay to spine2" + peer_group: ["10.0.250.11", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf1"] + peer_address: "10.0.3.1" + description: "iBGP to leaf2" + peer_group: ["10.0.250.11", "underlay_ibgp"] + peer_device: ["leaf2"] + - bgp_config: ["leaf1"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.11", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf1"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.11", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf2 sessions + # ============================================================ + - bgp_config: ["leaf2"] + peer_address: "10.0.1.2" + description: "underlay to spine1" + peer_group: ["10.0.250.12", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf2"] + peer_address: "10.0.2.2" + description: "underlay to spine2" + peer_group: ["10.0.250.12", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf2"] + peer_address: "10.0.3.0" + description: "iBGP to leaf1" + peer_group: ["10.0.250.12", "underlay_ibgp"] + peer_device: ["leaf1"] + - bgp_config: ["leaf2"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.12", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf2"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.12", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf3 sessions + # ============================================================ + - bgp_config: ["leaf3"] + peer_address: "10.0.1.4" + description: "underlay to spine1" + peer_group: ["10.0.250.13", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf3"] + peer_address: "10.0.2.4" + description: "underlay to spine2" + peer_group: ["10.0.250.13", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf3"] + peer_address: "10.0.3.3" + description: "iBGP to leaf4" + peer_group: ["10.0.250.13", "underlay_ibgp"] + peer_device: ["leaf4"] + - bgp_config: ["leaf3"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.13", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf3"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.13", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf4 sessions + # ============================================================ + - bgp_config: ["leaf4"] + peer_address: "10.0.1.6" + description: "underlay to spine1" + peer_group: ["10.0.250.14", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf4"] + peer_address: "10.0.2.6" + description: "underlay to spine2" + peer_group: ["10.0.250.14", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf4"] + peer_address: "10.0.3.2" + description: "iBGP to leaf3" + peer_group: ["10.0.250.14", "underlay_ibgp"] + peer_device: ["leaf3"] + - bgp_config: ["leaf4"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.14", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf4"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.14", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf5 sessions + # ============================================================ + - bgp_config: ["leaf5"] + peer_address: "10.0.1.8" + description: "underlay to spine1" + peer_group: ["10.0.250.15", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf5"] + peer_address: "10.0.2.8" + description: "underlay to spine2" + peer_group: ["10.0.250.15", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf5"] + peer_address: "10.0.3.5" + description: "iBGP to leaf6" + peer_group: ["10.0.250.15", "underlay_ibgp"] + peer_device: ["leaf6"] + - bgp_config: ["leaf5"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.15", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf5"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.15", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf6 sessions + # ============================================================ + - bgp_config: ["leaf6"] + peer_address: "10.0.1.10" + description: "underlay to spine1" + peer_group: ["10.0.250.16", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf6"] + peer_address: "10.0.2.10" + description: "underlay to spine2" + peer_group: ["10.0.250.16", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf6"] + peer_address: "10.0.3.4" + description: "iBGP to leaf5" + peer_group: ["10.0.250.16", "underlay_ibgp"] + peer_device: ["leaf5"] + - bgp_config: ["leaf6"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.16", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf6"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.16", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf7 sessions + # ============================================================ + - bgp_config: ["leaf7"] + peer_address: "10.0.1.12" + description: "underlay to spine1" + peer_group: ["10.0.250.17", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf7"] + peer_address: "10.0.2.12" + description: "underlay to spine2" + peer_group: ["10.0.250.17", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf7"] + peer_address: "10.0.3.7" + description: "iBGP to leaf8" + peer_group: ["10.0.250.17", "underlay_ibgp"] + peer_device: ["leaf8"] + - bgp_config: ["leaf7"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.17", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf7"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.17", "evpn"] + peer_device: ["spine2"] + # ============================================================ + # Leaf8 sessions + # ============================================================ + - bgp_config: ["leaf8"] + peer_address: "10.0.1.14" + description: "underlay to spine1" + peer_group: ["10.0.250.18", "underlay"] + peer_device: ["spine1"] + - bgp_config: ["leaf8"] + peer_address: "10.0.2.14" + description: "underlay to spine2" + peer_group: ["10.0.250.18", "underlay"] + peer_device: ["spine2"] + - bgp_config: ["leaf8"] + peer_address: "10.0.3.6" + description: "iBGP to leaf7" + peer_group: ["10.0.250.18", "underlay_ibgp"] + peer_device: ["leaf7"] + - bgp_config: ["leaf8"] + peer_address: "10.0.250.1" + description: "EVPN to spine1" + peer_group: ["10.0.250.18", "evpn"] + peer_device: ["spine1"] + - bgp_config: ["leaf8"] + peer_address: "10.0.250.2" + description: "EVPN to spine2" + peer_group: ["10.0.250.18", "evpn"] + peer_device: ["spine2"] +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraBGPAddressFamily + data: + # ============================================================ + # Spine1 address families + # ============================================================ + - bgp_config: ["spine1"] + afi: ipv4 + safi: unicast + networks: + - ["10.0.250.1/32"] + - bgp_config: ["spine1"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.1", "evpn"] + # ============================================================ + # Spine2 address families + # ============================================================ + - bgp_config: ["spine2"] + afi: ipv4 + safi: unicast + networks: + - ["10.0.250.2/32"] + - bgp_config: ["spine2"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.2", "evpn"] + # ============================================================ + # Leaf1 address families + # ============================================================ + - bgp_config: ["leaf1"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.11", "underlay"] + - ["10.0.250.11", "underlay_ibgp"] + networks: + - ["10.0.250.11/32"] + - ["10.0.255.11/32"] + - bgp_config: ["leaf1"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.11", "evpn"] + # ============================================================ + # Leaf2 address families + # ============================================================ + - bgp_config: ["leaf2"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.12", "underlay"] + - ["10.0.250.12", "underlay_ibgp"] + networks: + - ["10.0.250.12/32"] + - ["10.0.255.11/32"] + - bgp_config: ["leaf2"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.12", "evpn"] + # ============================================================ + # Leaf3 address families + # ============================================================ + - bgp_config: ["leaf3"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.13", "underlay"] + - ["10.0.250.13", "underlay_ibgp"] + networks: + - ["10.0.250.13/32"] + - ["10.0.255.12/32"] + - bgp_config: ["leaf3"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.13", "evpn"] + # ============================================================ + # Leaf4 address families + # ============================================================ + - bgp_config: ["leaf4"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.14", "underlay"] + - ["10.0.250.14", "underlay_ibgp"] + networks: + - ["10.0.250.14/32"] + - ["10.0.255.12/32"] + - bgp_config: ["leaf4"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.14", "evpn"] + # ============================================================ + # Leaf5 address families + # ============================================================ + - bgp_config: ["leaf5"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.15", "underlay"] + - ["10.0.250.15", "underlay_ibgp"] + networks: + - ["10.0.250.15/32"] + - ["10.0.255.13/32"] + - bgp_config: ["leaf5"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.15", "evpn"] + # ============================================================ + # Leaf6 address families + # ============================================================ + - bgp_config: ["leaf6"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.16", "underlay"] + - ["10.0.250.16", "underlay_ibgp"] + networks: + - ["10.0.250.16/32"] + - ["10.0.255.13/32"] + - bgp_config: ["leaf6"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.16", "evpn"] + # ============================================================ + # Leaf7 address families + # ============================================================ + - bgp_config: ["leaf7"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.17", "underlay"] + - ["10.0.250.17", "underlay_ibgp"] + networks: + - ["10.0.250.17/32"] + - ["10.0.255.14/32"] + - bgp_config: ["leaf7"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.17", "evpn"] + # ============================================================ + # Leaf8 address families + # ============================================================ + - bgp_config: ["leaf8"] + afi: ipv4 + safi: unicast + active_peer_groups: + - ["10.0.250.18", "underlay"] + - ["10.0.250.18", "underlay_ibgp"] + networks: + - ["10.0.250.18/32"] + - ["10.0.255.14/32"] + - bgp_config: ["leaf8"] + afi: evpn + safi: unicast + active_peer_groups: + - ["10.0.250.18", "evpn"] diff --git a/objects/10-vrfs.yml b/objects/11-vrfs.yml similarity index 100% rename from objects/10-vrfs.yml rename to objects/11-vrfs.yml diff --git a/objects/11-mlag.yml b/objects/12-mlag.yml similarity index 100% rename from objects/11-mlag.yml rename to objects/12-mlag.yml -- 2.53.0 From 241655e348e18a076c7d29e2347cce94b742894b Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 20:44:39 +0100 Subject: [PATCH 20/29] =?UTF-8?q?fix(schema,objects):=20use=20device=20nam?= =?UTF-8?q?e=20instead=20of=20router=5Fid=20in=20BGP=20HFIDs=20=E2=80=94?= =?UTF-8?q?=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SDK cannot resolve deep relation traversals like bgp_config__router_id__value when loading object files. Schema changes in bgp.yml: - InfraBGPPeerGroup HFID: bgp_config__router_id__value → bgp_config__device__name__value - InfraBGPSession HFID: bgp_config__router_id__value → bgp_config__device__name__value Object file changes in 10-bgp-sessions.yml: - peer_group refs: router_id → device_name (e.g. ["10.0.250.1", "evpn"] → ["spine1", "evpn"]) - active_peer_groups refs: same mapping (82 replacements total) --- objects/10-bgp-sessions.yml | 164 ++++++++++++++++++------------------ schemas/bgp.yml | 4 +- 2 files changed, 84 insertions(+), 84 deletions(-) diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml index 7a7769b..f675424 100644 --- a/objects/10-bgp-sessions.yml +++ b/objects/10-bgp-sessions.yml @@ -54,49 +54,49 @@ spec: - bgp_config: ["spine1"] peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine1"] peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine1"] peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine1"] peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine1"] peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine1"] peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine1"] peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine1"] peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: ["10.0.250.1", "evpn"] + peer_group: ["spine1", "evpn"] remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -147,49 +147,49 @@ spec: - bgp_config: ["spine2"] peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine2"] peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine2"] peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine2"] peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine2"] peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine2"] peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine2"] peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine2"] peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: ["10.0.250.2", "evpn"] + peer_group: ["spine2", "evpn"] remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -198,27 +198,27 @@ spec: - bgp_config: ["leaf1"] peer_address: "10.0.1.0" description: "underlay to spine1" - peer_group: ["10.0.250.11", "underlay"] + peer_group: ["leaf1", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf1"] peer_address: "10.0.2.0" description: "underlay to spine2" - peer_group: ["10.0.250.11", "underlay"] + peer_group: ["leaf1", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf1"] peer_address: "10.0.3.1" description: "iBGP to leaf2" - peer_group: ["10.0.250.11", "underlay_ibgp"] + peer_group: ["leaf1", "underlay_ibgp"] peer_device: ["leaf2"] - bgp_config: ["leaf1"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.11", "evpn"] + peer_group: ["leaf1", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf1"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.11", "evpn"] + peer_group: ["leaf1", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf2 sessions @@ -226,27 +226,27 @@ spec: - bgp_config: ["leaf2"] peer_address: "10.0.1.2" description: "underlay to spine1" - peer_group: ["10.0.250.12", "underlay"] + peer_group: ["leaf2", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf2"] peer_address: "10.0.2.2" description: "underlay to spine2" - peer_group: ["10.0.250.12", "underlay"] + peer_group: ["leaf2", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf2"] peer_address: "10.0.3.0" description: "iBGP to leaf1" - peer_group: ["10.0.250.12", "underlay_ibgp"] + peer_group: ["leaf2", "underlay_ibgp"] peer_device: ["leaf1"] - bgp_config: ["leaf2"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.12", "evpn"] + peer_group: ["leaf2", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf2"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.12", "evpn"] + peer_group: ["leaf2", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf3 sessions @@ -254,27 +254,27 @@ spec: - bgp_config: ["leaf3"] peer_address: "10.0.1.4" description: "underlay to spine1" - peer_group: ["10.0.250.13", "underlay"] + peer_group: ["leaf3", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf3"] peer_address: "10.0.2.4" description: "underlay to spine2" - peer_group: ["10.0.250.13", "underlay"] + peer_group: ["leaf3", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf3"] peer_address: "10.0.3.3" description: "iBGP to leaf4" - peer_group: ["10.0.250.13", "underlay_ibgp"] + peer_group: ["leaf3", "underlay_ibgp"] peer_device: ["leaf4"] - bgp_config: ["leaf3"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.13", "evpn"] + peer_group: ["leaf3", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf3"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.13", "evpn"] + peer_group: ["leaf3", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf4 sessions @@ -282,27 +282,27 @@ spec: - bgp_config: ["leaf4"] peer_address: "10.0.1.6" description: "underlay to spine1" - peer_group: ["10.0.250.14", "underlay"] + peer_group: ["leaf4", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf4"] peer_address: "10.0.2.6" description: "underlay to spine2" - peer_group: ["10.0.250.14", "underlay"] + peer_group: ["leaf4", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf4"] peer_address: "10.0.3.2" description: "iBGP to leaf3" - peer_group: ["10.0.250.14", "underlay_ibgp"] + peer_group: ["leaf4", "underlay_ibgp"] peer_device: ["leaf3"] - bgp_config: ["leaf4"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.14", "evpn"] + peer_group: ["leaf4", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf4"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.14", "evpn"] + peer_group: ["leaf4", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf5 sessions @@ -310,27 +310,27 @@ spec: - bgp_config: ["leaf5"] peer_address: "10.0.1.8" description: "underlay to spine1" - peer_group: ["10.0.250.15", "underlay"] + peer_group: ["leaf5", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf5"] peer_address: "10.0.2.8" description: "underlay to spine2" - peer_group: ["10.0.250.15", "underlay"] + peer_group: ["leaf5", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf5"] peer_address: "10.0.3.5" description: "iBGP to leaf6" - peer_group: ["10.0.250.15", "underlay_ibgp"] + peer_group: ["leaf5", "underlay_ibgp"] peer_device: ["leaf6"] - bgp_config: ["leaf5"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.15", "evpn"] + peer_group: ["leaf5", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf5"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.15", "evpn"] + peer_group: ["leaf5", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf6 sessions @@ -338,27 +338,27 @@ spec: - bgp_config: ["leaf6"] peer_address: "10.0.1.10" description: "underlay to spine1" - peer_group: ["10.0.250.16", "underlay"] + peer_group: ["leaf6", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf6"] peer_address: "10.0.2.10" description: "underlay to spine2" - peer_group: ["10.0.250.16", "underlay"] + peer_group: ["leaf6", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf6"] peer_address: "10.0.3.4" description: "iBGP to leaf5" - peer_group: ["10.0.250.16", "underlay_ibgp"] + peer_group: ["leaf6", "underlay_ibgp"] peer_device: ["leaf5"] - bgp_config: ["leaf6"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.16", "evpn"] + peer_group: ["leaf6", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf6"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.16", "evpn"] + peer_group: ["leaf6", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf7 sessions @@ -366,27 +366,27 @@ spec: - bgp_config: ["leaf7"] peer_address: "10.0.1.12" description: "underlay to spine1" - peer_group: ["10.0.250.17", "underlay"] + peer_group: ["leaf7", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf7"] peer_address: "10.0.2.12" description: "underlay to spine2" - peer_group: ["10.0.250.17", "underlay"] + peer_group: ["leaf7", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf7"] peer_address: "10.0.3.7" description: "iBGP to leaf8" - peer_group: ["10.0.250.17", "underlay_ibgp"] + peer_group: ["leaf7", "underlay_ibgp"] peer_device: ["leaf8"] - bgp_config: ["leaf7"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.17", "evpn"] + peer_group: ["leaf7", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf7"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.17", "evpn"] + peer_group: ["leaf7", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf8 sessions @@ -394,27 +394,27 @@ spec: - bgp_config: ["leaf8"] peer_address: "10.0.1.14" description: "underlay to spine1" - peer_group: ["10.0.250.18", "underlay"] + peer_group: ["leaf8", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf8"] peer_address: "10.0.2.14" description: "underlay to spine2" - peer_group: ["10.0.250.18", "underlay"] + peer_group: ["leaf8", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf8"] peer_address: "10.0.3.6" description: "iBGP to leaf7" - peer_group: ["10.0.250.18", "underlay_ibgp"] + peer_group: ["leaf8", "underlay_ibgp"] peer_device: ["leaf7"] - bgp_config: ["leaf8"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.18", "evpn"] + peer_group: ["leaf8", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf8"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.18", "evpn"] + peer_group: ["leaf8", "evpn"] peer_device: ["spine2"] --- apiVersion: infrahub.app/v1 @@ -434,7 +434,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.1", "evpn"] + - ["spine1", "evpn"] # ============================================================ # Spine2 address families # ============================================================ @@ -447,7 +447,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.2", "evpn"] + - ["spine2", "evpn"] # ============================================================ # Leaf1 address families # ============================================================ @@ -455,8 +455,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.11", "underlay"] - - ["10.0.250.11", "underlay_ibgp"] + - ["leaf1", "underlay"] + - ["leaf1", "underlay_ibgp"] networks: - ["10.0.250.11/32"] - ["10.0.255.11/32"] @@ -464,7 +464,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.11", "evpn"] + - ["leaf1", "evpn"] # ============================================================ # Leaf2 address families # ============================================================ @@ -472,8 +472,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.12", "underlay"] - - ["10.0.250.12", "underlay_ibgp"] + - ["leaf2", "underlay"] + - ["leaf2", "underlay_ibgp"] networks: - ["10.0.250.12/32"] - ["10.0.255.11/32"] @@ -481,7 +481,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.12", "evpn"] + - ["leaf2", "evpn"] # ============================================================ # Leaf3 address families # ============================================================ @@ -489,8 +489,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.13", "underlay"] - - ["10.0.250.13", "underlay_ibgp"] + - ["leaf3", "underlay"] + - ["leaf3", "underlay_ibgp"] networks: - ["10.0.250.13/32"] - ["10.0.255.12/32"] @@ -498,7 +498,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.13", "evpn"] + - ["leaf3", "evpn"] # ============================================================ # Leaf4 address families # ============================================================ @@ -506,8 +506,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.14", "underlay"] - - ["10.0.250.14", "underlay_ibgp"] + - ["leaf4", "underlay"] + - ["leaf4", "underlay_ibgp"] networks: - ["10.0.250.14/32"] - ["10.0.255.12/32"] @@ -515,7 +515,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.14", "evpn"] + - ["leaf4", "evpn"] # ============================================================ # Leaf5 address families # ============================================================ @@ -523,8 +523,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.15", "underlay"] - - ["10.0.250.15", "underlay_ibgp"] + - ["leaf5", "underlay"] + - ["leaf5", "underlay_ibgp"] networks: - ["10.0.250.15/32"] - ["10.0.255.13/32"] @@ -532,7 +532,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.15", "evpn"] + - ["leaf5", "evpn"] # ============================================================ # Leaf6 address families # ============================================================ @@ -540,8 +540,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.16", "underlay"] - - ["10.0.250.16", "underlay_ibgp"] + - ["leaf6", "underlay"] + - ["leaf6", "underlay_ibgp"] networks: - ["10.0.250.16/32"] - ["10.0.255.13/32"] @@ -549,7 +549,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.16", "evpn"] + - ["leaf6", "evpn"] # ============================================================ # Leaf7 address families # ============================================================ @@ -557,8 +557,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.17", "underlay"] - - ["10.0.250.17", "underlay_ibgp"] + - ["leaf7", "underlay"] + - ["leaf7", "underlay_ibgp"] networks: - ["10.0.250.17/32"] - ["10.0.255.14/32"] @@ -566,7 +566,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.17", "evpn"] + - ["leaf7", "evpn"] # ============================================================ # Leaf8 address families # ============================================================ @@ -574,8 +574,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.18", "underlay"] - - ["10.0.250.18", "underlay_ibgp"] + - ["leaf8", "underlay"] + - ["leaf8", "underlay_ibgp"] networks: - ["10.0.250.18/32"] - ["10.0.255.14/32"] @@ -583,4 +583,4 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.18", "evpn"] + - ["leaf8", "evpn"] diff --git a/schemas/bgp.yml b/schemas/bgp.yml index 2b48d01..214a3d8 100644 --- a/schemas/bgp.yml +++ b/schemas/bgp.yml @@ -108,7 +108,7 @@ nodes: uniqueness_constraints: - ["bgp_config", "name__value"] human_friendly_id: - - bgp_config__router_id__value + - bgp_config__device__name__value - name__value display_label: "{{ name__value }}" attributes: @@ -184,7 +184,7 @@ nodes: uniqueness_constraints: - ["bgp_config", "peer_address__value"] human_friendly_id: - - bgp_config__router_id__value + - bgp_config__device__name__value - peer_address__value display_label: "{{ peer_address__value }}" attributes: -- 2.53.0 From 9f89058f5857563dd2420f6e011ec9da0ee64ed7 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 20:46:26 +0100 Subject: [PATCH 21/29] =?UTF-8?q?revert(schema,objects):=20restore=20route?= =?UTF-8?q?r=5Fid=20in=20BGP=20HFIDs=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restore original human_friendly_id fields: - InfraBGPPeerGroup: bgp_config__router_id__value + name__value - InfraBGPSession: bgp_config__router_id__value + peer_address__value Restore router_id values in peer_group and active_peer_groups references in 10-bgp-sessions.yml (82 replacements). --- objects/10-bgp-sessions.yml | 164 ++++++++++++++++++------------------ schemas/bgp.yml | 4 +- 2 files changed, 84 insertions(+), 84 deletions(-) diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml index f675424..7a7769b 100644 --- a/objects/10-bgp-sessions.yml +++ b/objects/10-bgp-sessions.yml @@ -54,49 +54,49 @@ spec: - bgp_config: ["spine1"] peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine1"] peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine1"] peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine1"] peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine1"] peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine1"] peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine1"] peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine1"] peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: ["spine1", "evpn"] + peer_group: ["10.0.250.1", "evpn"] remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -147,49 +147,49 @@ spec: - bgp_config: ["spine2"] peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine2"] peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine2"] peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine2"] peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine2"] peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine2"] peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine2"] peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine2"] peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: ["spine2", "evpn"] + peer_group: ["10.0.250.2", "evpn"] remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -198,27 +198,27 @@ spec: - bgp_config: ["leaf1"] peer_address: "10.0.1.0" description: "underlay to spine1" - peer_group: ["leaf1", "underlay"] + peer_group: ["10.0.250.11", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf1"] peer_address: "10.0.2.0" description: "underlay to spine2" - peer_group: ["leaf1", "underlay"] + peer_group: ["10.0.250.11", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf1"] peer_address: "10.0.3.1" description: "iBGP to leaf2" - peer_group: ["leaf1", "underlay_ibgp"] + peer_group: ["10.0.250.11", "underlay_ibgp"] peer_device: ["leaf2"] - bgp_config: ["leaf1"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf1", "evpn"] + peer_group: ["10.0.250.11", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf1"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf1", "evpn"] + peer_group: ["10.0.250.11", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf2 sessions @@ -226,27 +226,27 @@ spec: - bgp_config: ["leaf2"] peer_address: "10.0.1.2" description: "underlay to spine1" - peer_group: ["leaf2", "underlay"] + peer_group: ["10.0.250.12", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf2"] peer_address: "10.0.2.2" description: "underlay to spine2" - peer_group: ["leaf2", "underlay"] + peer_group: ["10.0.250.12", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf2"] peer_address: "10.0.3.0" description: "iBGP to leaf1" - peer_group: ["leaf2", "underlay_ibgp"] + peer_group: ["10.0.250.12", "underlay_ibgp"] peer_device: ["leaf1"] - bgp_config: ["leaf2"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf2", "evpn"] + peer_group: ["10.0.250.12", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf2"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf2", "evpn"] + peer_group: ["10.0.250.12", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf3 sessions @@ -254,27 +254,27 @@ spec: - bgp_config: ["leaf3"] peer_address: "10.0.1.4" description: "underlay to spine1" - peer_group: ["leaf3", "underlay"] + peer_group: ["10.0.250.13", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf3"] peer_address: "10.0.2.4" description: "underlay to spine2" - peer_group: ["leaf3", "underlay"] + peer_group: ["10.0.250.13", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf3"] peer_address: "10.0.3.3" description: "iBGP to leaf4" - peer_group: ["leaf3", "underlay_ibgp"] + peer_group: ["10.0.250.13", "underlay_ibgp"] peer_device: ["leaf4"] - bgp_config: ["leaf3"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf3", "evpn"] + peer_group: ["10.0.250.13", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf3"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf3", "evpn"] + peer_group: ["10.0.250.13", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf4 sessions @@ -282,27 +282,27 @@ spec: - bgp_config: ["leaf4"] peer_address: "10.0.1.6" description: "underlay to spine1" - peer_group: ["leaf4", "underlay"] + peer_group: ["10.0.250.14", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf4"] peer_address: "10.0.2.6" description: "underlay to spine2" - peer_group: ["leaf4", "underlay"] + peer_group: ["10.0.250.14", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf4"] peer_address: "10.0.3.2" description: "iBGP to leaf3" - peer_group: ["leaf4", "underlay_ibgp"] + peer_group: ["10.0.250.14", "underlay_ibgp"] peer_device: ["leaf3"] - bgp_config: ["leaf4"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf4", "evpn"] + peer_group: ["10.0.250.14", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf4"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf4", "evpn"] + peer_group: ["10.0.250.14", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf5 sessions @@ -310,27 +310,27 @@ spec: - bgp_config: ["leaf5"] peer_address: "10.0.1.8" description: "underlay to spine1" - peer_group: ["leaf5", "underlay"] + peer_group: ["10.0.250.15", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf5"] peer_address: "10.0.2.8" description: "underlay to spine2" - peer_group: ["leaf5", "underlay"] + peer_group: ["10.0.250.15", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf5"] peer_address: "10.0.3.5" description: "iBGP to leaf6" - peer_group: ["leaf5", "underlay_ibgp"] + peer_group: ["10.0.250.15", "underlay_ibgp"] peer_device: ["leaf6"] - bgp_config: ["leaf5"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf5", "evpn"] + peer_group: ["10.0.250.15", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf5"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf5", "evpn"] + peer_group: ["10.0.250.15", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf6 sessions @@ -338,27 +338,27 @@ spec: - bgp_config: ["leaf6"] peer_address: "10.0.1.10" description: "underlay to spine1" - peer_group: ["leaf6", "underlay"] + peer_group: ["10.0.250.16", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf6"] peer_address: "10.0.2.10" description: "underlay to spine2" - peer_group: ["leaf6", "underlay"] + peer_group: ["10.0.250.16", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf6"] peer_address: "10.0.3.4" description: "iBGP to leaf5" - peer_group: ["leaf6", "underlay_ibgp"] + peer_group: ["10.0.250.16", "underlay_ibgp"] peer_device: ["leaf5"] - bgp_config: ["leaf6"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf6", "evpn"] + peer_group: ["10.0.250.16", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf6"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf6", "evpn"] + peer_group: ["10.0.250.16", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf7 sessions @@ -366,27 +366,27 @@ spec: - bgp_config: ["leaf7"] peer_address: "10.0.1.12" description: "underlay to spine1" - peer_group: ["leaf7", "underlay"] + peer_group: ["10.0.250.17", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf7"] peer_address: "10.0.2.12" description: "underlay to spine2" - peer_group: ["leaf7", "underlay"] + peer_group: ["10.0.250.17", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf7"] peer_address: "10.0.3.7" description: "iBGP to leaf8" - peer_group: ["leaf7", "underlay_ibgp"] + peer_group: ["10.0.250.17", "underlay_ibgp"] peer_device: ["leaf8"] - bgp_config: ["leaf7"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf7", "evpn"] + peer_group: ["10.0.250.17", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf7"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf7", "evpn"] + peer_group: ["10.0.250.17", "evpn"] peer_device: ["spine2"] # ============================================================ # Leaf8 sessions @@ -394,27 +394,27 @@ spec: - bgp_config: ["leaf8"] peer_address: "10.0.1.14" description: "underlay to spine1" - peer_group: ["leaf8", "underlay"] + peer_group: ["10.0.250.18", "underlay"] peer_device: ["spine1"] - bgp_config: ["leaf8"] peer_address: "10.0.2.14" description: "underlay to spine2" - peer_group: ["leaf8", "underlay"] + peer_group: ["10.0.250.18", "underlay"] peer_device: ["spine2"] - bgp_config: ["leaf8"] peer_address: "10.0.3.6" description: "iBGP to leaf7" - peer_group: ["leaf8", "underlay_ibgp"] + peer_group: ["10.0.250.18", "underlay_ibgp"] peer_device: ["leaf7"] - bgp_config: ["leaf8"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["leaf8", "evpn"] + peer_group: ["10.0.250.18", "evpn"] peer_device: ["spine1"] - bgp_config: ["leaf8"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["leaf8", "evpn"] + peer_group: ["10.0.250.18", "evpn"] peer_device: ["spine2"] --- apiVersion: infrahub.app/v1 @@ -434,7 +434,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["spine1", "evpn"] + - ["10.0.250.1", "evpn"] # ============================================================ # Spine2 address families # ============================================================ @@ -447,7 +447,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["spine2", "evpn"] + - ["10.0.250.2", "evpn"] # ============================================================ # Leaf1 address families # ============================================================ @@ -455,8 +455,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf1", "underlay"] - - ["leaf1", "underlay_ibgp"] + - ["10.0.250.11", "underlay"] + - ["10.0.250.11", "underlay_ibgp"] networks: - ["10.0.250.11/32"] - ["10.0.255.11/32"] @@ -464,7 +464,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf1", "evpn"] + - ["10.0.250.11", "evpn"] # ============================================================ # Leaf2 address families # ============================================================ @@ -472,8 +472,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf2", "underlay"] - - ["leaf2", "underlay_ibgp"] + - ["10.0.250.12", "underlay"] + - ["10.0.250.12", "underlay_ibgp"] networks: - ["10.0.250.12/32"] - ["10.0.255.11/32"] @@ -481,7 +481,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf2", "evpn"] + - ["10.0.250.12", "evpn"] # ============================================================ # Leaf3 address families # ============================================================ @@ -489,8 +489,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf3", "underlay"] - - ["leaf3", "underlay_ibgp"] + - ["10.0.250.13", "underlay"] + - ["10.0.250.13", "underlay_ibgp"] networks: - ["10.0.250.13/32"] - ["10.0.255.12/32"] @@ -498,7 +498,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf3", "evpn"] + - ["10.0.250.13", "evpn"] # ============================================================ # Leaf4 address families # ============================================================ @@ -506,8 +506,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf4", "underlay"] - - ["leaf4", "underlay_ibgp"] + - ["10.0.250.14", "underlay"] + - ["10.0.250.14", "underlay_ibgp"] networks: - ["10.0.250.14/32"] - ["10.0.255.12/32"] @@ -515,7 +515,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf4", "evpn"] + - ["10.0.250.14", "evpn"] # ============================================================ # Leaf5 address families # ============================================================ @@ -523,8 +523,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf5", "underlay"] - - ["leaf5", "underlay_ibgp"] + - ["10.0.250.15", "underlay"] + - ["10.0.250.15", "underlay_ibgp"] networks: - ["10.0.250.15/32"] - ["10.0.255.13/32"] @@ -532,7 +532,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf5", "evpn"] + - ["10.0.250.15", "evpn"] # ============================================================ # Leaf6 address families # ============================================================ @@ -540,8 +540,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf6", "underlay"] - - ["leaf6", "underlay_ibgp"] + - ["10.0.250.16", "underlay"] + - ["10.0.250.16", "underlay_ibgp"] networks: - ["10.0.250.16/32"] - ["10.0.255.13/32"] @@ -549,7 +549,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf6", "evpn"] + - ["10.0.250.16", "evpn"] # ============================================================ # Leaf7 address families # ============================================================ @@ -557,8 +557,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf7", "underlay"] - - ["leaf7", "underlay_ibgp"] + - ["10.0.250.17", "underlay"] + - ["10.0.250.17", "underlay_ibgp"] networks: - ["10.0.250.17/32"] - ["10.0.255.14/32"] @@ -566,7 +566,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf7", "evpn"] + - ["10.0.250.17", "evpn"] # ============================================================ # Leaf8 address families # ============================================================ @@ -574,8 +574,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["leaf8", "underlay"] - - ["leaf8", "underlay_ibgp"] + - ["10.0.250.18", "underlay"] + - ["10.0.250.18", "underlay_ibgp"] networks: - ["10.0.250.18/32"] - ["10.0.255.14/32"] @@ -583,4 +583,4 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["leaf8", "evpn"] + - ["10.0.250.18", "evpn"] diff --git a/schemas/bgp.yml b/schemas/bgp.yml index 214a3d8..2b48d01 100644 --- a/schemas/bgp.yml +++ b/schemas/bgp.yml @@ -108,7 +108,7 @@ nodes: uniqueness_constraints: - ["bgp_config", "name__value"] human_friendly_id: - - bgp_config__device__name__value + - bgp_config__router_id__value - name__value display_label: "{{ name__value }}" attributes: @@ -184,7 +184,7 @@ nodes: uniqueness_constraints: - ["bgp_config", "peer_address__value"] human_friendly_id: - - bgp_config__device__name__value + - bgp_config__router_id__value - peer_address__value display_label: "{{ peer_address__value }}" attributes: -- 2.53.0 From 4b1ca7b2a67e9a42799f4a589d0adb0bf74df5a5 Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 21:23:58 +0100 Subject: [PATCH 22/29] =?UTF-8?q?fix(schema,objects):=20simplify=20BGP=20H?= =?UTF-8?q?FIDs=20to=20single=20field=20=E2=80=94=20refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Infrahub does not support relation traversal in HFID computation. bgp_config__router_id__value returned only the name, not the full path. Schema changes: - InfraBGPPeerGroup HFID: [name__value] (was [bgp_config__router_id__value, name__value]) - InfraBGPSession HFID: [peer_address__value] (was [bgp_config__router_id__value, peer_address__value]) - uniqueness_constraints unchanged (still scoped to bgp_config) Object file changes (10-bgp-sessions.yml): - peer_group: ["10.0.250.x", "name"] → peer_group: "name" (56 refs) - active_peer_groups: - ["10.0.250.x", "name"] → - "name" (26 refs) --- objects/10-bgp-sessions.yml | 164 ++++++++++++++++++------------------ schemas/bgp.yml | 2 - 2 files changed, 82 insertions(+), 84 deletions(-) diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml index 7a7769b..0f9f130 100644 --- a/objects/10-bgp-sessions.yml +++ b/objects/10-bgp-sessions.yml @@ -54,49 +54,49 @@ spec: - bgp_config: ["spine1"] peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine1"] peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine1"] peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine1"] peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine1"] peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine1"] peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine1"] peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine1"] peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: ["10.0.250.1", "evpn"] + peer_group: "evpn" remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -147,49 +147,49 @@ spec: - bgp_config: ["spine2"] peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine2"] peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine2"] peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine2"] peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine2"] peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine2"] peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine2"] peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine2"] peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: ["10.0.250.2", "evpn"] + peer_group: "evpn" remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -198,27 +198,27 @@ spec: - bgp_config: ["leaf1"] peer_address: "10.0.1.0" description: "underlay to spine1" - peer_group: ["10.0.250.11", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf1"] peer_address: "10.0.2.0" description: "underlay to spine2" - peer_group: ["10.0.250.11", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf1"] peer_address: "10.0.3.1" description: "iBGP to leaf2" - peer_group: ["10.0.250.11", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf2"] - bgp_config: ["leaf1"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.11", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf1"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.11", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf2 sessions @@ -226,27 +226,27 @@ spec: - bgp_config: ["leaf2"] peer_address: "10.0.1.2" description: "underlay to spine1" - peer_group: ["10.0.250.12", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf2"] peer_address: "10.0.2.2" description: "underlay to spine2" - peer_group: ["10.0.250.12", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf2"] peer_address: "10.0.3.0" description: "iBGP to leaf1" - peer_group: ["10.0.250.12", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf1"] - bgp_config: ["leaf2"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.12", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf2"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.12", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf3 sessions @@ -254,27 +254,27 @@ spec: - bgp_config: ["leaf3"] peer_address: "10.0.1.4" description: "underlay to spine1" - peer_group: ["10.0.250.13", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf3"] peer_address: "10.0.2.4" description: "underlay to spine2" - peer_group: ["10.0.250.13", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf3"] peer_address: "10.0.3.3" description: "iBGP to leaf4" - peer_group: ["10.0.250.13", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf4"] - bgp_config: ["leaf3"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.13", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf3"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.13", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf4 sessions @@ -282,27 +282,27 @@ spec: - bgp_config: ["leaf4"] peer_address: "10.0.1.6" description: "underlay to spine1" - peer_group: ["10.0.250.14", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf4"] peer_address: "10.0.2.6" description: "underlay to spine2" - peer_group: ["10.0.250.14", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf4"] peer_address: "10.0.3.2" description: "iBGP to leaf3" - peer_group: ["10.0.250.14", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf3"] - bgp_config: ["leaf4"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.14", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf4"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.14", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf5 sessions @@ -310,27 +310,27 @@ spec: - bgp_config: ["leaf5"] peer_address: "10.0.1.8" description: "underlay to spine1" - peer_group: ["10.0.250.15", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf5"] peer_address: "10.0.2.8" description: "underlay to spine2" - peer_group: ["10.0.250.15", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf5"] peer_address: "10.0.3.5" description: "iBGP to leaf6" - peer_group: ["10.0.250.15", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf6"] - bgp_config: ["leaf5"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.15", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf5"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.15", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf6 sessions @@ -338,27 +338,27 @@ spec: - bgp_config: ["leaf6"] peer_address: "10.0.1.10" description: "underlay to spine1" - peer_group: ["10.0.250.16", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf6"] peer_address: "10.0.2.10" description: "underlay to spine2" - peer_group: ["10.0.250.16", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf6"] peer_address: "10.0.3.4" description: "iBGP to leaf5" - peer_group: ["10.0.250.16", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf5"] - bgp_config: ["leaf6"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.16", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf6"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.16", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf7 sessions @@ -366,27 +366,27 @@ spec: - bgp_config: ["leaf7"] peer_address: "10.0.1.12" description: "underlay to spine1" - peer_group: ["10.0.250.17", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf7"] peer_address: "10.0.2.12" description: "underlay to spine2" - peer_group: ["10.0.250.17", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf7"] peer_address: "10.0.3.7" description: "iBGP to leaf8" - peer_group: ["10.0.250.17", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf8"] - bgp_config: ["leaf7"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.17", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf7"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.17", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] # ============================================================ # Leaf8 sessions @@ -394,27 +394,27 @@ spec: - bgp_config: ["leaf8"] peer_address: "10.0.1.14" description: "underlay to spine1" - peer_group: ["10.0.250.18", "underlay"] + peer_group: "underlay" peer_device: ["spine1"] - bgp_config: ["leaf8"] peer_address: "10.0.2.14" description: "underlay to spine2" - peer_group: ["10.0.250.18", "underlay"] + peer_group: "underlay" peer_device: ["spine2"] - bgp_config: ["leaf8"] peer_address: "10.0.3.6" description: "iBGP to leaf7" - peer_group: ["10.0.250.18", "underlay_ibgp"] + peer_group: "underlay_ibgp" peer_device: ["leaf7"] - bgp_config: ["leaf8"] peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: ["10.0.250.18", "evpn"] + peer_group: "evpn" peer_device: ["spine1"] - bgp_config: ["leaf8"] peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: ["10.0.250.18", "evpn"] + peer_group: "evpn" peer_device: ["spine2"] --- apiVersion: infrahub.app/v1 @@ -434,7 +434,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.1", "evpn"] + - "evpn" # ============================================================ # Spine2 address families # ============================================================ @@ -447,7 +447,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.2", "evpn"] + - "evpn" # ============================================================ # Leaf1 address families # ============================================================ @@ -455,8 +455,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.11", "underlay"] - - ["10.0.250.11", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.11/32"] - ["10.0.255.11/32"] @@ -464,7 +464,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.11", "evpn"] + - "evpn" # ============================================================ # Leaf2 address families # ============================================================ @@ -472,8 +472,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.12", "underlay"] - - ["10.0.250.12", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.12/32"] - ["10.0.255.11/32"] @@ -481,7 +481,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.12", "evpn"] + - "evpn" # ============================================================ # Leaf3 address families # ============================================================ @@ -489,8 +489,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.13", "underlay"] - - ["10.0.250.13", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.13/32"] - ["10.0.255.12/32"] @@ -498,7 +498,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.13", "evpn"] + - "evpn" # ============================================================ # Leaf4 address families # ============================================================ @@ -506,8 +506,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.14", "underlay"] - - ["10.0.250.14", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.14/32"] - ["10.0.255.12/32"] @@ -515,7 +515,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.14", "evpn"] + - "evpn" # ============================================================ # Leaf5 address families # ============================================================ @@ -523,8 +523,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.15", "underlay"] - - ["10.0.250.15", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.15/32"] - ["10.0.255.13/32"] @@ -532,7 +532,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.15", "evpn"] + - "evpn" # ============================================================ # Leaf6 address families # ============================================================ @@ -540,8 +540,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.16", "underlay"] - - ["10.0.250.16", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.16/32"] - ["10.0.255.13/32"] @@ -549,7 +549,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.16", "evpn"] + - "evpn" # ============================================================ # Leaf7 address families # ============================================================ @@ -557,8 +557,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.17", "underlay"] - - ["10.0.250.17", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.17/32"] - ["10.0.255.14/32"] @@ -566,7 +566,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.17", "evpn"] + - "evpn" # ============================================================ # Leaf8 address families # ============================================================ @@ -574,8 +574,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - ["10.0.250.18", "underlay"] - - ["10.0.250.18", "underlay_ibgp"] + - "underlay" + - "underlay_ibgp" networks: - ["10.0.250.18/32"] - ["10.0.255.14/32"] @@ -583,4 +583,4 @@ spec: afi: evpn safi: unicast active_peer_groups: - - ["10.0.250.18", "evpn"] + - "evpn" diff --git a/schemas/bgp.yml b/schemas/bgp.yml index 2b48d01..5ab6200 100644 --- a/schemas/bgp.yml +++ b/schemas/bgp.yml @@ -108,7 +108,6 @@ nodes: uniqueness_constraints: - ["bgp_config", "name__value"] human_friendly_id: - - bgp_config__router_id__value - name__value display_label: "{{ name__value }}" attributes: @@ -184,7 +183,6 @@ nodes: uniqueness_constraints: - ["bgp_config", "peer_address__value"] human_friendly_id: - - bgp_config__router_id__value - peer_address__value display_label: "{{ peer_address__value }}" attributes: -- 2.53.0 From cb06068347d1094dfbf68e7385b5f970579efb8a Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 15 Feb 2026 21:31:03 +0100 Subject: [PATCH 23/29] =?UTF-8?q?feat(schema,objects):=20add=20local=5Fide?= =?UTF-8?q?ntifier=20to=20BGP=20types=20for=20unique=20HFID=20=E2=80=94=20?= =?UTF-8?q?refs=20#52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Infrahub does not support relation traversal in HFID computation. Add a local_identifier attribute to PeerGroup, Session, and AddressFamily that combines device name with the type-specific key. Schema changes (bgp.yml): - InfraBGPPeerGroup: HFID=local_identifier__value (e.g. spine1__evpn) - InfraBGPSession: HFID=local_identifier__value (e.g. spine1__10.0.250.11) - InfraBGPAddressFamily: HFID=local_identifier__value (e.g. spine1__ipv4_unicast) Object file changes: - 09-bgp.yml: added local_identifier to 26 PeerGroup entries - 10-bgp-sessions.yml: added local_identifier to 72 Session + 20 AF entries, updated 56 peer_group + 26 active_peer_groups references --- objects/09-bgp.yml | 26 ++++ objects/10-bgp-sessions.yml | 256 ++++++++++++++++++++++++------------ schemas/bgp.yml | 19 ++- 3 files changed, 215 insertions(+), 86 deletions(-) diff --git a/objects/09-bgp.yml b/objects/09-bgp.yml index d6b7b55..c9c7d31 100644 --- a/objects/09-bgp.yml +++ b/objects/09-bgp.yml @@ -151,6 +151,7 @@ spec: # ============================================================ # Spine1 — evpn peer-group - bgp_config: ["spine1"] + local_identifier: "spine1__evpn" name: evpn description: EVPN overlay to leaf loopbacks peer_group_type: evpn @@ -162,6 +163,7 @@ spec: maximum_routes_warning_only: true # Spine2 — evpn peer-group - bgp_config: ["spine2"] + local_identifier: "spine2__evpn" name: evpn description: EVPN overlay to leaf loopbacks peer_group_type: evpn @@ -176,6 +178,7 @@ spec: # ============================================================ # Leaf1 - bgp_config: ["leaf1"] + local_identifier: "leaf1__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -183,6 +186,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf1"] + local_identifier: "leaf1__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -191,6 +195,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf1"] + local_identifier: "leaf1__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -202,6 +207,7 @@ spec: maximum_routes_warning_only: true # Leaf2 - bgp_config: ["leaf2"] + local_identifier: "leaf2__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -209,6 +215,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf2"] + local_identifier: "leaf2__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -217,6 +224,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf2"] + local_identifier: "leaf2__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -228,6 +236,7 @@ spec: maximum_routes_warning_only: true # Leaf3 - bgp_config: ["leaf3"] + local_identifier: "leaf3__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -235,6 +244,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf3"] + local_identifier: "leaf3__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -243,6 +253,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf3"] + local_identifier: "leaf3__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -254,6 +265,7 @@ spec: maximum_routes_warning_only: true # Leaf4 - bgp_config: ["leaf4"] + local_identifier: "leaf4__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -261,6 +273,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf4"] + local_identifier: "leaf4__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -269,6 +282,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf4"] + local_identifier: "leaf4__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -280,6 +294,7 @@ spec: maximum_routes_warning_only: true # Leaf5 - bgp_config: ["leaf5"] + local_identifier: "leaf5__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -287,6 +302,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf5"] + local_identifier: "leaf5__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -295,6 +311,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf5"] + local_identifier: "leaf5__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -306,6 +323,7 @@ spec: maximum_routes_warning_only: true # Leaf6 - bgp_config: ["leaf6"] + local_identifier: "leaf6__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -313,6 +331,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf6"] + local_identifier: "leaf6__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -321,6 +340,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf6"] + local_identifier: "leaf6__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -332,6 +352,7 @@ spec: maximum_routes_warning_only: true # Leaf7 - bgp_config: ["leaf7"] + local_identifier: "leaf7__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -339,6 +360,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf7"] + local_identifier: "leaf7__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -347,6 +369,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf7"] + local_identifier: "leaf7__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn @@ -358,6 +381,7 @@ spec: maximum_routes_warning_only: true # Leaf8 - bgp_config: ["leaf8"] + local_identifier: "leaf8__underlay" name: underlay description: Underlay eBGP to spines peer_group_type: underlay @@ -365,6 +389,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf8"] + local_identifier: "leaf8__underlay_ibgp" name: underlay_ibgp description: MLAG iBGP peering peer_group_type: underlay_ibgp @@ -373,6 +398,7 @@ spec: maximum_routes: 12000 maximum_routes_warning_only: true - bgp_config: ["leaf8"] + local_identifier: "leaf8__evpn" name: evpn description: EVPN overlay to spines peer_group_type: evpn diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml index 0f9f130..0af2483 100644 --- a/objects/10-bgp-sessions.yml +++ b/objects/10-bgp-sessions.yml @@ -11,92 +11,108 @@ spec: # ============================================================ # Spine1 underlay (direct neighbors, no peer-group — use remote_asn) - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.1" peer_address: "10.0.1.1" description: "underlay to leaf1" remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.3" peer_address: "10.0.1.3" description: "underlay to leaf2" remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.5" peer_address: "10.0.1.5" description: "underlay to leaf3" remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.7" peer_address: "10.0.1.7" description: "underlay to leaf4" remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.9" peer_address: "10.0.1.9" description: "underlay to leaf5" remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.11" peer_address: "10.0.1.11" description: "underlay to leaf6" remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.13" peer_address: "10.0.1.13" description: "underlay to leaf7" remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.1.15" peer_address: "10.0.1.15" description: "underlay to leaf8" remote_asn: ["65004"] peer_device: ["leaf8"] # Spine1 EVPN (via evpn peer-group) - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.11" peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.12" peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.13" peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.14" peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.15" peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.16" peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.17" peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine1"] + local_identifier: "spine1__10.0.250.18" peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: "evpn" + peer_group: "spine1__evpn" remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ @@ -104,317 +120,373 @@ spec: # ============================================================ # Spine2 underlay - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.1" peer_address: "10.0.2.1" description: "underlay to leaf1" remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.3" peer_address: "10.0.2.3" description: "underlay to leaf2" remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.5" peer_address: "10.0.2.5" description: "underlay to leaf3" remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.7" peer_address: "10.0.2.7" description: "underlay to leaf4" remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.9" peer_address: "10.0.2.9" description: "underlay to leaf5" remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.11" peer_address: "10.0.2.11" description: "underlay to leaf6" remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.13" peer_address: "10.0.2.13" description: "underlay to leaf7" remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.2.15" peer_address: "10.0.2.15" description: "underlay to leaf8" remote_asn: ["65004"] peer_device: ["leaf8"] # Spine2 EVPN - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.11" peer_address: "10.0.250.11" description: "EVPN to leaf1" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65001"] peer_device: ["leaf1"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.12" peer_address: "10.0.250.12" description: "EVPN to leaf2" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65001"] peer_device: ["leaf2"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.13" peer_address: "10.0.250.13" description: "EVPN to leaf3" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65002"] peer_device: ["leaf3"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.14" peer_address: "10.0.250.14" description: "EVPN to leaf4" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65002"] peer_device: ["leaf4"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.15" peer_address: "10.0.250.15" description: "EVPN to leaf5" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65003"] peer_device: ["leaf5"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.16" peer_address: "10.0.250.16" description: "EVPN to leaf6" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65003"] peer_device: ["leaf6"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.17" peer_address: "10.0.250.17" description: "EVPN to leaf7" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65004"] peer_device: ["leaf7"] - bgp_config: ["spine2"] + local_identifier: "spine2__10.0.250.18" peer_address: "10.0.250.18" description: "EVPN to leaf8" - peer_group: "evpn" + peer_group: "spine2__evpn" remote_asn: ["65004"] peer_device: ["leaf8"] # ============================================================ # Leaf1 sessions # ============================================================ - bgp_config: ["leaf1"] + local_identifier: "leaf1__10.0.1.0" peer_address: "10.0.1.0" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf1__underlay" peer_device: ["spine1"] - bgp_config: ["leaf1"] + local_identifier: "leaf1__10.0.2.0" peer_address: "10.0.2.0" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf1__underlay" peer_device: ["spine2"] - bgp_config: ["leaf1"] + local_identifier: "leaf1__10.0.3.1" peer_address: "10.0.3.1" description: "iBGP to leaf2" - peer_group: "underlay_ibgp" + peer_group: "leaf1__underlay_ibgp" peer_device: ["leaf2"] - bgp_config: ["leaf1"] + local_identifier: "leaf1__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf1__evpn" peer_device: ["spine1"] - bgp_config: ["leaf1"] + local_identifier: "leaf1__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf1__evpn" peer_device: ["spine2"] # ============================================================ # Leaf2 sessions # ============================================================ - bgp_config: ["leaf2"] + local_identifier: "leaf2__10.0.1.2" peer_address: "10.0.1.2" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf2__underlay" peer_device: ["spine1"] - bgp_config: ["leaf2"] + local_identifier: "leaf2__10.0.2.2" peer_address: "10.0.2.2" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf2__underlay" peer_device: ["spine2"] - bgp_config: ["leaf2"] + local_identifier: "leaf2__10.0.3.0" peer_address: "10.0.3.0" description: "iBGP to leaf1" - peer_group: "underlay_ibgp" + peer_group: "leaf2__underlay_ibgp" peer_device: ["leaf1"] - bgp_config: ["leaf2"] + local_identifier: "leaf2__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf2__evpn" peer_device: ["spine1"] - bgp_config: ["leaf2"] + local_identifier: "leaf2__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf2__evpn" peer_device: ["spine2"] # ============================================================ # Leaf3 sessions # ============================================================ - bgp_config: ["leaf3"] + local_identifier: "leaf3__10.0.1.4" peer_address: "10.0.1.4" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf3__underlay" peer_device: ["spine1"] - bgp_config: ["leaf3"] + local_identifier: "leaf3__10.0.2.4" peer_address: "10.0.2.4" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf3__underlay" peer_device: ["spine2"] - bgp_config: ["leaf3"] + local_identifier: "leaf3__10.0.3.3" peer_address: "10.0.3.3" description: "iBGP to leaf4" - peer_group: "underlay_ibgp" + peer_group: "leaf3__underlay_ibgp" peer_device: ["leaf4"] - bgp_config: ["leaf3"] + local_identifier: "leaf3__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf3__evpn" peer_device: ["spine1"] - bgp_config: ["leaf3"] + local_identifier: "leaf3__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf3__evpn" peer_device: ["spine2"] # ============================================================ # Leaf4 sessions # ============================================================ - bgp_config: ["leaf4"] + local_identifier: "leaf4__10.0.1.6" peer_address: "10.0.1.6" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf4__underlay" peer_device: ["spine1"] - bgp_config: ["leaf4"] + local_identifier: "leaf4__10.0.2.6" peer_address: "10.0.2.6" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf4__underlay" peer_device: ["spine2"] - bgp_config: ["leaf4"] + local_identifier: "leaf4__10.0.3.2" peer_address: "10.0.3.2" description: "iBGP to leaf3" - peer_group: "underlay_ibgp" + peer_group: "leaf4__underlay_ibgp" peer_device: ["leaf3"] - bgp_config: ["leaf4"] + local_identifier: "leaf4__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf4__evpn" peer_device: ["spine1"] - bgp_config: ["leaf4"] + local_identifier: "leaf4__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf4__evpn" peer_device: ["spine2"] # ============================================================ # Leaf5 sessions # ============================================================ - bgp_config: ["leaf5"] + local_identifier: "leaf5__10.0.1.8" peer_address: "10.0.1.8" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf5__underlay" peer_device: ["spine1"] - bgp_config: ["leaf5"] + local_identifier: "leaf5__10.0.2.8" peer_address: "10.0.2.8" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf5__underlay" peer_device: ["spine2"] - bgp_config: ["leaf5"] + local_identifier: "leaf5__10.0.3.5" peer_address: "10.0.3.5" description: "iBGP to leaf6" - peer_group: "underlay_ibgp" + peer_group: "leaf5__underlay_ibgp" peer_device: ["leaf6"] - bgp_config: ["leaf5"] + local_identifier: "leaf5__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf5__evpn" peer_device: ["spine1"] - bgp_config: ["leaf5"] + local_identifier: "leaf5__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf5__evpn" peer_device: ["spine2"] # ============================================================ # Leaf6 sessions # ============================================================ - bgp_config: ["leaf6"] + local_identifier: "leaf6__10.0.1.10" peer_address: "10.0.1.10" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf6__underlay" peer_device: ["spine1"] - bgp_config: ["leaf6"] + local_identifier: "leaf6__10.0.2.10" peer_address: "10.0.2.10" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf6__underlay" peer_device: ["spine2"] - bgp_config: ["leaf6"] + local_identifier: "leaf6__10.0.3.4" peer_address: "10.0.3.4" description: "iBGP to leaf5" - peer_group: "underlay_ibgp" + peer_group: "leaf6__underlay_ibgp" peer_device: ["leaf5"] - bgp_config: ["leaf6"] + local_identifier: "leaf6__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf6__evpn" peer_device: ["spine1"] - bgp_config: ["leaf6"] + local_identifier: "leaf6__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf6__evpn" peer_device: ["spine2"] # ============================================================ # Leaf7 sessions # ============================================================ - bgp_config: ["leaf7"] + local_identifier: "leaf7__10.0.1.12" peer_address: "10.0.1.12" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf7__underlay" peer_device: ["spine1"] - bgp_config: ["leaf7"] + local_identifier: "leaf7__10.0.2.12" peer_address: "10.0.2.12" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf7__underlay" peer_device: ["spine2"] - bgp_config: ["leaf7"] + local_identifier: "leaf7__10.0.3.7" peer_address: "10.0.3.7" description: "iBGP to leaf8" - peer_group: "underlay_ibgp" + peer_group: "leaf7__underlay_ibgp" peer_device: ["leaf8"] - bgp_config: ["leaf7"] + local_identifier: "leaf7__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf7__evpn" peer_device: ["spine1"] - bgp_config: ["leaf7"] + local_identifier: "leaf7__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf7__evpn" peer_device: ["spine2"] # ============================================================ # Leaf8 sessions # ============================================================ - bgp_config: ["leaf8"] + local_identifier: "leaf8__10.0.1.14" peer_address: "10.0.1.14" description: "underlay to spine1" - peer_group: "underlay" + peer_group: "leaf8__underlay" peer_device: ["spine1"] - bgp_config: ["leaf8"] + local_identifier: "leaf8__10.0.2.14" peer_address: "10.0.2.14" description: "underlay to spine2" - peer_group: "underlay" + peer_group: "leaf8__underlay" peer_device: ["spine2"] - bgp_config: ["leaf8"] + local_identifier: "leaf8__10.0.3.6" peer_address: "10.0.3.6" description: "iBGP to leaf7" - peer_group: "underlay_ibgp" + peer_group: "leaf8__underlay_ibgp" peer_device: ["leaf7"] - bgp_config: ["leaf8"] + local_identifier: "leaf8__10.0.250.1" peer_address: "10.0.250.1" description: "EVPN to spine1" - peer_group: "evpn" + peer_group: "leaf8__evpn" peer_device: ["spine1"] - bgp_config: ["leaf8"] + local_identifier: "leaf8__10.0.250.2" peer_address: "10.0.250.2" description: "EVPN to spine2" - peer_group: "evpn" + peer_group: "leaf8__evpn" peer_device: ["spine2"] --- apiVersion: infrahub.app/v1 @@ -426,161 +498,181 @@ spec: # Spine1 address families # ============================================================ - bgp_config: ["spine1"] + local_identifier: "spine1__ipv4_unicast" afi: ipv4 safi: unicast networks: - ["10.0.250.1/32"] - bgp_config: ["spine1"] + local_identifier: "spine1__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "spine1__evpn" # ============================================================ # Spine2 address families # ============================================================ - bgp_config: ["spine2"] + local_identifier: "spine2__ipv4_unicast" afi: ipv4 safi: unicast networks: - ["10.0.250.2/32"] - bgp_config: ["spine2"] + local_identifier: "spine2__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "spine2__evpn" # ============================================================ # Leaf1 address families # ============================================================ - bgp_config: ["leaf1"] + local_identifier: "leaf1__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf1__underlay" + - "leaf1__underlay_ibgp" networks: - ["10.0.250.11/32"] - ["10.0.255.11/32"] - bgp_config: ["leaf1"] + local_identifier: "leaf1__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf1__evpn" # ============================================================ # Leaf2 address families # ============================================================ - bgp_config: ["leaf2"] + local_identifier: "leaf2__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf2__underlay" + - "leaf2__underlay_ibgp" networks: - ["10.0.250.12/32"] - ["10.0.255.11/32"] - bgp_config: ["leaf2"] + local_identifier: "leaf2__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf2__evpn" # ============================================================ # Leaf3 address families # ============================================================ - bgp_config: ["leaf3"] + local_identifier: "leaf3__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf3__underlay" + - "leaf3__underlay_ibgp" networks: - ["10.0.250.13/32"] - ["10.0.255.12/32"] - bgp_config: ["leaf3"] + local_identifier: "leaf3__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf3__evpn" # ============================================================ # Leaf4 address families # ============================================================ - bgp_config: ["leaf4"] + local_identifier: "leaf4__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf4__underlay" + - "leaf4__underlay_ibgp" networks: - ["10.0.250.14/32"] - ["10.0.255.12/32"] - bgp_config: ["leaf4"] + local_identifier: "leaf4__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf4__evpn" # ============================================================ # Leaf5 address families # ============================================================ - bgp_config: ["leaf5"] + local_identifier: "leaf5__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf5__underlay" + - "leaf5__underlay_ibgp" networks: - ["10.0.250.15/32"] - ["10.0.255.13/32"] - bgp_config: ["leaf5"] + local_identifier: "leaf5__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf5__evpn" # ============================================================ # Leaf6 address families # ============================================================ - bgp_config: ["leaf6"] + local_identifier: "leaf6__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf6__underlay" + - "leaf6__underlay_ibgp" networks: - ["10.0.250.16/32"] - ["10.0.255.13/32"] - bgp_config: ["leaf6"] + local_identifier: "leaf6__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf6__evpn" # ============================================================ # Leaf7 address families # ============================================================ - bgp_config: ["leaf7"] + local_identifier: "leaf7__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf7__underlay" + - "leaf7__underlay_ibgp" networks: - ["10.0.250.17/32"] - ["10.0.255.14/32"] - bgp_config: ["leaf7"] + local_identifier: "leaf7__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf7__evpn" # ============================================================ # Leaf8 address families # ============================================================ - bgp_config: ["leaf8"] + local_identifier: "leaf8__ipv4_unicast" afi: ipv4 safi: unicast active_peer_groups: - - "underlay" - - "underlay_ibgp" + - "leaf8__underlay" + - "leaf8__underlay_ibgp" networks: - ["10.0.250.18/32"] - ["10.0.255.14/32"] - bgp_config: ["leaf8"] + local_identifier: "leaf8__evpn_unicast" afi: evpn safi: unicast active_peer_groups: - - "evpn" + - "leaf8__evpn" diff --git a/schemas/bgp.yml b/schemas/bgp.yml index 5ab6200..a4a83ea 100644 --- a/schemas/bgp.yml +++ b/schemas/bgp.yml @@ -106,11 +106,14 @@ nodes: icon: mdi--account-group include_in_menu: false uniqueness_constraints: - - ["bgp_config", "name__value"] + - ["local_identifier__value"] human_friendly_id: - - name__value + - local_identifier__value display_label: "{{ name__value }}" attributes: + - name: local_identifier + kind: Text + description: "Unique identifier combining device name and peer group name (e.g. spine1__evpn)" - name: name kind: Text description: Peer group name (e.g., underlay, evpn) @@ -181,11 +184,14 @@ nodes: icon: mdi--connection include_in_menu: false uniqueness_constraints: - - ["bgp_config", "peer_address__value"] + - ["local_identifier__value"] human_friendly_id: - - peer_address__value + - local_identifier__value display_label: "{{ peer_address__value }}" attributes: + - name: local_identifier + kind: Text + description: "Unique identifier combining device name and peer address (e.g. spine1__10.0.250.11)" - name: peer_address kind: IPHost description: Neighbor IP address @@ -231,8 +237,13 @@ nodes: label: BGP Address Family icon: mdi--format-list-bulleted include_in_menu: false + human_friendly_id: + - local_identifier__value display_label: "{{ afi__value }}" attributes: + - name: local_identifier + kind: Text + description: "Unique identifier combining device name and AFI/SAFI (e.g. spine1__ipv4_unicast)" - name: afi kind: Dropdown choices: -- 2.53.0 From bccac190ff530b233d5b6c668d5e87e1777b3118 Mon Sep 17 00:00:00 2001 From: Damien Date: Mon, 16 Feb 2026 17:49:44 +0100 Subject: [PATCH 24/29] Update object --- objects/10-bgp-sessions.yml | 52 ++++++++++++++++++------------------- objects/12-mlag.yml | 8 +++--- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml index 0af2483..23ec94d 100644 --- a/objects/10-bgp-sessions.yml +++ b/objects/10-bgp-sessions.yml @@ -508,7 +508,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "spine1__evpn" + - ["spine1__evpn"] # ============================================================ # Spine2 address families # ============================================================ @@ -523,7 +523,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "spine2__evpn" + - ["spine2__evpn"] # ============================================================ # Leaf1 address families # ============================================================ @@ -532,8 +532,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf1__underlay" - - "leaf1__underlay_ibgp" + - ["leaf1__underlay"] + - ["leaf1__underlay_ibgp"] networks: - ["10.0.250.11/32"] - ["10.0.255.11/32"] @@ -542,7 +542,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf1__evpn" + - ["leaf1__evpn"] # ============================================================ # Leaf2 address families # ============================================================ @@ -551,8 +551,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf2__underlay" - - "leaf2__underlay_ibgp" + - ["leaf2__underlay"] + - ["leaf2__underlay_ibgp"] networks: - ["10.0.250.12/32"] - ["10.0.255.11/32"] @@ -561,7 +561,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf2__evpn" + - ["leaf2__evpn"] # ============================================================ # Leaf3 address families # ============================================================ @@ -570,8 +570,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf3__underlay" - - "leaf3__underlay_ibgp" + - ["leaf3__underlay"] + - ["leaf3__underlay_ibgp"] networks: - ["10.0.250.13/32"] - ["10.0.255.12/32"] @@ -580,7 +580,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf3__evpn" + - ["leaf3__evpn"] # ============================================================ # Leaf4 address families # ============================================================ @@ -589,8 +589,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf4__underlay" - - "leaf4__underlay_ibgp" + - ["leaf4__underlay"] + - ["leaf4__underlay_ibgp"] networks: - ["10.0.250.14/32"] - ["10.0.255.12/32"] @@ -599,7 +599,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf4__evpn" + - ["leaf4__evpn"] # ============================================================ # Leaf5 address families # ============================================================ @@ -608,8 +608,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf5__underlay" - - "leaf5__underlay_ibgp" + - ["leaf5__underlay"] + - ["leaf5__underlay_ibgp"] networks: - ["10.0.250.15/32"] - ["10.0.255.13/32"] @@ -618,7 +618,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf5__evpn" + - ["leaf5__evpn"] # ============================================================ # Leaf6 address families # ============================================================ @@ -627,8 +627,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf6__underlay" - - "leaf6__underlay_ibgp" + - ["leaf6__underlay"] + - ["leaf6__underlay_ibgp"] networks: - ["10.0.250.16/32"] - ["10.0.255.13/32"] @@ -637,7 +637,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf6__evpn" + - ["leaf6__evpn"] # ============================================================ # Leaf7 address families # ============================================================ @@ -646,8 +646,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf7__underlay" - - "leaf7__underlay_ibgp" + - ["leaf7__underlay"] + - ["leaf7__underlay_ibgp"] networks: - ["10.0.250.17/32"] - ["10.0.255.14/32"] @@ -656,7 +656,7 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf7__evpn" + - ["leaf7__evpn"] # ============================================================ # Leaf8 address families # ============================================================ @@ -665,8 +665,8 @@ spec: afi: ipv4 safi: unicast active_peer_groups: - - "leaf8__underlay" - - "leaf8__underlay_ibgp" + - ["leaf8__underlay"] + - ["leaf8__underlay_ibgp"] networks: - ["10.0.250.18/32"] - ["10.0.255.14/32"] @@ -675,4 +675,4 @@ spec: afi: evpn safi: unicast active_peer_groups: - - "leaf8__evpn" + - ["leaf8__evpn"] diff --git a/objects/12-mlag.yml b/objects/12-mlag.yml index 29b8e56..c6d73bb 100644 --- a/objects/12-mlag.yml +++ b/objects/12-mlag.yml @@ -79,7 +79,7 @@ spec: # Leaf2 MLAG peer config - device: ["leaf2"] mlag_domain: ["leafs-1-2"] - local_interface_ip: "10.0.199.255/31" + local_interface_ip: "10.0.199.254/31" peer_address: "10.0.199.254" heartbeat_peer_ip: "172.16.0.25" local_interface: ["leaf2", "Vlan4090"] @@ -95,7 +95,7 @@ spec: # Leaf4 MLAG peer config - device: ["leaf4"] mlag_domain: ["leafs-3-4"] - local_interface_ip: "10.0.199.253/31" + local_interface_ip: "10.0.199.252/31" peer_address: "10.0.199.252" heartbeat_peer_ip: "172.16.0.27" local_interface: ["leaf4", "Vlan4090"] @@ -111,7 +111,7 @@ spec: # Leaf6 MLAG peer config - device: ["leaf6"] mlag_domain: ["leafs-5-6"] - local_interface_ip: "10.0.199.251/31" + local_interface_ip: "10.0.199.250/31" peer_address: "10.0.199.250" heartbeat_peer_ip: "172.16.0.29" local_interface: ["leaf6", "Vlan4090"] @@ -127,7 +127,7 @@ spec: # Leaf8 MLAG peer config - device: ["leaf8"] mlag_domain: ["leafs-7-8"] - local_interface_ip: "10.0.199.249/31" + local_interface_ip: "10.0.199.248/31" peer_address: "10.0.199.248" heartbeat_peer_ip: "172.16.0.31" local_interface: ["leaf8", "Vlan4090"] -- 2.53.0 From 9e1fe9be7f4c941ff6f1c53bcc83d0e742fbbc16 Mon Sep 17 00:00:00 2001 From: Damien Date: Fri, 20 Feb 2026 15:02:49 +0100 Subject: [PATCH 25/29] chore(fix schema): remove unused border leaf --- objects/03-devices.yml | 6 +++--- schemas/base.yml | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/objects/03-devices.yml b/objects/03-devices.yml index 96da0e2..794921b 100644 --- a/objects/03-devices.yml +++ b/objects/03-devices.yml @@ -69,15 +69,15 @@ spec: # Leaf pair 4 (VTEP4) - name: leaf7 description: Leaf7 - VTEP4 - role: border_leaf + role: leaf status: active platform: ["arista_eos"] site: ["dc1"] asn: ["65004"] - name: leaf8 description: Leaf8 - VTEP4 - role: border_leaf + role: leaf status: active platform: ["arista_eos"] site: ["dc1"] - asn: ["65004"] \ No newline at end of file + asn: ["65004"] diff --git a/schemas/base.yml b/schemas/base.yml index e08bb57..7bd5aa9 100644 --- a/schemas/base.yml +++ b/schemas/base.yml @@ -125,9 +125,6 @@ nodes: - name: leaf label: Leaf color: "#22c55e" - - name: border_leaf - label: Border Leaf - color: "#f59e0b" description: Fabric role - name: status kind: Dropdown -- 2.53.0 From c902d7df58c21477383f5b6eb729e2b1ca011bb6 Mon Sep 17 00:00:00 2001 From: Damien Date: Fri, 20 Feb 2026 15:13:46 +0100 Subject: [PATCH 26/29] chore(schema): update schema --- objects/10-bgp-sessions.yml | 48 +++++++++++++++++++++++++++++++++++++ schemas/bgp.yml | 11 +++++++++ 2 files changed, 59 insertions(+) diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml index 23ec94d..c41986c 100644 --- a/objects/10-bgp-sessions.yml +++ b/objects/10-bgp-sessions.yml @@ -455,6 +455,13 @@ spec: description: "EVPN to spine2" peer_group: "leaf7__evpn" peer_device: ["spine2"] + # Leaf7 VRF gold border peering + - bgp_config: ["leaf7"] + local_identifier: "leaf7__10.90.90.1" + peer_address: "10.90.90.1" + description: "border peering to AS 64999 in VRF gold" + remote_asn: ["64999"] + vrf: "gold" # ============================================================ # Leaf8 sessions # ============================================================ @@ -488,6 +495,13 @@ spec: description: "EVPN to spine2" peer_group: "leaf8__evpn" peer_device: ["spine2"] + # Leaf8 VRF gold border peering + - bgp_config: ["leaf8"] + local_identifier: "leaf8__10.90.90.1" + peer_address: "10.90.90.1" + description: "border peering to AS 64999 in VRF gold" + remote_asn: ["64999"] + vrf: "gold" --- apiVersion: infrahub.app/v1 kind: Object @@ -501,6 +515,15 @@ spec: local_identifier: "spine1__ipv4_unicast" afi: ipv4 safi: unicast + active_sessions: + - ["spine1__10.0.1.1"] + - ["spine1__10.0.1.3"] + - ["spine1__10.0.1.5"] + - ["spine1__10.0.1.7"] + - ["spine1__10.0.1.9"] + - ["spine1__10.0.1.11"] + - ["spine1__10.0.1.13"] + - ["spine1__10.0.1.15"] networks: - ["10.0.250.1/32"] - bgp_config: ["spine1"] @@ -516,6 +539,15 @@ spec: local_identifier: "spine2__ipv4_unicast" afi: ipv4 safi: unicast + active_sessions: + - ["spine2__10.0.2.1"] + - ["spine2__10.0.2.3"] + - ["spine2__10.0.2.5"] + - ["spine2__10.0.2.7"] + - ["spine2__10.0.2.9"] + - ["spine2__10.0.2.11"] + - ["spine2__10.0.2.13"] + - ["spine2__10.0.2.15"] networks: - ["10.0.250.2/32"] - bgp_config: ["spine2"] @@ -657,6 +689,14 @@ spec: safi: unicast active_peer_groups: - ["leaf7__evpn"] + # Leaf7 IPv4 unicast in VRF gold (border peering) + - bgp_config: ["leaf7"] + local_identifier: "leaf7__vrf_gold__ipv4_unicast" + afi: ipv4 + safi: unicast + vrf: "gold" + active_sessions: + - ["leaf7__10.90.90.1"] # ============================================================ # Leaf8 address families # ============================================================ @@ -676,3 +716,11 @@ spec: safi: unicast active_peer_groups: - ["leaf8__evpn"] + # Leaf8 IPv4 unicast in VRF gold (border peering) + - bgp_config: ["leaf8"] + local_identifier: "leaf8__vrf_gold__ipv4_unicast" + afi: ipv4 + safi: unicast + vrf: "gold" + active_sessions: + - ["leaf8__10.90.90.1"] diff --git a/schemas/bgp.yml b/schemas/bgp.yml index a4a83ea..c246ebf 100644 --- a/schemas/bgp.yml +++ b/schemas/bgp.yml @@ -273,6 +273,17 @@ nodes: peer: InfraBGPPeerGroup cardinality: many description: Peer groups activated in this AF + - name: active_sessions + peer: InfraBGPSession + cardinality: many + optional: true + description: Individual sessions activated in this AF (e.g. spine direct neighbors) + - name: vrf + peer: InfraVRF + cardinality: one + kind: Attribute + optional: true + description: VRF context for this AF (null = global BGP process) - name: networks peer: InfraIPAddress cardinality: many -- 2.53.0 From 8faf5139cb9c0e7bf580534b488afeead0cf47ff Mon Sep 17 00:00:00 2001 From: Damien Arnodo Date: Fri, 20 Feb 2026 14:21:59 +0000 Subject: [PATCH 27/29] fix(mlag): correct local_interface_ip for secondary leaves in MLAG pairs --- objects/12-mlag.yml | 135 +------------------------------------------- 1 file changed, 1 insertion(+), 134 deletions(-) diff --git a/objects/12-mlag.yml b/objects/12-mlag.yml index c6d73bb..d61d6b2 100644 --- a/objects/12-mlag.yml +++ b/objects/12-mlag.yml @@ -1,134 +1 @@ -# MLAG: Domains and Peer Configs -# Depends on: 02-devices, 03-interfaces (Vlan4090, Port-Channel999), 05-vlans-vxlan (VLAN 4090/4091) -# -# All 4 MLAG pairs share domain-id "leafs" and virtual-mac c001.cafe.babe -# but each is a separate MlagDomain object linking two devices. -# MLAG peer VLAN: 4090, MLAG iBGP VLAN: 4091 ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraMlagDomain - data: - # MLAG pair 1: leaf1 + leaf2 - - domain_id: leafs-1-2 - description: MLAG domain for leaf1/leaf2 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf1"] - - ["leaf2"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] - # MLAG pair 2: leaf3 + leaf4 - - domain_id: leafs-3-4 - description: MLAG domain for leaf3/leaf4 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf3"] - - ["leaf4"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] - # MLAG pair 3: leaf5 + leaf6 - - domain_id: leafs-5-6 - description: MLAG domain for leaf5/leaf6 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf5"] - - ["leaf6"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] - # MLAG pair 4: leaf7 + leaf8 - - domain_id: leafs-7-8 - description: MLAG domain for leaf7/leaf8 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf7"] - - ["leaf8"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraMlagPeerConfig - data: - # Leaf1 MLAG peer config - - device: ["leaf1"] - mlag_domain: ["leafs-1-2"] - local_interface_ip: "10.0.199.254/31" - peer_address: "10.0.199.255" - heartbeat_peer_ip: "172.16.0.50" - local_interface: ["leaf1", "Vlan4090"] - peer_link: ["leaf1", "Port-Channel999"] - # Leaf2 MLAG peer config - - device: ["leaf2"] - mlag_domain: ["leafs-1-2"] - local_interface_ip: "10.0.199.254/31" - peer_address: "10.0.199.254" - heartbeat_peer_ip: "172.16.0.25" - local_interface: ["leaf2", "Vlan4090"] - peer_link: ["leaf2", "Port-Channel999"] - # Leaf3 MLAG peer config - - device: ["leaf3"] - mlag_domain: ["leafs-3-4"] - local_interface_ip: "10.0.199.252/31" - peer_address: "10.0.199.253" - heartbeat_peer_ip: "172.16.0.28" - local_interface: ["leaf3", "Vlan4090"] - peer_link: ["leaf3", "Port-Channel999"] - # Leaf4 MLAG peer config - - device: ["leaf4"] - mlag_domain: ["leafs-3-4"] - local_interface_ip: "10.0.199.252/31" - peer_address: "10.0.199.252" - heartbeat_peer_ip: "172.16.0.27" - local_interface: ["leaf4", "Vlan4090"] - peer_link: ["leaf4", "Port-Channel999"] - # Leaf5 MLAG peer config - - device: ["leaf5"] - mlag_domain: ["leafs-5-6"] - local_interface_ip: "10.0.199.250/31" - peer_address: "10.0.199.251" - heartbeat_peer_ip: "172.16.0.30" - local_interface: ["leaf5", "Vlan4090"] - peer_link: ["leaf5", "Port-Channel999"] - # Leaf6 MLAG peer config - - device: ["leaf6"] - mlag_domain: ["leafs-5-6"] - local_interface_ip: "10.0.199.250/31" - peer_address: "10.0.199.250" - heartbeat_peer_ip: "172.16.0.29" - local_interface: ["leaf6", "Vlan4090"] - peer_link: ["leaf6", "Port-Channel999"] - # Leaf7 MLAG peer config - - device: ["leaf7"] - mlag_domain: ["leafs-7-8"] - local_interface_ip: "10.0.199.248/31" - peer_address: "10.0.199.249" - heartbeat_peer_ip: "172.16.0.32" - local_interface: ["leaf7", "Vlan4090"] - peer_link: ["leaf7", "Port-Channel999"] - # Leaf8 MLAG peer config - - device: ["leaf8"] - mlag_domain: ["leafs-7-8"] - local_interface_ip: "10.0.199.248/31" - peer_address: "10.0.199.248" - heartbeat_peer_ip: "172.16.0.31" - local_interface: ["leaf8", "Vlan4090"] - peer_link: ["leaf8", "Port-Channel999"] +IyBNTEFHOiBEb21haW5zIGFuZCBQZWVyIENvbmZpZ3MKIyBEZXBlbmRzIG9uOiAwMi1kZXZpY2VzLCAwMy1pbnRlcmZhY2VzIChWbGFuNDA5MCwgUG9ydC1DaGFubmVsOTk5KSwgMDUtdmxhbnMtdnhsYW4gKFZMQU4gNDA5MC80MDkxKQojCiMgQWxsIDQgTUxBRyBwYWlycyBzaGFyZSBkb21haW4taWQgImxlYWZzIiBhbmQgdmlydHVhbC1tYWMgYzAwMS5jYWZlLmJhYmUKIyBidXQgZWFjaCBpcyBhIHNlcGFyYXRlIE1sYWdEb21haW4gb2JqZWN0IGxpbmtpbmcgdHdvIGRldmljZXMuCiMgTUxBRyBwZWVyIFZMQU46IDQwOTAsIE1MQUcgaUJHUCBWTEFOOiA0MDkxCi0tLQphcGlWZXJzaW9uOiBpbmZyYWh1Yi5hcHAvdjEKa2luZDogT2JqZWN0CnNwZWM6CiAga2luZDogSW5mcmFNbGFnRG9tYWluCiAgZGF0YToKICAgICMgTUxBRyBwYWlyIDE6IGxlYWYxICsgbGVhZjIKICAgIC0gZG9tYWluX2lkOiBsZWFmcy0xLTIKICAgICAgZGVzY3JpcHRpb246IE1MQUcgZG9tYWluIGZvciBsZWFmMS9sZWFmMiBwYWlyCiAgICAgIHZpcnR1YWxfbWFjOiAiYzAwMS5jYWZlLmJhYmUiCiAgICAgIGhlYXJ0YmVhdF92cmY6IG1nbXQKICAgICAgZHVhbF9wcmltYXJ5X2RldGVjdGlvbjogdHJ1ZQogICAgICBkdWFsX3ByaW1hcnlfZGVsYXk6IDEwCiAgICAgIGR1YWxfcHJpbWFyeV9hY3Rpb246IGVycmRpc2FibGUKICAgICAgZGV2aWNlczoKICAgICAgICAtIFsibGVhZjEiXQogICAgICAgIC0gWyJsZWFmMiJdCiAgICAgIHBlZXJfdmxhbjogWyI0MDkwIl0KICAgICAgaWJncF92bGFuOiBbIjQwOTEiXQogICAgIyBNTEFHIHBhaXIgMjogbGVhZjMgKyBsZWFmNAogICAgLSBkb21haW5faWQ6IGxlYWZzLTMtNAogICAgICBkZXNjcmlwdGlvbjogTUxBRyBkb21haW4gZm9yIGxlYWYzL2xlYWY0IHBhaXIKICAgICAgdmlydHVhbF9tYWM6ICJjMDAxLmNhZmUuYmFiZSIKICAgICAgaGVhcnRiZWF0X3ZyZjogbWdtdAogICAgICBkdWFsX3ByaW1hcnlfZGV0ZWN0aW9uOiB0cnVlCiAgICAgIGR1YWxfcHJpbWFyeV9kZWxheTogMTAKICAgICAgZHVhbF9wcmltYXJ5X2FjdGlvbjogZXJyZGlzYWJsZQogICAgICBkZXZpY2VzOgogICAgICAgIC0gWyJsZWFmMyJdCiAgICAgICAgLSBbImxlYWY0Il0KICAgICAgcGVlcl92bGFuOiBbIjQwOTAiXQogICAgICBpYmdwX3ZsYW46IFsiNDA5MSJdCiAgICAjIE1MQUcgcGFpciAzOiBsZWFmNSArIGxlYWY2CiAgICAtIGRvbWFpbl9pZDogbGVhZnMtNS02CiAgICAgIGRlc2NyaXB0aW9uOiBNTEFHIGRvbWFpbiBmb3IgbGVhZjUvbGVhZjYgcGFpcgogICAgICB2aXJ0dWFsX21hYzogImMwMDEuY2FmZS5iYWJlIgogICAgICBoZWFydGJlYXRfdnJmOiBtZ210CiAgICAgIGR1YWxfcHJpbWFyeV9kZXRlY3Rpb246IHRydWUKICAgICAgZHVhbF9wcmltYXJ5X2RlbGF5OiAxMAogICAgICBkdWFsX3ByaW1hcnlfYWN0aW9uOiBlcnJkaXNhYmxlCiAgICAgIGRldmljZXM6CiAgICAgICAgLSBbImxlYWY1Il0KICAgICAgICAtIFsibGVhZjYiXQogICAgICBwZWVyX3ZsYW46IFsiNDA5MCJdCiAgICAgIGliZ3BfdmxhbjogWyI0MDkxIl0KICAgICMgTUxBRyBwYWlyIDQ6IGxlYWY3ICsgbGVhZjgKICAgIC0gZG9tYWluX2lkOiBsZWFmcy03LTgKICAgICAgZGVzY3JpcHRpb246IE1MQUcgZG9tYWluIGZvciBsZWFmNy9sZWFmOCBwYWlyCiAgICAgIHZpcnR1YWxfbWFjOiAiYzAwMS5jYWZlLmJhYmUiCiAgICAgIGhlYXJ0YmVhdF92cmY6IG1nbXQKICAgICAgZHVhbF9wcmltYXJ5X2RldGVjdGlvbjogdHJ1ZQogICAgICBkdWFsX3ByaW1hcnlfZGVsYXk6IDEwCiAgICAgIGR1YWxfcHJpbWFyeV9hY3Rpb246IGVycmRpc2FibGUKICAgICAgZGV2aWNlczoKICAgICAgICAtIFsibGVhZjciXQogICAgICAgIC0gWyJsZWFmOCJdCiAgICAgIHBlZXJfdmxhbjogWyI0MDkwIl0KICAgICAgaWJncF92bGFuOiBbIjQwOTEiXQotLS0KYXBpVmVyc2lvbjogaW5mcmFodWIuYXBwL3YxCmtpbmQ6IE9iamVjdApzcGVjOgogIGtpbmQ6IEluZnJhTWxhZ1BlZXJDb25maWcKICBkYXRhOgogICAgIyBMZWFmMSBNTEFHIHBlZXIgY29uZmlnCiAgICAtIGRldmljZTogWyJsZWFmMSJdCiAgICAgIG1sYWdfZG9tYWluOiBbImxlYWZzLTEtMiJdCiAgICAgIGxvY2FsX2ludGVyZmFjZV9pcDogIjEwLjAuMTk5LjI1NC8zMSIKICAgICAgcGVlcl9hZGRyZXNzOiAiMTAuMC4xOTkuMjU1IgogICAgICBoZWFydGJlYXRfcGVlcl9pcDogIjE3Mi4xNi4wLjUwIgogICAgICBsb2NhbF9pbnRlcmZhY2U6IFsibGVhZjEiLCAiVmxhbjQwOTAiXQogICAgICBwZWVyX2xpbms6IFsibGVhZjEiLCAiUG9ydC1DaGFubmVsOTk5Il0KICAgICMgTGVhZjIgTUxBRyBwZWVyIGNvbmZpZwogICAgLSBkZXZpY2U6IFsibGVhZjIiXQogICAgICBtbGFnX2RvbWFpbjogWyJsZWFmcy0xLTIiXQogICAgICBsb2NhbF9pbnRlcmZhY2VfaXA6ICIxMC4wLjE5OS4yNTUvMzEiCiAgICAgIHBlZXJfYWRkcmVzczogIjEwLjAuMTk5LjI1NCIKICAgICAgaGVhcnRiZWF0X3BlZXJfaXA6ICIxNzIuMTYuMC4yNSIKICAgICAgbG9jYWxfaW50ZXJmYWNlOiBbImxlYWYyIiwgIlZsYW40MDkwIl0KICAgICAgcGVlcl9saW5rOiBbImxlYWYyIiwgIlBvcnQtQ2hhbm5lbDk5OSJdCiAgICAjIExlYWYzIE1MQUcgcGVlciBjb25maWcKICAgIC0gZGV2aWNlOiBbImxlYWYzIl0KICAgICAgbWxhZ19kb21haW46IFsibGVhZnMtMy00Il0KICAgICAgbG9jYWxfaW50ZXJmYWNlX2lwOiAiMTAuMC4xOTkuMjUyLzMxIgogICAgICBwZWVyX2FkZHJlc3M6ICIxMC4wLjE5OS4yNTMiCiAgICAgIGhlYXJ0YmVhdF9wZWVyX2lwOiAiMTcyLjE2LjAuMjgiCiAgICAgIGxvY2FsX2ludGVyZmFjZTogWyJsZWFmMyIsICJWbGFuNDA5MCJdCiAgICAgIHBlZXJfbGluazogWyJsZWFmMyIsICJQb3J0LUNoYW5uZWw5OTkiXQogICAgIyBMZWFmNCBNTEFHIHBlZXIgY29uZmlnCiAgICAtIGRldmljZTogWyJsZWFmNCJdCiAgICAgIG1sYWdfZG9tYWluOiBbImxlYWZzLTMtNCJdCiAgICAgIGxvY2FsX2ludGVyZmFjZV9pcDogIjEwLjAuMTk5LjI1My8zMSIKICAgICAgcGVlcl9hZGRyZXNzOiAiMTAuMC4xOTkuMjUyIgogICAgICBoZWFydGJlYXRfcGVlcl9pcDogIjE3Mi4xNi4wLjI3IgogICAgICBsb2NhbF9pbnRlcmZhY2U6IFsibGVhZjQiLCAiVmxhbjQwOTAiXQogICAgICBwZWVyX2xpbms6IFsibGVhZjQiLCAiUG9ydC1DaGFubmVsOTk5Il0KICAgICMgTGVhZjUgTUxBRyBwZWVyIGNvbmZpZwogICAgLSBkZXZpY2U6IFsibGVhZjUiXQogICAgICBtbGFnX2RvbWFpbjogWyJsZWFmcy01LTYiXQogICAgICBsb2NhbF9pbnRlcmZhY2VfaXA6ICIxMC4wLjE5OS4yNTAvMzEiCiAgICAgIHBlZXJfYWRkcmVzczogIjEwLjAuMTk5LjI1MSIKICAgICAgaGVhcnRiZWF0X3BlZXJfaXA6ICIxNzIuMTYuMC4zMCIKICAgICAgbG9jYWxfaW50ZXJmYWNlOiBbImxlYWY1IiwgIlZsYW40MDkwIl0KICAgICAgcGVlcl9saW5rOiBbImxlYWY1IiwgIlBvcnQtQ2hhbm5lbDk5OSJdCiAgICAjIExlYWY2IE1MQUcgcGVlciBjb25maWcKICAgIC0gZGV2aWNlOiBbImxlYWY2Il0KICAgICAgbWxhZ19kb21haW46IFsibGVhZnMtNS02Il0KICAgICAgbG9jYWxfaW50ZXJmYWNlX2lwOiAiMTAuMC4xOTkuMjUxLzMxIgogICAgICBwZWVyX2FkZHJlc3M6ICIxMC4wLjE5OS4yNTAiCiAgICAgIGhlYXJ0YmVhdF9wZWVyX2lwOiAiMTcyLjE2LjAuMjkiCiAgICAgIGxvY2FsX2ludGVyZmFjZTogWyJsZWFmNiIsICJWbGFuNDA5MCJdCiAgICAgIHBlZXJfbGluazogWyJsZWFmNiIsICJQb3J0LUNoYW5uZWw5OTkiXQogICAgIyBMZWFmNyBNTEFHIHBlZXIgY29uZmlnCiAgICAtIGRldmljZTogWyJsZWFmNyJdCiAgICAgIG1sYWdfZG9tYWluOiBbImxlYWZzLTctOCJdCiAgICAgIGxvY2FsX2ludGVyZmFjZV9pcDogIjEwLjAuMTk5LjI0OC8zMSIKICAgICAgcGVlcl9hZGRyZXNzOiAiMTAuMC4xOTkuMjQ5IgogICAgICBoZWFydGJlYXRfcGVlcl9pcDogIjE3Mi4xNi4wLjMyIgogICAgICBsb2NhbF9pbnRlcmZhY2U6IFsibGVhZjciLCAiVmxhbjQwOTAiXQogICAgICBwZWVyX2xpbms6IFsibGVhZjciLCAiUG9ydC1DaGFubmVsOTk5Il0KICAgICMgTGVhZjggTUxBRyBwZWVyIGNvbmZpZwogICAgLSBkZXZpY2U6IFsibGVhZjgiXQogICAgICBtbGFnX2RvbWFpbjogWyJsZWFmcy03LTgiXQogICAgICBsb2NhbF9pbnRlcmZhY2VfaXA6ICIxMC4wLjE5OS4yNDkvMzEiCiAgICAgIHBlZXJfYWRkcmVzczogIjEwLjAuMTk5LjI0OCIKICAgICAgaGVhcnRiZWF0X3BlZXJfaXA6ICIxNzIuMTYuMC4zMSIKICAgICAgbG9jYWxfaW50ZXJmYWNlOiBbImxlYWY4IiwgIlZsYW40MDkwIl0KICAgICAgcGVlcl9saW5rOiBbImxlYWY4IiwgIlBvcnQtQ2hhbm5lbDk5OSJdCg== \ No newline at end of file -- 2.53.0 From 110c223b66dc178efe1a35806f17f0df2ec90135 Mon Sep 17 00:00:00 2001 From: Damien Date: Fri, 20 Feb 2026 15:49:09 +0100 Subject: [PATCH 28/29] chore(schema): update schema --- objects/12-mlag.yml | 135 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) diff --git a/objects/12-mlag.yml b/objects/12-mlag.yml index d61d6b2..29b8e56 100644 --- a/objects/12-mlag.yml +++ b/objects/12-mlag.yml @@ -1 +1,134 @@ -IyBNTEFHOiBEb21haW5zIGFuZCBQZWVyIENvbmZpZ3MKIyBEZXBlbmRzIG9uOiAwMi1kZXZpY2VzLCAwMy1pbnRlcmZhY2VzIChWbGFuNDA5MCwgUG9ydC1DaGFubmVsOTk5KSwgMDUtdmxhbnMtdnhsYW4gKFZMQU4gNDA5MC80MDkxKQojCiMgQWxsIDQgTUxBRyBwYWlycyBzaGFyZSBkb21haW4taWQgImxlYWZzIiBhbmQgdmlydHVhbC1tYWMgYzAwMS5jYWZlLmJhYmUKIyBidXQgZWFjaCBpcyBhIHNlcGFyYXRlIE1sYWdEb21haW4gb2JqZWN0IGxpbmtpbmcgdHdvIGRldmljZXMuCiMgTUxBRyBwZWVyIFZMQU46IDQwOTAsIE1MQUcgaUJHUCBWTEFOOiA0MDkxCi0tLQphcGlWZXJzaW9uOiBpbmZyYWh1Yi5hcHAvdjEKa2luZDogT2JqZWN0CnNwZWM6CiAga2luZDogSW5mcmFNbGFnRG9tYWluCiAgZGF0YToKICAgICMgTUxBRyBwYWlyIDE6IGxlYWYxICsgbGVhZjIKICAgIC0gZG9tYWluX2lkOiBsZWFmcy0xLTIKICAgICAgZGVzY3JpcHRpb246IE1MQUcgZG9tYWluIGZvciBsZWFmMS9sZWFmMiBwYWlyCiAgICAgIHZpcnR1YWxfbWFjOiAiYzAwMS5jYWZlLmJhYmUiCiAgICAgIGhlYXJ0YmVhdF92cmY6IG1nbXQKICAgICAgZHVhbF9wcmltYXJ5X2RldGVjdGlvbjogdHJ1ZQogICAgICBkdWFsX3ByaW1hcnlfZGVsYXk6IDEwCiAgICAgIGR1YWxfcHJpbWFyeV9hY3Rpb246IGVycmRpc2FibGUKICAgICAgZGV2aWNlczoKICAgICAgICAtIFsibGVhZjEiXQogICAgICAgIC0gWyJsZWFmMiJdCiAgICAgIHBlZXJfdmxhbjogWyI0MDkwIl0KICAgICAgaWJncF92bGFuOiBbIjQwOTEiXQogICAgIyBNTEFHIHBhaXIgMjogbGVhZjMgKyBsZWFmNAogICAgLSBkb21haW5faWQ6IGxlYWZzLTMtNAogICAgICBkZXNjcmlwdGlvbjogTUxBRyBkb21haW4gZm9yIGxlYWYzL2xlYWY0IHBhaXIKICAgICAgdmlydHVhbF9tYWM6ICJjMDAxLmNhZmUuYmFiZSIKICAgICAgaGVhcnRiZWF0X3ZyZjogbWdtdAogICAgICBkdWFsX3ByaW1hcnlfZGV0ZWN0aW9uOiB0cnVlCiAgICAgIGR1YWxfcHJpbWFyeV9kZWxheTogMTAKICAgICAgZHVhbF9wcmltYXJ5X2FjdGlvbjogZXJyZGlzYWJsZQogICAgICBkZXZpY2VzOgogICAgICAgIC0gWyJsZWFmMyJdCiAgICAgICAgLSBbImxlYWY0Il0KICAgICAgcGVlcl92bGFuOiBbIjQwOTAiXQogICAgICBpYmdwX3ZsYW46IFsiNDA5MSJdCiAgICAjIE1MQUcgcGFpciAzOiBsZWFmNSArIGxlYWY2CiAgICAtIGRvbWFpbl9pZDogbGVhZnMtNS02CiAgICAgIGRlc2NyaXB0aW9uOiBNTEFHIGRvbWFpbiBmb3IgbGVhZjUvbGVhZjYgcGFpcgogICAgICB2aXJ0dWFsX21hYzogImMwMDEuY2FmZS5iYWJlIgogICAgICBoZWFydGJlYXRfdnJmOiBtZ210CiAgICAgIGR1YWxfcHJpbWFyeV9kZXRlY3Rpb246IHRydWUKICAgICAgZHVhbF9wcmltYXJ5X2RlbGF5OiAxMAogICAgICBkdWFsX3ByaW1hcnlfYWN0aW9uOiBlcnJkaXNhYmxlCiAgICAgIGRldmljZXM6CiAgICAgICAgLSBbImxlYWY1Il0KICAgICAgICAtIFsibGVhZjYiXQogICAgICBwZWVyX3ZsYW46IFsiNDA5MCJdCiAgICAgIGliZ3BfdmxhbjogWyI0MDkxIl0KICAgICMgTUxBRyBwYWlyIDQ6IGxlYWY3ICsgbGVhZjgKICAgIC0gZG9tYWluX2lkOiBsZWFmcy03LTgKICAgICAgZGVzY3JpcHRpb246IE1MQUcgZG9tYWluIGZvciBsZWFmNy9sZWFmOCBwYWlyCiAgICAgIHZpcnR1YWxfbWFjOiAiYzAwMS5jYWZlLmJhYmUiCiAgICAgIGhlYXJ0YmVhdF92cmY6IG1nbXQKICAgICAgZHVhbF9wcmltYXJ5X2RldGVjdGlvbjogdHJ1ZQogICAgICBkdWFsX3ByaW1hcnlfZGVsYXk6IDEwCiAgICAgIGR1YWxfcHJpbWFyeV9hY3Rpb246IGVycmRpc2FibGUKICAgICAgZGV2aWNlczoKICAgICAgICAtIFsibGVhZjciXQogICAgICAgIC0gWyJsZWFmOCJdCiAgICAgIHBlZXJfdmxhbjogWyI0MDkwIl0KICAgICAgaWJncF92bGFuOiBbIjQwOTEiXQotLS0KYXBpVmVyc2lvbjogaW5mcmFodWIuYXBwL3YxCmtpbmQ6IE9iamVjdApzcGVjOgogIGtpbmQ6IEluZnJhTWxhZ1BlZXJDb25maWcKICBkYXRhOgogICAgIyBMZWFmMSBNTEFHIHBlZXIgY29uZmlnCiAgICAtIGRldmljZTogWyJsZWFmMSJdCiAgICAgIG1sYWdfZG9tYWluOiBbImxlYWZzLTEtMiJdCiAgICAgIGxvY2FsX2ludGVyZmFjZV9pcDogIjEwLjAuMTk5LjI1NC8zMSIKICAgICAgcGVlcl9hZGRyZXNzOiAiMTAuMC4xOTkuMjU1IgogICAgICBoZWFydGJlYXRfcGVlcl9pcDogIjE3Mi4xNi4wLjUwIgogICAgICBsb2NhbF9pbnRlcmZhY2U6IFsibGVhZjEiLCAiVmxhbjQwOTAiXQogICAgICBwZWVyX2xpbms6IFsibGVhZjEiLCAiUG9ydC1DaGFubmVsOTk5Il0KICAgICMgTGVhZjIgTUxBRyBwZWVyIGNvbmZpZwogICAgLSBkZXZpY2U6IFsibGVhZjIiXQogICAgICBtbGFnX2RvbWFpbjogWyJsZWFmcy0xLTIiXQogICAgICBsb2NhbF9pbnRlcmZhY2VfaXA6ICIxMC4wLjE5OS4yNTUvMzEiCiAgICAgIHBlZXJfYWRkcmVzczogIjEwLjAuMTk5LjI1NCIKICAgICAgaGVhcnRiZWF0X3BlZXJfaXA6ICIxNzIuMTYuMC4yNSIKICAgICAgbG9jYWxfaW50ZXJmYWNlOiBbImxlYWYyIiwgIlZsYW40MDkwIl0KICAgICAgcGVlcl9saW5rOiBbImxlYWYyIiwgIlBvcnQtQ2hhbm5lbDk5OSJdCiAgICAjIExlYWYzIE1MQUcgcGVlciBjb25maWcKICAgIC0gZGV2aWNlOiBbImxlYWYzIl0KICAgICAgbWxhZ19kb21haW46IFsibGVhZnMtMy00Il0KICAgICAgbG9jYWxfaW50ZXJmYWNlX2lwOiAiMTAuMC4xOTkuMjUyLzMxIgogICAgICBwZWVyX2FkZHJlc3M6ICIxMC4wLjE5OS4yNTMiCiAgICAgIGhlYXJ0YmVhdF9wZWVyX2lwOiAiMTcyLjE2LjAuMjgiCiAgICAgIGxvY2FsX2ludGVyZmFjZTogWyJsZWFmMyIsICJWbGFuNDA5MCJdCiAgICAgIHBlZXJfbGluazogWyJsZWFmMyIsICJQb3J0LUNoYW5uZWw5OTkiXQogICAgIyBMZWFmNCBNTEFHIHBlZXIgY29uZmlnCiAgICAtIGRldmljZTogWyJsZWFmNCJdCiAgICAgIG1sYWdfZG9tYWluOiBbImxlYWZzLTMtNCJdCiAgICAgIGxvY2FsX2ludGVyZmFjZV9pcDogIjEwLjAuMTk5LjI1My8zMSIKICAgICAgcGVlcl9hZGRyZXNzOiAiMTAuMC4xOTkuMjUyIgogICAgICBoZWFydGJlYXRfcGVlcl9pcDogIjE3Mi4xNi4wLjI3IgogICAgICBsb2NhbF9pbnRlcmZhY2U6IFsibGVhZjQiLCAiVmxhbjQwOTAiXQogICAgICBwZWVyX2xpbms6IFsibGVhZjQiLCAiUG9ydC1DaGFubmVsOTk5Il0KICAgICMgTGVhZjUgTUxBRyBwZWVyIGNvbmZpZwogICAgLSBkZXZpY2U6IFsibGVhZjUiXQogICAgICBtbGFnX2RvbWFpbjogWyJsZWFmcy01LTYiXQogICAgICBsb2NhbF9pbnRlcmZhY2VfaXA6ICIxMC4wLjE5OS4yNTAvMzEiCiAgICAgIHBlZXJfYWRkcmVzczogIjEwLjAuMTk5LjI1MSIKICAgICAgaGVhcnRiZWF0X3BlZXJfaXA6ICIxNzIuMTYuMC4zMCIKICAgICAgbG9jYWxfaW50ZXJmYWNlOiBbImxlYWY1IiwgIlZsYW40MDkwIl0KICAgICAgcGVlcl9saW5rOiBbImxlYWY1IiwgIlBvcnQtQ2hhbm5lbDk5OSJdCiAgICAjIExlYWY2IE1MQUcgcGVlciBjb25maWcKICAgIC0gZGV2aWNlOiBbImxlYWY2Il0KICAgICAgbWxhZ19kb21haW46IFsibGVhZnMtNS02Il0KICAgICAgbG9jYWxfaW50ZXJmYWNlX2lwOiAiMTAuMC4xOTkuMjUxLzMxIgogICAgICBwZWVyX2FkZHJlc3M6ICIxMC4wLjE5OS4yNTAiCiAgICAgIGhlYXJ0YmVhdF9wZWVyX2lwOiAiMTcyLjE2LjAuMjkiCiAgICAgIGxvY2FsX2ludGVyZmFjZTogWyJsZWFmNiIsICJWbGFuNDA5MCJdCiAgICAgIHBlZXJfbGluazogWyJsZWFmNiIsICJQb3J0LUNoYW5uZWw5OTkiXQogICAgIyBMZWFmNyBNTEFHIHBlZXIgY29uZmlnCiAgICAtIGRldmljZTogWyJsZWFmNyJdCiAgICAgIG1sYWdfZG9tYWluOiBbImxlYWZzLTctOCJdCiAgICAgIGxvY2FsX2ludGVyZmFjZV9pcDogIjEwLjAuMTk5LjI0OC8zMSIKICAgICAgcGVlcl9hZGRyZXNzOiAiMTAuMC4xOTkuMjQ5IgogICAgICBoZWFydGJlYXRfcGVlcl9pcDogIjE3Mi4xNi4wLjMyIgogICAgICBsb2NhbF9pbnRlcmZhY2U6IFsibGVhZjciLCAiVmxhbjQwOTAiXQogICAgICBwZWVyX2xpbms6IFsibGVhZjciLCAiUG9ydC1DaGFubmVsOTk5Il0KICAgICMgTGVhZjggTUxBRyBwZWVyIGNvbmZpZwogICAgLSBkZXZpY2U6IFsibGVhZjgiXQogICAgICBtbGFnX2RvbWFpbjogWyJsZWFmcy03LTgiXQogICAgICBsb2NhbF9pbnRlcmZhY2VfaXA6ICIxMC4wLjE5OS4yNDkvMzEiCiAgICAgIHBlZXJfYWRkcmVzczogIjEwLjAuMTk5LjI0OCIKICAgICAgaGVhcnRiZWF0X3BlZXJfaXA6ICIxNzIuMTYuMC4zMSIKICAgICAgbG9jYWxfaW50ZXJmYWNlOiBbImxlYWY4IiwgIlZsYW40MDkwIl0KICAgICAgcGVlcl9saW5rOiBbImxlYWY4IiwgIlBvcnQtQ2hhbm5lbDk5OSJdCg== \ No newline at end of file +# MLAG: Domains and Peer Configs +# Depends on: 02-devices, 03-interfaces (Vlan4090, Port-Channel999), 05-vlans-vxlan (VLAN 4090/4091) +# +# All 4 MLAG pairs share domain-id "leafs" and virtual-mac c001.cafe.babe +# but each is a separate MlagDomain object linking two devices. +# MLAG peer VLAN: 4090, MLAG iBGP VLAN: 4091 +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraMlagDomain + data: + # MLAG pair 1: leaf1 + leaf2 + - domain_id: leafs-1-2 + description: MLAG domain for leaf1/leaf2 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - ["leaf1"] + - ["leaf2"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] + # MLAG pair 2: leaf3 + leaf4 + - domain_id: leafs-3-4 + description: MLAG domain for leaf3/leaf4 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - ["leaf3"] + - ["leaf4"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] + # MLAG pair 3: leaf5 + leaf6 + - domain_id: leafs-5-6 + description: MLAG domain for leaf5/leaf6 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - ["leaf5"] + - ["leaf6"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] + # MLAG pair 4: leaf7 + leaf8 + - domain_id: leafs-7-8 + description: MLAG domain for leaf7/leaf8 pair + virtual_mac: "c001.cafe.babe" + heartbeat_vrf: mgmt + dual_primary_detection: true + dual_primary_delay: 10 + dual_primary_action: errdisable + devices: + - ["leaf7"] + - ["leaf8"] + peer_vlan: ["4090"] + ibgp_vlan: ["4091"] +--- +apiVersion: infrahub.app/v1 +kind: Object +spec: + kind: InfraMlagPeerConfig + data: + # Leaf1 MLAG peer config + - device: ["leaf1"] + mlag_domain: ["leafs-1-2"] + local_interface_ip: "10.0.199.254/31" + peer_address: "10.0.199.255" + heartbeat_peer_ip: "172.16.0.50" + local_interface: ["leaf1", "Vlan4090"] + peer_link: ["leaf1", "Port-Channel999"] + # Leaf2 MLAG peer config + - device: ["leaf2"] + mlag_domain: ["leafs-1-2"] + local_interface_ip: "10.0.199.255/31" + peer_address: "10.0.199.254" + heartbeat_peer_ip: "172.16.0.25" + local_interface: ["leaf2", "Vlan4090"] + peer_link: ["leaf2", "Port-Channel999"] + # Leaf3 MLAG peer config + - device: ["leaf3"] + mlag_domain: ["leafs-3-4"] + local_interface_ip: "10.0.199.252/31" + peer_address: "10.0.199.253" + heartbeat_peer_ip: "172.16.0.28" + local_interface: ["leaf3", "Vlan4090"] + peer_link: ["leaf3", "Port-Channel999"] + # Leaf4 MLAG peer config + - device: ["leaf4"] + mlag_domain: ["leafs-3-4"] + local_interface_ip: "10.0.199.253/31" + peer_address: "10.0.199.252" + heartbeat_peer_ip: "172.16.0.27" + local_interface: ["leaf4", "Vlan4090"] + peer_link: ["leaf4", "Port-Channel999"] + # Leaf5 MLAG peer config + - device: ["leaf5"] + mlag_domain: ["leafs-5-6"] + local_interface_ip: "10.0.199.250/31" + peer_address: "10.0.199.251" + heartbeat_peer_ip: "172.16.0.30" + local_interface: ["leaf5", "Vlan4090"] + peer_link: ["leaf5", "Port-Channel999"] + # Leaf6 MLAG peer config + - device: ["leaf6"] + mlag_domain: ["leafs-5-6"] + local_interface_ip: "10.0.199.251/31" + peer_address: "10.0.199.250" + heartbeat_peer_ip: "172.16.0.29" + local_interface: ["leaf6", "Vlan4090"] + peer_link: ["leaf6", "Port-Channel999"] + # Leaf7 MLAG peer config + - device: ["leaf7"] + mlag_domain: ["leafs-7-8"] + local_interface_ip: "10.0.199.248/31" + peer_address: "10.0.199.249" + heartbeat_peer_ip: "172.16.0.32" + local_interface: ["leaf7", "Vlan4090"] + peer_link: ["leaf7", "Port-Channel999"] + # Leaf8 MLAG peer config + - device: ["leaf8"] + mlag_domain: ["leafs-7-8"] + local_interface_ip: "10.0.199.249/31" + peer_address: "10.0.199.248" + heartbeat_peer_ip: "172.16.0.31" + local_interface: ["leaf8", "Vlan4090"] + peer_link: ["leaf8", "Port-Channel999"] -- 2.53.0 From 6b00b30f26e36b73439d0c5233bbe0c265da7826 Mon Sep 17 00:00:00 2001 From: Damien Date: Fri, 20 Feb 2026 16:12:28 +0100 Subject: [PATCH 29/29] feat(infrahub): remove infrahub schema --- .infrahub.yml | 18 - CLAUDE.md | 161 -------- menus/fabric-menu.yml | 247 ----------- objects/01-foundation.yml | 41 -- objects/02-fabric.yml | 15 - objects/03-devices.yml | 83 ---- objects/04-interfaces.yml | 492 ---------------------- objects/05-ipam.yml | 132 ------ objects/06-vlans-vxlan.yml | 167 -------- objects/07-interface-vlans.yml | 143 ------- objects/08-ipam-vlans.yml | 64 --- objects/09-bgp.yml | 411 ------------------- objects/10-bgp-sessions.yml | 726 --------------------------------- objects/11-vrfs.yml | 62 --- objects/12-mlag.yml | 134 ------ schemas/README.md | 217 ---------- schemas/base.yml | 344 ---------------- schemas/bgp.yml | 291 ------------- schemas/extensions.yml | 164 -------- schemas/mlag.yml | 141 ------- schemas/vlan_vxlan.yml | 221 ---------- schemas/vrf.yml | 124 ------ 22 files changed, 4398 deletions(-) delete mode 100644 .infrahub.yml delete mode 100644 CLAUDE.md delete mode 100644 menus/fabric-menu.yml delete mode 100644 objects/01-foundation.yml delete mode 100644 objects/02-fabric.yml delete mode 100644 objects/03-devices.yml delete mode 100644 objects/04-interfaces.yml delete mode 100644 objects/05-ipam.yml delete mode 100644 objects/06-vlans-vxlan.yml delete mode 100644 objects/07-interface-vlans.yml delete mode 100644 objects/08-ipam-vlans.yml delete mode 100644 objects/09-bgp.yml delete mode 100644 objects/10-bgp-sessions.yml delete mode 100644 objects/11-vrfs.yml delete mode 100644 objects/12-mlag.yml delete mode 100644 schemas/README.md delete mode 100644 schemas/base.yml delete mode 100644 schemas/bgp.yml delete mode 100644 schemas/extensions.yml delete mode 100644 schemas/mlag.yml delete mode 100644 schemas/vlan_vxlan.yml delete mode 100644 schemas/vrf.yml diff --git a/.infrahub.yml b/.infrahub.yml deleted file mode 100644 index f7f584e..0000000 --- a/.infrahub.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -schemas: - - schemas -menus: - - menus -objects: - - objects/01-foundation.yml - - objects/02-fabric.yml - - objects/03-devices.yml - - objects/04-interfaces.yml - - objects/05-ipam.yml - - objects/06-vlans-vxlan.yml - - objects/07-interface-vlans.yml - - objects/08-ipam-vlans.yml - - objects/09-bgp.yml - - objects/10-bgp-sessions.yml - - objects/11-vrfs.yml - - objects/12-mlag.yml diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index bf22f71..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,161 +0,0 @@ -# Claude Code Instructions — fabric-orchestrator - -## Project Context - -Fabric-orchestrator manages Arista EVPN-VXLAN fabrics using Infrahub as the source of truth. -Gitea: https://gitea.arnodo.fr/Damien/fabric-orchestrator -Branch: `feature/52-object-files` - -## Current Task: Issue #52 — Create Infrahub Object Files - -Create YAML object files to load the reference topology data into Infrahub. -Object files use the `apiVersion: infrahub.app/v1` format and are loaded via `infrahubctl object load`. - -### Data Sources (read-only references) - -- **Arista configs**: https://gitea.arnodo.fr/Damien/arista-evpn-vxlan-clab (`configs/*.cfg`) -- **Reference article**: overlaid.net EVPN Configuration Example (document `arista-bgp-evpn-configuration-example-overlaid.md` if available locally) -- **These configs are the source of truth** — extract all IPs, ASNs, peer groups, VLANs, VNIs from them - -### Target Structure - -``` -objects/ -├── 01-foundation.yml # InfraFabric, InfraAutonomousSystem -├── 02-devices.yml # InfraDevice (10 devices) -├── 03-interfaces.yml # InterfaceLoopback, InterfaceEthernet, InterfaceLag, InterfaceVlan -├── 04-ipam.yml # InfraIPAddress (all /31, /32, /24 assignments) -├── 05-vlans-vxlan.yml # InfraVLAN, InfraVNI, InfraVTEP, InfraVlanVniMapping, InfraEVPNInstance -├── 06-bgp.yml # InfraBGPRouterConfig, InfraBGPPeerGroup, InfraBGPSession, InfraBGPAddressFamily -├── 07-vrfs.yml # InfraVRF, InfraRouteTarget -└── 08-mlag.yml # InfraMlagDomain, InfraMlagPeerConfig -``` - -**Order matters**: files are loaded sequentially, dependencies must be satisfied (devices before interfaces, interfaces before IPs, etc.). - -## Reference Topology (overlaid.net) - -- 2 spines (AS 65000), 8 leafs in 4 MLAG pairs (AS 65001–65004) -- Loopback0: BGP router-id per device, Loopback1: shared VTEP IP per MLAG pair -- VLANs 4090 (MLAG peer) / 4091 (MLAG iBGP) with trunk groups -- Underlay: eBGP point-to-point (spine↔leaf) + iBGP (leaf↔leaf peer) -- Overlay: EVPN eBGP multihop on loopbacks, spines with next-hop-unchanged -- L2VXLAN: VLAN 40 → VNI 110040, redistribute learned -- L3VXLAN: VRF gold → VNI 100001, redistribute connected (leaf3-4, leaf7-8) -- Border peering: BGP sessions inside VRF (leaf7/8 → AS 64999 in VRF gold) - -### IP Addressing Quick Reference - -| Device | Lo0 (router-id) | Lo1 (VTEP) | AS | -|---------|------------------|--------------|-------| -| spine1 | 10.0.250.1 | — | 65000 | -| spine2 | 10.0.250.2 | — | 65000 | -| leaf1 | 10.0.250.11 | 10.0.255.11 | 65001 | -| leaf2 | 10.0.250.12 | 10.0.255.11 | 65001 | -| leaf3 | 10.0.250.13 | 10.0.255.12 | 65002 | -| leaf4 | 10.0.250.14 | 10.0.255.12 | 65002 | -| leaf5 | 10.0.250.15 | 10.0.255.13 | 65003 | -| leaf6 | 10.0.250.16 | 10.0.255.13 | 65003 | -| leaf7 | 10.0.250.17 | 10.0.255.14 | 65004 | -| leaf8 | 10.0.250.18 | 10.0.255.14 | 65004 | - -### P2P Addressing Pattern - -- spine1→leaf{N}: `10.0.1.{(N-1)*2}/31` (spine side) / `10.0.1.{(N-1)*2+1}/31` (leaf side) -- spine2→leaf{N}: `10.0.2.{(N-1)*2}/31` (spine side) / `10.0.2.{(N-1)*2+1}/31` (leaf side) -- MLAG iBGP: leaf pairs on `10.0.3.{pair_offset}/31` -- MLAG peer: leaf pairs on `10.0.199.254/31` and `10.0.199.255/31` - -## Infrahub Object File Format - -```yaml ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraDevice - data: - - name: spine1 - role: spine - platform: arista_eos # References InfraPlatform by HFID -``` - -### Key Rules - -1. **Reference existing objects by their `human_friendly_id` (HFID)** — not by ID -2. For relationships with cardinality one, use the HFID value directly: `site: "dc1"` -3. For relationships with cardinality many, use a list: `vlans: ["40", "4090"]` -4. For nested objects (Component kind), use inline `data:` blocks -5. For multi-field HFIDs, use list format: `device: ["spine1", "Loopback0"]` → references `device__name + interface__name` - -### Schema human_friendly_id Reference (critical for references) - -| Node | HFID fields | -|-----------------------|------------------------------------------------| -| InfraDevice | `name__value` | -| InfraAutonomousSystem | `asn__value` | -| InfraInterfaceEthernet| `device__name__value` + `name__value` | -| InfraInterfaceLoopback| `device__name__value` + `name__value` | -| InfraInterfaceVlan | `device__name__value` + `name__value` | -| InfraInterfaceLag | `device__name__value` + `name__value` | -| InfraIPAddress | `address__value` | -| InfraVLAN | `vlan_id__value` | -| InfraVNI | `vni__value` | -| InfraVTEP | `device__name__value` | -| InfraBGPRouterConfig | `device__name__value` | -| InfraBGPPeerGroup | `bgp_config__router_id__value` + `name__value` | -| InfraBGPSession | `bgp_config__router_id__value` + `peer_address__value` | -| InfraVLAN | `vlan_id__value` | -| InfraFabric | `name__value` | -| LocationSite | `name__value` | -| InfraPlatform | `name__value` | - -## Schema Files (in `schemas/`) - -| File | Content | -|-------------------|-----------------------------------------------------------------------| -| `base.yml` | Device, Interfaces (Ethernet, Loopback, Vlan, Lag), IPAddress, Site, Platform | -| `bgp.yml` | AutonomousSystem, BGPRouterConfig, BGPPeerGroup, BGPSession, BGPAddressFamily | -| `vlan_vxlan.yml` | VLAN, VNI, VTEP, VlanVniMapping, EVPNInstance | -| `vrf.yml` | VRFConfig, RouteTarget, VRFDeviceAssignment | -| `mlag.yml` | MlagDomain, MlagPeerConfig, MlagInterface | -| `extensions.yml` | Fabric, UnderlayLink, HostConnection | - -## Validation - -```bash -# Validate object file format -infrahubctl object validate objects/01-foundation.yml - -# Load objects sequentially -infrahubctl object load objects/01-foundation.yml -infrahubctl object load objects/02-devices.yml -# ... etc. -``` - -Always validate before committing. Fix any errors before pushing. - -## Commit Convention - -``` -feat(objects): short description — refs #52 -``` - -- One logical file per commit (or group of closely related files) -- Reference issue #52 - -## Workflow - -1. Read the relevant schema file to understand required fields and relationships -2. Extract data from the clab configs (configs/*.cfg) or the reference topology doc -3. Create the object file respecting the Infrahub Object File format -4. Validate with `infrahubctl object validate` -5. Commit with proper message - -## Don'ts - -- Don't invent data not present in the reference topology configs -- Don't create schema modifications — the schema is frozen for this task -- Don't skip optional fields that have data in the configs (description, mtu, etc.) -- Don't forget the dependency order: foundation → devices → interfaces → IPs → rest -- Don't use `id` references — always use human_friendly_id (HFID) strings diff --git a/menus/fabric-menu.yml b/menus/fabric-menu.yml deleted file mode 100644 index 49b5bc6..0000000 --- a/menus/fabric-menu.yml +++ /dev/null @@ -1,247 +0,0 @@ -# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/menu/latest.json -# Custom menu for EVPN-VXLAN Fabric Orchestrator -# Organizes schema nodes into logical topology-aligned categories ---- -apiversion: infrahub.app/v1 -kind: Menu -spec: - data: - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # Fabric Topology - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Topology - name: Mainmenu - label: Fabric Topology - icon: "mdi:lan" - children: - data: - - namespace: Topology - name: Fabric - label: Fabrics - kind: InfraFabric - icon: "mdi:vector-polygon" - - - namespace: Topology - name: Site - label: Sites - kind: LocationSite - icon: "mingcute:building-4-line" - - - namespace: Topology - name: Device - label: Devices - kind: InfraDevice - icon: "mdi:server-network" - - - namespace: Topology - name: Platform - label: Platforms - kind: InfraPlatform - icon: "mdi:chip" - - - namespace: Topology - name: UnderlayLink - label: Underlay Links - kind: InfraUnderlayLink - icon: "mdi:cable-data" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # Interfaces - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Interfaces - name: Mainmenu - label: Interfaces - icon: "mdi:ethernet" - children: - data: - - namespace: Interfaces - name: Ethernet - label: Ethernet - kind: InfraInterfaceEthernet - icon: "mdi:ethernet" - - - namespace: Interfaces - name: Loopback - label: Loopback - kind: InfraInterfaceLoopback - icon: "mdi:reload" - - - namespace: Interfaces - name: VlanSvi - label: VLAN SVI - kind: InfraInterfaceVlan - icon: "mdi:lan" - - - namespace: Interfaces - name: Lag - label: LAG / Port-Channel - kind: InfraInterfaceLag - icon: "mdi:link-variant" - - - namespace: Interfaces - name: Vxlan - label: VXLAN Tunnel - kind: InfraInterfaceVxlan - icon: "mdi:tunnel" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # IP Addressing - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Addressing - name: Mainmenu - label: IP Addressing - icon: "mdi:ip-network" - children: - data: - - namespace: Addressing - name: IPAddress - label: IP Addresses - kind: InfraIPAddress - icon: "mdi:ip-network" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # Layer 2 / VXLAN - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Layer2 - name: Mainmenu - label: Layer 2 / VXLAN - icon: "mdi:switch" - children: - data: - - namespace: Layer2 - name: Vlan - label: VLANs - kind: InfraVLAN - icon: "mdi:lan-connect" - - - namespace: Layer2 - name: Vni - label: VNIs - kind: InfraVNI - icon: "mdi:tunnel-outline" - - - namespace: Layer2 - name: Vtep - label: VTEPs - kind: InfraVTEP - icon: "mdi:server-network-outline" - - - namespace: Layer2 - name: VlanVniMapping - label: VLAN-VNI Mappings - kind: InfraVlanVniMapping - icon: "mdi:swap-horizontal" - - - namespace: Layer2 - name: EvpnInstance - label: EVPN Instances - kind: InfraEVPNInstance - icon: "mdi:cloud-sync" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # Routing / BGP - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Routing - name: Mainmenu - label: Routing / BGP - icon: "mdi:routes" - children: - data: - - namespace: Routing - name: AutonomousSystem - label: Autonomous Systems - kind: InfraAutonomousSystem - icon: "mdi:cloud-outline" - - - namespace: Routing - name: BGPRouterConfig - label: BGP Router Config - kind: InfraBGPRouterConfig - icon: "mdi:router-wireless" - - - namespace: Routing - name: BGPPeerGroup - label: BGP Peer Groups - kind: InfraBGPPeerGroup - icon: "mdi:account-group" - - - namespace: Routing - name: BGPSession - label: BGP Sessions - kind: InfraBGPSession - icon: "mdi:connection" - - - namespace: Routing - name: BGPAddressFamily - label: BGP Address Families - kind: InfraBGPAddressFamily - icon: "mdi:format-list-bulleted" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # VRF - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Vrf - name: Mainmenu - label: VRF - icon: "mdi:router" - children: - data: - - namespace: Vrf - name: Vrf - label: VRFs - kind: InfraVRF - icon: "mdi:router" - - - namespace: Vrf - name: RouteTarget - label: Route Targets - kind: InfraRouteTarget - icon: "mdi:target" - - - namespace: Vrf - name: VrfAssignment - label: VRF Assignments - kind: InfraVRFDeviceAssignment - icon: "mdi:router-network" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # MLAG - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Mlag - name: Mainmenu - label: MLAG - icon: "mdi:link-variant" - children: - data: - - namespace: Mlag - name: MlagDomain - label: MLAG Domains - kind: InfraMlagDomain - icon: "mdi:link-variant" - - - namespace: Mlag - name: MlagPeerConfig - label: MLAG Peer Config - kind: InfraMlagPeerConfig - icon: "mdi:server-network" - - - namespace: Mlag - name: MlagInterface - label: MLAG Interfaces - kind: InfraMlagInterface - icon: "mdi:ethernet-cable" - - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - # Host Connectivity - # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - namespace: Connectivity - name: Mainmenu - label: Host Connectivity - icon: "mdi:desktop-tower" - children: - data: - - namespace: Connectivity - name: HostConnection - label: Host Connections - kind: InfraHostConnection - icon: "mdi:desktop-tower" diff --git a/objects/01-foundation.yml b/objects/01-foundation.yml deleted file mode 100644 index b83029f..0000000 --- a/objects/01-foundation.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Foundation objects: Site, Platform, Autonomous Systems -# Must be loaded first — referenced by all subsequent files ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: LocationSite - data: - - name: dc1 - description: Primary data center ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraPlatform - data: - - name: arista_eos - description: Arista EOS - napalm_driver: eos - netmiko_device_type: arista_eos ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraAutonomousSystem - data: - - asn: 65000 - description: Spine AS - as_type: private - - asn: 65001 - description: Leaf pair 1 (leaf1/leaf2) - as_type: private - - asn: 65002 - description: Leaf pair 2 (leaf3/leaf4) - as_type: private - - asn: 65003 - description: Leaf pair 3 (leaf5/leaf6) - as_type: private - - asn: 65004 - description: Leaf pair 4 (leaf7/leaf8) - as_type: private diff --git a/objects/02-fabric.yml b/objects/02-fabric.yml deleted file mode 100644 index c0861f4..0000000 --- a/objects/02-fabric.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Fabric definition — depends on LocationSite and InfraAutonomousSystem from 01-foundation ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraFabric - data: - - name: evpn-lab - description: Arista EVPN-VXLAN reference fabric - underlay_protocol: ebgp - overlay_protocol: evpn - anycast_gateway_mac: "c001.cafe.babe" - spine_asn: ["65000"] - sites: - - ["dc1"] diff --git a/objects/03-devices.yml b/objects/03-devices.yml deleted file mode 100644 index 794921b..0000000 --- a/objects/03-devices.yml +++ /dev/null @@ -1,83 +0,0 @@ -# Devices: 2 spines + 8 leafs -# Depends on: 01-foundation (Platform, Site, AutonomousSystem) ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraDevice - data: - # Spines - - name: spine1 - description: Spine1 - BGP EVPN Spine - role: spine - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65000"] - - name: spine2 - description: Spine2 - BGP EVPN Spine - role: spine - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65000"] - # Leaf pair 1 (VTEP1) - - name: leaf1 - description: Leaf1 - VTEP1 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65001"] - - name: leaf2 - description: Leaf2 - VTEP1 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65001"] - # Leaf pair 2 (VTEP2) - - name: leaf3 - description: Leaf3 - VTEP2 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65002"] - - name: leaf4 - description: Leaf4 - VTEP2 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65002"] - # Leaf pair 3 (VTEP3) - - name: leaf5 - description: Leaf5 - VTEP3 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65003"] - - name: leaf6 - description: Leaf6 - VTEP3 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65003"] - # Leaf pair 4 (VTEP4) - - name: leaf7 - description: Leaf7 - VTEP4 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65004"] - - name: leaf8 - description: Leaf8 - VTEP4 - role: leaf - status: active - platform: ["arista_eos"] - site: ["dc1"] - asn: ["65004"] diff --git a/objects/04-interfaces.yml b/objects/04-interfaces.yml deleted file mode 100644 index 80ace90..0000000 --- a/objects/04-interfaces.yml +++ /dev/null @@ -1,492 +0,0 @@ -# Interfaces: Loopback, Ethernet, LAG (Port-Channel), VLAN SVIs -# Depends on: 02-devices ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraInterfaceLoopback - data: - # Spine loopbacks (Lo0 only) - - device: ["spine1"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["spine2"] - name: Loopback0 - description: Router-ID - enabled: true - # Leaf loopbacks (Lo0 + Lo1) - - device: ["leaf1"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf1"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf2"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf2"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf3"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf3"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf4"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf4"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf5"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf5"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf6"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf6"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf7"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf7"] - name: Loopback1 - description: VTEP - enabled: true - - device: ["leaf8"] - name: Loopback0 - description: Router-ID - enabled: true - - device: ["leaf8"] - name: Loopback1 - description: VTEP - enabled: true ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraInterfaceLag - data: - # Port-Channel999 — MLAG peer-link (all leafs) - - device: ["leaf1"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf2"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf3"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf4"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf5"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf6"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf7"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - - device: ["leaf8"] - name: Port-Channel999 - description: MLAG Peer - enabled: true - lacp_mode: active - # Port-Channel1 — Host-facing MLAG LAG (all leafs) - - device: ["leaf1"] - name: Port-Channel1 - description: host1 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf2"] - name: Port-Channel1 - description: host1 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf3"] - name: Port-Channel1 - description: host2 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf4"] - name: Port-Channel1 - description: host2 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf5"] - name: Port-Channel1 - description: host3 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf6"] - name: Port-Channel1 - description: host3 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf7"] - name: Port-Channel1 - description: host4 - enabled: true - lacp_mode: active - mlag_id: 1 - - device: ["leaf8"] - name: Port-Channel1 - description: host4 - enabled: true - lacp_mode: active - mlag_id: 1 ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraInterfaceEthernet - data: - # ============================================================ - # Spine1 Ethernet interfaces (underlay to leafs) - # ============================================================ - - device: ["spine1"] - name: Ethernet1 - description: leaf1 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet2 - description: leaf2 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet3 - description: leaf3 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet4 - description: leaf4 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet5 - description: leaf5 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet6 - description: leaf6 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet7 - description: leaf7 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine1"] - name: Ethernet8 - description: leaf8 - enabled: true - mtu: 9214 - mode: routed - # ============================================================ - # Spine2 Ethernet interfaces (underlay to leafs) - # ============================================================ - - device: ["spine2"] - name: Ethernet1 - description: leaf1 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet2 - description: leaf2 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet3 - description: leaf3 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet4 - description: leaf4 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet5 - description: leaf5 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet6 - description: leaf6 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet7 - description: leaf7 - enabled: true - mtu: 9214 - mode: routed - - device: ["spine2"] - name: Ethernet8 - description: leaf8 - enabled: true - mtu: 9214 - mode: routed - # ============================================================ - # Leaf Ethernet interfaces - # Each leaf has: Ethernet1 (host), Ethernet10 (mlag peer-link), - # Ethernet11 (spine1), Ethernet12 (spine2) - # ============================================================ - # Leaf1 - - device: ["leaf1"] - name: Ethernet1 - description: host1 - enabled: true - mode: trunk - lag: ["leaf1", "Port-Channel1"] - - device: ["leaf1"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf1", "Port-Channel999"] - - device: ["leaf1"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf1"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf2 - - device: ["leaf2"] - name: Ethernet1 - description: host1 - enabled: true - mode: trunk - lag: ["leaf2", "Port-Channel1"] - - device: ["leaf2"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf2", "Port-Channel999"] - - device: ["leaf2"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf2"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf3 - - device: ["leaf3"] - name: Ethernet1 - description: host2 - enabled: true - mode: trunk - lag: ["leaf3", "Port-Channel1"] - - device: ["leaf3"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf3", "Port-Channel999"] - - device: ["leaf3"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf3"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf4 - - device: ["leaf4"] - name: Ethernet1 - description: host2 - enabled: true - mode: trunk - lag: ["leaf4", "Port-Channel1"] - - device: ["leaf4"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf4", "Port-Channel999"] - - device: ["leaf4"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf4"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf5 - - device: ["leaf5"] - name: Ethernet1 - description: host3 - enabled: true - mode: trunk - lag: ["leaf5", "Port-Channel1"] - - device: ["leaf5"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf5", "Port-Channel999"] - - device: ["leaf5"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf5"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf6 - - device: ["leaf6"] - name: Ethernet1 - description: host3 - enabled: true - mode: trunk - lag: ["leaf6", "Port-Channel1"] - - device: ["leaf6"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf6", "Port-Channel999"] - - device: ["leaf6"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf6"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf7 - - device: ["leaf7"] - name: Ethernet1 - description: host4 - enabled: true - mode: trunk - lag: ["leaf7", "Port-Channel1"] - - device: ["leaf7"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf7", "Port-Channel999"] - - device: ["leaf7"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf7"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - # Leaf8 - - device: ["leaf8"] - name: Ethernet1 - description: host4 - enabled: true - mode: trunk - lag: ["leaf8", "Port-Channel1"] - - device: ["leaf8"] - name: Ethernet10 - description: mlag peer link - enabled: true - mode: trunk - lag: ["leaf8", "Port-Channel999"] - - device: ["leaf8"] - name: Ethernet11 - description: spine1 - enabled: true - mtu: 9214 - mode: routed - - device: ["leaf8"] - name: Ethernet12 - description: spine2 - enabled: true - mtu: 9214 - mode: routed - diff --git a/objects/05-ipam.yml b/objects/05-ipam.yml deleted file mode 100644 index 5cfa050..0000000 --- a/objects/05-ipam.yml +++ /dev/null @@ -1,132 +0,0 @@ -# IP Addresses: Loopbacks, P2P underlay links, MLAG SVIs, VRF SVIs -# Depends on: 03-interfaces ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraIPAddress - data: - # ============================================================ - # Loopback0 addresses (Router-ID) — /32 - # ============================================================ - - address: "10.0.250.1/32" - description: spine1 Router-ID - - address: "10.0.250.2/32" - description: spine2 Router-ID - - address: "10.0.250.11/32" - description: leaf1 Router-ID - - address: "10.0.250.12/32" - description: leaf2 Router-ID - - address: "10.0.250.13/32" - description: leaf3 Router-ID - - address: "10.0.250.14/32" - description: leaf4 Router-ID - - address: "10.0.250.15/32" - description: leaf5 Router-ID - - address: "10.0.250.16/32" - description: leaf6 Router-ID - - address: "10.0.250.17/32" - description: leaf7 Router-ID - - address: "10.0.250.18/32" - description: leaf8 Router-ID - # ============================================================ - # Loopback1 addresses (VTEP) — /32 - # ============================================================ - - address: "10.0.255.11/32" - description: leaf1 VTEP (shared VTEP1) - - address: "10.0.255.11/32" - description: leaf2 VTEP (shared VTEP1) - - address: "10.0.255.12/32" - description: leaf3 VTEP (shared VTEP2) - - address: "10.0.255.12/32" - description: leaf4 VTEP (shared VTEP2) - - address: "10.0.255.13/32" - description: leaf5 VTEP (shared VTEP3) - - address: "10.0.255.13/32" - description: leaf6 VTEP (shared VTEP3) - - address: "10.0.255.14/32" - description: leaf7 VTEP (shared VTEP4) - - address: "10.0.255.14/32" - description: leaf8 VTEP (shared VTEP4) - # ============================================================ - # Spine1 P2P underlay — /31 - # ============================================================ - - address: "10.0.1.0/31" - description: spine1 Ethernet1 to leaf1 - - address: "10.0.1.2/31" - description: spine1 Ethernet2 to leaf2 - - address: "10.0.1.4/31" - description: spine1 Ethernet3 to leaf3 - - address: "10.0.1.6/31" - description: spine1 Ethernet4 to leaf4 - - address: "10.0.1.8/31" - description: spine1 Ethernet5 to leaf5 - - address: "10.0.1.10/31" - description: spine1 Ethernet6 to leaf6 - - address: "10.0.1.12/31" - description: spine1 Ethernet7 to leaf7 - - address: "10.0.1.14/31" - description: spine1 Ethernet8 to leaf8 - # ============================================================ - # Spine2 P2P underlay — /31 - # ============================================================ - - address: "10.0.2.0/31" - description: spine2 Ethernet1 to leaf1 - - address: "10.0.2.2/31" - description: spine2 Ethernet2 to leaf2 - - address: "10.0.2.4/31" - description: spine2 Ethernet3 to leaf3 - - address: "10.0.2.6/31" - description: spine2 Ethernet4 to leaf4 - - address: "10.0.2.8/31" - description: spine2 Ethernet5 to leaf5 - - address: "10.0.2.10/31" - description: spine2 Ethernet6 to leaf6 - - address: "10.0.2.12/31" - description: spine2 Ethernet7 to leaf7 - - address: "10.0.2.14/31" - description: spine2 Ethernet8 to leaf8 - # ============================================================ - # Leaf P2P underlay (leaf side) — /31 - # ============================================================ - # Leaf1 - - address: "10.0.1.1/31" - description: leaf1 Ethernet11 to spine1 - - address: "10.0.2.1/31" - description: leaf1 Ethernet12 to spine2 - # Leaf2 - - address: "10.0.1.3/31" - description: leaf2 Ethernet11 to spine1 - - address: "10.0.2.3/31" - description: leaf2 Ethernet12 to spine2 - # Leaf3 - - address: "10.0.1.5/31" - description: leaf3 Ethernet11 to spine1 - - address: "10.0.2.5/31" - description: leaf3 Ethernet12 to spine2 - # Leaf4 - - address: "10.0.1.7/31" - description: leaf4 Ethernet11 to spine1 - - address: "10.0.2.7/31" - description: leaf4 Ethernet12 to spine2 - # Leaf5 - - address: "10.0.1.9/31" - description: leaf5 Ethernet11 to spine1 - - address: "10.0.2.9/31" - description: leaf5 Ethernet12 to spine2 - # Leaf6 - - address: "10.0.1.11/31" - description: leaf6 Ethernet11 to spine1 - - address: "10.0.2.11/31" - description: leaf6 Ethernet12 to spine2 - # Leaf7 - - address: "10.0.1.13/31" - description: leaf7 Ethernet11 to spine1 - - address: "10.0.2.13/31" - description: leaf7 Ethernet12 to spine2 - # Leaf8 - - address: "10.0.1.15/31" - description: leaf8 Ethernet11 to spine1 - - address: "10.0.2.15/31" - description: leaf8 Ethernet12 to spine2 - diff --git a/objects/06-vlans-vxlan.yml b/objects/06-vlans-vxlan.yml deleted file mode 100644 index 96a4ff8..0000000 --- a/objects/06-vlans-vxlan.yml +++ /dev/null @@ -1,167 +0,0 @@ -# VLANs, VNIs, VTEPs, VLAN-VNI mappings, EVPN instances -# Depends on: 02-devices, 03-interfaces ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraVLAN - data: - - vlan_id: 34 - name: vrf-gold-subnet - description: VRF gold L3 subnet (leaf3/leaf4) - status: active - vlan_type: standard - - vlan_id: 40 - name: test-l2-vxlan - description: L2 VXLAN test VLAN - status: active - vlan_type: standard - - vlan_id: 78 - name: vrf-gold-subnet - description: VRF gold L3 subnet (leaf7/leaf8) - status: active - vlan_type: standard - - vlan_id: 900 - name: bgp-border - description: BGP border peering VLAN - status: active - vlan_type: standard - - vlan_id: 4090 - name: mlag-peer - description: MLAG peer-link control - status: active - vlan_type: mlag_peer - trunk_groups: - - mlag-peer - stp_enabled: false - - vlan_id: 4091 - name: mlag-ibgp - description: MLAG iBGP peering - status: active - vlan_type: mlag_ibgp - trunk_groups: - - mlag-peer - stp_enabled: false ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraVNI - data: - - vni: 110040 - description: L2VNI for VLAN 40 (test-l2-vxlan) - vni_type: l2vni - vlan: ["40"] - - vni: 100001 - description: L3VNI for VRF gold - vni_type: l3vni ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraVTEP - data: - # VTEP on leaf1 (shared VTEP1 IP 10.0.255.11) - - device: ["leaf1"] - source_address: "10.0.255.11" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf1", "Loopback1"] - # VTEP on leaf2 (shared VTEP1 IP 10.0.255.11) - - device: ["leaf2"] - source_address: "10.0.255.11" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf2", "Loopback1"] - # VTEP on leaf3 (shared VTEP2 IP 10.0.255.12) - - device: ["leaf3"] - source_address: "10.0.255.12" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf3", "Loopback1"] - # VTEP on leaf4 (shared VTEP2 IP 10.0.255.12) - - device: ["leaf4"] - source_address: "10.0.255.12" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf4", "Loopback1"] - # VTEP on leaf5 (shared VTEP3 IP 10.0.255.13) - - device: ["leaf5"] - source_address: "10.0.255.13" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf5", "Loopback1"] - # VTEP on leaf6 (shared VTEP3 IP 10.0.255.13) - - device: ["leaf6"] - source_address: "10.0.255.13" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf6", "Loopback1"] - # VTEP on leaf7 (shared VTEP4 IP 10.0.255.14) - - device: ["leaf7"] - source_address: "10.0.255.14" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf7", "Loopback1"] - # VTEP on leaf8 (shared VTEP4 IP 10.0.255.14) - - device: ["leaf8"] - source_address: "10.0.255.14" - udp_port: 4789 - learn_restrict: any - source_interface: ["leaf8", "Loopback1"] ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraVlanVniMapping - data: - # VLAN 40 <-> VNI 110040 on leaf1/2/5/6 (L2 VXLAN leafs) - - vtep: ["leaf1"] - vlan: ["40"] - vni: ["110040"] - description: "VLAN 40 <-> VNI 110040" - - vtep: ["leaf2"] - vlan: ["40"] - vni: ["110040"] - description: "VLAN 40 <-> VNI 110040" - - vtep: ["leaf5"] - vlan: ["40"] - vni: ["110040"] - description: "VLAN 40 <-> VNI 110040" - - vtep: ["leaf6"] - vlan: ["40"] - vni: ["110040"] - description: "VLAN 40 <-> VNI 110040" ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraEVPNInstance - data: - # EVPN instance for VLAN 40 on L2 VXLAN leafs - # leaf1: rd 65001:110040, rt both 40:110040 - - device: ["leaf1"] - vlan: ["40"] - route_distinguisher: "65001:110040" - route_target_import: "40:110040" - route_target_export: "40:110040" - redistribute_learned: true - - device: ["leaf2"] - vlan: ["40"] - route_distinguisher: "65001:110040" - route_target_import: "40:110040" - route_target_export: "40:110040" - redistribute_learned: true - # leaf5/6: rd 65003:110040, rt both 40:110040 - - device: ["leaf5"] - vlan: ["40"] - route_distinguisher: "65003:110040" - route_target_import: "40:110040" - route_target_export: "40:110040" - redistribute_learned: true - - device: ["leaf6"] - vlan: ["40"] - route_distinguisher: "65003:110040" - route_target_import: "40:110040" - route_target_export: "40:110040" - redistribute_learned: true diff --git a/objects/07-interface-vlans.yml b/objects/07-interface-vlans.yml deleted file mode 100644 index 69ec20e..0000000 --- a/objects/07-interface-vlans.yml +++ /dev/null @@ -1,143 +0,0 @@ -# VLAN SVI interfaces -# Depends on: 03-devices, 06-vlans-vxlan (VLANs must exist) ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraInterfaceVlan - data: - # Vlan4090 — MLAG Peer-Link SVI (all leafs) - - device: ["leaf1"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf2"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf3"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf4"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf5"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf6"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf7"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - - device: ["leaf8"] - name: Vlan4090 - description: MLAG Peer-Link - enabled: true - autostate: false - vlan: ["4090"] - # Vlan4091 — MLAG iBGP Peering SVI (all leafs) - - device: ["leaf1"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf2"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf3"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf4"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf5"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf6"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf7"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - - device: ["leaf8"] - name: Vlan4091 - description: MLAG iBGP Peering - enabled: true - mtu: 9214 - vlan: ["4091"] - # Vlan34 — VRF gold subnet (leaf3/leaf4) - - device: ["leaf3"] - name: Vlan34 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.34.34.1" - vlan: ["34"] - - device: ["leaf4"] - name: Vlan34 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.34.34.1" - vlan: ["34"] - # Vlan78 — VRF gold subnet (leaf7/leaf8) - - device: ["leaf7"] - name: Vlan78 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.78.78.1" - vlan: ["78"] - - device: ["leaf8"] - name: Vlan78 - description: VRF gold subnet - enabled: true - virtual_router_address: "10.78.78.1" - vlan: ["78"] - # Vlan900 — BGP border peering (leaf7/leaf8) - - device: ["leaf7"] - name: Vlan900 - description: BGP border peering - enabled: true - vlan: ["900"] - - device: ["leaf8"] - name: Vlan900 - description: BGP border peering - enabled: true - vlan: ["900"] \ No newline at end of file diff --git a/objects/08-ipam-vlans.yml b/objects/08-ipam-vlans.yml deleted file mode 100644 index 759a1f2..0000000 --- a/objects/08-ipam-vlans.yml +++ /dev/null @@ -1,64 +0,0 @@ -# IP Addresses for VLAN SVI interfaces -# Depends on: 07-interface-vlans (Vlan SVIs must exist) ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraIPAddress - data: - # ============================================================ - # MLAG Peer-Link SVI (Vlan4090) — /31 - # ============================================================ - - address: "10.0.199.254/31" - description: leaf1 MLAG peer-link - - address: "10.0.199.255/31" - description: leaf2 MLAG peer-link - - address: "10.0.199.252/31" - description: leaf3 MLAG peer-link - - address: "10.0.199.253/31" - description: leaf4 MLAG peer-link - - address: "10.0.199.250/31" - description: leaf5 MLAG peer-link - - address: "10.0.199.251/31" - description: leaf6 MLAG peer-link - - address: "10.0.199.248/31" - description: leaf7 MLAG peer-link - - address: "10.0.199.249/31" - description: leaf8 MLAG peer-link - # ============================================================ - # MLAG iBGP Peering SVI (Vlan4091) — /31 - # ============================================================ - - address: "10.0.3.0/31" - description: leaf1 MLAG iBGP peering - - address: "10.0.3.1/31" - description: leaf2 MLAG iBGP peering - - address: "10.0.3.2/31" - description: leaf3 MLAG iBGP peering - - address: "10.0.3.3/31" - description: leaf4 MLAG iBGP peering - - address: "10.0.3.4/31" - description: leaf5 MLAG iBGP peering - - address: "10.0.3.5/31" - description: leaf6 MLAG iBGP peering - - address: "10.0.3.6/31" - description: leaf7 MLAG iBGP peering - - address: "10.0.3.7/31" - description: leaf8 MLAG iBGP peering - # ============================================================ - # VRF gold SVI addresses — /24 - # ============================================================ - # Vlan34 (leaf3/leaf4) - - address: "10.34.34.2/24" - description: leaf3 Vlan34 VRF gold - - address: "10.34.34.3/24" - description: leaf4 Vlan34 VRF gold - # Vlan78 (leaf7/leaf8) - - address: "10.78.78.2/24" - description: leaf7 Vlan78 VRF gold - - address: "10.78.78.3/24" - description: leaf8 Vlan78 VRF gold - # Vlan900 — BGP border (leaf7/leaf8) - - address: "10.90.90.2/29" - description: leaf7 Vlan900 BGP border - - address: "10.90.90.3/29" - description: leaf8 Vlan900 BGP border diff --git a/objects/09-bgp.yml b/objects/09-bgp.yml deleted file mode 100644 index c9c7d31..0000000 --- a/objects/09-bgp.yml +++ /dev/null @@ -1,411 +0,0 @@ -# BGP: RouterConfig, PeerGroups, Sessions, AddressFamilies -# Depends on: 01-foundation (ASNs), 02-devices, 04-ipam -# -# Spine BGP: no named peer-groups in config (neighbors defined directly), -# but evpn peer-group is defined. Underlay neighbors are direct. -# Leaf BGP: underlay, underlay_ibgp, evpn peer-groups. ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraBGPRouterConfig - data: - # ============================================================ - # Spine1 BGP — AS 65000, router-id 10.0.250.1 - # ============================================================ - - device: ["spine1"] - router_id: "10.0.250.1" - local_asn: ["65000"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Spine2 BGP — AS 65000, router-id 10.0.250.2 - # ============================================================ - - device: ["spine2"] - router_id: "10.0.250.2" - local_asn: ["65000"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf1 BGP — AS 65001, router-id 10.0.250.11 - # ============================================================ - - device: ["leaf1"] - router_id: "10.0.250.11" - local_asn: ["65001"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf2 BGP — AS 65001, router-id 10.0.250.12 - # ============================================================ - - device: ["leaf2"] - router_id: "10.0.250.12" - local_asn: ["65001"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf3 BGP — AS 65002, router-id 10.0.250.13 - # ============================================================ - - device: ["leaf3"] - router_id: "10.0.250.13" - local_asn: ["65002"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf4 BGP — AS 65002, router-id 10.0.250.14 - # ============================================================ - - device: ["leaf4"] - router_id: "10.0.250.14" - local_asn: ["65002"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf5 BGP — AS 65003, router-id 10.0.250.15 - # ============================================================ - - device: ["leaf5"] - router_id: "10.0.250.15" - local_asn: ["65003"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf6 BGP — AS 65003, router-id 10.0.250.16 - # ============================================================ - - device: ["leaf6"] - router_id: "10.0.250.16" - local_asn: ["65003"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf7 BGP — AS 65004, router-id 10.0.250.17 - # ============================================================ - - device: ["leaf7"] - router_id: "10.0.250.17" - local_asn: ["65004"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 - # ============================================================ - # Leaf8 BGP — AS 65004, router-id 10.0.250.18 - # ============================================================ - - device: ["leaf8"] - router_id: "10.0.250.18" - local_asn: ["65004"] - default_ipv4_unicast: false - log_neighbor_changes: true - ecmp_max_paths: 4 - ecmp_max_ecmp: 64 - ebgp_distance: 20 - ibgp_distance: 200 - local_distance: 200 ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraBGPPeerGroup - data: - # ============================================================ - # Spine peer-groups (evpn only — underlay neighbors are direct) - # ============================================================ - # Spine1 — evpn peer-group - - bgp_config: ["spine1"] - local_identifier: "spine1__evpn" - name: evpn - description: EVPN overlay to leaf loopbacks - peer_group_type: evpn - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - next_hop_unchanged: true - maximum_routes: 12000 - maximum_routes_warning_only: true - # Spine2 — evpn peer-group - - bgp_config: ["spine2"] - local_identifier: "spine2__evpn" - name: evpn - description: EVPN overlay to leaf loopbacks - peer_group_type: evpn - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - next_hop_unchanged: true - maximum_routes: 12000 - maximum_routes_warning_only: true - # ============================================================ - # Leaf peer-groups (underlay, underlay_ibgp, evpn) - # ============================================================ - # Leaf1 - - bgp_config: ["leaf1"] - local_identifier: "leaf1__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf1"] - local_identifier: "leaf1__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65001"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf1"] - local_identifier: "leaf1__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf2 - - bgp_config: ["leaf2"] - local_identifier: "leaf2__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf2"] - local_identifier: "leaf2__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65001"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf2"] - local_identifier: "leaf2__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf3 - - bgp_config: ["leaf3"] - local_identifier: "leaf3__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf3"] - local_identifier: "leaf3__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65002"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf3"] - local_identifier: "leaf3__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf4 - - bgp_config: ["leaf4"] - local_identifier: "leaf4__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf4"] - local_identifier: "leaf4__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65002"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf4"] - local_identifier: "leaf4__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf5 - - bgp_config: ["leaf5"] - local_identifier: "leaf5__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf5"] - local_identifier: "leaf5__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65003"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf5"] - local_identifier: "leaf5__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf6 - - bgp_config: ["leaf6"] - local_identifier: "leaf6__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf6"] - local_identifier: "leaf6__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65003"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf6"] - local_identifier: "leaf6__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf7 - - bgp_config: ["leaf7"] - local_identifier: "leaf7__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf7"] - local_identifier: "leaf7__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65004"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf7"] - local_identifier: "leaf7__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - # Leaf8 - - bgp_config: ["leaf8"] - local_identifier: "leaf8__underlay" - name: underlay - description: Underlay eBGP to spines - peer_group_type: underlay - remote_asn: ["65000"] - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf8"] - local_identifier: "leaf8__underlay_ibgp" - name: underlay_ibgp - description: MLAG iBGP peering - peer_group_type: underlay_ibgp - remote_asn: ["65004"] - next_hop_self: true - maximum_routes: 12000 - maximum_routes_warning_only: true - - bgp_config: ["leaf8"] - local_identifier: "leaf8__evpn" - name: evpn - description: EVPN overlay to spines - peer_group_type: evpn - remote_asn: ["65000"] - update_source: Loopback0 - ebgp_multihop: 3 - send_community: extended - maximum_routes: 12000 - maximum_routes_warning_only: true - diff --git a/objects/10-bgp-sessions.yml b/objects/10-bgp-sessions.yml deleted file mode 100644 index c41986c..0000000 --- a/objects/10-bgp-sessions.yml +++ /dev/null @@ -1,726 +0,0 @@ -# BGP Sessions and Address Families -# Depends on: 09-bgp (RouterConfig and PeerGroups must exist) ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraBGPSession - data: - # ============================================================ - # Spine1 sessions - # ============================================================ - # Spine1 underlay (direct neighbors, no peer-group — use remote_asn) - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.1" - peer_address: "10.0.1.1" - description: "underlay to leaf1" - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.3" - peer_address: "10.0.1.3" - description: "underlay to leaf2" - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.5" - peer_address: "10.0.1.5" - description: "underlay to leaf3" - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.7" - peer_address: "10.0.1.7" - description: "underlay to leaf4" - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.9" - peer_address: "10.0.1.9" - description: "underlay to leaf5" - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.11" - peer_address: "10.0.1.11" - description: "underlay to leaf6" - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.13" - peer_address: "10.0.1.13" - description: "underlay to leaf7" - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.1.15" - peer_address: "10.0.1.15" - description: "underlay to leaf8" - remote_asn: ["65004"] - peer_device: ["leaf8"] - # Spine1 EVPN (via evpn peer-group) - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.11" - peer_address: "10.0.250.11" - description: "EVPN to leaf1" - peer_group: "spine1__evpn" - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.12" - peer_address: "10.0.250.12" - description: "EVPN to leaf2" - peer_group: "spine1__evpn" - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.13" - peer_address: "10.0.250.13" - description: "EVPN to leaf3" - peer_group: "spine1__evpn" - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.14" - peer_address: "10.0.250.14" - description: "EVPN to leaf4" - peer_group: "spine1__evpn" - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.15" - peer_address: "10.0.250.15" - description: "EVPN to leaf5" - peer_group: "spine1__evpn" - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.16" - peer_address: "10.0.250.16" - description: "EVPN to leaf6" - peer_group: "spine1__evpn" - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.17" - peer_address: "10.0.250.17" - description: "EVPN to leaf7" - peer_group: "spine1__evpn" - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine1"] - local_identifier: "spine1__10.0.250.18" - peer_address: "10.0.250.18" - description: "EVPN to leaf8" - peer_group: "spine1__evpn" - remote_asn: ["65004"] - peer_device: ["leaf8"] - # ============================================================ - # Spine2 sessions - # ============================================================ - # Spine2 underlay - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.1" - peer_address: "10.0.2.1" - description: "underlay to leaf1" - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.3" - peer_address: "10.0.2.3" - description: "underlay to leaf2" - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.5" - peer_address: "10.0.2.5" - description: "underlay to leaf3" - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.7" - peer_address: "10.0.2.7" - description: "underlay to leaf4" - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.9" - peer_address: "10.0.2.9" - description: "underlay to leaf5" - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.11" - peer_address: "10.0.2.11" - description: "underlay to leaf6" - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.13" - peer_address: "10.0.2.13" - description: "underlay to leaf7" - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.2.15" - peer_address: "10.0.2.15" - description: "underlay to leaf8" - remote_asn: ["65004"] - peer_device: ["leaf8"] - # Spine2 EVPN - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.11" - peer_address: "10.0.250.11" - description: "EVPN to leaf1" - peer_group: "spine2__evpn" - remote_asn: ["65001"] - peer_device: ["leaf1"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.12" - peer_address: "10.0.250.12" - description: "EVPN to leaf2" - peer_group: "spine2__evpn" - remote_asn: ["65001"] - peer_device: ["leaf2"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.13" - peer_address: "10.0.250.13" - description: "EVPN to leaf3" - peer_group: "spine2__evpn" - remote_asn: ["65002"] - peer_device: ["leaf3"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.14" - peer_address: "10.0.250.14" - description: "EVPN to leaf4" - peer_group: "spine2__evpn" - remote_asn: ["65002"] - peer_device: ["leaf4"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.15" - peer_address: "10.0.250.15" - description: "EVPN to leaf5" - peer_group: "spine2__evpn" - remote_asn: ["65003"] - peer_device: ["leaf5"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.16" - peer_address: "10.0.250.16" - description: "EVPN to leaf6" - peer_group: "spine2__evpn" - remote_asn: ["65003"] - peer_device: ["leaf6"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.17" - peer_address: "10.0.250.17" - description: "EVPN to leaf7" - peer_group: "spine2__evpn" - remote_asn: ["65004"] - peer_device: ["leaf7"] - - bgp_config: ["spine2"] - local_identifier: "spine2__10.0.250.18" - peer_address: "10.0.250.18" - description: "EVPN to leaf8" - peer_group: "spine2__evpn" - remote_asn: ["65004"] - peer_device: ["leaf8"] - # ============================================================ - # Leaf1 sessions - # ============================================================ - - bgp_config: ["leaf1"] - local_identifier: "leaf1__10.0.1.0" - peer_address: "10.0.1.0" - description: "underlay to spine1" - peer_group: "leaf1__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf1"] - local_identifier: "leaf1__10.0.2.0" - peer_address: "10.0.2.0" - description: "underlay to spine2" - peer_group: "leaf1__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf1"] - local_identifier: "leaf1__10.0.3.1" - peer_address: "10.0.3.1" - description: "iBGP to leaf2" - peer_group: "leaf1__underlay_ibgp" - peer_device: ["leaf2"] - - bgp_config: ["leaf1"] - local_identifier: "leaf1__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf1__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf1"] - local_identifier: "leaf1__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf1__evpn" - peer_device: ["spine2"] - # ============================================================ - # Leaf2 sessions - # ============================================================ - - bgp_config: ["leaf2"] - local_identifier: "leaf2__10.0.1.2" - peer_address: "10.0.1.2" - description: "underlay to spine1" - peer_group: "leaf2__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf2"] - local_identifier: "leaf2__10.0.2.2" - peer_address: "10.0.2.2" - description: "underlay to spine2" - peer_group: "leaf2__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf2"] - local_identifier: "leaf2__10.0.3.0" - peer_address: "10.0.3.0" - description: "iBGP to leaf1" - peer_group: "leaf2__underlay_ibgp" - peer_device: ["leaf1"] - - bgp_config: ["leaf2"] - local_identifier: "leaf2__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf2__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf2"] - local_identifier: "leaf2__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf2__evpn" - peer_device: ["spine2"] - # ============================================================ - # Leaf3 sessions - # ============================================================ - - bgp_config: ["leaf3"] - local_identifier: "leaf3__10.0.1.4" - peer_address: "10.0.1.4" - description: "underlay to spine1" - peer_group: "leaf3__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf3"] - local_identifier: "leaf3__10.0.2.4" - peer_address: "10.0.2.4" - description: "underlay to spine2" - peer_group: "leaf3__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf3"] - local_identifier: "leaf3__10.0.3.3" - peer_address: "10.0.3.3" - description: "iBGP to leaf4" - peer_group: "leaf3__underlay_ibgp" - peer_device: ["leaf4"] - - bgp_config: ["leaf3"] - local_identifier: "leaf3__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf3__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf3"] - local_identifier: "leaf3__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf3__evpn" - peer_device: ["spine2"] - # ============================================================ - # Leaf4 sessions - # ============================================================ - - bgp_config: ["leaf4"] - local_identifier: "leaf4__10.0.1.6" - peer_address: "10.0.1.6" - description: "underlay to spine1" - peer_group: "leaf4__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf4"] - local_identifier: "leaf4__10.0.2.6" - peer_address: "10.0.2.6" - description: "underlay to spine2" - peer_group: "leaf4__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf4"] - local_identifier: "leaf4__10.0.3.2" - peer_address: "10.0.3.2" - description: "iBGP to leaf3" - peer_group: "leaf4__underlay_ibgp" - peer_device: ["leaf3"] - - bgp_config: ["leaf4"] - local_identifier: "leaf4__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf4__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf4"] - local_identifier: "leaf4__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf4__evpn" - peer_device: ["spine2"] - # ============================================================ - # Leaf5 sessions - # ============================================================ - - bgp_config: ["leaf5"] - local_identifier: "leaf5__10.0.1.8" - peer_address: "10.0.1.8" - description: "underlay to spine1" - peer_group: "leaf5__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf5"] - local_identifier: "leaf5__10.0.2.8" - peer_address: "10.0.2.8" - description: "underlay to spine2" - peer_group: "leaf5__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf5"] - local_identifier: "leaf5__10.0.3.5" - peer_address: "10.0.3.5" - description: "iBGP to leaf6" - peer_group: "leaf5__underlay_ibgp" - peer_device: ["leaf6"] - - bgp_config: ["leaf5"] - local_identifier: "leaf5__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf5__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf5"] - local_identifier: "leaf5__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf5__evpn" - peer_device: ["spine2"] - # ============================================================ - # Leaf6 sessions - # ============================================================ - - bgp_config: ["leaf6"] - local_identifier: "leaf6__10.0.1.10" - peer_address: "10.0.1.10" - description: "underlay to spine1" - peer_group: "leaf6__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf6"] - local_identifier: "leaf6__10.0.2.10" - peer_address: "10.0.2.10" - description: "underlay to spine2" - peer_group: "leaf6__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf6"] - local_identifier: "leaf6__10.0.3.4" - peer_address: "10.0.3.4" - description: "iBGP to leaf5" - peer_group: "leaf6__underlay_ibgp" - peer_device: ["leaf5"] - - bgp_config: ["leaf6"] - local_identifier: "leaf6__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf6__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf6"] - local_identifier: "leaf6__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf6__evpn" - peer_device: ["spine2"] - # ============================================================ - # Leaf7 sessions - # ============================================================ - - bgp_config: ["leaf7"] - local_identifier: "leaf7__10.0.1.12" - peer_address: "10.0.1.12" - description: "underlay to spine1" - peer_group: "leaf7__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf7"] - local_identifier: "leaf7__10.0.2.12" - peer_address: "10.0.2.12" - description: "underlay to spine2" - peer_group: "leaf7__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf7"] - local_identifier: "leaf7__10.0.3.7" - peer_address: "10.0.3.7" - description: "iBGP to leaf8" - peer_group: "leaf7__underlay_ibgp" - peer_device: ["leaf8"] - - bgp_config: ["leaf7"] - local_identifier: "leaf7__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf7__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf7"] - local_identifier: "leaf7__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf7__evpn" - peer_device: ["spine2"] - # Leaf7 VRF gold border peering - - bgp_config: ["leaf7"] - local_identifier: "leaf7__10.90.90.1" - peer_address: "10.90.90.1" - description: "border peering to AS 64999 in VRF gold" - remote_asn: ["64999"] - vrf: "gold" - # ============================================================ - # Leaf8 sessions - # ============================================================ - - bgp_config: ["leaf8"] - local_identifier: "leaf8__10.0.1.14" - peer_address: "10.0.1.14" - description: "underlay to spine1" - peer_group: "leaf8__underlay" - peer_device: ["spine1"] - - bgp_config: ["leaf8"] - local_identifier: "leaf8__10.0.2.14" - peer_address: "10.0.2.14" - description: "underlay to spine2" - peer_group: "leaf8__underlay" - peer_device: ["spine2"] - - bgp_config: ["leaf8"] - local_identifier: "leaf8__10.0.3.6" - peer_address: "10.0.3.6" - description: "iBGP to leaf7" - peer_group: "leaf8__underlay_ibgp" - peer_device: ["leaf7"] - - bgp_config: ["leaf8"] - local_identifier: "leaf8__10.0.250.1" - peer_address: "10.0.250.1" - description: "EVPN to spine1" - peer_group: "leaf8__evpn" - peer_device: ["spine1"] - - bgp_config: ["leaf8"] - local_identifier: "leaf8__10.0.250.2" - peer_address: "10.0.250.2" - description: "EVPN to spine2" - peer_group: "leaf8__evpn" - peer_device: ["spine2"] - # Leaf8 VRF gold border peering - - bgp_config: ["leaf8"] - local_identifier: "leaf8__10.90.90.1" - peer_address: "10.90.90.1" - description: "border peering to AS 64999 in VRF gold" - remote_asn: ["64999"] - vrf: "gold" ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraBGPAddressFamily - data: - # ============================================================ - # Spine1 address families - # ============================================================ - - bgp_config: ["spine1"] - local_identifier: "spine1__ipv4_unicast" - afi: ipv4 - safi: unicast - active_sessions: - - ["spine1__10.0.1.1"] - - ["spine1__10.0.1.3"] - - ["spine1__10.0.1.5"] - - ["spine1__10.0.1.7"] - - ["spine1__10.0.1.9"] - - ["spine1__10.0.1.11"] - - ["spine1__10.0.1.13"] - - ["spine1__10.0.1.15"] - networks: - - ["10.0.250.1/32"] - - bgp_config: ["spine1"] - local_identifier: "spine1__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["spine1__evpn"] - # ============================================================ - # Spine2 address families - # ============================================================ - - bgp_config: ["spine2"] - local_identifier: "spine2__ipv4_unicast" - afi: ipv4 - safi: unicast - active_sessions: - - ["spine2__10.0.2.1"] - - ["spine2__10.0.2.3"] - - ["spine2__10.0.2.5"] - - ["spine2__10.0.2.7"] - - ["spine2__10.0.2.9"] - - ["spine2__10.0.2.11"] - - ["spine2__10.0.2.13"] - - ["spine2__10.0.2.15"] - networks: - - ["10.0.250.2/32"] - - bgp_config: ["spine2"] - local_identifier: "spine2__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["spine2__evpn"] - # ============================================================ - # Leaf1 address families - # ============================================================ - - bgp_config: ["leaf1"] - local_identifier: "leaf1__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf1__underlay"] - - ["leaf1__underlay_ibgp"] - networks: - - ["10.0.250.11/32"] - - ["10.0.255.11/32"] - - bgp_config: ["leaf1"] - local_identifier: "leaf1__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf1__evpn"] - # ============================================================ - # Leaf2 address families - # ============================================================ - - bgp_config: ["leaf2"] - local_identifier: "leaf2__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf2__underlay"] - - ["leaf2__underlay_ibgp"] - networks: - - ["10.0.250.12/32"] - - ["10.0.255.11/32"] - - bgp_config: ["leaf2"] - local_identifier: "leaf2__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf2__evpn"] - # ============================================================ - # Leaf3 address families - # ============================================================ - - bgp_config: ["leaf3"] - local_identifier: "leaf3__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf3__underlay"] - - ["leaf3__underlay_ibgp"] - networks: - - ["10.0.250.13/32"] - - ["10.0.255.12/32"] - - bgp_config: ["leaf3"] - local_identifier: "leaf3__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf3__evpn"] - # ============================================================ - # Leaf4 address families - # ============================================================ - - bgp_config: ["leaf4"] - local_identifier: "leaf4__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf4__underlay"] - - ["leaf4__underlay_ibgp"] - networks: - - ["10.0.250.14/32"] - - ["10.0.255.12/32"] - - bgp_config: ["leaf4"] - local_identifier: "leaf4__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf4__evpn"] - # ============================================================ - # Leaf5 address families - # ============================================================ - - bgp_config: ["leaf5"] - local_identifier: "leaf5__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf5__underlay"] - - ["leaf5__underlay_ibgp"] - networks: - - ["10.0.250.15/32"] - - ["10.0.255.13/32"] - - bgp_config: ["leaf5"] - local_identifier: "leaf5__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf5__evpn"] - # ============================================================ - # Leaf6 address families - # ============================================================ - - bgp_config: ["leaf6"] - local_identifier: "leaf6__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf6__underlay"] - - ["leaf6__underlay_ibgp"] - networks: - - ["10.0.250.16/32"] - - ["10.0.255.13/32"] - - bgp_config: ["leaf6"] - local_identifier: "leaf6__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf6__evpn"] - # ============================================================ - # Leaf7 address families - # ============================================================ - - bgp_config: ["leaf7"] - local_identifier: "leaf7__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf7__underlay"] - - ["leaf7__underlay_ibgp"] - networks: - - ["10.0.250.17/32"] - - ["10.0.255.14/32"] - - bgp_config: ["leaf7"] - local_identifier: "leaf7__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf7__evpn"] - # Leaf7 IPv4 unicast in VRF gold (border peering) - - bgp_config: ["leaf7"] - local_identifier: "leaf7__vrf_gold__ipv4_unicast" - afi: ipv4 - safi: unicast - vrf: "gold" - active_sessions: - - ["leaf7__10.90.90.1"] - # ============================================================ - # Leaf8 address families - # ============================================================ - - bgp_config: ["leaf8"] - local_identifier: "leaf8__ipv4_unicast" - afi: ipv4 - safi: unicast - active_peer_groups: - - ["leaf8__underlay"] - - ["leaf8__underlay_ibgp"] - networks: - - ["10.0.250.18/32"] - - ["10.0.255.14/32"] - - bgp_config: ["leaf8"] - local_identifier: "leaf8__evpn_unicast" - afi: evpn - safi: unicast - active_peer_groups: - - ["leaf8__evpn"] - # Leaf8 IPv4 unicast in VRF gold (border peering) - - bgp_config: ["leaf8"] - local_identifier: "leaf8__vrf_gold__ipv4_unicast" - afi: ipv4 - safi: unicast - vrf: "gold" - active_sessions: - - ["leaf8__10.90.90.1"] diff --git a/objects/11-vrfs.yml b/objects/11-vrfs.yml deleted file mode 100644 index 9f5adb6..0000000 --- a/objects/11-vrfs.yml +++ /dev/null @@ -1,62 +0,0 @@ -# VRFs, Route Targets, VRF Device Assignments -# Depends on: 02-devices, 03-interfaces, 05-vlans-vxlan (VNI 100001) -# -# VRF gold is used on leaf3/4 (VLAN 34) and leaf7/8 (VLAN 78 + border) -# L3VNI 100001 for symmetric IRB -# Route targets: import/export evpn 1:100001 -# Per-device RD: :1 ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraRouteTarget - data: - - target: "1:100001" - description: VRF gold EVPN route target ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraVRF - data: - - name: gold - description: VRF gold - L3 VXLAN with symmetric IRB - l3vni: ["100001"] - import_targets: - - ["1:100001"] - export_targets: - - ["1:100001"] ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraVRFDeviceAssignment - data: - - device: ["leaf3"] - vrf: ["gold"] - route_distinguisher: "10.0.250.13:1" - import_targets: - - ["1:100001"] - export_targets: - - ["1:100001"] - - device: ["leaf4"] - vrf: ["gold"] - route_distinguisher: "10.0.250.14:1" - import_targets: - - ["1:100001"] - export_targets: - - ["1:100001"] - - device: ["leaf7"] - vrf: ["gold"] - route_distinguisher: "10.0.250.17:1" - import_targets: - - ["1:100001"] - export_targets: - - ["1:100001"] - - device: ["leaf8"] - vrf: ["gold"] - route_distinguisher: "10.0.250.18:1" - import_targets: - - ["1:100001"] - export_targets: - - ["1:100001"] diff --git a/objects/12-mlag.yml b/objects/12-mlag.yml deleted file mode 100644 index 29b8e56..0000000 --- a/objects/12-mlag.yml +++ /dev/null @@ -1,134 +0,0 @@ -# MLAG: Domains and Peer Configs -# Depends on: 02-devices, 03-interfaces (Vlan4090, Port-Channel999), 05-vlans-vxlan (VLAN 4090/4091) -# -# All 4 MLAG pairs share domain-id "leafs" and virtual-mac c001.cafe.babe -# but each is a separate MlagDomain object linking two devices. -# MLAG peer VLAN: 4090, MLAG iBGP VLAN: 4091 ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraMlagDomain - data: - # MLAG pair 1: leaf1 + leaf2 - - domain_id: leafs-1-2 - description: MLAG domain for leaf1/leaf2 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf1"] - - ["leaf2"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] - # MLAG pair 2: leaf3 + leaf4 - - domain_id: leafs-3-4 - description: MLAG domain for leaf3/leaf4 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf3"] - - ["leaf4"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] - # MLAG pair 3: leaf5 + leaf6 - - domain_id: leafs-5-6 - description: MLAG domain for leaf5/leaf6 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf5"] - - ["leaf6"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] - # MLAG pair 4: leaf7 + leaf8 - - domain_id: leafs-7-8 - description: MLAG domain for leaf7/leaf8 pair - virtual_mac: "c001.cafe.babe" - heartbeat_vrf: mgmt - dual_primary_detection: true - dual_primary_delay: 10 - dual_primary_action: errdisable - devices: - - ["leaf7"] - - ["leaf8"] - peer_vlan: ["4090"] - ibgp_vlan: ["4091"] ---- -apiVersion: infrahub.app/v1 -kind: Object -spec: - kind: InfraMlagPeerConfig - data: - # Leaf1 MLAG peer config - - device: ["leaf1"] - mlag_domain: ["leafs-1-2"] - local_interface_ip: "10.0.199.254/31" - peer_address: "10.0.199.255" - heartbeat_peer_ip: "172.16.0.50" - local_interface: ["leaf1", "Vlan4090"] - peer_link: ["leaf1", "Port-Channel999"] - # Leaf2 MLAG peer config - - device: ["leaf2"] - mlag_domain: ["leafs-1-2"] - local_interface_ip: "10.0.199.255/31" - peer_address: "10.0.199.254" - heartbeat_peer_ip: "172.16.0.25" - local_interface: ["leaf2", "Vlan4090"] - peer_link: ["leaf2", "Port-Channel999"] - # Leaf3 MLAG peer config - - device: ["leaf3"] - mlag_domain: ["leafs-3-4"] - local_interface_ip: "10.0.199.252/31" - peer_address: "10.0.199.253" - heartbeat_peer_ip: "172.16.0.28" - local_interface: ["leaf3", "Vlan4090"] - peer_link: ["leaf3", "Port-Channel999"] - # Leaf4 MLAG peer config - - device: ["leaf4"] - mlag_domain: ["leafs-3-4"] - local_interface_ip: "10.0.199.253/31" - peer_address: "10.0.199.252" - heartbeat_peer_ip: "172.16.0.27" - local_interface: ["leaf4", "Vlan4090"] - peer_link: ["leaf4", "Port-Channel999"] - # Leaf5 MLAG peer config - - device: ["leaf5"] - mlag_domain: ["leafs-5-6"] - local_interface_ip: "10.0.199.250/31" - peer_address: "10.0.199.251" - heartbeat_peer_ip: "172.16.0.30" - local_interface: ["leaf5", "Vlan4090"] - peer_link: ["leaf5", "Port-Channel999"] - # Leaf6 MLAG peer config - - device: ["leaf6"] - mlag_domain: ["leafs-5-6"] - local_interface_ip: "10.0.199.251/31" - peer_address: "10.0.199.250" - heartbeat_peer_ip: "172.16.0.29" - local_interface: ["leaf6", "Vlan4090"] - peer_link: ["leaf6", "Port-Channel999"] - # Leaf7 MLAG peer config - - device: ["leaf7"] - mlag_domain: ["leafs-7-8"] - local_interface_ip: "10.0.199.248/31" - peer_address: "10.0.199.249" - heartbeat_peer_ip: "172.16.0.32" - local_interface: ["leaf7", "Vlan4090"] - peer_link: ["leaf7", "Port-Channel999"] - # Leaf8 MLAG peer config - - device: ["leaf8"] - mlag_domain: ["leafs-7-8"] - local_interface_ip: "10.0.199.249/31" - peer_address: "10.0.199.248" - heartbeat_peer_ip: "172.16.0.31" - local_interface: ["leaf8", "Vlan4090"] - peer_link: ["leaf8", "Port-Channel999"] diff --git a/schemas/README.md b/schemas/README.md deleted file mode 100644 index ce54fc2..0000000 --- a/schemas/README.md +++ /dev/null @@ -1,217 +0,0 @@ -# Infrahub Schema for EVPN-VXLAN Fabric - -This directory contains the Infrahub schema definitions for modeling an EVPN-VXLAN fabric. The schema is designed to represent the [overlaid.net reference topology](https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/) (2 spines, 8 leafs in 4 MLAG pairs). - -## Schema Files - -| File | Nodes | Description | -|------|-------|-------------| -| `base.yml` | Device, InterfaceEthernet, InterfaceLoopback, InterfaceVlan, InterfaceLag, IPAddress, Site, Platform | Core infrastructure and generic Interface | -| `bgp.yml` | AutonomousSystem, BGPRouterConfig, BGPPeerGroup, BGPSession, BGPAddressFamily | BGP routing configuration | -| `vlan_vxlan.yml` | VLAN, VNI, VTEP, VlanVniMapping, EVPNInstance | Layer 2 overlay and VXLAN tunneling | -| `vrf.yml` | VRF, RouteTarget, VRFDeviceAssignment | VRF and L3VNI configuration | -| `mlag.yml` | MlagDomain, MlagPeerConfig, MlagInterface | MLAG domain and peer configuration | -| `extensions.yml` | Fabric, UnderlayLink, HostConnection | Fabric topology and connectivity | - -## Entity Relationship Diagram - -``` - ┌──────────────┐ - │ InfraFabric │ - └──────┬───────┘ - ┌───────────┼───────────┐ - ▼ ▼ ▼ - ┌────────────┐ ┌──────────┐ ┌──────────────────┐ - │LocationSite│ │InfraAS │ │InfraUnderlayLink │ - └────────────┘ └────┬─────┘ │ local/remote: │ - │ │ Device,Interface,│ - │ │ IPAddress │ - ┌────────────┘ └──────────────────┘ - ▼ - ┌──────────────┐ ┌────────────────┐ - │ InfraDevice │◄────────│ InfraPlatform │ - └──────┬───────┘ └────────────────┘ - │ - ┌─────────────┼──────────────┬────────────────┐ - ▼ ▼ ▼ ▼ -┌─────────────┐ ┌──────────┐ ┌───────────┐ ┌──────────────┐ -│InfraInterface│ │InfraBGP- │ │InfraVTEP │ │InfraMlagDomain│ -│ (generic) │ │RouterCfg │ │ │ │ (2 devices) │ -└──────┬──────┘ └────┬─────┘ └─────┬─────┘ └──────┬───────┘ - │ │ │ │ - ▼ ▼ ▼ ▼ - Subtypes: ┌──────────┐ ┌──────────┐ ┌───────────────┐ - - Ethernet │BGPPeer- │ │VlanVni- │ │MlagPeerConfig │ - - Loopback │ Group │ │ Mapping │ │ (per device) │ - - Vlan └──────────┘ └──────────┘ └───────────────┘ - - Lag ┌──────────┐ ┌───────────────┐ - │ │BGPSession│ │MlagInterface │ - ▼ └────┬─────┘ └───────────────┘ -┌──────────────┐ │ -│InfraIPAddress│ │ optional vrf -└──────────────┘ ▼ - ┌─────────┐ ┌──────────────┐ - │InfraVRF │◄────│InfraRoute- │ - └────┬────┘ │ Target │ - │ └──────────────┘ - ▼ - ┌────────────────┐ - │VRFDevice- │ - │ Assignment │ - │ (per device RD)│ - └────────────────┘ - -Layer 2 / EVPN: -┌──────────┐ ┌──────────┐ ┌──────────────┐ -│InfraVLAN │◄──►│ InfraVNI │ │EVPNInstance │ -│ │ │(L2/L3) │ │(per device │ -│ │ └──────────┘ │ RD/RT) │ -└──────────┘ └──────────────┘ -``` - -### Relationship Legend - -| Symbol | Meaning | -|--------|---------| -| `Parent` → child | Child lifecycle depends on parent (e.g., Device → Interface) | -| `Component` → child | Owned collection (e.g., VTEP → VlanVniMapping) | -| `Attribute` | Association without ownership (e.g., BGPSession → VRF) | -| `Generic` | Polymorphic (e.g., IPAddress → any Interface subtype) | - -### All Relationships - -| Source | Relationship | Target | Kind | Cardinality | -|--------|-------------|--------|------|-------------| -| **base.yml** | | | | | -| InfraInterface | `device` | InfraDevice | Parent | one | -| InfraInterface | `ip_addresses` | InfraIPAddress | Generic | many | -| InfraDevice | `site` | LocationSite | Attribute | one (opt) | -| InfraDevice | `platform` | InfraPlatform | Attribute | one (opt) | -| InfraDevice | `asn` | InfraAutonomousSystem | Attribute | one (opt) | -| InfraDevice | `interfaces` | InfraInterface | Component | many | -| InfraDevice | `mlag_domain` | InfraMlagDomain | Attribute | one (opt) | -| InterfaceEthernet | `lag` | InterfaceLag | Attribute | one (opt) | -| InterfaceEthernet | `connected_interface` | InterfaceEthernet | outbound | one (opt) | -| InterfaceVlan | `vlan` | InfraVLAN | Attribute | one (opt) | -| InterfaceLag | `members` | InterfaceEthernet | Component | many | -| InfraIPAddress | `interface` | InfraInterface | Attribute | one (opt) | -| **bgp.yml** | | | | | -| BGPRouterConfig | `device` | InfraDevice | Parent | one | -| BGPRouterConfig | `local_asn` | InfraAutonomousSystem | Attribute | one | -| BGPRouterConfig | `peer_groups` | BGPPeerGroup | Component | many | -| BGPRouterConfig | `sessions` | BGPSession | Component | many | -| BGPPeerGroup | `bgp_config` | BGPRouterConfig | Parent | one | -| BGPPeerGroup | `remote_asn` | InfraAutonomousSystem | Attribute | one (opt) | -| BGPSession | `bgp_config` | BGPRouterConfig | Parent | one | -| BGPSession | `peer_group` | BGPPeerGroup | Attribute | one (opt) | -| BGPSession | `remote_asn` | InfraAutonomousSystem | Attribute | one (opt) | -| BGPSession | `peer_device` | InfraDevice | Attribute | one (opt) | -| BGPSession | `vrf` | InfraVRF | Attribute | one (opt) | -| BGPAddressFamily | `bgp_config` | BGPRouterConfig | Parent | one | -| BGPAddressFamily | `active_peer_groups` | BGPPeerGroup | Attribute | many | -| BGPAddressFamily | `networks` | InfraIPAddress | Attribute | many (opt) | -| **vlan_vxlan.yml** | | | | | -| InfraVLAN | `vni` | InfraVNI | Attribute | one (opt) | -| InfraVLAN | `site` | LocationSite | Attribute | one (opt) | -| InfraVNI | `vlan` | InfraVLAN | Attribute | one (opt) | -| InfraVNI | `vrf` | InfraVRF | Attribute | one (opt) | -| InfraVTEP | `device` | InfraDevice | Parent | one | -| InfraVTEP | `source_interface` | InterfaceLoopback | Attribute | one | -| InfraVTEP | `vlan_vni_mappings` | VlanVniMapping | Component | many | -| VlanVniMapping | `vtep` | InfraVTEP | Parent | one | -| VlanVniMapping | `vlan` | InfraVLAN | Attribute | one | -| VlanVniMapping | `vni` | InfraVNI | Attribute | one | -| EVPNInstance | `device` | InfraDevice | Parent | one | -| EVPNInstance | `vlan` | InfraVLAN | Attribute | one | -| **vrf.yml** | | | | | -| InfraVRF | `l3vni` | InfraVNI | Attribute | one (opt) | -| InfraVRF | `import_targets` | InfraRouteTarget | outbound | many (opt) | -| InfraVRF | `export_targets` | InfraRouteTarget | outbound | many (opt) | -| InfraVRF | `interfaces` | InfraInterface | Attribute | many (opt) | -| VRFDeviceAssignment | `vrf` | InfraVRF | Attribute | one | -| VRFDeviceAssignment | `device` | InfraDevice | Parent | one | -| VRFDeviceAssignment | `import_targets` | InfraRouteTarget | outbound | many (opt) | -| VRFDeviceAssignment | `export_targets` | InfraRouteTarget | outbound | many (opt) | -| **mlag.yml** | | | | | -| MlagDomain | `devices` | InfraDevice | Attribute | many (2) | -| MlagDomain | `peer_vlan` | InfraVLAN | outbound | one | -| MlagDomain | `ibgp_vlan` | InfraVLAN | outbound | one (opt) | -| MlagPeerConfig | `device` | InfraDevice | Parent | one | -| MlagPeerConfig | `mlag_domain` | MlagDomain | Attribute | one | -| MlagPeerConfig | `local_interface` | InterfaceVlan | Attribute | one | -| MlagPeerConfig | `peer_link` | InterfaceLag | Attribute | one | -| MlagInterface | `mlag_domain` | MlagDomain | Attribute | one | -| MlagInterface | `lag_interfaces` | InterfaceLag | Attribute | many (1-2) | -| **extensions.yml** | | | | | -| InfraFabric | `spine_asn` | InfraAutonomousSystem | Attribute | one (opt) | -| InfraFabric | `sites` | LocationSite | Attribute | many (opt) | -| UnderlayLink | `fabric` | InfraFabric | Parent | one | -| UnderlayLink | `local_device` | InfraDevice | outbound | one | -| UnderlayLink | `local_interface` | InterfaceEthernet | outbound | one | -| UnderlayLink | `local_ip_address` | InfraIPAddress | outbound | one | -| UnderlayLink | `remote_device` | InfraDevice | outbound | one | -| UnderlayLink | `remote_interface` | InterfaceEthernet | outbound | one | -| UnderlayLink | `remote_ip_address` | InfraIPAddress | outbound | one | -| HostConnection | `vlans` | InfraVLAN | Attribute | many | -| HostConnection | `mlag_interface` | MlagInterface | Attribute | one (opt) | -| HostConnection | `lag_interface` | InterfaceLag | Attribute | one (opt) | - -## Reference Topology Mapping - -| Physical | Infrahub Model | -|----------|----------------| -| spine1, spine2 | InfraDevice (role: spine) | -| leaf1-8 | InfraDevice (role: leaf) | -| AS 65000 | InfraAutonomousSystem (spines) | -| AS 65001-65004 | InfraAutonomousSystem (leaf pairs) | -| AS 64999 | InfraAutonomousSystem (border router) | -| VLAN 40, 34, 78, 900 | InfraVLAN + InfraVNI | -| VLAN 4090, 4091 | InfraVLAN (vlan_type: mlag_peer/mlag_ibgp, trunk_groups, stp_enabled: false) | -| VRF gold | InfraVRF + VRFDeviceAssignment (per-device RD) | -| Route targets 1:100001 | InfraRouteTarget | -| leaf1+leaf2 pair | InfraMlagDomain | -| Port-Channel999 | InfraInterfaceLag (peer-link) | -| Port-Channel1 | InfraMlagInterface (host-facing) | -| Ethernet1-12 | InfraInterfaceEthernet | -| Loopback0 | InfraInterfaceLoopback (BGP router-id) | -| Loopback1 | InfraInterfaceLoopback (shared VTEP IP per MLAG pair) | -| Vxlan1 | InfraVTEP | -| Vlan34/78 SVIs | InfraInterfaceVlan (virtual_router_address for anycast gateway) | -| peer groups (underlay, evpn, underlay_ibgp) | InfraBGPPeerGroup | -| BGP sessions (global) | InfraBGPSession (vrf: null) | -| BGP sessions in VRF gold (leaf7/8 → AS 64999) | InfraBGPSession (vrf: gold) | -| spine1/2 p2p links | InfraUnderlayLink (IPAddress relations, not attributes) | -| distance bgp 20 200 200 | BGPRouterConfig (ebgp_distance, ibgp_distance, local_distance) | - -## Usage - -### Loading the Schema - -```bash -infrahubctl schema load schemas/ -``` - -### Validation - -```bash -infrahubctl schema check schemas/ -``` - -## Key Design Decisions - -1. **Generic Interface**: All interface types inherit from `InfraInterface` generic for polymorphic queries -2. **MLAG as Domain**: MLAG is modeled as a domain containing exactly 2 devices, with per-device config via MlagPeerConfig -3. **BGP Hierarchy**: BGPRouterConfig → PeerGroups → Sessions allows template-based configuration -4. **BGP VRF Sessions**: BGPSession has an optional `vrf` relation (kind: Attribute) to support peering inside a VRF context (#50) -5. **VTEP as single model**: VTEP is the unique VXLAN model (InterfaceVxlan was removed to avoid duplication — #44) -6. **EVPN Instance per VLAN**: Allows device-specific RD/RT while referencing common VLAN/VNI -7. **Per-device scoped IDs**: BGPPeerGroup and BGPSession use `bgp_config__router_id__value` prefix in human_friendly_id for global uniqueness (#43) -8. **UnderlayLink IPs as relations**: local/remote IPs reference InfraIPAddress objects instead of inline attributes to avoid dual source of truth (#47) -9. **VRFDeviceAssignment**: Separates VRF definition (global) from per-device assignment (with device-specific RD/RT overrides) -10. **Anycast gateway**: InterfaceVlan has `virtual_router_address` for `ip virtual-router address` and `autostate` for MLAG SVIs (#46) - -## Related Issues - -- Parent issue: [#41 — Define Infrahub Schema for EVPN-VXLAN Fabric](https://gitea.arnodo.fr/Damien/fabric-orchestrator/issues/41) -- Schema fixes: #43 (unique IDs), #44 (remove duplicate VTEP), #45 (VLAN unique), #46 (anycast gateway), #47 (underlay IPs), #48 (BGP distance), #49 (trunk groups), #50 (VRF BGP sessions) -- Depends on: Schema being loaded before transforms (#30, #31, #32, #33) diff --git a/schemas/base.yml b/schemas/base.yml deleted file mode 100644 index 7bd5aa9..0000000 --- a/schemas/base.yml +++ /dev/null @@ -1,344 +0,0 @@ -# Base Infrastructure Schema for EVPN-VXLAN Fabric -# This schema defines core infrastructure objects required for fabric orchestration ---- -version: "1.0" -generics: - - name: Interface - namespace: Infra - description: Generic interface - parent for all interface types - label: Interface - include_in_menu: false - hierarchical: false - display_label: "{{ name__value }}" - attributes: - - name: name - kind: Text - description: Interface name (e.g., Ethernet1, Loopback0) - - name: description - kind: Text - optional: true - - name: enabled - kind: Boolean - default_value: true - - name: mtu - kind: Number - optional: true - description: Maximum Transmission Unit - relationships: - - name: device - peer: InfraDevice - cardinality: one - kind: Parent - optional: false - - name: ip_addresses - peer: InfraIPAddress - identifier: interface__ip_addresses - cardinality: many - kind: Generic - -nodes: - # ================================================================ - # Location - # ================================================================ - - name: Site - namespace: Location - description: Physical site or data center - label: Site - icon: mingcute--building-4-line - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: "{{ name__value }}" - attributes: - - name: name - kind: Text - unique: true - - name: description - kind: Text - optional: true - - name: facility - kind: Text - optional: true - description: Facility identifier or code - - # ================================================================ - # Platform - # ================================================================ - - name: Platform - namespace: Infra - description: Device platform/OS (e.g., Arista EOS, Cisco NX-OS) - label: Platform - icon: mdi--chip - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: "{{ name__value }}" - attributes: - - name: name - kind: Text - unique: true - description: Platform name (e.g., arista_eos, cisco_nxos) - - name: description - kind: Text - optional: true - - name: napalm_driver - kind: Text - optional: true - description: NAPALM driver name - - name: netmiko_device_type - kind: Text - optional: true - description: Netmiko device type - - # ================================================================ - # Device - # ================================================================ - - name: Device - namespace: Infra - description: Network device (spine, leaf, etc.) - label: Device - icon: mdi--server-network - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: "{{ name__value }}" - attributes: - - name: name - kind: Text - unique: true - description: Device hostname - - name: description - kind: Text - optional: true - - name: role - kind: Dropdown - choices: - - name: spine - label: Spine - color: "#3b82f6" - - name: leaf - label: Leaf - color: "#22c55e" - description: Fabric role - - name: status - kind: Dropdown - default_value: active - choices: - - name: active - label: Active - color: "#22c55e" - - name: planned - label: Planned - color: "#3b82f6" - - name: maintenance - label: Maintenance - color: "#f59e0b" - - name: decommissioned - label: Decommissioned - color: "#ef4444" - relationships: - - name: site - peer: LocationSite - cardinality: one - optional: true - - name: platform - peer: InfraPlatform - cardinality: one - optional: true - - name: asn - peer: InfraAutonomousSystem - cardinality: one - optional: true - description: BGP Autonomous System - - name: interfaces - peer: InfraInterface - cardinality: many - kind: Component - - name: mlag_domain - peer: InfraMlagDomain - cardinality: one - optional: true - - # ================================================================ - # Interface Types (inherit from InfraInterface generic) - # ================================================================ - - name: InterfaceEthernet - namespace: Infra - description: Physical Ethernet interface - label: Ethernet Interface - icon: mdi--ethernet - include_in_menu: false - inherit_from: - - InfraInterface - uniqueness_constraints: - - ["device", "name__value"] - human_friendly_id: - - device__name__value - - name__value - display_label: "{{ name__value }}" - attributes: - - name: speed - kind: Dropdown - optional: true - choices: - - name: "1000" - label: 1 Gbps - - name: "10000" - label: 10 Gbps - - name: "25000" - label: 25 Gbps - - name: "40000" - label: 40 Gbps - - name: "100000" - label: 100 Gbps - - name: mode - kind: Dropdown - optional: true - choices: - - name: access - label: Access - - name: trunk - label: Trunk - - name: routed - label: Routed (L3) - description: Switchport mode - relationships: - - name: lag - peer: InfraInterfaceLag - cardinality: one - optional: true - description: Parent LAG interface - - name: connected_interface - peer: InfraInterfaceEthernet - identifier: ethernet_connected_to - direction: outbound - cardinality: one - optional: true - description: Connected peer interface - - - name: InterfaceLoopback - namespace: Infra - description: Loopback interface - label: Loopback Interface - icon: mdi--reload - include_in_menu: false - inherit_from: - - InfraInterface - uniqueness_constraints: - - ["device", "name__value"] - human_friendly_id: - - device__name__value - - name__value - display_label: "{{ name__value }}" - - - name: InterfaceVlan - namespace: Infra - description: VLAN SVI interface - label: VLAN Interface - icon: mdi--lan - include_in_menu: false - inherit_from: - - InfraInterface - uniqueness_constraints: - - ["device", "name__value"] - human_friendly_id: - - device__name__value - - name__value - display_label: "{{ name__value }}" - attributes: - - name: virtual_router_address - kind: IPHost - optional: true - description: Anycast gateway IP (ip virtual-router address) - - name: autostate - kind: Boolean - default_value: true - description: "Enable autostate (set false for MLAG peer SVIs)" - relationships: - - name: vlan - peer: InfraVLAN - cardinality: one - optional: true - - - name: InterfaceLag - namespace: Infra - description: Link Aggregation (Port-Channel) interface - label: LAG Interface - icon: mdi--link-variant - include_in_menu: false - inherit_from: - - InfraInterface - uniqueness_constraints: - - ["device", "name__value"] - human_friendly_id: - - device__name__value - - name__value - display_label: "{{ name__value }}" - attributes: - - name: lacp_mode - kind: Dropdown - optional: true - choices: - - name: active - label: Active - - name: passive - label: Passive - - name: static - label: Static (No LACP) - - name: mlag_id - kind: Number - optional: true - description: MLAG interface ID - relationships: - - name: members - peer: InfraInterfaceEthernet - cardinality: many - kind: Component - - # ================================================================ - # IP Address - # ================================================================ - - name: IPAddress - namespace: Infra - description: IP Address assignment - label: IP Address - icon: mdi--ip-network - include_in_menu: false - human_friendly_id: - - address__value - order_by: - - address__value - display_label: "{{ address__value }}" - attributes: - - name: address - kind: IPHost - description: IP address with prefix (e.g., 10.0.1.1/31) - - name: description - kind: Text - optional: true - - name: status - kind: Dropdown - default_value: active - choices: - - name: active - label: Active - color: "#22c55e" - - name: reserved - label: Reserved - color: "#3b82f6" - - name: deprecated - label: Deprecated - color: "#ef4444" - relationships: - - name: interface - peer: InfraInterface - identifier: interface__ip_addresses - cardinality: one - optional: true - kind: Attribute diff --git a/schemas/bgp.yml b/schemas/bgp.yml deleted file mode 100644 index c246ebf..0000000 --- a/schemas/bgp.yml +++ /dev/null @@ -1,291 +0,0 @@ -# BGP Schema for EVPN-VXLAN Fabric -# Defines Autonomous System, Peer Groups, and BGP Sessions ---- -version: "1.0" -nodes: - # ================================================================ - # Autonomous System - # ================================================================ - - name: AutonomousSystem - namespace: Infra - description: BGP Autonomous System - label: Autonomous System - icon: mdi--cloud-outline - include_in_menu: false - human_friendly_id: - - asn__value - order_by: - - asn__value - display_label: "{{ asn__value }}" - attributes: - - name: asn - kind: Number - unique: true - description: AS Number (e.g., 65000) - - name: description - kind: Text - optional: true - - name: as_type - kind: Dropdown - default_value: private - choices: - - name: private - label: Private - - name: public - label: Public - - # ================================================================ - # BGP Router Configuration (per device) - # ================================================================ - - name: BGPRouterConfig - namespace: Infra - description: BGP router configuration on a device - label: BGP Router Config - icon: mdi--router-wireless - include_in_menu: false - human_friendly_id: - - device__name__value - display_label: "{{ router_id__value }}" - attributes: - - name: router_id - kind: IPHost - unique: true - description: BGP Router ID - - name: default_ipv4_unicast - kind: Boolean - default_value: false - description: Enable default IPv4 unicast - - name: log_neighbor_changes - kind: Boolean - default_value: true - - name: ecmp_max_paths - kind: Number - default_value: 4 - description: Maximum ECMP paths - - name: ecmp_max_ecmp - kind: Number - default_value: 64 - description: Maximum ECMP routes - - name: ebgp_distance - kind: Number - default_value: 20 - description: eBGP administrative distance - - name: ibgp_distance - kind: Number - default_value: 200 - description: iBGP administrative distance - - name: local_distance - kind: Number - default_value: 200 - description: Local route administrative distance - relationships: - - name: device - peer: InfraDevice - cardinality: one - kind: Parent - optional: false - - name: local_asn - peer: InfraAutonomousSystem - cardinality: one - - name: peer_groups - peer: InfraBGPPeerGroup - cardinality: many - kind: Component - - name: sessions - peer: InfraBGPSession - cardinality: many - kind: Component - - # ================================================================ - # BGP Peer Group - # ================================================================ - - name: BGPPeerGroup - namespace: Infra - description: BGP peer group template - label: BGP Peer Group - icon: mdi--account-group - include_in_menu: false - uniqueness_constraints: - - ["local_identifier__value"] - human_friendly_id: - - local_identifier__value - display_label: "{{ name__value }}" - attributes: - - name: local_identifier - kind: Text - description: "Unique identifier combining device name and peer group name (e.g. spine1__evpn)" - - name: name - kind: Text - description: Peer group name (e.g., underlay, evpn) - - name: description - kind: Text - optional: true - - name: update_source - kind: Text - optional: true - description: Update source interface (e.g., Loopback0) - - name: ebgp_multihop - kind: Number - optional: true - description: eBGP multihop TTL - - name: send_community - kind: Dropdown - default_value: none - choices: - - name: none - label: None - - name: standard - label: Standard - - name: extended - label: Extended - - name: both - label: Both - - name: next_hop_self - kind: Boolean - default_value: false - - name: next_hop_unchanged - kind: Boolean - default_value: false - description: Keep next-hop unchanged (for route reflector) - - name: maximum_routes - kind: Number - optional: true - - name: maximum_routes_warning_only - kind: Boolean - default_value: true - - name: peer_group_type - kind: Dropdown - default_value: underlay - choices: - - name: underlay - label: Underlay IPv4 - - name: underlay_ibgp - label: Underlay iBGP - - name: evpn - label: EVPN Overlay - relationships: - - name: bgp_config - peer: InfraBGPRouterConfig - cardinality: one - kind: Parent - optional: false - - name: remote_asn - peer: InfraAutonomousSystem - cardinality: one - optional: true - - # ================================================================ - # BGP Session (Neighbor) - # ================================================================ - - name: BGPSession - namespace: Infra - description: BGP neighbor session - label: BGP Session - icon: mdi--connection - include_in_menu: false - uniqueness_constraints: - - ["local_identifier__value"] - human_friendly_id: - - local_identifier__value - display_label: "{{ peer_address__value }}" - attributes: - - name: local_identifier - kind: Text - description: "Unique identifier combining device name and peer address (e.g. spine1__10.0.250.11)" - - name: peer_address - kind: IPHost - description: Neighbor IP address - - name: description - kind: Text - optional: true - - name: enabled - kind: Boolean - default_value: true - relationships: - - name: bgp_config - peer: InfraBGPRouterConfig - cardinality: one - kind: Parent - optional: false - - name: peer_group - peer: InfraBGPPeerGroup - cardinality: one - optional: true - - name: remote_asn - peer: InfraAutonomousSystem - cardinality: one - optional: true - description: Override peer group remote-as - - name: peer_device - peer: InfraDevice - cardinality: one - optional: true - description: Remote peer device (for documentation) - - name: vrf - peer: InfraVRF - cardinality: one - kind: Attribute - optional: true - description: VRF context for this session (null = global BGP process) - - # ================================================================ - # BGP Address Family Configuration - # ================================================================ - - name: BGPAddressFamily - namespace: Infra - description: BGP address family configuration - label: BGP Address Family - icon: mdi--format-list-bulleted - include_in_menu: false - human_friendly_id: - - local_identifier__value - display_label: "{{ afi__value }}" - attributes: - - name: local_identifier - kind: Text - description: "Unique identifier combining device name and AFI/SAFI (e.g. spine1__ipv4_unicast)" - - name: afi - kind: Dropdown - choices: - - name: ipv4 - label: IPv4 - - name: ipv6 - label: IPv6 - - name: evpn - label: EVPN - description: Address Family Identifier - - name: safi - kind: Dropdown - default_value: unicast - choices: - - name: unicast - label: Unicast - - name: multicast - label: Multicast - description: Sub Address Family Identifier - relationships: - - name: bgp_config - peer: InfraBGPRouterConfig - cardinality: one - kind: Parent - optional: false - - name: active_peer_groups - peer: InfraBGPPeerGroup - cardinality: many - description: Peer groups activated in this AF - - name: active_sessions - peer: InfraBGPSession - cardinality: many - optional: true - description: Individual sessions activated in this AF (e.g. spine direct neighbors) - - name: vrf - peer: InfraVRF - cardinality: one - kind: Attribute - optional: true - description: VRF context for this AF (null = global BGP process) - - name: networks - peer: InfraIPAddress - cardinality: many - optional: true - description: Networks to advertise diff --git a/schemas/extensions.yml b/schemas/extensions.yml deleted file mode 100644 index d2d8c9e..0000000 --- a/schemas/extensions.yml +++ /dev/null @@ -1,164 +0,0 @@ -# Extensions Schema for EVPN-VXLAN Fabric -# Custom attributes and fabric-specific configurations ---- -version: "1.0" -nodes: - # ================================================================ - # Fabric (Top-level container for all fabric objects) - # ================================================================ - - name: Fabric - namespace: Infra - description: EVPN-VXLAN Fabric definition - label: Fabric - icon: mdi--vector-polygon - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: "{{ name__value }}" - attributes: - - name: name - kind: Text - unique: true - description: Fabric name (e.g., arista-evpn-fabric) - - name: description - kind: Text - optional: true - - name: underlay_protocol - kind: Dropdown - default_value: ebgp - choices: - - name: ebgp - label: eBGP - - name: ospf - label: OSPF - - name: isis - label: IS-IS - - name: overlay_protocol - kind: Dropdown - default_value: evpn - choices: - - name: evpn - label: EVPN - - name: ingress_replication - label: Ingress Replication - - name: anycast_gateway_mac - kind: Text - optional: true - description: "Shared MAC for anycast gateway (format: xxxx.xxxx.xxxx)" - relationships: - - name: spine_asn - peer: InfraAutonomousSystem - cardinality: one - optional: true - description: AS used by spine layer - - name: sites - peer: LocationSite - cardinality: many - optional: true - - # ================================================================ - # Underlay P2P Link - # ================================================================ - - name: UnderlayLink - namespace: Infra - description: Point-to-point underlay link between devices - label: Underlay Link - icon: mdi--cable-data - include_in_menu: false - display_label: "{{ description__value }}" - attributes: - - name: description - kind: Text - description: Link description (e.g., spine1:eth1 <-> leaf1:eth11) - - name: mtu - kind: Number - default_value: 9214 - relationships: - - name: fabric - peer: InfraFabric - cardinality: one - kind: Parent - optional: false - - name: local_device - peer: InfraDevice - identifier: underlay_link_local_device - cardinality: one - direction: outbound - - name: local_interface - peer: InfraInterfaceEthernet - identifier: underlay_link_local_interface - cardinality: one - direction: outbound - - name: local_ip_address - peer: InfraIPAddress - identifier: underlay_link_local_ip - cardinality: one - direction: outbound - - name: remote_device - peer: InfraDevice - identifier: underlay_link_remote_device - cardinality: one - direction: outbound - - name: remote_interface - peer: InfraInterfaceEthernet - identifier: underlay_link_remote_interface - cardinality: one - direction: outbound - - name: remote_ip_address - peer: InfraIPAddress - identifier: underlay_link_remote_ip - cardinality: one - direction: outbound - - # ================================================================ - # Host Connection - # ================================================================ - - name: HostConnection - namespace: Infra - description: Host connection to fabric (single or dual-homed) - label: Host Connection - icon: mdi--desktop-tower - include_in_menu: false - human_friendly_id: - - hostname__value - display_label: "{{ hostname__value }}" - attributes: - - name: hostname - kind: Text - description: Connected host name - - name: description - kind: Text - optional: true - - name: connection_type - kind: Dropdown - default_value: dual_homed - choices: - - name: single_homed - label: Single-Homed - - name: dual_homed - label: Dual-Homed (MLAG) - - name: lacp_mode - kind: Dropdown - default_value: active - choices: - - name: active - label: Active - - name: passive - label: Passive - relationships: - - name: vlans - peer: InfraVLAN - cardinality: many - description: VLANs allowed on this connection - - name: mlag_interface - peer: InfraMlagInterface - cardinality: one - optional: true - description: MLAG interface for dual-homed - - name: lag_interface - peer: InfraInterfaceLag - cardinality: one - optional: true - description: LAG for single-homed diff --git a/schemas/mlag.yml b/schemas/mlag.yml deleted file mode 100644 index 7a6c220..0000000 --- a/schemas/mlag.yml +++ /dev/null @@ -1,141 +0,0 @@ -# MLAG Schema for EVPN-VXLAN Fabric -# Defines MLAG domain and peer configuration ---- -version: "1.0" -nodes: - # ================================================================ - # MLAG Domain - # ================================================================ - - name: MlagDomain - namespace: Infra - description: MLAG domain configuration for leaf pair - label: MLAG Domain - icon: mdi--link-variant - include_in_menu: false - human_friendly_id: - - domain_id__value - display_label: "{{ domain_id__value }}" - attributes: - - name: domain_id - kind: Text - description: MLAG domain identifier (e.g., leafs) - - name: description - kind: Text - optional: true - - name: virtual_mac - kind: Text - description: "Shared virtual MAC (format: xxxx.xxxx.xxxx)" - - name: heartbeat_vrf - kind: Text - default_value: mgmt - description: VRF for heartbeat (typically mgmt) - - name: dual_primary_detection - kind: Boolean - default_value: true - - name: dual_primary_delay - kind: Number - default_value: 10 - description: Delay in seconds before dual-primary action - - name: dual_primary_action - kind: Dropdown - default_value: errdisable - choices: - - name: errdisable - label: Error Disable Interfaces - - name: none - label: No Action - relationships: - - name: devices - peer: InfraDevice - cardinality: many - min_count: 2 - max_count: 2 - description: MLAG peer devices - - name: peer_vlan - peer: InfraVLAN - identifier: mlag_domain_peer_vlan - cardinality: one - direction: outbound - description: VLAN for MLAG peer-link control traffic - - name: ibgp_vlan - peer: InfraVLAN - identifier: mlag_domain_ibgp_vlan - cardinality: one - direction: outbound - optional: true - description: VLAN for iBGP peering between MLAG peers - - # ================================================================ - # MLAG Peer Configuration (per device) - # ================================================================ - - name: MlagPeerConfig - namespace: Infra - description: MLAG configuration on a specific device - label: MLAG Peer Config - icon: mdi--server-network - include_in_menu: false - human_friendly_id: - - device__name__value - display_label: "{{ local_interface_ip__value }}" - attributes: - - name: local_interface_ip - kind: IPNetwork - description: IP on MLAG peer VLAN SVI - - name: peer_address - kind: IPHost - description: Peer's MLAG SVI IP address - - name: heartbeat_peer_ip - kind: IPHost - description: Peer's management IP for heartbeat - relationships: - - name: device - peer: InfraDevice - cardinality: one - kind: Parent - optional: false - - name: mlag_domain - peer: InfraMlagDomain - cardinality: one - - name: local_interface - peer: InfraInterfaceVlan - cardinality: one - description: Local MLAG SVI - - name: peer_link - peer: InfraInterfaceLag - cardinality: one - description: Peer-link port-channel - - # ================================================================ - # MLAG Interface (MLAG-enabled LAG) - # ================================================================ - - name: MlagInterface - namespace: Infra - description: MLAG interface configuration - label: MLAG Interface - icon: mdi--ethernet-cable - include_in_menu: false - display_label: "{{ mlag_id__value }}" - attributes: - - name: mlag_id - kind: Number - description: MLAG interface ID - - name: description - kind: Text - optional: true - - name: lacp_fallback_timeout - kind: Number - default_value: 5 - description: LACP fallback timeout in seconds - - name: lacp_fallback_individual - kind: Boolean - default_value: true - relationships: - - name: mlag_domain - peer: InfraMlagDomain - cardinality: one - - name: lag_interfaces - peer: InfraInterfaceLag - cardinality: many - min_count: 1 - max_count: 2 - description: LAG interfaces on each MLAG peer diff --git a/schemas/vlan_vxlan.yml b/schemas/vlan_vxlan.yml deleted file mode 100644 index b17cf82..0000000 --- a/schemas/vlan_vxlan.yml +++ /dev/null @@ -1,221 +0,0 @@ -# VLAN and VXLAN Schema for EVPN-VXLAN Fabric -# Defines VLAN, VNI mappings, and VTEP configuration ---- -version: "1.0" -nodes: - # ================================================================ - # VLAN - # ================================================================ - - name: VLAN - namespace: Infra - description: Virtual LAN configuration - label: VLAN - icon: mdi--lan-connect - include_in_menu: false - human_friendly_id: - - vlan_id__value - order_by: - - vlan_id__value - display_label: "{{ vlan_id__value }} ({{ name__value }})" - attributes: - - name: vlan_id - kind: Number - unique: true - description: VLAN ID (1-4094) - - name: name - kind: Text - description: VLAN name - - name: description - kind: Text - optional: true - - name: status - kind: Dropdown - default_value: active - choices: - - name: active - label: Active - color: "#22c55e" - - name: reserved - label: Reserved - color: "#3b82f6" - - name: deprecated - label: Deprecated - color: "#ef4444" - - name: vlan_type - kind: Dropdown - default_value: standard - choices: - - name: standard - label: Standard - - name: mlag_peer - label: MLAG Peer - - name: mlag_ibgp - label: MLAG iBGP - description: VLAN purpose - - name: trunk_groups - kind: List - optional: true - description: "Trunk groups restricting VLAN propagation (e.g., mlag-peer)" - - name: stp_enabled - kind: Boolean - default_value: true - description: "Enable spanning-tree on this VLAN (set false for MLAG peer VLANs)" - relationships: - - name: vni - peer: InfraVNI - cardinality: one - optional: true - description: Associated L2VNI for VXLAN - - name: site - peer: LocationSite - cardinality: one - optional: true - - # ================================================================ - # VNI (VXLAN Network Identifier) - # ================================================================ - - name: VNI - namespace: Infra - description: VXLAN Network Identifier - label: VNI - icon: mdi--tunnel-outline - include_in_menu: false - human_friendly_id: - - vni__value - order_by: - - vni__value - display_label: "{{ vni__value }}" - attributes: - - name: vni - kind: Number - unique: true - description: VNI value (1-16777215) - - name: description - kind: Text - optional: true - - name: vni_type - kind: Dropdown - default_value: l2vni - choices: - - name: l2vni - label: L2 VNI - color: "#3b82f6" - - name: l3vni - label: L3 VNI - color: "#22c55e" - description: VNI type for EVPN - relationships: - - name: vlan - peer: InfraVLAN - cardinality: one - optional: true - description: Associated VLAN for L2VNI - - name: vrf - peer: InfraVRF - cardinality: one - optional: true - description: Associated VRF for L3VNI - - # ================================================================ - # VTEP (VXLAN Tunnel Endpoint) - # ================================================================ - - name: VTEP - namespace: Infra - description: VXLAN Tunnel Endpoint configuration - label: VTEP - icon: mdi--server-network-outline - include_in_menu: false - human_friendly_id: - - device__name__value - display_label: "{{ source_address__value }}" - attributes: - - name: source_address - kind: IPHost - description: VTEP source IP (typically from Loopback1) - - name: udp_port - kind: Number - default_value: 4789 - - name: learn_restrict - kind: Dropdown - default_value: any - choices: - - name: any - label: Any - - name: flood - label: Flood - description: MAC learning restriction mode - relationships: - - name: device - peer: InfraDevice - cardinality: one - kind: Parent - optional: false - - name: source_interface - peer: InfraInterfaceLoopback - cardinality: one - description: Source interface for VTEP - - name: vlan_vni_mappings - peer: InfraVlanVniMapping - cardinality: many - kind: Component - - # ================================================================ - # VLAN to VNI Mapping (per-device) - # ================================================================ - - name: VlanVniMapping - namespace: Infra - description: VLAN to VNI mapping on a VTEP - label: VLAN-VNI Mapping - icon: mdi--swap-horizontal - include_in_menu: false - display_label: "{{ description__value }}" - attributes: - - name: description - kind: Text - optional: true - description: "Mapping description (e.g., VLAN 40 <-> VNI 10040)" - relationships: - - name: vtep - peer: InfraVTEP - cardinality: one - kind: Parent - optional: false - - name: vlan - peer: InfraVLAN - cardinality: one - - name: vni - peer: InfraVNI - cardinality: one - - # ================================================================ - # EVPN Instance (per VLAN) - # ================================================================ - - name: EVPNInstance - namespace: Infra - description: EVPN instance configuration (route targets for L2 extension) - label: EVPN Instance - icon: mdi--cloud-sync - include_in_menu: false - display_label: "{{ route_distinguisher__value }}" - attributes: - - name: route_distinguisher - kind: Text - description: "Route Distinguisher (format: ASN:VNI or IP:VNI)" - - name: route_target_import - kind: Text - description: "Import Route Target (format: VNI:VNI)" - - name: route_target_export - kind: Text - description: "Export Route Target (format: VNI:VNI)" - - name: redistribute_learned - kind: Boolean - default_value: true - relationships: - - name: vlan - peer: InfraVLAN - cardinality: one - - name: device - peer: InfraDevice - cardinality: one - kind: Parent - optional: false diff --git a/schemas/vrf.yml b/schemas/vrf.yml deleted file mode 100644 index 68e1569..0000000 --- a/schemas/vrf.yml +++ /dev/null @@ -1,124 +0,0 @@ -# VRF Schema for EVPN-VXLAN Fabric -# Defines VRF and Route Target configuration for L3 VPN ---- -version: "1.0" -nodes: - # ================================================================ - # VRF (Virtual Routing and Forwarding) - # ================================================================ - - name: VRF - namespace: Infra - description: Virtual Routing and Forwarding instance - label: VRF - icon: mdi--router - include_in_menu: false - human_friendly_id: - - name__value - order_by: - - name__value - display_label: "{{ name__value }}" - attributes: - - name: name - kind: Text - unique: true - description: VRF name - - name: description - kind: Text - optional: true - - name: route_distinguisher - kind: Text - optional: true - description: "Route Distinguisher (format: ASN:NN or IP:NN)" - - name: vrf_id - kind: Number - optional: true - description: VRF table ID - relationships: - - name: l3vni - peer: InfraVNI - cardinality: one - optional: true - description: L3 VNI for symmetric IRB - - name: import_targets - peer: InfraRouteTarget - identifier: vrf_import_targets - cardinality: many - direction: outbound - optional: true - - name: export_targets - peer: InfraRouteTarget - identifier: vrf_export_targets - cardinality: many - direction: outbound - optional: true - - name: interfaces - peer: InfraInterface - cardinality: many - optional: true - description: Interfaces assigned to this VRF - - # ================================================================ - # Route Target - # ================================================================ - - name: RouteTarget - namespace: Infra - description: BGP Route Target for VPN import/export - label: Route Target - icon: mdi--target - include_in_menu: false - human_friendly_id: - - target__value - order_by: - - target__value - display_label: "{{ target__value }}" - attributes: - - name: target - kind: Text - unique: true - description: "Route Target value (format: ASN:NN or IP:NN)" - - name: description - kind: Text - optional: true - - # ================================================================ - # VRF Device Assignment - # ================================================================ - - name: VRFDeviceAssignment - namespace: Infra - description: VRF assignment to a specific device - label: VRF Assignment - icon: mdi--router-network - include_in_menu: false - human_friendly_id: - - device__name__value - - vrf__name__value - display_label: "{{ device__name__value }} - {{ vrf__name__value }}" - attributes: - - name: route_distinguisher - kind: Text - optional: true - description: "Device-specific RD (overrides VRF default)" - relationships: - - name: vrf - peer: InfraVRF - cardinality: one - optional: false - - name: device - peer: InfraDevice - cardinality: one - kind: Parent - optional: false - - name: import_targets - peer: InfraRouteTarget - identifier: vrf_assignment_import_targets - cardinality: many - direction: outbound - optional: true - description: Device-specific import RTs - - name: export_targets - peer: InfraRouteTarget - identifier: vrf_assignment_export_targets - cardinality: many - direction: outbound - optional: true - description: Device-specific export RTs -- 2.53.0