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
|
optional: false
|
||||||
- name: ip_addresses
|
- name: ip_addresses
|
||||||
peer: InfraIPAddress
|
peer: InfraIPAddress
|
||||||
|
identifier: interface__ip_addresses
|
||||||
cardinality: many
|
cardinality: many
|
||||||
kind: Component
|
kind: Generic
|
||||||
|
|
||||||
nodes:
|
nodes:
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
@@ -360,6 +361,7 @@ nodes:
|
|||||||
relationships:
|
relationships:
|
||||||
- name: interface
|
- name: interface
|
||||||
peer: InfraInterface
|
peer: InfraInterface
|
||||||
|
identifier: interface__ip_addresses
|
||||||
cardinality: one
|
cardinality: one
|
||||||
optional: true
|
optional: true
|
||||||
kind: Parent
|
kind: Attribute
|
||||||
|
|||||||
Reference in New Issue
Block a user