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.
This commit is contained in:
2026-02-06 15:07:01 +00:00
parent 4aadf763a3
commit ef6877551f

View File

@@ -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