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.
This commit is contained in:
151
infrahub/schema/08_mlag_evpn_vxlan.yml
Normal file
151
infrahub/schema/08_mlag_evpn_vxlan.yml
Normal file
@@ -0,0 +1,151 @@
|
||||
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
|
||||
---
|
||||
version: "1.0"
|
||||
|
||||
nodes:
|
||||
- name: MLAGDomain
|
||||
namespace: Network
|
||||
label: "MLAG Domain"
|
||||
icon: "mdi:link-variant"
|
||||
include_in_menu: true
|
||||
human_friendly_id: ["domain_id__value"]
|
||||
display_label: "{{ ' - '.join(filter(None, [record.domain_id__value, record.status__value])) }}"
|
||||
order_by:
|
||||
- domain_id__value
|
||||
attributes:
|
||||
- name: domain_id
|
||||
kind: Text
|
||||
unique: true
|
||||
optional: false
|
||||
description: "MLAG domain identifier (e.g., MLAG-leaf1-2)"
|
||||
|
||||
- name: local_interface
|
||||
kind: Text
|
||||
optional: false
|
||||
default_value: "Vlan4094"
|
||||
description: "Local interface for MLAG peer link"
|
||||
|
||||
- name: peer_interface
|
||||
kind: Text
|
||||
optional: false
|
||||
default_value: "Vlan4094"
|
||||
description: "Peer interface for MLAG peer link"
|
||||
|
||||
- name: peer_address
|
||||
kind: IPHost
|
||||
optional: false
|
||||
description: "Peer IP address for MLAG link"
|
||||
|
||||
- name: status
|
||||
kind: Dropdown
|
||||
optional: false
|
||||
default_value: "active"
|
||||
choices:
|
||||
- name: active
|
||||
label: Active
|
||||
- name: inactive
|
||||
label: Inactive
|
||||
description: "MLAG domain status"
|
||||
|
||||
relationships:
|
||||
- name: devices
|
||||
peer: NetworkDevice
|
||||
optional: true
|
||||
cardinality: many
|
||||
kind: Generic
|
||||
description: "Devices in this MLAG domain"
|
||||
|
||||
- name: interfaces
|
||||
peer: NetworkMLAGInterface
|
||||
optional: true
|
||||
cardinality: many
|
||||
kind: Component
|
||||
description: "MLAG-enabled interfaces"
|
||||
|
||||
- name: MLAGInterface
|
||||
namespace: Network
|
||||
label: "MLAG Interface"
|
||||
icon: "mdi:ethernet-plus"
|
||||
include_in_menu: false
|
||||
human_friendly_id: ["interface__device__hostname__value", "interface__name__value"]
|
||||
display_label: "{{ ' - '.join(filter(None, [record.interface__device__hostname__value, record.interface__name__value])) }}"
|
||||
attributes:
|
||||
- name: mlag_id
|
||||
kind: Number
|
||||
optional: false
|
||||
description: "MLAG interface ID"
|
||||
|
||||
relationships:
|
||||
- name: mlag_domain
|
||||
peer: NetworkMLAGDomain
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Parent
|
||||
|
||||
- name: interface
|
||||
peer: NetworkInterface
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "Physical interface"
|
||||
|
||||
- name: EVPNConfig
|
||||
namespace: Network
|
||||
label: "EVPN Configuration"
|
||||
icon: "mdi:wan"
|
||||
include_in_menu: false
|
||||
human_friendly_id: ["device__hostname__value"]
|
||||
display_label: "{{ record.device__hostname__value }}"
|
||||
attributes:
|
||||
- name: vni_auto
|
||||
kind: Boolean
|
||||
optional: false
|
||||
default_value: true
|
||||
description: "Automatically generate VNIs"
|
||||
|
||||
relationships:
|
||||
- name: device
|
||||
peer: NetworkDevice
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Parent
|
||||
|
||||
- name: VXLANTunnel
|
||||
namespace: Network
|
||||
label: "VXLAN Tunnel"
|
||||
icon: "mdi:tunnel"
|
||||
include_in_menu: true
|
||||
human_friendly_id: ["name__value"]
|
||||
display_label: "{{ record.name__value }}"
|
||||
attributes:
|
||||
- name: name
|
||||
kind: Text
|
||||
unique: true
|
||||
optional: false
|
||||
default_value: "Vxlan1"
|
||||
description: "VXLAN tunnel interface name"
|
||||
|
||||
- name: source_ip
|
||||
kind: IPHost
|
||||
optional: false
|
||||
description: "Source IP for VXLAN tunnel (Loopback1)"
|
||||
|
||||
- name: udp_port
|
||||
kind: Number
|
||||
optional: false
|
||||
default_value: 4789
|
||||
description: "VXLAN UDP port"
|
||||
|
||||
relationships:
|
||||
- name: device
|
||||
peer: NetworkDevice
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Parent
|
||||
|
||||
- name: vlans
|
||||
peer: NetworkVLAN
|
||||
optional: true
|
||||
cardinality: many
|
||||
kind: Generic
|
||||
description: "VLANs mapped to this VXLAN tunnel"
|
||||
Reference in New Issue
Block a user