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>
179 lines
5.2 KiB
YAML
179 lines
5.2 KiB
YAML
# 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
|
|
identifier: fabric__sites
|
|
cardinality: many
|
|
optional: true
|
|
- name: devices
|
|
peer: InfraDevice
|
|
identifier: fabric__devices
|
|
cardinality: many
|
|
kind: Generic
|
|
description: Devices in this fabric
|
|
|
|
# ================================================================
|
|
# 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
|
|
uniqueness_constraints:
|
|
- ["local_identifier__value"]
|
|
human_friendly_id:
|
|
- local_identifier__value
|
|
display_label: "{{ description__value }}"
|
|
attributes:
|
|
- name: local_identifier
|
|
kind: Text
|
|
description: "Unique identifier combining local and remote device/interface (e.g. spine1-eth1__leaf1-eth11)"
|
|
- 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
|