Allow DiffSyncModel to be present in multiple branches from top_level #287
Labels
status: gathering feedback
Further discussion is needed to determine this issue's scope and/or implementation
status: internal review
Internal discussion is required to move forward with issue
Environment
Proposed Functionality
Allow instances of DiffSyncModels to be preset in multiple branches.
This would allow a model to have an optional parent while still syncing all the objects without parents
Use Case
In the Netbox model we can have a
VirtualChassis
that includes memberDevice
's, but also haveDevice
's that are not part of aVirtualChassis
.If i split up these entities in two
DiffSyncModel
's and makeDevice
a child of theVirtualChassis
i must choose whether i only want to sync theDevice
's that are part of aVirtualChassis
:VirtualChassis
a top_level entry. This however will ignore all the devices that are not a child ofVirtualChassis
. Or:Device
a top_level entry. This however will not create theVirtualChassis
.If i add both
VirtualChassis
andDevice
to top_level i get an error thatDevice
's that are a child ofVirtualChassis
are already created when it wants to add theDevice
from that top_level entry.This is exactly the same object so i dont know why it couldnt be possible to just skip over trying to recreate this. This would also be a nicer option than what is suggested in #285 .
The text was updated successfully, but these errors were encountered: