[PR #16739] [MERGED] 12826 Add Rack Type #14900

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16739
Author: @arthanson
Created: 6/26/2024
Status: Merged
Merged: 7/16/2024
Merged by: @jeremystretch

Base: featureHead: 12826-rack-type


📝 Commits (10+)

📊 Changes

32 files changed (+1504 additions, -353 deletions)

View changed files

📝 docs/features/facilities.md (+4 -0)
📝 docs/models/dcim/rack.md (+6 -41)
docs/models/dcim/racktype.md (+57 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/dcim/api/serializers_/racks.py (+85 -16)
📝 netbox/dcim/api/urls.py (+1 -0)
📝 netbox/dcim/api/views.py (+10 -0)
📝 netbox/dcim/choices.py (+1 -1)
📝 netbox/dcim/filtersets.py (+48 -2)
📝 netbox/dcim/forms/bulk_edit.py (+98 -6)
📝 netbox/dcim/forms/bulk_import.py (+53 -4)
📝 netbox/dcim/forms/filtersets.py (+66 -29)
📝 netbox/dcim/forms/model_forms.py (+65 -10)
📝 netbox/dcim/graphql/filters.py (+7 -0)
📝 netbox/dcim/graphql/schema.py (+5 -0)
📝 netbox/dcim/graphql/types.py (+12 -0)
netbox/dcim/migrations/0188_racktype.py (+93 -0)
📝 netbox/dcim/models/racks.py (+196 -69)
📝 netbox/dcim/search.py (+11 -0)
📝 netbox/dcim/tables/racks.py (+60 -4)

...and 12 more files

📄 Description

Fixes: #12826

Add's a RackType and can set a Rack to use a Rack Type and on creation will get the fields from it.

Rack fields associated with a rack_type are disabled on Rack form if rack_type is set.

If rack_type is set on a rack and fields associated with a rack_type are modified (via API) then a validation error is thrown.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/16739 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 6/26/2024 **Status:** ✅ Merged **Merged:** 7/16/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `12826-rack-type` --- ### 📝 Commits (10+) - [`21e11cd`](https://github.com/netbox-community/netbox/commit/21e11cd78f2f91f8ffc499875a6937370978e83c) 12826 add RackType - [`24b957a`](https://github.com/netbox-community/netbox/commit/24b957aab404a65eeff82516315b45579a4ac7e4) 12826 add forms, filters, tables - [`1800e49`](https://github.com/netbox-community/netbox/commit/1800e49f6586698508f7863ef6dd7aa1c8773927) 12826 add to menu - [`c8a5197`](https://github.com/netbox-community/netbox/commit/c8a5197b2c1c3e490726ff2a9a24bf1d3cd5d99a) 12826 remove role - [`fc1ce31`](https://github.com/netbox-community/netbox/commit/fc1ce31b00873887c01bc826c1e063f4ffa683e4) 12826 add api/serializers - [`811c1bd`](https://github.com/netbox-community/netbox/commit/811c1bdfaaf345a249d49b5ea2656246a7488778) 12826 add tests and fixes - [`b6a785d`](https://github.com/netbox-community/netbox/commit/b6a785d24ab69471cd810cb9a008b01d75088c2e) 12826 fix tests - [`25a55c5`](https://github.com/netbox-community/netbox/commit/25a55c56c8243d537416e231eea3ceefcb1720a2) 12826 fix tests - [`e3677a2`](https://github.com/netbox-community/netbox/commit/e3677a2eaec88240e52ae09960dc87980cae79f9) 12826 fix tests - [`5a719be`](https://github.com/netbox-community/netbox/commit/5a719bef3803c6bdf41823f4587bd422434a2be5) 12826 fix tests ### 📊 Changes **32 files changed** (+1504 additions, -353 deletions) <details> <summary>View changed files</summary> 📝 `docs/features/facilities.md` (+4 -0) 📝 `docs/models/dcim/rack.md` (+6 -41) ➕ `docs/models/dcim/racktype.md` (+57 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/dcim/api/serializers_/racks.py` (+85 -16) 📝 `netbox/dcim/api/urls.py` (+1 -0) 📝 `netbox/dcim/api/views.py` (+10 -0) 📝 `netbox/dcim/choices.py` (+1 -1) 📝 `netbox/dcim/filtersets.py` (+48 -2) 📝 `netbox/dcim/forms/bulk_edit.py` (+98 -6) 📝 `netbox/dcim/forms/bulk_import.py` (+53 -4) 📝 `netbox/dcim/forms/filtersets.py` (+66 -29) 📝 `netbox/dcim/forms/model_forms.py` (+65 -10) 📝 `netbox/dcim/graphql/filters.py` (+7 -0) 📝 `netbox/dcim/graphql/schema.py` (+5 -0) 📝 `netbox/dcim/graphql/types.py` (+12 -0) ➕ `netbox/dcim/migrations/0188_racktype.py` (+93 -0) 📝 `netbox/dcim/models/racks.py` (+196 -69) 📝 `netbox/dcim/search.py` (+11 -0) 📝 `netbox/dcim/tables/racks.py` (+60 -4) _...and 12 more files_ </details> ### 📄 Description ### Fixes: #12826 Add's a RackType and can set a Rack to use a Rack Type and on creation will get the fields from it. Rack fields associated with a rack_type are disabled on Rack form if rack_type is set. If rack_type is set on a rack and fields associated with a rack_type are modified (via API) then a validation error is thrown. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:27:21 +01:00
adam closed this issue 2025-12-29 23:27:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14900