new custom field type: data rate #7004

Closed
opened 2025-12-29 19:47:41 +01:00 by adam · 2 comments
Owner

Originally created by @swoga on GitHub (Sep 20, 2022).

NetBox version

v.3.3.4

Feature type

New functionality

Proposed functionality

Add a new type of custom field for data rates that use the SelectSpeedWidget for input and humanize_speed for representation in table views.

Use case

We would like to document the bandwidth for L2VPN entries, so we would create a custom field.
The widget would make it easier to enter values and the pretty formatting would greatly improve readability.

(I think adding such a field to the general L2VPN model doesn't make sense in the context of multipoint connections, hence an individual solution via a custom field.)

Database changes

none

External dependencies

none

Originally created by @swoga on GitHub (Sep 20, 2022). ### NetBox version v.3.3.4 ### Feature type New functionality ### Proposed functionality Add a new type of custom field for data rates that use the `SelectSpeedWidget` for input and `humanize_speed` for representation in table views. ### Use case We would like to document the bandwidth for L2VPN entries, so we would create a custom field. The widget would make it easier to enter values and the pretty formatting would greatly improve readability. (I think adding such a field to the general L2VPN model doesn't make sense in the context of multipoint connections, hence an individual solution via a custom field.) ### Database changes none ### External dependencies none
adam added the type: feature label 2025-12-29 19:47:41 +01:00
adam closed this issue 2025-12-29 19:47:41 +01:00
Author
Owner

@jsenecal commented on GitHub (Sep 22, 2022):

Would a Bandwidth field make sense with the L2VPNTermination Model ?

NetBox already has somewhat similar functionality on the models for CircuitTerminations port_speed field which is optional... Perhaps this would work here as well...

@jsenecal commented on GitHub (Sep 22, 2022): Would a `Bandwidth` field make sense with the [L2VPNTermination Model](https://github.com/netbox-community/netbox/blob/develop/netbox/ipam/models/l2vpn.py#L83) ? NetBox already has somewhat similar functionality on the models for [CircuitTerminations `port_speed` field](https://github.com/netbox-community/netbox/blob/develop/netbox/circuits/models/circuits.py#L183) which is optional... Perhaps this would work here as well...
Author
Owner

@jeremystretch commented on GitHub (Sep 26, 2022):

Add a new type of custom field for data rates that use the SelectSpeedWidget for input and humanize_speed for representation in table views.

I'm sorry but that's a bit too niche for custom fields, and would be very difficult for us to maintain long-term. You'll have to stick with a normal integer field, or as @jsenecal suggests perhaps propose adding a built-in field for this purpose.

@jeremystretch commented on GitHub (Sep 26, 2022): > Add a new type of custom field for data rates that use the SelectSpeedWidget for input and humanize_speed for representation in table views. I'm sorry but that's a bit too niche for custom fields, and would be very difficult for us to maintain long-term. You'll have to stick with a normal integer field, or as @jsenecal suggests perhaps propose adding a built-in field for this purpose.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7004