refactor(ipam): simplify interface references to compact array format

Replace verbose interface definitions using node/kind objects with
concise [device, interface] array notation across all IPAM address
entries. This reduces verbosity and improves readability of the
IP address assignments for loopbacks and P2P underlay links.
This commit is contained in:
Damien
2026-02-21 16:13:31 +01:00
parent e9dad132ea
commit 807f3ce8a1
2 changed files with 72 additions and 216 deletions

View File

@@ -11,120 +11,76 @@ spec:
# ============================================================
- address: "10.0.199.254/31"
description: leaf1 MLAG peer-link
interface:
node: leaf1__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf1", "Vlan4090"]
- address: "10.0.199.255/31"
description: leaf2 MLAG peer-link
interface:
node: leaf2__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf2", "Vlan4090"]
- address: "10.0.199.252/31"
description: leaf3 MLAG peer-link
interface:
node: leaf3__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf3", "Vlan4090"]
- address: "10.0.199.253/31"
description: leaf4 MLAG peer-link
interface:
node: leaf4__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf4", "Vlan4090"]
- address: "10.0.199.250/31"
description: leaf5 MLAG peer-link
interface:
node: leaf5__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf5", "Vlan4090"]
- address: "10.0.199.251/31"
description: leaf6 MLAG peer-link
interface:
node: leaf6__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf6", "Vlan4090"]
- address: "10.0.199.248/31"
description: leaf7 MLAG peer-link
interface:
node: leaf7__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf7", "Vlan4090"]
- address: "10.0.199.249/31"
description: leaf8 MLAG peer-link
interface:
node: leaf8__Vlan4090
kind: InfraInterfaceVlan
interface: ["leaf8", "Vlan4090"]
# ============================================================
# MLAG iBGP Peering SVI (Vlan4091) — /31
# ============================================================
- address: "10.0.3.0/31"
description: leaf1 MLAG iBGP peering
interface:
node: leaf1__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf1", "Vlan4091"]
- address: "10.0.3.1/31"
description: leaf2 MLAG iBGP peering
interface:
node: leaf2__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf2", "Vlan4091"]
- address: "10.0.3.2/31"
description: leaf3 MLAG iBGP peering
interface:
node: leaf3__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf3", "Vlan4091"]
- address: "10.0.3.3/31"
description: leaf4 MLAG iBGP peering
interface:
node: leaf4__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf4", "Vlan4091"]
- address: "10.0.3.4/31"
description: leaf5 MLAG iBGP peering
interface:
node: leaf5__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf5", "Vlan4091"]
- address: "10.0.3.5/31"
description: leaf6 MLAG iBGP peering
interface:
node: leaf6__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf6", "Vlan4091"]
- address: "10.0.3.6/31"
description: leaf7 MLAG iBGP peering
interface:
node: leaf7__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf7", "Vlan4091"]
- address: "10.0.3.7/31"
description: leaf8 MLAG iBGP peering
interface:
node: leaf8__Vlan4091
kind: InfraInterfaceVlan
interface: ["leaf8", "Vlan4091"]
# ============================================================
# VRF gold SVI addresses — /24
# ============================================================
# Vlan34 (leaf3/leaf4)
- address: "10.34.34.2/24"
description: leaf3 Vlan34 VRF gold
interface:
node: leaf3__Vlan34
kind: InfraInterfaceVlan
interface: ["leaf3", "Vlan34"]
- address: "10.34.34.3/24"
description: leaf4 Vlan34 VRF gold
interface:
node: leaf4__Vlan34
kind: InfraInterfaceVlan
interface: ["leaf4", "Vlan34"]
# Vlan78 (leaf7/leaf8)
- address: "10.78.78.2/24"
description: leaf7 Vlan78 VRF gold
interface:
node: leaf7__Vlan78
kind: InfraInterfaceVlan
interface: ["leaf7", "Vlan78"]
- address: "10.78.78.3/24"
description: leaf8 Vlan78 VRF gold
interface:
node: leaf8__Vlan78
kind: InfraInterfaceVlan
interface: ["leaf8", "Vlan78"]
# Vlan900 — BGP border (leaf7/leaf8)
- address: "10.90.90.2/29"
description: leaf7 Vlan900 BGP border
interface:
node: leaf7__Vlan900
kind: InfraInterfaceVlan
interface: ["leaf7", "Vlan900"]
- address: "10.90.90.3/29"
description: leaf8 Vlan900 BGP border
interface:
node: leaf8__Vlan900
kind: InfraInterfaceVlan
interface: ["leaf8", "Vlan900"]