Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft delete and changelog #148

Open
TaLoN1x opened this issue May 7, 2024 · 4 comments
Open

Soft delete and changelog #148

TaLoN1x opened this issue May 7, 2024 · 4 comments
Labels
question Further information is requested

Comments

@TaLoN1x
Copy link
Contributor

TaLoN1x commented May 7, 2024

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
Copy link
Owner

bl4ko commented May 7, 2024

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
Copy link
Contributor Author

TaLoN1x commented May 7, 2024

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

@bl4ko bl4ko added the question Further information is requested label May 7, 2024
@kirkkak
Copy link

kirkkak commented May 7, 2024

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
Copy link
Owner

bl4ko commented May 7, 2024

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:

  • which orphans to autodelete and which to keep
  • adding new objects whose primary keys would overlap with orphans would trigger error

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants