bl4ko / netbox-ssot

Microservice that synces objects from multiple sources into netbox and makes it automatic SSOT.
MIT License
23 stars 4 forks source link

Soft delete and changelog #148

Open TaLoN1x opened 1 month ago

TaLoN1x commented 1 month ago

In the CMDB/IPAN/DCIM one of the essential roles is to have historical information on what was the object state and why at the point of time. Therefore I think there should be a soft delete option for objects that are either currently not observed of have been deleted, otherwise the whole history (changelog) is lost together with the record.

bl4ko commented 1 month ago

Yes its good to have history of an object, but how would you implement this in netbox? There is no soft delete option, so as you suggested, when an objects gets deleted from the API all changelog gets lost with it.

I think this is a feature netbox is supposed to implement first, because microservice only stores data locally.

TaLoN1x commented 1 month ago

I'd say playing with the status of an object or assigning a tag would be a solution. I will think of it and describe my vision

kirkkak commented 1 month ago

Lifecycle wise i imagine: asset -> purchase/inventory id/stocking can be handled in Inventory plugin/module resource -> in use/on the field in core netbox [as device]

Nevertheless device-asset (even in case of reimage .. new uuid; rename etc) relationship and/or device should not be deleted as it is "same thing" on same "rackunit etc (which info is kept with device) with different values or..?

bl4ko commented 1 month ago

The easiest way I currently see, is to add orphan tag to objects which would mark soft deletion. But this approach would introduce use to new issues like:

So full redesign of OrphanManager will also have to be implemented.