Add Tenancy Support to VLAN Group #10605

Closed
opened 2025-12-29 21:33:36 +01:00 by adam · 0 comments
Owner

Originally created by @sleepinggenius2 on GitHub (Jan 3, 2025).

Originally assigned to: @arthanson on GitHub.

NetBox version

v4.2-beta1

Feature type

Data model extension

Triage priority

N/A

Proposed functionality

Add the tenant field to the VLANGroup model to support tenancy. Ideally, show the tenant with an "*" appended in the Tenant column on the VLAN table for a VLAN that is not explicitly assigned to a Tenant, but inherited from its group, just like is done with the IPAddress table when its Prefix has an assigned Tenant.

Use case

The VLAN model already supports tenancy, so it's curious why the VLANGroup model does not. When using a VLANGroup to document the VLANs on an ENNI, it would be useful to also associate the group to a Tenant and not just the VLAN members under it. This would also allow for additional validation opportunities, like it could be enforced that the Tenant set on the VLAN and VLANGroup match (I think it makes sense to leave this as a custom validation opportunity). We added a custom field for this in our environment today, but that has the limitation that when you go to the details page for a Tenant, it is not listed under the related objects.

Database changes

Add nullable tenant ForeignKey to tenancy.Tenant.

External dependencies

None

Originally created by @sleepinggenius2 on GitHub (Jan 3, 2025). Originally assigned to: @arthanson on GitHub. ### NetBox version v4.2-beta1 ### Feature type Data model extension ### Triage priority N/A ### Proposed functionality Add the `tenant` field to the `VLANGroup` model to support tenancy. Ideally, show the tenant with an "*" appended in the `Tenant` column on the `VLAN` table for a `VLAN` that is not explicitly assigned to a `Tenant`, but inherited from its group, just like is done with the `IPAddress` table when its `Prefix` has an assigned `Tenant`. ### Use case The `VLAN` model already supports tenancy, so it's curious why the `VLANGroup` model does not. When using a `VLANGroup` to document the VLANs on an ENNI, it would be useful to also associate the group to a `Tenant` and not just the `VLAN` members under it. This would also allow for additional validation opportunities, like it could be enforced that the `Tenant` set on the `VLAN` and `VLANGroup` match (I think it makes sense to leave this as a custom validation opportunity). We added a custom field for this in our environment today, but that has the limitation that when you go to the details page for a `Tenant`, it is not listed under the related objects. ### Database changes Add nullable `tenant` ForeignKey to `tenancy.Tenant`. ### External dependencies None
adam added the status: acceptedtype: featurecomplexity: medium labels 2025-12-29 21:33:37 +01:00
adam closed this issue 2025-12-29 21:33:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10605