Commit Graph

4 Commits

Author SHA1 Message Date
Damien
c3587a1c9c fix: Add direct device relationship to BGPAddressFamily for query filtering (#23)
InfraHub does not support multi-hop relationship traversal in GraphQL
filters, so `bgp_config__device__name__value` fails at query time.
Fix follows the same pattern used for InfraMlagPeerConfig (#22):
add a denormalized direct device relationship to the schema node and
use it in the query filter.

Changes:
- infrahub/schemas/bgp.yml: add `device` relationship (kind: Attribute,
  cardinality: one, optional: false) to BGPAddressFamily as the first
  relationship, before bgp_config
- infrahub/objects/11-bgp-sessions.yml: add `device: ["<device>"]` to
  all 22 InfraBGPAddressFamily entries (spine1×2, spine2×2, leaf1–8×2
  each, plus leaf7 and leaf8 VRF gold AF)
- infrahub/transforms/queries/bgp_intent.gql: change filter from
  `bgp_config__device__name__value` to `device__name__value`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:05:37 +01:00
Damien
9a0b6dd1e6 feat(schema): add bidirectional relationship identifiers and fabric-device links
- LocationSite: add devices (device__site) and fabrics (fabric__sites) reverse relationships
- InfraDevice.site: add identifier device__site
- InfraDevice: add fabric relationship (fabric__devices)
- InfraFabric.sites: add identifier fabric__sites; add devices reverse relationship (fabric__devices)
- InfraInterfaceVlan.vlan: add identifier vlan__svi
- InfraVLAN: add svi_interfaces reverse relationship (vlan__svi)
- Add 14-fabric-links.yml to assign all 10 devices to the evpn-lab fabric

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 20:59:10 +01:00
Damien
e353ef0a90 Update MLAG schema to use IPHost instead of IPNetwork for local
interface IP
2026-02-21 11:48:13 +01:00
Damien
1b25c92965 build(infrahub): update file paths to match new directory structure
Refactor the .infrahub.yml configuration file to prefix all schema, menu, and object paths with the 'infrahub/' directory. This change aligns the configuration with the reorganized project structure where Infrahub resources have been moved into a dedicated subfolder.
2026-02-20 18:33:37 +01:00