-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v3.0.10
Feature type
New functionality
Proposed functionality
Add two new models for tracking the installation of field-swappable hardware modules/line cards/etc. within devices: Module and ModuleType. These will roughly parallel Device and DeviceType, where the later serves as a "template" for instances of the former. A ModuleType can have device component templates assigned to it. Upon the "installation" of a Module within a Device, these components will be instantiated and assigned to the new Module, just as with DeviceTypes.
It likely also makes sense to introduce ModuleBays, to which (similar to DeviceBays) Modules can be installed. A ModuleBay can be assigned a position identifier, which can be leveraged to automatically rename component templates assigned to a ModuleType.
For example, suppose we have a DeviceType with six ModuleBayTemplates. When creating a new Device from this DeviceType, it would receive six ModuleBays assigned to it. Next we might device a ModuleType with 24 InterfaceTemplates assigned to it. When "installing" a Module into the Device, 24 new Interfaces would be created and assigned to the Module. Ideally, these would be automatically named to correspond to the Module's position. (The exact logic supporting this is TBD but there are a few options.)
When a Module is removed, it and any associated device components would be deleted.
(This concept was originally introduced in #824, but has been updated and fleshed out a bit.)
Use case
This proposal would address the use case of modeling chassis-based devices with removable line cards or similar components. Some examples include the Cisco Nexus 7000 series switch and Juniper MX480 router. Associating individual components with a module provides a layer of relationship that better facilitates the addition and removal of these components as they relate to the parent module.
Database changes
The proposal above requires the addition of four new models:
- ModuleBayTemplate
- ModuleBay
- ModuleType
- Module
It will also require changing the device_type ForeignKey relationship on the device component template models to a GenericForeignKey, so that they can be associated with ModuleTypes as well.
External dependencies
No response