Skip to content

Update to Napalm version 3.2.0 #114

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

Merged
merged 1 commit into from
Nov 18, 2020
Merged

Update to Napalm version 3.2.0 #114

merged 1 commit into from
Nov 18, 2020

Conversation

nniehoff
Copy link

This PR is to update the onboarding plugin to Napalm 3.2.0. I had to update all dependencies with poetry hence the updates to poetry.lock.

@nniehoff
Copy link
Author

I also did some cleanup for NetBox 2.9 (configuration.py) and pylint.

@dgarros
Copy link
Contributor

dgarros commented Nov 17, 2020

Could we support both napalm 2 and napalm 3 ? if we don't have to enforce a specific version I think it's better.
poetry by default limit

Looking at it more closely, I think our pyproject.toml is too restrictive right now, we shouldn't pin our dependencies to a specific version

# from pyproject.toml
invoke = "^1.4.1"
napalm = "^3.2.0"

https://python-poetry.org/docs/dependency-specification/

@glennmatthews
Copy link
Contributor

@dgarros If I'm reading that link correctly, ^1.4.1 in pyproject.toml means >=1.4.1, <2.0.0, which seems reasonable to me.

Agreed that it would be nice (if possible) to set the napalm dependency to something like >=2.5.0, <4.0.0 instead of requiring at least 3.2.0.

@nniehoff
Copy link
Author

Could we support both napalm 2 and napalm 3 ? if we don't have to enforce a specific version I think it's better.
poetry by default limit

Looking at it more closely, I think our pyproject.toml is too restrictive right now, we shouldn't pin our dependencies to a specific version

# from pyproject.toml
invoke = "^1.4.1"
napalm = "^3.2.0"

https://python-poetry.org/docs/dependency-specification/

AIUI right now we are basically saying for napalm we want versions >= 3.2.0 < 4.0.0. We could change this to something like:

napalm = ">= 2.5.0, < 4"

I think the problem is if version 4 comes out I don't think we want to automatically support that without testing so at the very least I think we need to keep the < 4 just to be safe. If we want to add support for multiple versions we will also need to adjust the tests for multiple versions.

@nniehoff nniehoff mentioned this pull request Nov 17, 2020
@mzbroch
Copy link
Contributor

mzbroch commented Nov 17, 2020

Could we support both napalm 2 and napalm 3 ? if we don't have to enforce a specific version I think it's better.
poetry by default limit

I agree, in general we're more focused on NAPALM facts structure and its content, than a specific NAPALM version.

Copy link
Contributor

@mzbroch mzbroch left a comment

Choose a reason for hiding this comment

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

LGTM, please squash commits

edit: Reason of this comment was to improve git history cleanness, and to avoid injecting the code in one commit and deleting it in next commit as a part of single pull-request. In current iteration the commits names do not reflect their contents as well. (ie changes of base configuration)

@nniehoff nniehoff merged commit f34817d into develop Nov 18, 2020
@nniehoff nniehoff deleted the nn-napalm3 branch November 19, 2020 02:23
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.

4 participants