Description
NetBox version
v.4.3.0
Feature type
Data model extension
Proposed functionality
Currently InterfaceSpeecChoices do not support 2.5GBASE-T and 5GBASE-T speeds:
class InterfaceSpeedChoices(ChoiceSet):
key = 'Interface.speed'
CHOICES = [
(10000, '10 Mbps'),
(100000, '100 Mbps'),
(1000000, '1 Gbps'),
(10000000, '10 Gbps'),
(25000000, '25 Gbps'),
(40000000, '40 Gbps'),
(100000000, '100 Gbps'),
(200000000, '200 Gbps'),
(400000000, '400 Gbps'),
]
I suggest to modify it the following way so we could be able to set the correct speeds on Netbox Interfaces.
class InterfaceSpeedChoices(ChoiceSet):
key = 'Interface.speed'
CHOICES = [
(10000, '10 Mbps'),
(100000, '100 Mbps'),
(1000000, '1 Gbps'),
(2500000, '2.5 Gbps'),
(5000000, '5 Gbps'),
(10000000, '10 Gbps'),
(25000000, '25 Gbps'),
(40000000, '40 Gbps'),
(100000000, '100 Gbps'),
(200000000, '200 Gbps'),
(400000000, '400 Gbps'),
]
Use case
2.5GBASE-T and 5GBASE-T speeds already exist in InterfaceTypeChoices but this only represent the actual hardware.
The operating speed could be something else and once this modification is implemented, 2.5Gbps and 5Gbps speeds could be documented as well on the interfaces.
This would also make easier to reuse this class for API input validation in projects using Netbox as source of truth.
Database changes
No DB change (I guess)
External dependencies
No external dependencies