Files
infra-clab-pipeline/infrahub/schema/06_vlan_vrfs.yml
darnodo d93a9e5c29 Add network schema for devices, interfaces, VLANs, VRFs, BGP configurations, MLAG, EVPN, VXLAN, routing policies, and DCI connections
- Created device schema with attributes for hostname, role, platform, and management IP.
- Added interface schema with various types, MTU, speed, and switchport modes.
- Introduced VLAN and VRF schemas with relationships to devices and interfaces.
- Implemented BGP configuration, peer groups, and neighbors with detailed attributes.
- Established MLAG domain and interface schemas for multi-chassis link aggregation.
- Developed EVPN and VXLAN schemas for overlay networking.
- Created routing policy schemas including route maps and prefix lists.
- Added DCI switch and connection schemas for inter-datacenter connectivity.
2025-11-12 11:32:26 +01:00

146 lines
3.6 KiB
YAML

# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
---
version: "1.0"
nodes:
- name: VLAN
namespace: Network
label: "VLAN"
icon: "mdi:lan"
include_in_menu: true
human_friendly_id: ["vlan_id__value", "name__value"]
display_label: "{{ ' - '.join(filter(None, [record.vlan_id__value, record.name__value])) }}"
order_by:
- vlan_id__value
attributes:
- name: vlan_id
kind: Number
optional: false
description: "VLAN ID (1-4094)"
- name: name
kind: Text
optional: false
description: "VLAN name"
- name: description
kind: Text
optional: true
description: "VLAN description"
- name: trunk_groups
kind: Text
optional: true
description: "Trunk groups (comma-separated, e.g., MLAGPEER)"
- name: status
kind: Dropdown
optional: false
default_value: "active"
choices:
- name: active
label: Active
- name: suspended
label: Suspended
description: "VLAN status"
relationships:
- name: devices
peer: NetworkDevice
optional: true
cardinality: many
kind: Generic
description: "Devices with this VLAN"
- name: interfaces
peer: NetworkInterface
optional: true
cardinality: many
kind: Generic
description: "Interfaces with this VLAN"
- name: svi
peer: NetworkInterface
optional: true
cardinality: one
kind: Attribute
description: "SVI interface for this VLAN"
- name: vrf
peer: NetworkVRF
optional: true
cardinality: one
kind: Attribute
description: "VRF for this VLAN"
- name: vxlan_tunnel
peer: NetworkVXLANTunnel
optional: true
cardinality: one
kind: Attribute
description: "VXLAN tunnel mapping"
- name: VRF
namespace: Network
label: "VRF"
icon: "mdi:router-network"
include_in_menu: true
human_friendly_id: ["name__value"]
display_label: "{{ record.name__value }}"
order_by:
- name__value
attributes:
- name: name
kind: Text
unique: true
optional: false
description: "VRF name (e.g., default, tenant1)"
- name: description
kind: Text
optional: true
description: "VRF description"
- name: route_distinguisher
kind: Text
optional: true
description: "Route Distinguisher (e.g., 65001:100)"
- name: rt_import
kind: Text
optional: true
description: "Route Target Import (comma-separated)"
- name: rt_export
kind: Text
optional: true
description: "Route Target Export (comma-separated)"
relationships:
- name: devices
peer: NetworkDevice
optional: true
cardinality: many
kind: Generic
description: "Devices with this VRF"
- name: interfaces
peer: NetworkInterface
optional: true
cardinality: many
kind: Generic
description: "Interfaces in this VRF"
- name: ip_prefixes
peer: IpamIPPrefix
optional: true
cardinality: many
kind: Generic
description: "IP prefixes in this VRF"
- name: vlans
peer: NetworkVLAN
optional: true
cardinality: many
kind: Generic
description: "VLANs in this VRF"