Move YAML serialization for component templates from DeviceType to the individual models #6752

Closed
opened 2025-12-29 19:44:58 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 1, 2022).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

The to_yaml method on the DeviceType model currently constructs data for itself as well as for all of its assigned component templates. While this is desirable, the actual rendering logic for each component should liver under its respective model.

Justification

This will help to ensure the YAML serialization logic is kept up to date as the component template models change over time.

Originally created by @jeremystretch on GitHub (Aug 1, 2022). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes The `to_yaml` method on the DeviceType model currently constructs data for itself as well as for all of its assigned component templates. While this is desirable, the actual rendering logic for each component should liver under its respective model. ### Justification This will help to ensure the YAML serialization logic is kept up to date as the component template models change over time.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 19:44:58 +01:00
adam closed this issue 2025-12-29 19:44:58 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6752