Device as both parent and child

1,085 views
Skip to first unread message

Mike Clements

unread,
May 21, 2019, 8:45:15 AM5/21/19
to NetBox
Is there a way to (or plan for feature update) make a device both a parent & a child device?  So that a device can be in a device bay, and have its own device bays.

It might be a poor example but I'm thinking something like this
1 Parent device = Computer
2 Parent & Child Device = USB cellular modem, plugged into the computer
3 Child device = SD card or SIM card in the USB cellular modem

Cheers,

MC

Jason Kopacko

unread,
May 21, 2019, 10:30:46 AM5/21/19
to NetBox
I've requested this many, many times. Falls on deaf ears.

Cisco routers have slots, that can be full blade servers with their own interface cards.

Brian Candler

unread,
May 21, 2019, 11:19:26 AM5/21/19
to NetBox
In the Netbox data model, interface cards are not "child devices".

Each "device" is a completely independent managed entity - e.g. a server with its own OS, management IP address etc (unless it's a completely passive device, like a patch panel or a shelf)

However, a device can also act as a physical housing, comparable to a rack.  A "parent" device acts as a housing for independent "child" devices.  For example: a device which fits into a blade chassis, rather than fitting directly into an xU slot in a rack.

The terminology of "parent device" is perhaps unfortunate.  Maybe it would be clearer if the parent device were called a "Housing" and the child were just called a "Device", which can sit inside either a Rack or a Housing.

Trust me: child devices don't work for interface cards.  It breaks down in several ways: to take one example, you cannot make a LAG between two interfaces on two child devices.

On Tuesday, 21 May 2019 15:30:46 UTC+1, Jason Kopacko wrote:
2 Parent & Child Device = USB cellular modem, plugged into the computer

If this is an internally-fitted cellular modem, e.g. in a miniPCI slot, then Netbox expects you to enter this as an Inventory Item on the device.
 
3 Child device = SD card or SIM card in the USB cellular modem

As it happens, the Netbox data model *does* have a recursive parent-child relationship between inventory items - so the SIM card could be a child inventory item of the modem.

Unfortunately, this relationship is not exposed in the GUI - see #1692.  (It might be possible to set parent inventory item via the API, I haven't tested it).

So for now, you'd just have to enter the two inventory items as siblings, and have the relationship implied e.g. by their name.

Jason Kopacko

unread,
May 22, 2019, 11:58:54 AM5/22/19
to NetBox
My example with the 3rd level device being interfaces was probably not best, but NetBox should support at least 3 levels of grand-parent -> parent -> child. In this day with chassis's, blades, and child modules, it needs to be added. I get infinite parent-child is crazy and could introduce problems. But at min, a 3 tiered setup needs to be allowed.

Jeremy Stretch

unread,
May 22, 2019, 2:05:36 PM5/22/19
to Jason Kopacko, NetBox
> In this day with chassis's, blades, and child modules

Not all of these have their own management plane, and thus do not get modeled as devices in NetBox. For example, you do not SSH into a line card on a router. #824 is open to address grouping of components by module, but this is irrelevant to the parent/child relationship between devices.

I feel like I've been very clear about this in the past, but just to reiterate: We will not be making any changes to the parent/child model in NetBox. Power/console/network/port components should be modeled as their respective component types. Any other component which is not a device in its own right should be modeled as an inventory item. This is the model we have chosen for NetBox. If it does not suit your particular needs, NetBox unfortunately is probably not the right tool for you.

Jeremy

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/ae91582f-8a6f-411b-badc-9ac3a1da8a35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vasilii Shashkov

unread,
Nov 20, 2020, 1:19:29 PM11/20/20
to NetBox
Hello all! 

Jeremy, thank you for explanation. 

Am I correctly understand, that SNMP/Management card for UPS (it has IP and acts as "device") is a child device, and can be "installed" into Device Bay ?

But how to deal with removable PSU, that should provide a Power Port for whole "House"? 

Example: 
- 1U L3 switch may have 2 removable PSUs, that provides 2 power ports
- If I create 2 inventory items PSU0 and PSU1, I'm not able to define PSU parameters, it doesn't have attributes of power ports, and it will not show a power ports in UI
- Currently Power Port represents Integrated PSU rather than removable PSU

Okay, let's say Power Port represents integrated and removable PSU. Then it should have extra fields like "asset tag", "manufacturer" and "model" (linked to Devyce Type?),  "serial number", and e.t.c..

Is there any link to documentation/issue request that may clarify this case? 

I would like to add into my netbox instance the Dell VRTX platform, with a set of it's "Devices" and non-"Devices" (blade switches, blade servers, removable PSUs, and so on), but it still not clear to me, how to do it correctly. 

Thank you!

With regards,
Vasilii





четверг, 23 мая 2019 г. в 01:05:36 UTC+7, Jeremy Stretch:

Brian Candler

unread,
Nov 21, 2020, 3:48:17 AM11/21/20
to NetBox
On Friday, 20 November 2020 at 18:19:29 UTC Vasilii Shashkov wrote:
Am I correctly understand, that SNMP/Management card for UPS (it has IP and acts as "device") is a child device, and can be "installed" into Device Bay ?

No, not really.  The UPS is the device, because it's what fits into the xU slot in the rack. But what you are managing is the UPS, not the child device.

The management card should be added as an "Inventory Item" in the UPS, and then you assign the IP address directly to the UPS itself.

But how to deal with removable PSU, that should provide a Power Port for whole "House"? 

Example: 
- 1U L3 switch may have 2 removable PSUs, that provides 2 power ports
- If I create 2 inventory items PSU0 and PSU1, I'm not able to define PSU parameters, it doesn't have attributes of power ports, and it will not show a power ports in UI
- Currently Power Port represents Integrated PSU rather than removable PSU

Not true.  A Power Port is a power port, it doesn't say whether it's "integrated" or appears on an inventory item.  What you need to do is:
- add "Power Ports" to the Device, representing the IEC sockets
- add Inventory Items to the Device as Inventory Items, representing the power supply modules
There is no explicit linkage between a particular Power Port and a particular Inventory Item.  That's a limitation of the Netbox data model, but it's how it works.  You'd use the Inventory Item name to imply the relationship - e.g. call the first power supply "PSU1" and you can also call the power port "PSU1"

The same applies with network interfaces.  You can add a line card as an inventory item, but then you add all its interfaces, e.g. GigabitEthernet2/0/x, directly to the device.
 
HTH,

Brian.
Reply all
Reply to author
Forward
0 new messages