Closes #20241: Record A & B terminations on cable changelog records #1339

Closed
opened 2026-04-05 23:33:09 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 9/4/2025

Closes: #20241

  • Call save() twice for new cables (before and after updating the terminations)
  • Consolidate the logic for getting/setting A/B terminations into the new _get_x_terminations() and _set_x_terminations() methods
  • Add get_terminations() to Cable to return a mapping of all current CableTerminations
  • Move the logic for updating CableTerminations to a new update_terminations() method on Cable
  • Override serialize_object() on Cable to add a_terminations and b_terminations to the change data
  • Add a complementary deserialize_object() method (for completeness)
  • Update some testing utilities to specifically check for creation records (ignoring subsequent update records)
*Originally created by @jeremystretch on 9/4/2025* ### Closes: #20241 - Call `save()` twice for new cables (before and after updating the terminations) - Consolidate the logic for getting/setting A/B terminations into the new `_get_x_terminations()` and `_set_x_terminations()` methods - Add `get_terminations()` to Cable to return a mapping of all current CableTerminations - Move the logic for updating CableTerminations to a new `update_terminations()` method on Cable - Override `serialize_object()` on Cable to add `a_terminations` and `b_terminations` to the change data - Add a complementary `deserialize_object()` method (for completeness) - Update some testing utilities to specifically check for creation records (ignoring subsequent update records)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1339