[PR #1657] [CLOSED] Implements #417 - Rack furniture (cable managers, shelves, blanks, etc.) #12244

Closed
opened 2025-12-29 22:20:26 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/1657
Author: @lampwins
Created: 10/29/2017
Status: Closed

Base: developHead: feature/rack-furniture


📝 Commits (2)

  • 880d9f1 implemented a new device type for rack furniture with tests
  • 77af51c PEP8 line fixes

📊 Changes

14 files changed (+544 additions, -134 deletions)

View changed files

📝 netbox/dcim/api/serializers.py (+4 -3)
📝 netbox/dcim/forms.py (+11 -2)
netbox/dcim/migrations/0056_devicetype_is_rack_furniture.py (+20 -0)
📝 netbox/dcim/models.py (+126 -1)
📝 netbox/dcim/tables.py (+2 -1)
📝 netbox/dcim/tests/test_models.py (+136 -0)
📝 netbox/ipam/models.py (+6 -0)
📝 netbox/ipam/tests/test_models.py (+43 -1)
📝 netbox/secrets/models.py (+11 -0)
📝 netbox/secrets/tests/test_models.py (+37 -0)
📝 netbox/templates/dcim/device.html (+112 -108)
📝 netbox/templates/dcim/device_edit.html (+1 -1)
📝 netbox/templates/dcim/devicetype.html (+34 -17)
📝 netbox/templates/dcim/devicetype_edit.html (+1 -0)

📄 Description

Fixes: #417

This implements two new dcim models RackFurnitureType and RackFurniture. They act much like DeviceType and Device where RackFurnitureType is a mix of DeviceType and DeviceRole. Also implements the api, docs and associated tests.

As discussed in the new docs in this PR, rack furniture allows modeling of "dumb" rackable items such as cable managers, shelves, blanks, etc. From a UI/UX perspective they act just like devices in the way they relate to racks except furniture must be racked.

This modifies the rack utilization and validation logic to support both devices and furniture. A couple of new tests were added to verify that new logic is (mostly) sound. The rack elevations show both types and allows added both types from the rack elevation view.

This PR implements support for Rack Furniture and other "dump" rackable deviecs.


🔄 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/1657 **Author:** [@lampwins](https://github.com/lampwins) **Created:** 10/29/2017 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `feature/rack-furniture` --- ### 📝 Commits (2) - [`880d9f1`](https://github.com/netbox-community/netbox/commit/880d9f1713c8db9f7f983b8d972f58a91fd281fc) implemented a new device type for rack furniture with tests - [`77af51c`](https://github.com/netbox-community/netbox/commit/77af51c4b585ba7fb66902733bd9279c581594be) PEP8 line fixes ### 📊 Changes **14 files changed** (+544 additions, -134 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/serializers.py` (+4 -3) 📝 `netbox/dcim/forms.py` (+11 -2) ➕ `netbox/dcim/migrations/0056_devicetype_is_rack_furniture.py` (+20 -0) 📝 `netbox/dcim/models.py` (+126 -1) 📝 `netbox/dcim/tables.py` (+2 -1) 📝 `netbox/dcim/tests/test_models.py` (+136 -0) 📝 `netbox/ipam/models.py` (+6 -0) 📝 `netbox/ipam/tests/test_models.py` (+43 -1) 📝 `netbox/secrets/models.py` (+11 -0) 📝 `netbox/secrets/tests/test_models.py` (+37 -0) 📝 `netbox/templates/dcim/device.html` (+112 -108) 📝 `netbox/templates/dcim/device_edit.html` (+1 -1) 📝 `netbox/templates/dcim/devicetype.html` (+34 -17) 📝 `netbox/templates/dcim/devicetype_edit.html` (+1 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. --> ### Fixes: #417 ~~This implements two new dcim models `RackFurnitureType` and `RackFurniture`. They act much like `DeviceType` and `Device` where `RackFurnitureType` is a mix of `DeviceType` and `DeviceRole`. Also implements the api, docs and associated tests.~~ ~~As discussed in the new docs in this PR, rack furniture allows modeling of "dumb" rackable items such as cable managers, shelves, blanks, etc. From a UI/UX perspective they act just like devices in the way they relate to racks except furniture _must_ be racked.~~ ~~This modifies the rack utilization and validation logic to support both devices and furniture. A couple of new tests were added to verify that new logic is (mostly) sound. The rack elevations show both types and allows added both types from the rack elevation view.~~ This PR implements support for Rack Furniture and other "dump" rackable deviecs. --- <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 22:20:26 +01:00
adam closed this issue 2025-12-29 22:20:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12244