-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a model for device modules/line cards #7844
Comments
Hello, would this approach cover multiple levels of line cards? An example with some Cisco Models:
In the command line when connecting to the router the interfaces of the cards have the following name:
Would this level of nesting work as expected? |
No; this would only model a single level of module, which I'd expect to be sufficient for the vast majority of use cases. |
@jeremystretch Great news! However, i can't figure out from the description whether this will close the SFP modules question? |
@hiddenman SFPs would be addressed by the solution proposed in #7846. |
I just played a bit around with the feature and have a question regarding naming of interfaces in modules. We have a modular switch having 4 slots: slot1,slot2,slot3,slot4 We have two Linecards:
When I insert Type A into Slot 1 i get the interfaces named as in the module template In the real world the following happens: Type A-Slot1: TenGigabitEthernet1 -> TenGigabitEthernet1/1 I took a quick survey through our inventory and the pattern seems to (interface-type-name)(slot-prefix)(relative-id) Where interface-type-name, seems to pretty uniformly come from the module/linecard Is there already any idea how this will be done? Regex in the module-bay definition which will be applied to all module interfaces? |
Just to ensure expectations are clear, this is still very much a work in progress and not yet ready for evaluation. I'm still weighing options for the component renaming. My plan right now is to add an integer If it works out, we might be able to implement something similar for virtual chassis, although that's a but more complicated because devices (and their components) can exist prior to VC assignment. |
Totally understood and thanks for quick response, we are currently planning to have As to the integer "position" field or generally the idea to transport information from Devices with where Module bays use alpha-numerical identifiers within the same device: Device A On device name of interface: lc-a-0-0, lc-a-0-1 etc Devices with internal "paths" to modules, this seems to be common in large modular Device B On device name of interface: GigabitEthernet0/1/0, GigabitEthernet1/1/2 etc. I cross checked and in this case it is not about nested modules, like the comment above, Thanks again for spending time with this feature, we are really looking forward to it |
That's a fair point; I can just make it a character field to allow for maximum flexibility. My initial thought was to allow modification to it in format strings (e.g. |
Closes #7844: Add support for device modules
Played around with the latest feature branch, it works quite nicely. Thanks a lot for that functionality. |
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:
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
The text was updated successfully, but these errors were encountered: