Skip to main content

Schema Reference

This page covers the SP-demo-specific schema nodes defined in schemas/sp/. Base and extension schemas (devices, interfaces, IPAM, routing) come from the Infrahub schema-library and are not repeated here.

For the overall schema loading order and layering, see architecture.


ServiceL3Vpn

Namespace: Service · Kind: ServiceL3Vpn File: schemas/sp/service_l3vpn.yml

Represents a single L3VPN service offered to a tenant. One ServiceL3Vpn has one or more ServiceL3VpnSite attachments (component relationship).

Attributes

FieldKindRequiredDescriptionWho sets it
nameTextRequiredUnique human name for the VPN (e.g. acme-prod)User
descriptionTextOptionalFree-text descriptionUser
vpn_idNumberRequiredUnique integer allocated from vpn_id_pool. Used to derive RD/RT as <asn>:<vpn_id>User (catalog allocates from pool)
address_familyDropdownRequiredipv4 or ipv4_ipv6. Defaults to ipv4User
statusDropdownRequireddraftactivedecommissioned. Defaults to draftUser sets draft; generator promotes to active

Relationships

FieldPeerCardinalityRequiredDescriptionWho sets it
tenantOrganizationGenericoneRequiredOwning organisationUser
vrfIpamVRFoneOptionalVRF materialised by the generatorGenerator
sitesServiceL3VpnSitemanyOptionalPE attachment points (component)User / catalog

ServiceL3VpnSite

Namespace: Service · Kind: ServiceL3VpnSite File: schemas/sp/service_l3vpn.yml

Represents a single PE attachment of an L3VPN to a customer subnet. One site = one PE + one customer-facing interface + a /30 PE-CE link.

Attributes

FieldKindRequiredDescriptionWho sets it
nameTextRequiredUnique within a given l3vpn (uniqueness constraint)User
routing_protocolDropdownRequiredebgp, static, or connectedUser
bgp_peer_asnNumberOptionalCustomer BGP ASN (required when routing_protocol = ebgp)User
static_routesJSONOptionalList of static routes to inject into the VRFUser
statusDropdownRequiredprovisioningactivedecommissioned. Defaults to provisioningGenerator promotes to active

Relationships

FieldPeerCardinalityRequiredDescriptionWho sets it
l3vpnServiceL3VpnoneRequiredParent VPN (parent relationship)User / catalog
pe_deviceDcimDeviceoneRequiredPE router for this attachmentUser
pe_interfaceInterfacePhysicaloneOptionalPE-facing physical interfaceGenerator allocates from free interfaces
customer_subnetIpamPrefixoneRequiredCustomer prefix to be placed into the VRFUser
pe_addressIpamIPAddressoneOptionalPE IP on the PE-CE /30 linkGenerator allocates from pe_ce_pool
ce_addressIpamIPAddressoneOptionalCE IP on the PE-CE /30 linkGenerator allocates from pe_ce_pool

TopologyMplsBackbone

Namespace: Topology · Kind: TopologyMplsBackbone File: schemas/sp/topology_mpls.yml

Inherits from TopologyGeneric. Represents the MPLS backbone as a whole — one row per backbone domain. The demo has exactly one row: mpls-backbone-1.

Attributes

FieldKindRequiredDescriptionWho sets it
nameTextRequiredUnique backbone nameUser (bootstrap)
isis_areaTextRequiredISIS area ID (default 49.0001)User (bootstrap)
isis_levelDropdownRequiredlevel-1, level-2, or level-1-2 (default level-2)User (bootstrap)

Relationships

FieldPeerCardinalityRequiredDescriptionWho sets it
asnRoutingAutonomousSystemoneRequiredProvider ASN used for RD/RT derivationUser (bootstrap)
pesDcimDevicemanyOptionalAll PE routers in this backboneUser (bootstrap)

MplsIsisProcess

Namespace: Mpls · Kind: MplsIsisProcess File: schemas/sp/mpls.yml

Inherits from RoutingProtocol. One row per PE representing the IS-IS routing process. The device relationship is inherited from RoutingProtocol.

Attributes

FieldKindRequiredDescriptionWho sets it
area_idTextRequiredIS-IS area (default 49.0001)User (bootstrap)
levelDropdownRequiredlevel-1, level-2, or level-1-2 (default level-2)User (bootstrap)
net_idTextRequiredISO NET identifier (e.g. 49.0001.0100.0000.0001.00)User (bootstrap)

Relationships

FieldPeerCardinalityRequiredDescription
interfacesInterfacePhysicalmanyOptionalBackbone interfaces running IS-IS

Inherited from RoutingProtocol

FieldDescription
deviceThe PE device this process belongs to
descriptionFree-text description
statusactive / inactive

MplsLdpProcess

Namespace: Mpls · Kind: MplsLdpProcess File: schemas/sp/mpls.yml

Inherits from RoutingProtocol. One row per PE representing the LDP label distribution process.

Attributes

FieldKindRequiredDescriptionWho sets it
router_idTextRequiredLDP router-ID (typically the Loopback0 IP)User (bootstrap)

Relationships

FieldPeerCardinalityRequiredDescription
transport_addressIpamIPAddressoneOptionalLDP transport address override
interfacesInterfacePhysicalmanyOptionalBackbone interfaces running LDP

MplsBgpProcess

Namespace: Mpls · Kind: MplsBgpProcess File: schemas/sp/mpls.yml

Inherits from RoutingProtocol. One row per PE representing the MP-BGP overlay process carrying VPNv4 / VPNv6 address families.

Attributes

FieldKindRequiredDescriptionWho sets it
router_idTextRequiredBGP router-ID (typically the Loopback0 IP)User (bootstrap)
address_familiesListRequiredMP-BGP address families enabled (e.g. ["vpnv4", "vpnv6"])User (bootstrap)

Relationships

FieldPeerCardinalityRequiredDescription
sessionsRoutingBGPSessionmanyOptionaliBGP sessions for this process

LocationRegion / LocationSite

Namespace: Location · File: schemas/sp/location_concrete.yml

Concrete location kinds for this demo. LocationRegion inherits from LocationGeneric (the schema-library generic), and LocationSite adds hosting capability via LocationHosting. Both render under LocationGeneric in the sidebar menu. The bootstrap data uses LocationRegion for emea and LocationSite for the four PoPs (lon, fra, ams, par).

KindInheritsPurpose
LocationRegionLocationGenericGeographic region (e.g. emea)
LocationSiteLocationGeneric, LocationHostingPoP / site that hosts PEs

DcimDevice role extension

File: schemas/sp/dcim_role_pe.yml

This file is a schema extension (not a new node) that adds SP-specific choices to the existing DcimDevice.role dropdown:

RoleLabelUse
peProvider EdgePE router terminating customer VPNs
pProvider CoreP router (transit only, no customer VRFs)
rrRoute ReflectorBGP route reflector
coreCore RouterCentral part of the network
edgeEdge RouterNetwork boundary with external networks
cpeCustomer Premise EquipmentDevices at the customer's premises

The demo bootstrap sets role = pe on all four PEs.


Resource Pools

The following pools are bootstrapped in objects/50_pools.yml and consumed by the generator and the Streamlit catalog:

Pool nameKindPurposeAllocation unit
vpn_id_poolCoreNumberPoolGlobally unique VPN IDsInteger (range 200–9999; values 100–199 are reserved for bootstrap-seeded L3VPNs)
pe_loopback_poolCoreIPPrefixPoolLoopback /32 addresses/32 from 10.0.0.0/24
backbone_p2p_poolCoreIPPrefixPoolBackbone p2p /31 links/31 from 10.1.0.0/16
pe_ce_poolCoreIPPrefixPoolPE-CE /30 links per L3VPN site/30 from 10.100.0.0/16

User-provided vs generator-filled summary

The following table consolidates which fields an operator must supply and which the L3VpnGenerator fills in automatically:

ObjectFieldSource
ServiceL3Vpnname, vpn_id, address_family, tenantUser / catalog
ServiceL3Vpnvrf, status = activeGenerator
ServiceL3VpnSitename, pe_device, routing_protocol, bgp_peer_asn, customer_subnet, l3vpnUser / catalog
ServiceL3VpnSitepe_interface, pe_address, ce_address, status = activeGenerator
IpamVRFallGenerator
IpamIPAddress (PE-CE)allGenerator
RoutingBGPSession (PE-CE)all (only when routing_protocol = ebgp)Generator