Commit Graph

59 Commits

Author SHA1 Message Date
Damien
c902d7df58 chore(schema): update schema 2026-02-20 15:13:46 +01:00
Damien
9e1fe9be7f chore(fix schema): remove unused border leaf 2026-02-20 15:02:49 +01:00
Damien
cb06068347 feat(schema,objects): add local_identifier to BGP types for unique HFID — refs #52
Infrahub does not support relation traversal in HFID computation.
Add a local_identifier attribute to PeerGroup, Session, and
AddressFamily that combines device name with the type-specific key.

Schema changes (bgp.yml):
- InfraBGPPeerGroup: HFID=local_identifier__value (e.g. spine1__evpn)
- InfraBGPSession: HFID=local_identifier__value (e.g. spine1__10.0.250.11)
- InfraBGPAddressFamily: HFID=local_identifier__value (e.g. spine1__ipv4_unicast)

Object file changes:
- 09-bgp.yml: added local_identifier to 26 PeerGroup entries
- 10-bgp-sessions.yml: added local_identifier to 72 Session + 20 AF entries,
  updated 56 peer_group + 26 active_peer_groups references
2026-02-15 21:31:03 +01:00
Damien
4b1ca7b2a6 fix(schema,objects): simplify BGP HFIDs to single field — refs #52
Infrahub does not support relation traversal in HFID computation.
bgp_config__router_id__value returned only the name, not the full path.

Schema changes:
- InfraBGPPeerGroup HFID: [name__value] (was [bgp_config__router_id__value, name__value])
- InfraBGPSession HFID: [peer_address__value] (was [bgp_config__router_id__value, peer_address__value])
- uniqueness_constraints unchanged (still scoped to bgp_config)

Object file changes (10-bgp-sessions.yml):
- peer_group: ["10.0.250.x", "name"] → peer_group: "name" (56 refs)
- active_peer_groups: - ["10.0.250.x", "name"] → - "name" (26 refs)
2026-02-15 21:23:58 +01:00
Damien
9f89058f58 revert(schema,objects): restore router_id in BGP HFIDs — refs #52
Restore original human_friendly_id fields:
- InfraBGPPeerGroup: bgp_config__router_id__value + name__value
- InfraBGPSession: bgp_config__router_id__value + peer_address__value

Restore router_id values in peer_group and active_peer_groups
references in 10-bgp-sessions.yml (82 replacements).
2026-02-15 20:46:26 +01:00
Damien
241655e348 fix(schema,objects): use device name instead of router_id in BGP HFIDs — refs #52
The SDK cannot resolve deep relation traversals like
bgp_config__router_id__value when loading object files.

Schema changes in bgp.yml:
- InfraBGPPeerGroup HFID: bgp_config__router_id__value → bgp_config__device__name__value
- InfraBGPSession HFID: bgp_config__router_id__value → bgp_config__device__name__value

Object file changes in 10-bgp-sessions.yml:
- peer_group refs: router_id → device_name (e.g. ["10.0.250.1", "evpn"] → ["spine1", "evpn"])
- active_peer_groups refs: same mapping (82 replacements total)
2026-02-15 20:44:39 +01:00
Damien
ccd882bcfd fix(schema): change InfraIPAddress.address from IPNetwork to IPHost — refs #52
IPNetwork with strict=True rejects host addresses like 10.0.1.1/31
(host bits set). Interface IP assignments are host addresses with a
prefix length, which is exactly what IPHost accepts.
2026-02-15 20:23:07 +01:00
f484af442a docs(schema): update README with complete relationships and topology mapping — refs #41 2026-02-13 14:20:02 +00:00
Damien
e32da46bd7 fix(schema): add optional VRF relation on BGPSession — refs #50 2026-02-13 15:03:55 +01:00
Damien
cf05a5d477 fix(schema): add trunk_groups and stp_enabled on InfraVLAN — refs #49 2026-02-13 11:25:29 +01:00
Damien
f623d12b8c fix(schema): remove redundant Device.router_id, add BGP distance attributes — refs #48 2026-02-13 11:24:49 +01:00
Damien
e527534820 fix(schema): refactor UnderlayLink IPs from attributes to InfraIPAddress relations — refs #47 2026-02-13 11:24:17 +01:00
Damien
ed820f3380 fix(schema): add virtual_router_address and autostate on InterfaceVlan — refs #46 2026-02-13 11:23:29 +01:00
Damien
82af2daafc fix(schema): add unique constraint on InfraVLAN.vlan_id for human_friendly_id — refs #45 2026-02-13 11:23:02 +01:00
Damien
719ecfafaa fix(schema): remove duplicate InterfaceVxlan, keep VTEP only — refs #44 2026-02-13 11:22:43 +01:00
Damien
3654c2de9d fix(schema): scope BGPPeerGroup and BGPSession human_friendly_id per device — refs #43 2026-02-13 11:21:51 +01:00
d05c96915f feat(schema): add include_in_menu: false to all extension nodes #41 2026-02-09 12:05:11 +00:00
e31846b057 feat(schema): add include_in_menu: false to all MLAG nodes #41 2026-02-09 12:04:46 +00:00
741132a176 feat(schema): add include_in_menu: false to all VRF nodes #41 2026-02-09 12:04:21 +00:00
a05e997742 feat(schema): add include_in_menu: false to all VLAN/VXLAN nodes #41 2026-02-09 12:04:04 +00:00
ffa1eff19a feat(schema): add include_in_menu: false to all BGP nodes #41 2026-02-09 12:03:38 +00:00
69f003b798 feat(schema): add include_in_menu: false to all base nodes #41
Menu is now controlled by custom menus/fabric-menu.yml
2026-02-09 12:03:09 +00:00
25550bb3c4 fix: migrate display_labels to display_label Jinja2 format in VRF schema
Also enriched VRFDeviceAssignment display_label to show device + VRF.

Refs #41
2026-02-07 09:18:38 +00:00
b9b15f3beb fix: migrate display_labels to display_label Jinja2 format in VLAN/VXLAN schema
Refs #41
2026-02-07 09:18:11 +00:00
d9b47461d3 fix: migrate display_labels to display_label Jinja2 format in MLAG schema
Refs #41
2026-02-07 09:17:46 +00:00
498fa8505e fix: migrate display_labels to display_label Jinja2 format in extensions schema
Refs #41
2026-02-07 09:17:26 +00:00
cda3804c2c fix: migrate display_labels to display_label Jinja2 format in BGP schema
Refs #41
2026-02-07 09:17:07 +00:00
97080473f7 fix: migrate display_labels to display_label Jinja2 format in base schema
Replaces deprecated display_labels list format and bare display_label
strings with the new Jinja2 template format as required by Infrahub.

Refs #41
2026-02-07 09:16:40 +00:00
bb76b93499 refactor(schema): replace deprecated display_labels with display_label 2026-02-07 09:03:36 +00:00
a917715a47 refactor(schema): replace deprecated display_labels with display_label across all nodes 2026-02-07 09:03:11 +00:00
99f34b9639 fix(schema): add unique: true on VRF.name for HFID peer traversal 2026-02-06 19:39:28 +00:00
0e96e8aca8 fix(schema): add explicit optional: false on VRFDeviceAssignment.vrf for human_friendly_id 2026-02-06 19:20:56 +00:00
d7e2d9f0e0 fix(schema): add optional: false on UnderlayLink.fabric parent relationship 2026-02-06 19:19:55 +00:00
0c0ab1b214 fix(schema): add explicit optional: false to Parent relationships in vrf.yml 2026-02-06 15:10:16 +00:00
a12e24d00c fix(schema): add explicit optional: false to all Parent relationships in vlan_vxlan.yml 2026-02-06 15:10:00 +00:00
67a54e349d fix(schema): add explicit optional: false to Parent relationships in mlag.yml 2026-02-06 15:09:25 +00:00
adb02fc25c fix(schema): add explicit optional: false to all Parent relationships in bgp.yml 2026-02-06 15:08:57 +00:00
ef6877551f fix(schema): IPAddress.interface - replace Parent with Attribute kind
Parent relationships cannot be optional in Infrahub. Since an IP address
can exist without being assigned to an interface (reserved, planned),
we use kind: Attribute instead of kind: Parent.

Also change InfraInterface.ip_addresses from Component to Generic
since Component requires a matching Parent on the other side.

Both sides now use explicit identifier: interface__ip_addresses
for proper bidirectional linking.
2026-02-06 15:07:01 +00:00
4aadf763a3 fix(schema): add optional: false on device relationship for uniqueness_constraints 2026-02-06 13:11:52 +00:00
52c335aeb0 fix(schema): display_labels must only reference local attributes in vrf.yml 2026-02-06 13:08:59 +00:00
2ca08a4f41 fix(schema): display_labels must only reference local attributes in vlan_vxlan.yml 2026-02-06 13:08:30 +00:00
95bd2ee6c8 fix(schema): display_labels must only reference local attributes in mlag.yml 2026-02-06 13:08:04 +00:00
42d03699d9 fix(schema): display_labels must only reference local attributes in extensions.yml 2026-02-06 13:07:44 +00:00
c22a5b6ab4 fix(schema): display_labels must only reference attributes, not relationships 2026-02-06 13:07:24 +00:00
4e9c2d3009 fix(schema): replace deprecated default_filter with human_friendly_id in base.yml 2026-02-06 13:06:58 +00:00
eb809812af fix(schema): add direction outbound for self-referencing relationship
InterfaceEthernet.connected_interface is a self-reference that requires
direction: outbound to avoid bidirectional conflicts per Infrahub docs.

Ref: #41
2026-02-06 09:12:15 +00:00
8114b6d973 fix(schema): add unique identifiers for VRF RouteTarget relationships
Add identifier and direction: outbound for import/export targets
in VRF and VRFDeviceAssignment to avoid bidirectional conflicts.

Ref: #41
2026-02-06 09:09:31 +00:00
6d08b19b5f fix(schema): add unique identifiers for MlagDomain VLAN relationships
Add identifier and direction: outbound for peer_vlan and ibgp_vlan
to avoid bidirectional relationship conflicts.

Ref: #41
2026-02-06 09:04:39 +00:00
4f5fef7203 fix(schema): use direction outbound for UnderlayLink relationships
Use outbound direction to avoid bidirectional relationship conflicts
when multiple relationships point to the same peer type.

Ref: #41
2026-02-06 08:55:08 +00:00
afa268ad2d fix(schema): add unique identifiers for UnderlayLink relationships
Infrahub requires unique identifiers when multiple relationships
point to the same peer type with the same direction.

Ref: #41
2026-02-06 08:51:47 +00:00