Rename Interface form_factor to type #2402

Closed
opened 2025-12-29 17:25:46 +01:00 by adam · 3 comments
Owner

Originally created by @jeremystretch on GitHub (Feb 21, 2019).

Proposed Changes

Rename the form_factor field on the dcim.Interface model to type, and update forms and serializers accordingly.

Justification

"Form factor" is a misnomer given the field's purpose in conveying specific network technologies. For example, 100 Mbps and 1 Gbps Ethernet can both utilize the 8P8C copper form factor, but provide two different types of services and employ different wire protocols.

Originally created by @jeremystretch on GitHub (Feb 21, 2019). ### Proposed Changes Rename the `form_factor` field on the dcim.Interface model to `type`, and update forms and serializers accordingly. ### Justification "Form factor" is a misnomer given the field's purpose in conveying specific network technologies. For example, 100 Mbps and 1 Gbps Ethernet can both utilize the 8P8C copper form factor, but provide two different types of services and employ different wire protocols.
adam added the status: accepted label 2025-12-29 17:25:46 +01:00
adam closed this issue 2025-12-29 17:25:46 +01:00
Author
Owner

@lampwins commented on GitHub (Mar 4, 2019):

@jeremystretch I think we should we allow a period of backward compatibility in the API. Say go ahead and change the model field but in the API continue to allow the use of form_factor for a period of time (I suggest until 2.7)? I foresee this being one of those nasty breaking changes for a lot of people and thus a reason to delay 2.6 adoption.

@lampwins commented on GitHub (Mar 4, 2019): @jeremystretch I think we should we allow a period of backward compatibility in the API. Say go ahead and change the model field but in the API continue to allow the use of `form_factor` for a period of time (I suggest until 2.7)? I foresee this being one of those nasty breaking changes for a lot of people and thus a reason to delay 2.6 adoption.
Author
Owner

@jeremystretch commented on GitHub (Mar 4, 2019):

Yeah, I've been asking myself whether it's honestly worth the hassle. I suppose we could migrate the field name, then add a getter/setter named form_factor with a deprecation warning to retain backward compatibility until v2.7.

@jeremystretch commented on GitHub (Mar 4, 2019): Yeah, I've been asking myself whether it's honestly worth the hassle. I suppose we could migrate the field name, then add a getter/setter named `form_factor` with a deprecation warning to retain backward compatibility until v2.7.
Author
Owner

@jeremystretch commented on GitHub (Apr 12, 2019):

I've renamed form_factor to type but added a new form_factor field to replicate the functionality of type for backward compatibility. form_factor will be fully removed in NetBox v2.7.

@jeremystretch commented on GitHub (Apr 12, 2019): I've renamed `form_factor` to `type` but added a new `form_factor` field to replicate the functionality of `type` for backward compatibility. `form_factor` will be fully removed in NetBox v2.7.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2402