290 lines
7.2 KiB
YAML
290 lines
7.2 KiB
YAML
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
|
|
---
|
|
version: "1.0"
|
|
|
|
nodes:
|
|
- name: BGPConfig
|
|
namespace: Network
|
|
label: "BGP Configuration"
|
|
icon: "mdi:routes"
|
|
include_in_menu: true
|
|
human_friendly_id: ["asn__value"]
|
|
display_label: "asn__value"
|
|
order_by:
|
|
- device__hostname__value
|
|
attributes:
|
|
- name: asn
|
|
kind: Number
|
|
optional: false
|
|
description: "BGP AS Number"
|
|
|
|
- name: router_id
|
|
kind: IPHost
|
|
optional: false
|
|
description: "BGP Router ID (usually Loopback0)"
|
|
|
|
- name: maximum_paths
|
|
kind: Number
|
|
optional: false
|
|
default_value: 3
|
|
description: "Maximum paths for ECMP"
|
|
|
|
- name: distance_external
|
|
kind: Number
|
|
optional: false
|
|
default_value: 20
|
|
description: "Administrative distance for eBGP routes"
|
|
|
|
- name: distance_internal
|
|
kind: Number
|
|
optional: false
|
|
default_value: 200
|
|
description: "Administrative distance for iBGP routes"
|
|
|
|
- name: default_ipv4_unicast
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: false
|
|
description: "Enable default IPv4 unicast address family"
|
|
|
|
- name: ebgp_admin_distance
|
|
kind: Number
|
|
optional: false
|
|
default_value: 200
|
|
description: "eBGP admin distance override"
|
|
|
|
relationships:
|
|
- name: device
|
|
peer: NetworkDevice
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
description: "Parent device"
|
|
|
|
- name: peer_groups
|
|
peer: NetworkBGPPeerGroup
|
|
optional: true
|
|
cardinality: many
|
|
kind: Component
|
|
description: "BGP peer groups"
|
|
|
|
- name: neighbors
|
|
peer: NetworkBGPNeighbor
|
|
optional: true
|
|
cardinality: many
|
|
kind: Component
|
|
description: "BGP neighbors"
|
|
|
|
- name: address_families
|
|
peer: NetworkBGPAddressFamily
|
|
optional: true
|
|
cardinality: many
|
|
kind: Component
|
|
description: "BGP address families"
|
|
|
|
- name: route_maps
|
|
peer: NetworkRouteMap
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Route maps used in BGP"
|
|
|
|
- name: prefix_lists
|
|
peer: NetworkPrefixList
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Prefix lists used in BGP"
|
|
|
|
- name: BGPPeerGroup
|
|
namespace: Network
|
|
label: "BGP Peer Group"
|
|
icon: "mdi:account-group"
|
|
include_in_menu: false
|
|
human_friendly_id: ["name__value"]
|
|
display_label: "name__value"
|
|
order_by:
|
|
- name__value
|
|
attributes:
|
|
- name: name
|
|
kind: Text
|
|
optional: false
|
|
description: "Peer group name (e.g., SPINE_Underlay)"
|
|
|
|
- name: remote_asn
|
|
kind: Number
|
|
optional: true
|
|
description: "Remote AS number (for eBGP)"
|
|
|
|
- name: send_community
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: true
|
|
description: "Send community attributes"
|
|
|
|
- name: maximum_routes
|
|
kind: Number
|
|
optional: false
|
|
default_value: 12000
|
|
description: "Maximum routes from peers"
|
|
|
|
- name: peer_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "ebgp"
|
|
choices:
|
|
- name: ebgp
|
|
label: eBGP
|
|
- name: ibgp
|
|
label: iBGP
|
|
description: "Peer type"
|
|
|
|
- name: next_hop_self
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: false
|
|
description: "Set next-hop self for routes"
|
|
|
|
relationships:
|
|
- name: bgp_config
|
|
peer: NetworkBGPConfig
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
|
|
- name: update_source
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Update source interface"
|
|
|
|
- name: neighbors
|
|
peer: NetworkBGPNeighbor
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Neighbors in this peer group"
|
|
|
|
- name: BGPNeighbor
|
|
namespace: Network
|
|
label: "BGP Neighbor"
|
|
icon: "mdi:account-network"
|
|
include_in_menu: false
|
|
human_friendly_id: ["neighbor_ip__value"]
|
|
display_label: "neighbor_ip__value"
|
|
order_by:
|
|
- neighbor_ip__value
|
|
attributes:
|
|
- name: neighbor_ip
|
|
kind: IPHost
|
|
optional: false
|
|
description: "Neighbor IP address"
|
|
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
description: "Neighbor description"
|
|
|
|
- name: enabled
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: true
|
|
description: "Neighbor enabled"
|
|
|
|
- name: peer_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "ebgp"
|
|
choices:
|
|
- name: ebgp
|
|
label: eBGP
|
|
- name: ibgp
|
|
label: iBGP
|
|
description: "Peer type"
|
|
|
|
relationships:
|
|
- name: bgp_config
|
|
peer: NetworkBGPConfig
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
|
|
- name: peer_group
|
|
peer: NetworkBGPPeerGroup
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Peer group membership"
|
|
|
|
- name: local_interface
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Local interface for session"
|
|
|
|
- name: remote_device
|
|
peer: NetworkDevice
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Remote device (if known)"
|
|
|
|
- name: BGPAddressFamily
|
|
namespace: Network
|
|
label: "BGP Address Family"
|
|
icon: "mdi:family-tree"
|
|
include_in_menu: false
|
|
human_friendly_id: ["afi__value", "safi__value"]
|
|
display_label: "afi__value"
|
|
attributes:
|
|
- name: afi
|
|
kind: Dropdown
|
|
optional: false
|
|
choices:
|
|
- name: ipv4
|
|
label: IPv4
|
|
- name: ipv6
|
|
label: IPv6
|
|
- name: l2vpn
|
|
label: L2VPN
|
|
description: "Address Family Identifier"
|
|
|
|
- name: safi
|
|
kind: Dropdown
|
|
optional: false
|
|
choices:
|
|
- name: unicast
|
|
label: Unicast
|
|
- name: multicast
|
|
label: Multicast
|
|
- name: evpn
|
|
label: EVPN
|
|
description: "Sub-Address Family Identifier"
|
|
|
|
- name: activated
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: true
|
|
description: "Address family activated"
|
|
|
|
- name: redistribute_connected
|
|
kind: Boolean
|
|
optional: false
|
|
default_value: false
|
|
description: "Redistribute connected routes"
|
|
|
|
relationships:
|
|
- name: bgp_config
|
|
peer: NetworkBGPConfig
|
|
optional: false
|
|
cardinality: one
|
|
kind: Parent
|
|
|
|
- name: route_map
|
|
peer: NetworkRouteMap
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Route map for redistribution" |