- 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.
164 lines
4.3 KiB
YAML
164 lines
4.3 KiB
YAML
# yaml-language-server: $schema=https://schema.infrahub.app/infrahub/schema/latest.json
|
|
---
|
|
version: "1.0"
|
|
|
|
nodes:
|
|
- name: Namespace
|
|
namespace: Ipam
|
|
label: "IP Namespace"
|
|
icon: "mdi:ip-network"
|
|
include_in_menu: true
|
|
human_friendly_id: ["name__value"]
|
|
display_label: "{{ record.name__value }}"
|
|
order_by:
|
|
- name__value
|
|
attributes:
|
|
- name: name
|
|
kind: Text
|
|
unique: true
|
|
optional: false
|
|
description: "Namespace name (e.g., Global, Tenant1)"
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
description: "Namespace description"
|
|
relationships:
|
|
- name: organization
|
|
peer: CoreOrganization
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
|
|
- name: IPPrefix
|
|
namespace: Ipam
|
|
label: "IP Prefix"
|
|
icon: "mdi:ip-network-outline"
|
|
include_in_menu: true
|
|
human_friendly_id: ["prefix__value"]
|
|
display_label: "{{ ' - '.join(filter(None, [record.prefix__value, record.description__value])) }}"
|
|
order_by:
|
|
- prefix__value
|
|
attributes:
|
|
- name: prefix
|
|
kind: IPNetwork
|
|
unique: true
|
|
optional: false
|
|
description: "IP Prefix (e.g., 10.1.0.0/24)"
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
description: "Prefix description"
|
|
- name: prefix_type
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "pool"
|
|
choices:
|
|
- name: pool
|
|
label: Pool
|
|
description: IP address pool
|
|
- name: loopback
|
|
label: Loopback
|
|
description: Loopback addresses
|
|
- name: p2p
|
|
label: Point-to-Point
|
|
description: Point-to-point links
|
|
- name: management
|
|
label: Management
|
|
description: Management network
|
|
- name: tenant
|
|
label: Tenant
|
|
description: Tenant/VLAN network
|
|
- name: vtep
|
|
label: VTEP
|
|
description: VXLAN VTEP addresses
|
|
- name: mlag
|
|
label: MLAG
|
|
description: MLAG peer links
|
|
- name: status
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "active"
|
|
choices:
|
|
- name: active
|
|
label: Active
|
|
- name: reserved
|
|
label: Reserved
|
|
- name: deprecated
|
|
label: Deprecated
|
|
relationships:
|
|
- name: namespace
|
|
peer: IpamNamespace
|
|
optional: false
|
|
cardinality: one
|
|
kind: Attribute
|
|
- name: parent
|
|
peer: IpamIPPrefix
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Parent prefix"
|
|
- name: children
|
|
peer: IpamIPPrefix
|
|
optional: true
|
|
cardinality: many
|
|
kind: Generic
|
|
description: "Child prefixes"
|
|
- name: datacenter
|
|
peer: InfraDatacenter
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Associated datacenter"
|
|
- name: vrf
|
|
peer: NetworkVRF
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
|
|
- name: IPAddress
|
|
namespace: Ipam
|
|
label: "IP Address"
|
|
icon: "mdi:ip"
|
|
include_in_menu: true
|
|
human_friendly_id: ["address__value"]
|
|
display_label: "{{ record.address__value }}"
|
|
order_by:
|
|
- address__value
|
|
attributes:
|
|
- name: address
|
|
kind: IPHost
|
|
unique: true
|
|
optional: false
|
|
description: "IP Address with mask (e.g., 10.1.0.1/32)"
|
|
- name: description
|
|
kind: Text
|
|
optional: true
|
|
description: "IP address description"
|
|
- name: status
|
|
kind: Dropdown
|
|
optional: false
|
|
default_value: "active"
|
|
choices:
|
|
- name: active
|
|
label: Active
|
|
- name: reserved
|
|
label: Reserved
|
|
- name: deprecated
|
|
label: Deprecated
|
|
relationships:
|
|
- name: prefix
|
|
peer: IpamIPPrefix
|
|
optional: false
|
|
cardinality: one
|
|
kind: Attribute
|
|
- name: interface
|
|
peer: NetworkInterface
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute
|
|
description: "Interface using this IP"
|
|
- name: vrf
|
|
peer: NetworkVRF
|
|
optional: true
|
|
cardinality: one
|
|
kind: Attribute |