Add Tenant ownership to Rack Reservations #1307

Closed
opened 2025-12-29 16:31:17 +01:00 by adam · 7 comments
Owner

Originally created by @dirtycajunrice on GitHub (Oct 13, 2017).

Issue type

[x] Feature request
[ ] Bug report
[ ] Documentation

Description

I propose an addition to the rack reservation table that allows association with a Tenant (Exactly like IP addresses) which would allow racks used for "Shared Colocation Environments" to have the ability to reserve less than an entire rack for a customer. E.g. 7-8U per customer.

This would not matter if they were managed as devices are able to be assigned. But for environments where you only are keeping track of what section you have assigned the Tenant, it would be very helpful.

Originally created by @dirtycajunrice on GitHub (Oct 13, 2017). ### Issue type [x] Feature request <!-- Requesting the implementation of a new feature --> [ ] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> ### Description I propose an addition to the rack reservation table that allows association with a Tenant (Exactly like IP addresses) which would allow racks used for "Shared Colocation Environments" to have the ability to reserve less than an entire rack for a customer. E.g. 7-8U per customer. This would not matter if they were managed as devices are able to be assigned. But for environments where you only are keeping track of what section you have assigned the Tenant, it would be very helpful.
adam added the type: feature label 2025-12-29 16:31:17 +01:00
adam closed this issue 2025-12-29 16:31:17 +01:00
Author
Owner

@dirtycajunrice commented on GitHub (Oct 30, 2017):

I am comfortable enough with python to make these changes myself but I do need a point in the right direction for files, to begin with. Much appreciated

@dirtycajunrice commented on GitHub (Oct 30, 2017): I am comfortable enough with python to make these changes myself but I do need a point in the right direction for files, to begin with. Much appreciated
Author
Owner

@RyanBreaker commented on GitHub (Oct 30, 2017):

@DirtyCajunRice Start by looking in the dcim directory and the models and everything to work on this should be in there.

Sent with GitHawk

@RyanBreaker commented on GitHub (Oct 30, 2017): @DirtyCajunRice Start by looking in the `dcim` directory and the models and everything to work on this should be in there. <sub>Sent with <a href="http://githawk.com">GitHawk</a></sub>
Author
Owner

@dirtycajunrice commented on GitHub (Oct 30, 2017):

@RyanBreaker I have the tenants showing up as an option in the reservation_add, and the tenant showing up as part of the visible table when looking at a rack, but when you look at the main rack reservations page (BulkDeleteView) it is empty. Any ideas?
https://github.com/DirtyCajunRice/netbox

@dirtycajunrice commented on GitHub (Oct 30, 2017): @RyanBreaker I have the tenants showing up as an option in the reservation_add, and the tenant showing up as part of the visible table when looking at a rack, but when you look at the main rack reservations page (BulkDeleteView) it is empty. Any ideas? https://github.com/DirtyCajunRice/netbox
Author
Owner

@dirtycajunrice commented on GitHub (Oct 30, 2017):

ok figured that part out. Just need to figure out showing tenancy enumeration in the search box and a new box in the tenant main page

@dirtycajunrice commented on GitHub (Oct 30, 2017): ok figured that part out. Just need to figure out showing tenancy enumeration in the search box and a new box in the tenant main page
Author
Owner

@dirtycajunrice commented on GitHub (Oct 31, 2017):

Ok, I have added the box to the tenant page as well and it is propagating properly. All that is left to figure out the tenancy enumeration in the FilterForm. Some help would be much appreciated.

@dirtycajunrice commented on GitHub (Oct 31, 2017): Ok, I have added the box to the tenant page as well and it is propagating properly. All that is left to figure out the tenancy enumeration in the FilterForm. Some help would be much appreciated.
Author
Owner

@dirtycajunrice commented on GitHub (Oct 31, 2017):

@jeremystretch Sorry to ping you I would just love to make this pull request.
In netbox/dcim/forms.py under
class RackReservationFilterForm(BootstrapMixin, forms.Form):
the queryset for tenant currently is
queryset=Tenant.objects.annotate(filter_count=Count('racks__reservations'))
Am i missing something to make this query rack reservation ownership instead of rack ownership?

@dirtycajunrice commented on GitHub (Oct 31, 2017): @jeremystretch Sorry to ping you I would just love to make this pull request. In netbox/dcim/forms.py under `class RackReservationFilterForm(BootstrapMixin, forms.Form):` the queryset for tenant currently is `queryset=Tenant.objects.annotate(filter_count=Count('racks__reservations'))` Am i missing something to make this query rack reservation ownership instead of rack ownership?
Author
Owner

@dirtycajunrice commented on GitHub (Nov 8, 2017):

@jeremystretch Tag 2.3?

@dirtycajunrice commented on GitHub (Nov 8, 2017): @jeremystretch Tag 2.3?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1307