Currently the Rack endpoint displays how many devices it houses, I would like to expand this functionality to be more specific.
I propose an extra field called: nonRackedDevices that indicates how many of these devices that are non-racked
This would be useful when interacting with the api for rack capacity reasons, we have a rack that only contains 1U devices but also have some non-racked devices such as PDU's. We would then subtract the non-racked devices from the device count and compare this to the height of the rack, to know how much space was left.
Extra field for non-racked devices
None
This would be useful when interacting with the api for rack capacity reasons, we have a rack that only contains 1U devices but also have some non-racked devices such as PDU's.
This seems like a very niche use case. Generally speaking, it's not reasonable to assume that all devices within a rack are 1U, so determining utilization isn't as simple as counting the number of installed devices. This also totally ignores the concept of device depth: it's perfectly plausible to have more than 42 half-depth devices in a 42U rack, for instance.
The recommended approach for determining a rack's capacity is to fetch the elevation for a particular face (e.g. GET /api/dcim/racks/<id>/elevation/?face=front). This data allows for easily calculating the amount of used and available space within a rack.
After writing this issue I made some simple logic in my frontend application to do this.
I agree that this is very niche, but it might still be useful to know the amount of non-racked devices, as it shows on the page for the rack.
I'm going to decline this as there's been no further discussion. As indicated above, there already exists a mechanism for fetching the desired information.