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:
219
infrahub/schema/10_dci.yml
Normal file
219
infrahub/schema/10_dci.yml
Normal file
@@ -0,0 +1,219 @@
|
||||
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
|
||||
---
|
||||
version: "1.0"
|
||||
|
||||
nodes:
|
||||
- name: DCISwitch
|
||||
namespace: Network
|
||||
label: "DCI Interconnect Switch"
|
||||
icon: "mdi:transit-connection-variant"
|
||||
include_in_menu: true
|
||||
human_friendly_id: ["hostname__value"]
|
||||
display_label: "{{ record.hostname__value }}"
|
||||
order_by:
|
||||
- hostname__value
|
||||
description: "DCI switch connects multiple datacenters - NOT auto-generated, manually configured"
|
||||
attributes:
|
||||
- name: hostname
|
||||
kind: Text
|
||||
unique: true
|
||||
optional: false
|
||||
description: "DCI switch hostname (e.g., DCI)"
|
||||
|
||||
- name: description
|
||||
kind: Text
|
||||
optional: true
|
||||
default_value: "DCI Interconnect Switch"
|
||||
description: "DCI switch description"
|
||||
|
||||
- name: platform
|
||||
kind: Text
|
||||
optional: false
|
||||
default_value: "cEOS"
|
||||
description: "Device platform"
|
||||
|
||||
- name: eos_version
|
||||
kind: Text
|
||||
optional: true
|
||||
description: "EOS software version"
|
||||
|
||||
- name: serial_number
|
||||
kind: Text
|
||||
optional: true
|
||||
unique: true
|
||||
description: "Device serial number"
|
||||
|
||||
- name: management_ip
|
||||
kind: IPHost
|
||||
optional: true
|
||||
description: "Management IP address (e.g., 10.255.0.253)"
|
||||
|
||||
- name: loopback0_ip
|
||||
kind: IPHost
|
||||
optional: false
|
||||
description: "Loopback0 IP for BGP router-id (e.g., 10.253.0.1/32)"
|
||||
|
||||
- name: status
|
||||
kind: Dropdown
|
||||
optional: false
|
||||
default_value: "active"
|
||||
choices:
|
||||
- name: active
|
||||
label: Active
|
||||
color: "#7fbf7f"
|
||||
- name: planned
|
||||
label: Planned
|
||||
color: "#ffd966"
|
||||
- name: maintenance
|
||||
label: Maintenance
|
||||
color: "#ff9999"
|
||||
- name: decommissioned
|
||||
label: Decommissioned
|
||||
color: "#cccccc"
|
||||
|
||||
relationships:
|
||||
- name: organization
|
||||
peer: CoreOrganization
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "Parent organization"
|
||||
|
||||
- name: connected_datacenters
|
||||
peer: InfraDatacenter
|
||||
optional: true
|
||||
cardinality: many
|
||||
kind: Generic
|
||||
description: "Datacenters interconnected by this DCI switch"
|
||||
|
||||
- name: interfaces
|
||||
peer: NetworkInterface
|
||||
optional: true
|
||||
cardinality: many
|
||||
kind: Component
|
||||
description: "DCI switch interfaces"
|
||||
|
||||
- name: bgp_config
|
||||
peer: NetworkBGPConfig
|
||||
optional: true
|
||||
cardinality: one
|
||||
kind: Component
|
||||
description: "BGP configuration for DCI"
|
||||
|
||||
- name: dci_connections
|
||||
peer: NetworkDCIConnection
|
||||
optional: true
|
||||
cardinality: many
|
||||
kind: Component
|
||||
description: "DCI connections to border leafs"
|
||||
|
||||
- name: DCIConnection
|
||||
namespace: Network
|
||||
label: "DCI Connection"
|
||||
icon: "mdi:cable-data"
|
||||
include_in_menu: true
|
||||
menu_placement: "NetworkDCISwitch"
|
||||
human_friendly_id: ["dci_switch__hostname__value", "border_leaf__hostname__value"]
|
||||
display_label: "{{ ' - '.join(filter(None, [record.dci_switch__hostname__value, record.border_leaf__hostname__value, record.status__value])) }}"
|
||||
order_by:
|
||||
- dci_switch__hostname__value
|
||||
description: "Represents a P2P connection between DCI switch and a border leaf"
|
||||
attributes:
|
||||
- name: connection_name
|
||||
kind: Text
|
||||
optional: true
|
||||
description: "Connection identifier (e.g., DCI-to-borderleaf1-DC1)"
|
||||
|
||||
- name: status
|
||||
kind: Dropdown
|
||||
optional: false
|
||||
default_value: "shutdown"
|
||||
choices:
|
||||
- name: active
|
||||
label: Active
|
||||
description: "Connection is enabled and operational"
|
||||
color: "#7fbf7f"
|
||||
- name: shutdown
|
||||
label: Shutdown
|
||||
description: "Connection administratively disabled"
|
||||
color: "#cccccc"
|
||||
- name: maintenance
|
||||
label: Maintenance
|
||||
description: "Connection under maintenance"
|
||||
color: "#ff9999"
|
||||
description: "Connection operational status (shutdown until dci_enabled=true)"
|
||||
|
||||
- name: dci_interface_name
|
||||
kind: Text
|
||||
optional: false
|
||||
description: "DCI switch interface (e.g., Ethernet1)"
|
||||
|
||||
- name: border_interface_name
|
||||
kind: Text
|
||||
optional: false
|
||||
default_value: "Ethernet12"
|
||||
description: "Border leaf interface (always Ethernet12)"
|
||||
|
||||
- name: dci_ip
|
||||
kind: IPHost
|
||||
optional: false
|
||||
description: "DCI side IP address (e.g., 10.254.0.1/31)"
|
||||
|
||||
- name: border_ip
|
||||
kind: IPHost
|
||||
optional: false
|
||||
description: "Border leaf side IP address (e.g., 10.254.0.0/31)"
|
||||
|
||||
- name: subnet
|
||||
kind: IPNetwork
|
||||
optional: false
|
||||
description: "P2P subnet (e.g., 10.254.0.0/31)"
|
||||
|
||||
- name: mtu
|
||||
kind: Number
|
||||
optional: false
|
||||
default_value: 9214
|
||||
description: "Interface MTU"
|
||||
|
||||
relationships:
|
||||
- name: dci_switch
|
||||
peer: NetworkDCISwitch
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Parent
|
||||
description: "Parent DCI switch"
|
||||
|
||||
- name: border_leaf
|
||||
peer: NetworkDevice
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "Connected border leaf device"
|
||||
|
||||
- name: datacenter
|
||||
peer: InfraDatacenter
|
||||
optional: false
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "Datacenter of the border leaf"
|
||||
|
||||
- name: dci_interface
|
||||
peer: NetworkInterface
|
||||
optional: true
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "DCI switch interface object"
|
||||
|
||||
- name: border_interface
|
||||
peer: NetworkInterface
|
||||
optional: true
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "Border leaf interface object (eth12)"
|
||||
|
||||
- name: bgp_session
|
||||
peer: NetworkBGPNeighbor
|
||||
optional: true
|
||||
cardinality: one
|
||||
kind: Attribute
|
||||
description: "BGP session for this connection"
|
||||
Reference in New Issue
Block a user