- 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.
211 lines
5.5 KiB
YAML
211 lines
5.5 KiB
YAML
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
|
|
---
|
|
version: "1.0"
|
|
|
|
nodes:
|
|
- name: Interface
|
|
namespace: Network
|
|
label: "Interface"
|
|
icon: "mdi:ethernet"
|
|
include_in_menu: true
|
|
human_friendly_id: ["device__hostname__value", "name__value"]
|
|
display_label: "{{ ' - '.join(filter(None, [record.name__value, record.description__value])) }}"
|
|
order_by:
|
|
- device__hostname__value
|
|
- name__value
|
|
uniqueness_constraints:
|
|
- ["device", "name__value"]
|
|
attributes:
|
|
- name: name
|
|
kind: Text
|
|
optional: false
|
|
description: "Interface name (e.g., Ethernet1, Loopback0)"
|
|
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
description: "Interface description"
|
|
|
|
- name: interface_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "ethernet"
|
|
choices:
|
|
- name: ethernet
|
|
label: Ethernet
|
|
description: "Physical Ethernet interface"
|
|
- name: loopback
|
|
label: Loopback
|
|
description: "Loopback interface"
|
|
- name: port_channel
|
|
label: Port-Channel
|
|
description: "Link aggregation group"
|
|
- name: vlan
|
|
label: VLAN (SVI)
|
|
description: "VLAN interface"
|
|
- name: vxlan
|
|
label: VXLAN
|
|
description: "VXLAN tunnel interface"
|
|
- name: management
|
|
label: Management
|
|
description: "Management interface"
|
|
|
|
- name: enabled
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: true
|
|
description: "Interface administrative status"
|
|
|
|
- name: mtu
|
|
kind: Number
|
|
optional: true
|
|
default_value: 9214
|
|
description: "Interface MTU"
|
|
|
|
- name: speed
|
|
kind: Dropdown
|
|
optional: true
|
|
choices:
|
|
- name: 1g
|
|
label: 1 Gbps
|
|
- name: 10g
|
|
label: 10 Gbps
|
|
- name: 25g
|
|
label: 25 Gbps
|
|
- name: 40g
|
|
label: 40 Gbps
|
|
- name: 100g
|
|
label: 100 Gbps
|
|
description: "Interface speed"
|
|
|
|
# Layer 2 Attributes
|
|
- name: switchport_mode
|
|
kind: Dropdown
|
|
optional: true
|
|
choices:
|
|
- name: access
|
|
label: Access
|
|
- name: trunk
|
|
label: Trunk
|
|
- name: routed
|
|
label: Routed (no switchport)
|
|
description: "Switchport mode"
|
|
|
|
- name: trunk_groups
|
|
kind: Text
|
|
optional: true
|
|
description: "Trunk groups (comma-separated)"
|
|
|
|
# Layer 3 Attributes
|
|
- name: ip_unnumbered
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: false
|
|
description: "Use IP unnumbered"
|
|
|
|
# Port-Channel Attributes
|
|
- name: channel_id
|
|
kind: Number
|
|
optional: true
|
|
description: "Port-channel ID"
|
|
|
|
- name: lacp_mode
|
|
kind: Dropdown
|
|
optional: true
|
|
choices:
|
|
- name: active
|
|
label: Active
|
|
- name: passive
|
|
label: Passive
|
|
- name: on
|
|
label: On (no LACP)
|
|
description: "LACP mode for port-channel"
|
|
|
|
# Loopback Attributes
|
|
- name: loopback_id
|
|
kind: Number
|
|
optional: true
|
|
description: "Loopback interface ID (0, 1, etc.)"
|
|
|
|
- name: loopback_purpose
|
|
kind: Dropdown
|
|
optional: true
|
|
choices:
|
|
- name: router_id
|
|
label: Router ID (Loopback0)
|
|
- name: vtep
|
|
label: VTEP (Loopback1)
|
|
- name: other
|
|
label: Other
|
|
description: "Loopback purpose"
|
|
|
|
relationships:
|
|
- name: device
|
|
peer: NetworkDevice
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
description: "Parent device"
|
|
|
|
- name: ip_addresses
|
|
peer: IpamIPAddress
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "IP addresses assigned to interface"
|
|
|
|
- name: unnumbered_source
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Source interface for IP unnumbered"
|
|
|
|
- name: allowed_vlans
|
|
peer: NetworkVLAN
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "VLANs allowed on trunk"
|
|
|
|
- name: port_channel
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Parent port-channel"
|
|
|
|
- name: member_interfaces
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Member interfaces (for port-channel)"
|
|
|
|
- name: connected_to
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Remote interface connection"
|
|
|
|
- name: mlag_config
|
|
peer: NetworkMLAGInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Component
|
|
description: "MLAG interface configuration"
|
|
|
|
- name: bgp_sessions
|
|
peer: NetworkBGPNeighbor
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "BGP sessions on this interface"
|
|
|
|
- name: ospf_config
|
|
peer: NetworkOSPFInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Component
|
|
description: "OSPF interface configuration" |