Conversation
Comment on lines
115
to
122
| Now, if we reload the IPAM B, and try to check the difference, we should see no differences. | ||
|
|
||
| ```py | ||
| >>> new_ipam_b = IpamB().load() | ||
| >>> diff = ipam_a.diff_to(ipam_b) | ||
| >>> diff.summary() | ||
| {'create': 0, 'update': 0, 'delete': 0, 'no-change': 3} | ||
| ``` |
Collaborator
There was a problem hiding this comment.
Something seems off here - you're loading new_ipam_b but then checking the diff between ipam_a and ipam_b?
| } | ||
| ) | ||
|
|
||
| diffsync.write_yaml_data(data) |
Collaborator
There was a problem hiding this comment.
Seems wrong to me to re-load and re-dump the YAML file after each individual model create/update/delete. Should this be done (once) in a sync_complete callback instead?
Contributor
Author
There was a problem hiding this comment.
you are totally right
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
glennmatthews
approved these changes
Jun 10, 2022
Merged
glennmatthews
added a commit
that referenced
this pull request
Jun 30, 2022
* New Example06 - IP Prefixes (#111) * first draft of example06 Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Attempt to fix the read the docs pipeline. (#115) * Attempt to fix the read the docs pipeline. * Yamllint. Co-authored-by: Leo Kirchner <leo@kirchne.red> * Update CODEOWNERS (#113) * Fix get() by modelname (#118) * Update example05 (#107) * Update example05 * Use site as children * Add update after adding children * Add pylint disable until Redis code is in * Update example * simplify * wip * wip * Update example * Take redis from main * imprort order * yml * update readme * Use diffsync from pypi * Apply suggestions from code review Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Code review * replace bash by python exec * Rename dockerfile to Dockerfile * Update docs source Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com> * Update CHANGELOG and bump version Co-authored-by: Christian Adell <chadell@gmail.com> Co-authored-by: Leo Kirchner <Kircheneer@users.noreply.github.com> Co-authored-by: Leo Kirchner <leo@kirchne.red>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.