netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.23k stars 2.59k forks source link

Nested tenant groups #3939

Closed ebusto closed 4 years ago

ebusto commented 4 years ago

Environment

Proposed Functionality

Similar to regions, tenant groups should be nestable, in order to represent organizations with more than two levels.

For example: IT -> Infrastructure -> Network Support

Use Case

This allows companies of any appreciable size to share one NetBox instance, while tracking organizational and team level ownership accurately, without having to resort to ugly hacks or naming conventions.

Database Changes

Add a parent attribute to the TenantGroup model.

External Dependencies

None.

tb-killa commented 4 years ago

https://github.com/netbox-community/netbox/issues/2815

jeremystretch commented 4 years ago

This differs from #2815, which was to allow the assignment of a Tenant to multiple TenantGroups. Here, Tenants are still limited to a single TenantGroup association, but TenantGroups themselves can belong to other TenantGroups (similar to how Regions can be nested).

jeremystretch commented 4 years ago

Cross-referencing with #1754 (RackGroup nesting)

itmicus commented 4 years ago

May be it is part of it #554

ebusto commented 4 years ago

I don't think it should be coupled to #554.

I've implemented a simple and opinionated RBAC module for NetBox, and as it is a non-trivial task, it would unnecessarily delay this simple change.