Skip to content
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

Merged
merged 5 commits into from
Jun 10, 2022
Merged

New Example06 - IP Prefixes #111

merged 5 commits into from
Jun 10, 2022

Conversation

chadell
Copy link
Collaborator

@chadell chadell commented Jun 9, 2022

No description provided.

@chadell chadell requested a review from glennmatthews as a code owner June 9, 2022 17:34
examples/06-ip-prefixes/README.md Outdated Show resolved Hide resolved
examples/06-ip-prefixes/README.md Outdated Show resolved Hide resolved
examples/06-ip-prefixes/README.md Outdated Show resolved Hide resolved
examples/06-ip-prefixes/README.md Outdated Show resolved Hide resolved
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}
```
Copy link
Collaborator

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)
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you are totally right

@chadell chadell requested a review from glennmatthews June 10, 2022 05:33
@chadell chadell merged commit 46af6c4 into develop Jun 10, 2022
@chadell chadell deleted the example06 branch June 10, 2022 17:15
@glennmatthews glennmatthews mentioned this pull request Jun 30, 2022
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 <[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]>
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.

2 participants