Converged API serializer for device/VM interfaces #3638

Closed
opened 2025-12-29 18:30:18 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 5, 2020).

Proposed Changes

Ditch the VM-specific InterfaceSerializer class and extend the DCIM counterpart to return both the device and virtual_machine fields.

Justification

The use of two slightly different serializers for the same model (dcim.Interface) has led to issues such as #4542 and complicates long-term maintenance. Using a single serializer should not impose any significant burden on API consumers, however this should be considered a breaking change so I'm tagging it for v2.9.

Originally created by @jeremystretch on GitHub (May 5, 2020). ### Proposed Changes Ditch the VM-specific `InterfaceSerializer` class and extend the DCIM counterpart to return both the `device` and `virtual_machine` fields. ### Justification The use of two slightly different serializers for the same model (`dcim.Interface`) has led to issues such as #4542 and complicates long-term maintenance. Using a single serializer should not impose any significant burden on API consumers, however this should be considered a breaking change so I'm tagging it for v2.9.
adam added the type: housekeepingstatus: blocked labels 2025-12-29 18:30:18 +01:00
adam closed this issue 2025-12-29 18:30:18 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 8, 2020):

Possibly ditching this effort in favor of #4721

@jeremystretch commented on GitHub (Jun 8, 2020): Possibly ditching this effort in favor of #4721
Author
Owner

@jeremystretch commented on GitHub (Jun 23, 2020):

Ended up implementing #4721, which obviates the need for this.

@jeremystretch commented on GitHub (Jun 23, 2020): Ended up implementing #4721, which obviates the need for this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3638