Move schema files into a dedicated 'schemas' directory and update .infrahub.yml to reference them along with adding sections for schemas, generators, and queries.
249 lines
6.1 KiB
YAML
249 lines
6.1 KiB
YAML
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
|
|
---
|
|
version: "1.0"
|
|
|
|
nodes:
|
|
- name: RouteMap
|
|
namespace: Network
|
|
label: "Route Map"
|
|
icon: "mdi:map-marker-path"
|
|
include_in_menu: true
|
|
menu_placement: "NetworkVRF"
|
|
human_friendly_id: ["name__value"]
|
|
display_label: "name__value"
|
|
order_by:
|
|
- name__value
|
|
attributes:
|
|
- name: name
|
|
kind: Text
|
|
unique: true
|
|
optional: false
|
|
description: "Route map name (e.g., LOOPBACK)"
|
|
|
|
- name: sequence
|
|
kind: Number
|
|
optional: false
|
|
default_value: 10
|
|
description: "Sequence number"
|
|
|
|
- name: action
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "permit"
|
|
choices:
|
|
- name: permit
|
|
label: Permit
|
|
- name: deny
|
|
label: Deny
|
|
description: "Action (permit/deny)"
|
|
|
|
relationships:
|
|
- name: devices
|
|
peer: NetworkDevice
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Devices using this route map"
|
|
|
|
- name: prefix_lists
|
|
peer: NetworkPrefixList
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Prefix lists matched by this route map"
|
|
|
|
- name: PrefixList
|
|
namespace: Network
|
|
label: "Prefix List"
|
|
icon: "mdi:format-list-numbered"
|
|
include_in_menu: true
|
|
menu_placement: "NetworkVRF"
|
|
human_friendly_id: ["name__value"]
|
|
display_label: "name__value"
|
|
order_by:
|
|
- name__value
|
|
attributes:
|
|
- name: name
|
|
kind: Text
|
|
unique: true
|
|
optional: false
|
|
description: "Prefix list name (e.g., LOOPBACK)"
|
|
|
|
- name: sequence
|
|
kind: Number
|
|
optional: false
|
|
default_value: 10
|
|
description: "Sequence number"
|
|
|
|
- name: action
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "permit"
|
|
choices:
|
|
- name: permit
|
|
label: Permit
|
|
- name: deny
|
|
label: Deny
|
|
description: "Action (permit/deny)"
|
|
|
|
- name: prefix
|
|
kind: IPNetwork
|
|
optional: false
|
|
description: "IP prefix to match"
|
|
|
|
- name: match_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "exact"
|
|
choices:
|
|
- name: exact
|
|
label: Exact Match
|
|
- name: ge
|
|
label: Greater or Equal
|
|
- name: le
|
|
label: Less or Equal
|
|
description: "Match type"
|
|
|
|
- name: greater_equal
|
|
kind: Number
|
|
optional: true
|
|
description: "Greater or equal prefix length"
|
|
|
|
- name: less_equal
|
|
kind: Number
|
|
optional: true
|
|
description: "Less or equal prefix length"
|
|
|
|
relationships:
|
|
- name: devices
|
|
peer: NetworkDevice
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Devices using this prefix list"
|
|
|
|
- name: OSPFConfig
|
|
namespace: Network
|
|
label: "OSPF Configuration"
|
|
icon: "mdi:router"
|
|
include_in_menu: true
|
|
menu_placement: "NetworkVRF"
|
|
human_friendly_id: ["device__hostname__value"]
|
|
display_label: "process_id__value"
|
|
attributes:
|
|
- name: process_id
|
|
kind: Number
|
|
optional: false
|
|
default_value: 100
|
|
description: "OSPF process ID"
|
|
|
|
- name: router_id
|
|
kind: IPHost
|
|
optional: false
|
|
description: "OSPF router ID"
|
|
|
|
- name: max_paths
|
|
kind: Number
|
|
optional: false
|
|
default_value: 3
|
|
description: "Maximum paths for ECMP"
|
|
|
|
relationships:
|
|
- name: device
|
|
peer: NetworkDevice
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
|
|
- name: areas
|
|
peer: NetworkOSPFArea
|
|
optional: true
|
|
cardinality: many
|
|
kind: Component
|
|
description: "OSPF areas"
|
|
|
|
- name: OSPFArea
|
|
namespace: Network
|
|
label: "OSPF Area"
|
|
icon: "mdi:circle-outline"
|
|
include_in_menu: true
|
|
menu_placement: "NetworkVRF"
|
|
human_friendly_id: ["area_id__value"]
|
|
display_label: "area_id__value"
|
|
attributes:
|
|
- name: area_id
|
|
kind: Text
|
|
optional: false
|
|
default_value: "0.0.0.0"
|
|
description: "OSPF area ID (e.g., 0.0.0.0)"
|
|
|
|
- name: area_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "standard"
|
|
choices:
|
|
- name: standard
|
|
label: Standard
|
|
- name: stub
|
|
label: Stub
|
|
- name: nssa
|
|
label: NSSA
|
|
description: "Area type"
|
|
|
|
relationships:
|
|
- name: ospf_config
|
|
peer: NetworkOSPFConfig
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
|
|
- name: interfaces
|
|
peer: NetworkOSPFInterface
|
|
optional: true
|
|
cardinality: many
|
|
kind: Component
|
|
description: "Interfaces in this area"
|
|
|
|
- name: OSPFInterface
|
|
namespace: Network
|
|
label: "OSPF Interface"
|
|
icon: "mdi:ethernet"
|
|
include_in_menu: true
|
|
menu_placement: "NetworkVRF"
|
|
human_friendly_id: ["identifier__value"]
|
|
display_label: "network_type__value"
|
|
attributes:
|
|
- name: identifier
|
|
kind: Text
|
|
unique: true
|
|
optional: false
|
|
description: "Unique identifier for this OSPF interface"
|
|
- name: network_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "point-to-point"
|
|
choices:
|
|
- name: point-to-point
|
|
label: Point-to-Point
|
|
- name: broadcast
|
|
label: Broadcast
|
|
description: "OSPF network type"
|
|
|
|
- name: cost
|
|
kind: Number
|
|
optional: true
|
|
description: "OSPF cost"
|
|
|
|
relationships:
|
|
- name: area
|
|
peer: NetworkOSPFArea
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
|
|
- name: interface
|
|
peer: NetworkInterface
|
|
optional: false
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Physical interface" |