Interface name template model to allow advanced transceiver modelling as module types
type: featurestatus: needs triagenetbox
### NetBox version
4.6.7
### Feature type
Data model extension
### Proposed functionality
Using the same concept as the #19731 feature, create a new data model - "Interface Name Template", that can be associated both with a module bay and also with an interface template. MS Paint concept:
<img width="1174" height="221" alt="Image" src="https://github.com/user-attachments/assets/b132404f-aa02-4812-bd5d-a97b40ac916e" />
When a module type that models a transceiver was assigned to a device bay, netbox will check if both the module bay and the module type shares exactly one "interface name template" in commom, that template will be used to instanciate the interfaces.
### Use case
Modeling interfaces as module types was a recommended practice [see Modeling Pluggable Transceivers](https://netboxlabs.com/docs/netbox/best-practices/modeling-pluggable-transceivers/), but there is a major drawback - module type will carry a hardcoded interface template name.
In the generic case, the interface name will depend on the module type/vendor that it will be installed, and in some cases even it will have different names in the same module.
For example - a CISCO transceiver SFP-10G-LR-S installed in linecard A9K-48X10GE-1G-SE in ASR-9010 Chassis can have a name like TenGigE0/{slot_id}/0/{transceiver_position}. The same transceiver installed in linecard EPA-10X10GE in ASR-1006X chassis can have a name like TenGigabitEthernet0/{slot_id}/{transceiver_position}.
Another example - a Huawei transceiver S4017483 installed in first 8 positions, that accepts SFP+, in ATN-910D-C Chassis will have a name like GigabitEthernet0/2/{transceive_position}, and if installed in positions 9-24, that accepts SFP28 and SFP+, will have a name like 25GE0/2/{transceiver_position}
In pratice, right now the user must use different module types for the same transceiver to accomplish the interface naming changes. Also, the user cannot move a transceiver module from one device to another one that has different naming schema.
The idea is that when the user creates the interface template, in the module type, a new field will appear that allows to select the compatible interfaces templates, as the MS Paint concept:
<img width="1204" height="658" alt="Image" src="https://github.com/user-attachments/assets/be63a117-7dcd-45e6-88dc-60781c93f7af" />
To maintain he backyards compatibility will be maintained one of the two fields - 'Name' or 'Interface Template' must be selected to create a interface template.
### Database changes
Create a new data model - "Interface Name Template" that can be associated (M2M) with:
- Module Bay
- Module Bay Template
- Interface Template
This model will contains two fields:
- label - string
- naming - string
### External dependencies
I don't see any external dependency requiriments.
0 条评论