Rename RackGroup to Location #4608

Closed
opened 2025-12-29 18:38:12 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (Feb 27, 2021).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Rename the RackGroup model to Location (or some similarly generic term). This is a fairly substantial change, as it would entail renaming the model, database table, URLs, and REST API endpoints and serializers. We would also rename the rack_group field on the Rack model and add a location field to Device.

Justification

This change would be prudent to accommodate #4971, which seeks to support the direct assignment of devices to rack groups, in a scenario where rack groups are used primarily to subdivide a parent site (e.g. into rooms or floors) rather than to group racks.

Originally created by @jeremystretch on GitHub (Feb 27, 2021). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Rename the RackGroup model to Location (or some similarly generic term). This is a fairly substantial change, as it would entail renaming the model, database table, URLs, and REST API endpoints and serializers. We would also rename the `rack_group` field on the Rack model and add a `location` field to Device. ### Justification This change would be prudent to accommodate #4971, which seeks to support the direct assignment of devices to rack groups, in a scenario where rack groups are used primarily to subdivide a parent site (e.g. into rooms or floors) rather than to group racks.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 18:38:12 +01:00
adam closed this issue 2025-12-29 18:38:12 +01:00
Author
Owner

@ryanmerolle commented on GitHub (Feb 27, 2021):

People are already using RackGroups as such, so it seems only prudent to rename.

@ryanmerolle commented on GitHub (Feb 27, 2021): People are already using RackGroups as such, so it seems only prudent to rename.
Author
Owner

@jeremystretch commented on GitHub (Feb 27, 2021):

My only concern is that this could be a fairly disruptive change. It probably makes sense to retain the current related fields as read-only aliases of the new fields to support backward compatibility for all v2.11 releases. We could even go so far as replicating the API endpoints (to provide both /dcim/rack-groups/ and /dcim/locations/), though I'm not sure how complicated that becomes.

@jeremystretch commented on GitHub (Feb 27, 2021): My only concern is that this could be a fairly disruptive change. It probably makes sense to retain the current related fields as read-only aliases of the new fields to support backward compatibility for all v2.11 releases. We could even go so far as replicating the API endpoints (to provide both `/dcim/rack-groups/` and `/dcim/locations/`), though I'm not sure how complicated that becomes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4608