-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ltm-1.6] Import mode for existing data (Leo) #181
Conversation
docs/user/design_lifecycle.md
Outdated
|
||
The import logic works like this: | ||
|
||
1. If the object that we reference doesn't exist, normal design creation logic applies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated still
64ea031
to
1448892
Compare
1157b02
to
2ff28a4
Compare
nautobot_design_builder/models.py
Outdated
# When we don't want to assume full control, make sure we don't try to own any of the query filter values. | ||
if not entry_parameters["full_control"]: | ||
for attribute in model_instance.metadata.query_filter_values: | ||
entry_parameters["changes"].pop(attribute, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what is happening here, can the code comment be clarified, please?
nautobot_design_builder/models.py
Outdated
# Check if any owned attributes exist that conflict with the changes for this instance. | ||
for record in change_records_for_instance: | ||
for attribute in record.changes: | ||
if attribute in entry_parameters["changes"]: | ||
raise ValueError( # pylint: disable=raise-missing-from | ||
f"The {attribute} attribute for {instance} is already owned by Design Deployment {record.change_set.deployment}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here, I'm not sure what is happening... perhaps a concrete example in code comments?
deb5c99
to
3852a6e
Compare
LGTM |
3852a6e
to
5bd465a
Compare
Going off of #178, addressing most of the comments there but making some more drastic changes, like excluding
!create
from usage with import mode.