-
Notifications
You must be signed in to change notification settings - Fork 29
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
New Example06 - IP Prefixes #111
Conversation
examples/06-ip-prefixes/README.md
Outdated
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} | ||
``` |
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.
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) |
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.
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?
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.
you are totally right
Co-authored-by: Glenn Matthews <[email protected]>
* New Example06 - IP Prefixes (#111) * first draft of example06 Co-authored-by: Glenn Matthews <[email protected]> * Attempt to fix the read the docs pipeline. (#115) * Attempt to fix the read the docs pipeline. * Yamllint. Co-authored-by: Leo Kirchner <[email protected]> * 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 <[email protected]> * Code review * replace bash by python exec * Rename dockerfile to Dockerfile * Update docs source Co-authored-by: Glenn Matthews <[email protected]> * Update CHANGELOG and bump version Co-authored-by: Christian Adell <[email protected]> Co-authored-by: Leo Kirchner <[email protected]> Co-authored-by: Leo Kirchner <[email protected]>
No description provided.