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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user