Skip to content

Conversation

mzbroch
Copy link
Contributor

@mzbroch mzbroch commented Mar 6, 2021

This PR fixes issue #93

OnboardingDevice model instances are created as a part of onboarding process for devices created before ntc-netbox-plugin-onboarding installation. With the fix, template_content is rendered properly for re-onboarded devices.


Closes #93

@mzbroch mzbroch requested review from dgarros and glennmatthews March 6, 2021 19:03
Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the long term (i.e. once nautobot/nautobot#16 is implemented) this would be better solved as a one-time task run specifically when the plugin is first installed. In the short term, you might be able to implement a lot of this via custom logic in a migrations script (i.e., so that when nautobot-server migrate is run after installing the plugin, you have a function that iterates over all existing Device records and creates corresponding OnboardingDevice records) at that time. Have you considered that possibility?

Other than that suggestion, this looks good to me!

@mzbroch mzbroch force-pushed the mzb-develop-fix-93 branch from dc1f5c0 to b4eada1 Compare March 15, 2021 09:37
@mzbroch mzbroch requested a review from glennmatthews March 15, 2021 09:38
@mzbroch mzbroch merged commit 63b746c into develop Mar 16, 2021
@mzbroch mzbroch deleted the mzb-develop-fix-93 branch March 16, 2021 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create OnboardingDevice instance for existing devices
2 participants