Add models for VLAN, VNI, VTEP, VLAN-VNI mappings, and EVPN instances. Supports L2VNI and L3VNI types for EVPN-VXLAN fabric. Ref: #41
205 lines
5.7 KiB
YAML
205 lines
5.7 KiB
YAML
# VLAN and VXLAN Schema for EVPN-VXLAN Fabric
|
|
# Defines VLAN, VNI mappings, and VTEP configuration
|
|
---
|
|
version: "1.0"
|
|
nodes:
|
|
# =============================================================================
|
|
# VLAN
|
|
# =============================================================================
|
|
- name: VLAN
|
|
namespace: Infra
|
|
description: Virtual LAN configuration
|
|
label: VLAN
|
|
icon: mdi--lan-connect
|
|
default_filter: vlan_id__value
|
|
order_by:
|
|
- vlan_id__value
|
|
display_labels:
|
|
- vlan_id__value
|
|
- name__value
|
|
attributes:
|
|
- name: vlan_id
|
|
kind: Number
|
|
description: VLAN ID (1-4094)
|
|
- name: name
|
|
kind: Text
|
|
description: VLAN name
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
- name: status
|
|
kind: Dropdown
|
|
default_value: active
|
|
choices:
|
|
- name: active
|
|
label: Active
|
|
color: "#22c55e"
|
|
- name: reserved
|
|
label: Reserved
|
|
color: "#3b82f6"
|
|
- name: deprecated
|
|
label: Deprecated
|
|
color: "#ef4444"
|
|
- name: vlan_type
|
|
kind: Dropdown
|
|
default_value: standard
|
|
choices:
|
|
- name: standard
|
|
label: Standard
|
|
- name: mlag_peer
|
|
label: MLAG Peer
|
|
- name: mlag_ibgp
|
|
label: MLAG iBGP
|
|
description: VLAN purpose
|
|
relationships:
|
|
- name: vni
|
|
peer: InfraVNI
|
|
cardinality: one
|
|
optional: true
|
|
description: Associated L2VNI for VXLAN
|
|
- name: site
|
|
peer: LocationSite
|
|
cardinality: one
|
|
optional: true
|
|
|
|
# =============================================================================
|
|
# VNI (VXLAN Network Identifier)
|
|
# =============================================================================
|
|
- name: VNI
|
|
namespace: Infra
|
|
description: VXLAN Network Identifier
|
|
label: VNI
|
|
icon: mdi--tunnel-outline
|
|
default_filter: vni__value
|
|
order_by:
|
|
- vni__value
|
|
display_labels:
|
|
- vni__value
|
|
attributes:
|
|
- name: vni
|
|
kind: Number
|
|
unique: true
|
|
description: VNI value (1-16777215)
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
- name: vni_type
|
|
kind: Dropdown
|
|
default_value: l2vni
|
|
choices:
|
|
- name: l2vni
|
|
label: L2 VNI
|
|
color: "#3b82f6"
|
|
- name: l3vni
|
|
label: L3 VNI
|
|
color: "#22c55e"
|
|
description: VNI type for EVPN
|
|
relationships:
|
|
- name: vlan
|
|
peer: InfraVLAN
|
|
cardinality: one
|
|
optional: true
|
|
description: Associated VLAN for L2VNI
|
|
- name: vrf
|
|
peer: InfraVRF
|
|
cardinality: one
|
|
optional: true
|
|
description: Associated VRF for L3VNI
|
|
|
|
# =============================================================================
|
|
# VTEP (VXLAN Tunnel Endpoint)
|
|
# =============================================================================
|
|
- name: VTEP
|
|
namespace: Infra
|
|
description: VXLAN Tunnel Endpoint configuration
|
|
label: VTEP
|
|
icon: mdi--server-network-outline
|
|
default_filter: source_address__value
|
|
display_labels:
|
|
- device__name__value
|
|
attributes:
|
|
- name: source_address
|
|
kind: IPHost
|
|
description: VTEP source IP (typically from Loopback1)
|
|
- name: udp_port
|
|
kind: Number
|
|
default_value: 4789
|
|
- name: learn_restrict
|
|
kind: Dropdown
|
|
default_value: any
|
|
choices:
|
|
- name: any
|
|
label: Any
|
|
- name: flood
|
|
label: Flood
|
|
description: MAC learning restriction mode
|
|
relationships:
|
|
- name: device
|
|
peer: InfraDevice
|
|
cardinality: one
|
|
kind: Parent
|
|
- name: source_interface
|
|
peer: InfraInterfaceLoopback
|
|
cardinality: one
|
|
description: Source interface for VTEP
|
|
- name: vlan_vni_mappings
|
|
peer: InfraVlanVniMapping
|
|
cardinality: many
|
|
kind: Component
|
|
|
|
# =============================================================================
|
|
# VLAN to VNI Mapping (per-device)
|
|
# =============================================================================
|
|
- name: VlanVniMapping
|
|
namespace: Infra
|
|
description: VLAN to VNI mapping on a VTEP
|
|
label: VLAN-VNI Mapping
|
|
icon: mdi--swap-horizontal
|
|
display_labels:
|
|
- vlan__vlan_id__value
|
|
- vni__vni__value
|
|
relationships:
|
|
- name: vtep
|
|
peer: InfraVTEP
|
|
cardinality: one
|
|
kind: Parent
|
|
- name: vlan
|
|
peer: InfraVLAN
|
|
cardinality: one
|
|
- name: vni
|
|
peer: InfraVNI
|
|
cardinality: one
|
|
|
|
# =============================================================================
|
|
# EVPN Instance (per VLAN)
|
|
# =============================================================================
|
|
- name: EVPNInstance
|
|
namespace: Infra
|
|
description: EVPN instance configuration (route targets for L2 extension)
|
|
label: EVPN Instance
|
|
icon: mdi--cloud-sync
|
|
default_filter: vlan__vlan_id__value
|
|
display_labels:
|
|
- vlan__vlan_id__value
|
|
attributes:
|
|
- name: rd
|
|
kind: Text
|
|
description: "Route Distinguisher (format: ASN:VNI or IP:VNI)"
|
|
- name: route_target_import
|
|
kind: Text
|
|
description: "Import Route Target (format: VNI:VNI)"
|
|
- name: route_target_export
|
|
kind: Text
|
|
description: "Export Route Target (format: VNI:VNI)"
|
|
- name: redistribute_learned
|
|
kind: Boolean
|
|
default_value: true
|
|
relationships:
|
|
- name: vlan
|
|
peer: InfraVLAN
|
|
cardinality: one
|
|
- name: device
|
|
peer: InfraDevice
|
|
cardinality: one
|
|
kind: Parent
|