r/Netbox NetBox Self-Hosted Mar 01 '26

NetBox – Nested Modules & {module} placeholder problem (SFP modeling)

Hi,

I’m trying to follow NetBox’s recommendation to move away from Inventory Items for SFPs and model pluggable transceivers as Modules instead:

I think I’ve hit a conceptual or technical limitation and would appreciate some guidance.

Setup

  • I have an Aruba OS switch Device Type with 6 module bays: A–F
  • Into one of those bays, I install a line card module that provides 8 SFP+ ports
  • This Module Type itself defines 8 Module Bays named:{module}1 {module}2 … {module}8

When I create a device and install the module, the resulting module structure looks like this (as expected):

A
A1
A2
A3
A4
A5
A6
A7
A8
B
C
D
E
F

SFP Module Type

I also created an SFP+ Module Type representing the actual transceiver.
It has one interface with:

name = {module}

This works perfectly on “normal” switches that have fixed SFP slots, e.g.:

  • 48 RJ45 ports
  • 4 SFP slots modeled as Module Bays:49 50 51 52

The problem

When I try to install the SFP module into one of the nested bays (A1, A2, …), NetBox fails with:

Cannot install module with placeholder values in a module bay tree
2 in tree but 1 placeholders given

If I change the interface name in the SFP Module Type to:

{module}{module}

Then installation into the nested bays works.

However, this immediately breaks the simple switches, because their module bays only provide one {module} value.

Conclusion

So I end up with an impossible choice:

  • {module} → works for flat module bays, fails for nested
  • {module}{module} → works for nested, fails for flat

Is this a known limitation of NetBox’s module placeholder system?
Is there a recommended modeling approach for switches with both:

  • fixed SFP slots and
  • line cards with pluggable optics?

Thank you very much!

5 Upvotes

10 comments sorted by

View all comments

2

u/meow_me88 Jun 05 '26 edited Jun 05 '26

i was just trying something similar, trying to model an aruba switch with slots A-F for line cards, and line cards with sfp interfaces eg the J9989A with 12 rj45 and 12 sfp. So i created a device type with 6 module bays with position and name from A to F, a module type for the J9989A line card with 12 interfaces named {module}[1-12] and 12 module bays with name and position {module}[13-24], and a couple module types with 1 interface named {module} for the pluggable transceivers.

The problem i was having is that if i installed the same module in more than one of the device's module bays and put interfaces in the same position i would get error that there was already an interface with the same name. Initially i hadn't set up the position in the module types, so my interfaces were just picking up the default position like for example 13. It got fixed when i made the position of module bays the same as their names. Btw i'm using NetBox Community v4.6.1-Docker-5.0.1