Add IPAM foundation objects and schemas
Add device model, supernet prefixes, and ASN number pool for IPAM foundation Add IP prefix and address schemas with resource manager support Add device model schema with port specifications Add site IP prefix relationships and fabric device model relationships
This commit is contained in:
@@ -4,6 +4,7 @@ schemas:
|
|||||||
menus:
|
menus:
|
||||||
- infrahub/menus
|
- infrahub/menus
|
||||||
objects:
|
objects:
|
||||||
|
- infrahub/objects/00-ipam-foundation.yml
|
||||||
- infrahub/objects/01-foundation.yml
|
- infrahub/objects/01-foundation.yml
|
||||||
- infrahub/objects/02-fabric.yml
|
- infrahub/objects/02-fabric.yml
|
||||||
- infrahub/objects/03-devices.yml
|
- infrahub/objects/03-devices.yml
|
||||||
|
|||||||
53
infrahub/objects/00-ipam-foundation.yml
Normal file
53
infrahub/objects/00-ipam-foundation.yml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# IPAM Foundation Objects
|
||||||
|
# Must be loaded BEFORE 01-foundation.yml
|
||||||
|
# Contains: device model, supernet prefixes, ASN number pool
|
||||||
|
---
|
||||||
|
|
||||||
|
# ================================================================
|
||||||
|
# Device Model
|
||||||
|
# ================================================================
|
||||||
|
- kind: InfraDeviceModel
|
||||||
|
data:
|
||||||
|
name:
|
||||||
|
value: "7050SX3-48YC12"
|
||||||
|
description:
|
||||||
|
value: "Arista 7050SX3-48YC12 — 48x 25G SFP28 + 12x 100G QSFP100"
|
||||||
|
manufacturer:
|
||||||
|
value: "Arista"
|
||||||
|
host_port_count:
|
||||||
|
value: 48
|
||||||
|
fabric_port_count:
|
||||||
|
value: 12
|
||||||
|
|
||||||
|
# ================================================================
|
||||||
|
# Supernet Prefixes
|
||||||
|
# ================================================================
|
||||||
|
- kind: IpamIPPrefix
|
||||||
|
data:
|
||||||
|
prefix:
|
||||||
|
value: "10.0.0.0/8"
|
||||||
|
description:
|
||||||
|
value: "Infrastructure supernet — loopbacks, underlay, MLAG"
|
||||||
|
|
||||||
|
- kind: IpamIPPrefix
|
||||||
|
data:
|
||||||
|
prefix:
|
||||||
|
value: "172.16.0.0/12"
|
||||||
|
description:
|
||||||
|
value: "Services supernet — L2/L3 VXLAN user subnets"
|
||||||
|
|
||||||
|
# ================================================================
|
||||||
|
# ASN Number Pool
|
||||||
|
# ================================================================
|
||||||
|
- kind: CoreNumberPool
|
||||||
|
data:
|
||||||
|
name:
|
||||||
|
value: "leaf-asn-pool"
|
||||||
|
description:
|
||||||
|
value: "ASN pool for leaf MLAG pairs (65001-65099)"
|
||||||
|
start_range:
|
||||||
|
value: 65001
|
||||||
|
end_range:
|
||||||
|
value: 65099
|
||||||
|
node: InfraAutonomousSystem
|
||||||
|
node_attribute: asn
|
||||||
@@ -75,6 +75,18 @@ nodes:
|
|||||||
cardinality: many
|
cardinality: many
|
||||||
kind: Generic
|
kind: Generic
|
||||||
description: Fabrics deployed at this site
|
description: Fabrics deployed at this site
|
||||||
|
- name: infra_prefix
|
||||||
|
peer: IpamIPPrefix
|
||||||
|
identifier: site__infra_prefix
|
||||||
|
cardinality: one
|
||||||
|
optional: true
|
||||||
|
description: "Infrastructure IP prefix for this site"
|
||||||
|
- name: services_prefix
|
||||||
|
peer: IpamIPPrefix
|
||||||
|
identifier: site__services_prefix
|
||||||
|
cardinality: one
|
||||||
|
optional: true
|
||||||
|
description: "Services IP prefix for this site"
|
||||||
|
|
||||||
# ================================================================
|
# ================================================================
|
||||||
# Platform
|
# Platform
|
||||||
@@ -184,6 +196,11 @@ nodes:
|
|||||||
cardinality: one
|
cardinality: one
|
||||||
optional: true
|
optional: true
|
||||||
description: Fabric this device belongs to
|
description: Fabric this device belongs to
|
||||||
|
- name: model
|
||||||
|
peer: InfraDeviceModel
|
||||||
|
cardinality: one
|
||||||
|
optional: true
|
||||||
|
description: Hardware device model
|
||||||
|
|
||||||
# ================================================================
|
# ================================================================
|
||||||
# Interface Types (inherit from InfraInterface generic)
|
# Interface Types (inherit from InfraInterface generic)
|
||||||
|
|||||||
34
infrahub/schemas/device_model.yml
Normal file
34
infrahub/schemas/device_model.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Device Model Schema for EVPN-VXLAN Fabric
|
||||||
|
# Hardware platform definitions with port specifications
|
||||||
|
---
|
||||||
|
version: "1.0"
|
||||||
|
nodes:
|
||||||
|
# ================================================================
|
||||||
|
# Device Model
|
||||||
|
# ================================================================
|
||||||
|
- name: DeviceModel
|
||||||
|
namespace: Infra
|
||||||
|
description: Hardware device model with port specifications
|
||||||
|
label: Device Model
|
||||||
|
icon: mdi--chip
|
||||||
|
include_in_menu: false
|
||||||
|
human_friendly_id:
|
||||||
|
- name__value
|
||||||
|
display_label: "{{ name__value }}"
|
||||||
|
attributes:
|
||||||
|
- name: name
|
||||||
|
kind: Text
|
||||||
|
unique: true
|
||||||
|
description: "Model name (e.g., 7050SX3-48YC12)"
|
||||||
|
- name: description
|
||||||
|
kind: Text
|
||||||
|
optional: true
|
||||||
|
- name: manufacturer
|
||||||
|
kind: Text
|
||||||
|
description: "Manufacturer name (e.g., Arista)"
|
||||||
|
- name: host_port_count
|
||||||
|
kind: Number
|
||||||
|
description: "Number of host-facing ports (e.g., 48 for 25G SFP28 bank)"
|
||||||
|
- name: fabric_port_count
|
||||||
|
kind: Number
|
||||||
|
description: "Number of fabric ports (e.g., 12 for 100G QSFP100 bank)"
|
||||||
@@ -47,6 +47,17 @@ nodes:
|
|||||||
kind: Text
|
kind: Text
|
||||||
optional: true
|
optional: true
|
||||||
description: "Shared MAC for anycast gateway (format: xxxx.xxxx.xxxx)"
|
description: "Shared MAC for anycast gateway (format: xxxx.xxxx.xxxx)"
|
||||||
|
- name: spine_count
|
||||||
|
kind: Number
|
||||||
|
optional: true
|
||||||
|
description: "Number of spines (2-4)"
|
||||||
|
- name: leaf_pair_count
|
||||||
|
kind: Number
|
||||||
|
optional: true
|
||||||
|
description: "Number of MLAG leaf pairs"
|
||||||
|
- name: mtu
|
||||||
|
kind: Number
|
||||||
|
default_value: 9214
|
||||||
relationships:
|
relationships:
|
||||||
- name: spine_asn
|
- name: spine_asn
|
||||||
peer: InfraAutonomousSystem
|
peer: InfraAutonomousSystem
|
||||||
@@ -58,6 +69,16 @@ nodes:
|
|||||||
identifier: fabric__sites
|
identifier: fabric__sites
|
||||||
cardinality: many
|
cardinality: many
|
||||||
optional: true
|
optional: true
|
||||||
|
- name: spine_model
|
||||||
|
peer: InfraDeviceModel
|
||||||
|
cardinality: one
|
||||||
|
optional: true
|
||||||
|
description: Hardware model used for spines
|
||||||
|
- name: leaf_model
|
||||||
|
peer: InfraDeviceModel
|
||||||
|
cardinality: one
|
||||||
|
optional: true
|
||||||
|
description: Hardware model used for leafs
|
||||||
- name: devices
|
- name: devices
|
||||||
peer: InfraDevice
|
peer: InfraDevice
|
||||||
identifier: fabric__devices
|
identifier: fabric__devices
|
||||||
|
|||||||
29
infrahub/schemas/ipam.yml
Normal file
29
infrahub/schemas/ipam.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# IPAM Schema for EVPN-VXLAN Fabric
|
||||||
|
# IP Prefix and Address types inheriting from Infrahub builtins
|
||||||
|
# to enable the resource manager
|
||||||
|
---
|
||||||
|
version: "1.0"
|
||||||
|
nodes:
|
||||||
|
# ================================================================
|
||||||
|
# IP Prefix (inherits BuiltinIPPrefix for resource manager support)
|
||||||
|
# ================================================================
|
||||||
|
- name: IPPrefix
|
||||||
|
namespace: Ipam
|
||||||
|
inherit_from:
|
||||||
|
- "BuiltinIPPrefix"
|
||||||
|
description: "IP Prefix for hierarchical IPAM (supernets, site prefixes, pool parents)"
|
||||||
|
label: IP Prefix
|
||||||
|
icon: mdi--ip-network-outline
|
||||||
|
include_in_menu: false
|
||||||
|
|
||||||
|
# ================================================================
|
||||||
|
# IP Address (inherits BuiltinIPAddress for resource manager support)
|
||||||
|
# ================================================================
|
||||||
|
- name: IPAddress
|
||||||
|
namespace: Ipam
|
||||||
|
inherit_from:
|
||||||
|
- "BuiltinIPAddress"
|
||||||
|
description: "IP Address managed by resource pools"
|
||||||
|
label: IP Address
|
||||||
|
icon: mdi--ip-network
|
||||||
|
include_in_menu: false
|
||||||
Reference in New Issue
Block a user