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:
@@ -174,8 +174,15 @@ nodes:
|
||||
label: VLAN-VNI Mapping
|
||||
icon: mdi--swap-horizontal
|
||||
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 device name, VLAN ID and VNI (e.g. leaf1__vlan40__vni110040)"
|
||||
- name: description
|
||||
kind: Text
|
||||
optional: true
|
||||
@@ -202,8 +209,15 @@ nodes:
|
||||
label: EVPN Instance
|
||||
icon: mdi--cloud-sync
|
||||
include_in_menu: false
|
||||
uniqueness_constraints:
|
||||
- ["local_identifier__value"]
|
||||
human_friendly_id:
|
||||
- local_identifier__value
|
||||
display_label: "{{ route_distinguisher__value }}"
|
||||
attributes:
|
||||
- name: local_identifier
|
||||
kind: Text
|
||||
description: "Unique identifier combining device name and VLAN ID (e.g. leaf1__vlan40)"
|
||||
- name: route_distinguisher
|
||||
kind: Text
|
||||
description: "Route Distinguisher (format: ASN:VNI or IP:VNI)"
|
||||
|
||||
Reference in New Issue
Block a user