Skip to content

Example 5: PeeringDB to Nautobot example - #81

Merged
dgarros merged 8 commits into
networktocode:mainfrom
chadell:example-peeringdb
Dec 14, 2021
Merged

Example 5: PeeringDB to Nautobot example#81
dgarros merged 8 commits into
networktocode:mainfrom
chadell:example-peeringdb

Conversation

@chadell

Copy link
Copy Markdown
Contributor

Contributing with this example: https://github.com/chadell/playground-diffsync

Comment threadexamples/05-nautobot-peeringdb/adapter_nautobot.py
Comment threadexamples/05-nautobot-peeringdb/adapter_nautobot.py Outdated
Comment threadexamples/05-nautobot-peeringdb/adapter_peeringdb.py Outdated
Comment threadexamples/05-nautobot-peeringdb/adapter_peeringdb.py Outdated
glennmatthews
glennmatthews previously approved these changes Nov 17, 2021
Comment threadexamples/05-nautobot-peeringdb/README.md Outdated
Comment threadexamples/05-nautobot-peeringdb/README.md
@chadell

chadell commented Nov 21, 2021

Copy link
Copy Markdown
ContributorAuthor

@glennmatthews , I am not sure if the example is good for the CI, because it is actually updating the demo.nautobot.com at every run (it creates some sites and regions)... I leave at your criteria
BTW, do not merge it before 29 of November, I'm doing a workshop with the library and I prefer to not include this example already 😄

@glennmatthews

glennmatthews commented Nov 22, 2021

Copy link
Copy Markdown
Collaborator

Good thought. Maybe make the main.py (which it looks like you may not have committed to Git?) only run up to the diff.summary() and not perform the final sync_from() step?

Or alternately maybe we should leave this out of the CI altogether since it's not self-contained but is interacting with external systems. That might be wiser.

Comment threadexamples/05-nautobot-peeringdb/README.md Outdated
Comment threadexamples/05-nautobot-peeringdb/adapter_nautobot.py Outdated
Comment threadexamples/05-nautobot-peeringdb/adapter_peeringdb.py Outdated
@chadell

chadell commented Nov 22, 2021

Copy link
Copy Markdown
ContributorAuthor

Yes, I believe that in this case is wiser to skip the test as being dependent on external systems. I added the main.py as reference

glennmatthews
glennmatthews previously approved these changes Nov 23, 2021
dgarros
dgarros previously approved these changes Nov 30, 2021

@dgarrosdgarros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me overall,
it's not a blocker but I think if we should leverage pynautobot whenever possible, it makes the code cleaner.

@chadell

Copy link
Copy Markdown
ContributorAuthor

Looks good to me overall, it's not a blocker but I think if we should leverage pynautobot whenever possible, it makes the code cleaner.

I did it this way to avoid the extra dependency

@dgarros

Copy link
Copy Markdown
Contributor

I did it this way to avoid the extra dependency

That's a good reminder that we should be consistent here
for the other examples, we didn't add the dependencies to the pyproject.toml, instead we have a requirements.txt file in the example directory

I'm good either way but we should be consistent

@glennmatthews what is your preference ?

@dgarrosdgarros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@chadell please can you remove the changes from the pyproject.toml and add a requirements.txt file in your example directory to align with the other examples

@chadell

Copy link
Copy Markdown
ContributorAuthor

@chadell please can you remove the changes from the pyproject.toml and add a requirements.txt file in your example directory to align with the other examples

The requirements.txt file is already present. the changes in pyproject.toml should not be there, will remove.

@dgarrosdgarros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @chadell

@dgarros
dgarros merged commit 53d6095 into networktocode:mainDec 14, 2021
@chadell
chadell deleted the example-peeringdb branch December 14, 2021 16:30
Sign up for freeto 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.

3 participants

@chadell@glennmatthews@dgarros