Delete complete Tenant including dependent objects #9805
Replies: 1 comment
-
How about writing a Custom Script which does this? All it needs to do is to prompt for a tenant using ObjectVar and then:
See https://docs.djangoproject.com/en/4.0/ref/models/querysets/#delete However, personally I don't think this is what I'd for. For example, if a tenant leaves, all their devices don't magically vanish from the racks. Either you need a process to remove all those devices (in which case you might set the status to "Decommissioning" and then only remove them from Netbox after they've been physically removed); or the device remains but no longer assigned to that tenant (in which case you want to set the tenant to null, not delete the device) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to delete complete Tenants including their dependencies.
I understand that some dependencies could be used for multiple tenants or sites, but it could be unlinked from the tenant which you want to delete.
if not possible, or too complex to perform, perhaps it would be nice, if you could export tenants, including all depended object, so you can start up a new instance of netbox and import it there.
I'm current running netbox v3.0.9 ( planning to upgrade ) and have multiple tenants. When a Tenant leaves, we have to delete all data. It would be very helpful if this is possible.
if all the above is not possible. can someone have a SQL query to make this happen?
Beta Was this translation helpful? Give feedback.
All reactions