Add local_identifier attribute (kind: Text) + uniqueness_constraints + human_friendly_id to InfraVlanVniMapping, InfraEVPNInstance, InfraMlagInterface and InfraUnderlayLink so Infrahub can perform upserts during Repository backend sync instead of duplicating objects on every import. Schema changes (following the InfraBGPPeerGroup/BGPSession pattern): - infrahub/schemas/vlan_vxlan.yml: VlanVniMapping + EVPNInstance - infrahub/schemas/mlag.yml: MlagInterface - infrahub/schemas/extensions.yml: UnderlayLink Object file updates: - 06-vlans-vxlan.yml: local_identifier added to all VlanVniMapping and EVPNInstance entries (format: leaf1__vlan40__vni110040 / leaf1__vlan40) - 12-mlag.yml: InfraMlagInterface section added for all 4 MLAG pairs (format: mlag1__leaf1-leaf2) - 14-fabric-links.yml: InfraUnderlayLink section added for all 16 spine↔leaf P2P links (format: spine1-eth1__leaf1-eth11) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
149 lines
4.5 KiB
YAML
149 lines
4.5 KiB
YAML
# 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: IPHost
|
|
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
|
|
uniqueness_constraints:
|
|
- ["local_identifier__value"]
|
|
human_friendly_id:
|
|
- local_identifier__value
|
|
display_label: "{{ mlag_id__value }}"
|
|
attributes:
|
|
- name: local_identifier
|
|
kind: Text
|
|
description: "Unique identifier combining mlag_id and peer devices (e.g. mlag1__leaf1-leaf2)"
|
|
- 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
|