fix: add human_friendly_id to 4 schemas for idempotent Repository sync
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>
This commit is contained in:
@@ -114,8 +114,15 @@ nodes:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user