From ef6877551f47987ba860a5ecd24be6dac913e621 Mon Sep 17 00:00:00 2001 From: Damien Arnodo Date: Fri, 6 Feb 2026 15:07:01 +0000 Subject: [PATCH] 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. --- schemas/base.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schemas/base.yml b/schemas/base.yml index 0c220c0..9494c4e 100644 --- a/schemas/base.yml +++ b/schemas/base.yml @@ -33,8 +33,9 @@ generics: optional: false - name: ip_addresses peer: InfraIPAddress + identifier: interface__ip_addresses cardinality: many - kind: Component + kind: Generic nodes: # ========================================================================== @@ -360,6 +361,7 @@ nodes: relationships: - name: interface peer: InfraInterface + identifier: interface__ip_addresses cardinality: one optional: true - kind: Parent + kind: Attribute