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 (for example, 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
statusDropdownRequireddraft โ†’ active โ†’ decommissioned. 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
statusDropdownRequiredprovisioning โ†’ active โ†’ decommissioned. 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

ServiceSdwanโ€‹

Namespace: Service ยท Kind: ServiceSdwan File: schemas/sp/service_sdwan.yml

Represents a single SD-WAN service offered to a tenant. One ServiceSdwan has one or more ServiceSdwanSite attachments (component relationship).

Attributesโ€‹

FieldKindRequiredDescriptionWho sets it
nameTextRequiredUnique human name for the SD-WAN service (for example, treasury-branch-sdwan)User
descriptionTextOptionalFree-text descriptionUser
service_idNumberRequiredUnique integer allocated from sdwan_id_pool. Used for SD-WAN site-id derivationUser (catalog allocates from pool)
vendorDropdownRequiredviptela (Cisco SD-WAN) or versa (Versa Networks). Defaults to viptelaUser
topologyDropdownRequiredfull-mesh or hub-spoke. Defaults to full-meshUser
statusDropdownRequireddraft โ†’ active โ†’ decommissioned. Defaults to draftUser sets draft; generator promotes to active

Relationshipsโ€‹

FieldPeerCardinalityRequiredDescriptionWho sets it
tenantOrganizationGenericoneRequiredOwning organisationUser
sitesServiceSdwanSitemanyOptionalSD-WAN edge sites (component)User / catalog

ServiceSdwanSiteโ€‹

Namespace: Service ยท Kind: ServiceSdwanSite File: schemas/sp/service_sdwan.yml

Represents a single SD-WAN edge site: one location, one edge device, one LAN subnet, one LAN IP. The edge DcimDevice is created automatically by the generator (it isn't pre-seeded in any dataset).

Attributesโ€‹

FieldKindRequiredDescriptionWho sets it
nameTextRequiredUnique within a given sdwan (uniqueness constraint)User
roleDropdownRequiredhub, spoke, or branch. Defaults to spokeUser
statusDropdownRequiredprovisioning โ†’ active โ†’ decommissioned. Defaults to provisioningGenerator promotes to active

Relationshipsโ€‹

FieldPeerCardinalityRequiredDescriptionWho sets it
sdwanServiceSdwanoneRequiredParent SD-WAN service (parent relationship)User / catalog
locationLocationSiteoneRequiredCustomer site / PoP this edge attaches toUser
lan_subnetIpamPrefixoneRequiredCustomer LAN subnet behind this edgeUser
lan_addressIpamIPAddressoneOptionalEdge's LAN IP (network address + 1)Generator allocates from lan_subnet
sdwan_edgeDcimDeviceoneOptionalEdge router materialised at this siteGenerator creates per-site

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 (for example, 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 (for example, ["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 (for example, 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)
sdwan_id_poolCoreNumberPoolGlobally unique SD-WAN service IDsInteger (range 200โ€“9999; values 100โ€“199 are reserved for bootstrap-seeded SD-WANs)
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