Add an asset tag field to the rack model #1186

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

Originally created by @mattbostock on GitHub (Aug 21, 2017).

Issue type

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

Environment

  • Python version: N/A
  • NetBox version: 2.0.7

Description

Add fields to the rack model so that one can identify:

  • the manufacturer of the physical rack
  • the model number
  • the serial number
  • the asset tag

Use case

In the same way that it's useful to know what device type (model and manufacturer) a server is, it's also useful to know the same details for the rack:

  • serial number and asset tags helps to uniquely identify a given rack
  • manufacturer and model helps to identify a rack and track inventory
Originally created by @mattbostock on GitHub (Aug 21, 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 --> ### Environment * Python version: N/A * NetBox version: 2.0.7 ### Description Add fields to the rack model so that one can identify: - the manufacturer of the physical rack - the model number - the serial number - the asset tag ### Use case In the same way that it's useful to know what device type (model and manufacturer) a server is, it's also useful to know the same details for the rack: - serial number and asset tags helps to uniquely identify a given rack - manufacturer and model helps to identify a rack and track inventory
adam added the status: acceptedtype: feature labels 2025-12-29 16:29:50 +01:00
adam closed this issue 2025-12-29 16:29:51 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 21, 2017):

The problem with adding a RackType object analogous to DeviceType is we've already associated a type, width, and height with each individual rack. Introducing a separate model for this would allow racks of the same RackType to have different physical characteristics defined locally, which obviously wouldn't make sense. It would be possible to allow users to begin adopting the new approach at their leisure, but many would opt not to pursue it and I don't want to support two schemes for defining racks indefinitely.

Alternatively, we could add a direct association from the Rack model to the Manufacturer model, and add a model character field, but that doesn't strike me as particularly useful.

Serial number I have no problem adding. Asset tag might be problematic, as it's reasonable to assume that an asset tag will be unique across racks and devices, so we'd have to change it from a local field to a ForeignKey on a new model with its own table, which could get messy with regard to data migrations.

@jeremystretch commented on GitHub (Aug 21, 2017): The problem with adding a RackType object analogous to DeviceType is we've already associated a type, width, and height with each individual rack. Introducing a separate model for this would allow racks of the same RackType to have different physical characteristics defined locally, which obviously wouldn't make sense. It would be possible to allow users to begin adopting the new approach at their leisure, but many would opt not to pursue it and I don't want to support two schemes for defining racks indefinitely. Alternatively, we could add a direct association from the Rack model to the Manufacturer model, and add a `model` character field, but that doesn't strike me as particularly useful. Serial number I have no problem adding. Asset tag might be problematic, as it's reasonable to assume that an asset tag will be unique across racks _and_ devices, so we'd have to change it from a local field to a ForeignKey on a new model with its own table, which could get messy with regard to data migrations.
Author
Owner

@jeremystretch commented on GitHub (Oct 9, 2017):

I'm going to hold off on adding an asset tag field to the rack model for now. I'd like to gather more feedback on that feature before we implement to avoid working ourselves into a corner.

@jeremystretch commented on GitHub (Oct 9, 2017): I'm going to hold off on adding an asset tag field to the rack model for now. I'd like to gather more feedback on that feature before we implement to avoid working ourselves into a corner.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1186