Add support for half-width devices #2033

Closed
opened 2025-12-29 17:21:38 +01:00 by adam · 1 comment
Owner

Originally created by @jasonguy on GitHub (Sep 27, 2018).

Environment

  • Python version: 3.5.3
  • NetBox version: 2.4.3

Proposed Functionality

We currently have a number of half-width switches in the racks. This poses a few challenges for entering them into netbox as they are side-by-side in the 1RU space. The mounting hardware is 19 inches, and is essentially a shelf with a divider.

I have been looking at the code to see how this can be easily added. I suppose this would require a way to designate the device width as 'half' or 'full'. Once a half-width device is created, and the pick-list for the RU is selected, there would additionally need to be [left|right] designation.

For the elevation view, I did a little tinkering in chrome, and found the following CSS will nicely divide the RU list index, though the template will require a bit of logic, and that is where I realized I am not familiar enough with the codebase to render this in a really good way.

ul.rack li span.half_width{
    columns: 2;
    column-rule-width: 1px; 
    column-gap:1px; 
    column-rule-style: solid; 
    column-rule-color: black
}
<li class="occupied h1u" style="background-color: #8bc34a">
    <span class="half_width">
        <a href="/dcim/devices/440/" data-toggle="popover" data-trigger="hover" data-container="body" data-html="true" data-content="Switch<br />Mellanox 2100 (1U)" data-original-title="" title="">
            mlx-2100-51
        </a>
        <a href="/dcim/devices/440/" data-toggle="popover" data-trigger="hover" data-container="body" data-html="true" data-content="Switch<br />Mellanox 2100 (1U)" data-original-title="" title="">
            mlx-2100-52
        </a>
   </span>
</li>

Use Case

The half width switches are really nice and gaining in popularity. These work well for a top-of-rack MLAG switch pair, and only take up 1RU for 2 switches. It would be nice to represent this accurately in Netbox.

Database Changes

Add a field in device-type for "width".
Add a field in device for "position_side"

External Dependencies

None.

Originally created by @jasonguy on GitHub (Sep 27, 2018). ### Environment * Python version: 3.5.3 * NetBox version: 2.4.3 ### Proposed Functionality We currently have a number of half-width switches in the racks. This poses a few challenges for entering them into netbox as they are side-by-side in the 1RU space. The mounting hardware is 19 inches, and is essentially a shelf with a divider. I have been looking at the code to see how this can be easily added. I suppose this would require a way to designate the device width as 'half' or 'full'. Once a half-width device is created, and the pick-list for the RU is selected, there would additionally need to be [left|right] designation. For the elevation view, I did a little tinkering in chrome, and found the following CSS will nicely divide the RU list index, though the template will require a bit of logic, and that is where I realized I am not familiar enough with the codebase to render this in a really good way. ``` ul.rack li span.half_width{ columns: 2; column-rule-width: 1px; column-gap:1px; column-rule-style: solid; column-rule-color: black } <li class="occupied h1u" style="background-color: #8bc34a"> <span class="half_width"> <a href="/dcim/devices/440/" data-toggle="popover" data-trigger="hover" data-container="body" data-html="true" data-content="Switch<br />Mellanox 2100 (1U)" data-original-title="" title=""> mlx-2100-51 </a> <a href="/dcim/devices/440/" data-toggle="popover" data-trigger="hover" data-container="body" data-html="true" data-content="Switch<br />Mellanox 2100 (1U)" data-original-title="" title=""> mlx-2100-52 </a> </span> </li> ``` ### Use Case The half width switches are really nice and gaining in popularity. These work well for a top-of-rack MLAG switch pair, and only take up 1RU for 2 switches. It would be nice to represent this accurately in Netbox. ### Database Changes Add a field in device-type for "width". Add a field in device for "position_side" ### External Dependencies None.
adam closed this issue 2025-12-29 17:21:38 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 27, 2018):

The scheme NetBox uses for modeling rack space does not provide for half-width devices. However, you can create a parent device type with two (or more) bays to achieve this.

@jeremystretch commented on GitHub (Sep 27, 2018): The scheme NetBox uses for modeling rack space does not provide for half-width devices. However, you can create a parent device type with two (or more) bays to achieve this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2033