Move schema files into a dedicated 'schemas' directory and update .infrahub.yml to reference them along with adding sections for schemas, generators, and queries.
222 lines
6.2 KiB
YAML
222 lines
6.2 KiB
YAML
# 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
|
|
menu_placement: "InfraDatacenter"
|
|
human_friendly_id: ["hostname__value"]
|
|
display_label: "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: OrganizationOrganization
|
|
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: "InfraDatacenter"
|
|
human_friendly_id: ["dci_switch__hostname__value", "border_leaf__hostname__value"]
|
|
display_label: "connection_name__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
|
|
identifier: dci_link__dci_interface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "DCI switch interface object"
|
|
|
|
- name: border_interface
|
|
peer: NetworkInterface
|
|
identifier: dci_link__border_interface
|
|
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" |