Add bidirectional navigation relationships #18

Merged
Damien merged 2 commits from feat/update-identifiers into main 2026-02-22 09:27:21 +00:00
4 changed files with 62 additions and 0 deletions
Showing only changes of commit 9a0b6dd1e6 - Show all commits

View File

@@ -0,0 +1,28 @@
# Fabric-to-Device links
# Depends on: 02-devices, 03-fabric
---
apiVersion: infrahub.app/v1
kind: Object
spec:
kind: InfraDevice
data:
- name: spine1
fabric: "evpn-lab"
- name: spine2
fabric: "evpn-lab"
- name: leaf1
fabric: "evpn-lab"
- name: leaf2
fabric: "evpn-lab"
- name: leaf3
fabric: "evpn-lab"
- name: leaf4
fabric: "evpn-lab"
- name: leaf5
fabric: "evpn-lab"
- name: leaf6
fabric: "evpn-lab"
- name: leaf7
fabric: "evpn-lab"
- name: leaf8
fabric: "evpn-lab"

View File

@@ -62,6 +62,19 @@ nodes:
kind: Text
optional: true
description: Facility identifier or code
relationships:
- name: devices
peer: InfraDevice
identifier: device__site
cardinality: many
kind: Generic
description: Devices at this site
- name: fabrics
peer: InfraFabric
identifier: fabric__sites
cardinality: many
kind: Generic
description: Fabrics deployed at this site
# ================================================================
# Platform
@@ -145,6 +158,7 @@ nodes:
relationships:
- name: site
peer: LocationSite
identifier: device__site
cardinality: one
optional: true
- name: platform
@@ -164,6 +178,12 @@ nodes:
peer: InfraMlagDomain
cardinality: one
optional: true
- name: fabric
peer: InfraFabric
identifier: fabric__devices
cardinality: one
optional: true
description: Fabric this device belongs to
# ================================================================
# Interface Types (inherit from InfraInterface generic)
@@ -263,6 +283,7 @@ nodes:
relationships:
- name: vlan
peer: InfraVLAN
identifier: vlan__svi
cardinality: one
optional: true

View File

@@ -55,8 +55,15 @@ nodes:
description: AS used by spine layer
- name: sites
peer: LocationSite
identifier: fabric__sites
cardinality: many
optional: true
- name: devices
peer: InfraDevice
identifier: fabric__devices
cardinality: many
kind: Generic
description: Devices in this fabric
# ================================================================
# Underlay P2P Link

View File

@@ -70,6 +70,12 @@ nodes:
peer: LocationSite
cardinality: one
optional: true
- name: svi_interfaces
peer: InfraInterfaceVlan
identifier: vlan__svi
cardinality: many
kind: Generic
description: SVI interfaces for this VLAN
# ================================================================
# VNI (VXLAN Network Identifier)