napalm-automation / napalm-base

Apache License 2.0
32 stars 48 forks source link

Added integration with napalm-yang #264

Open dbarrosop opened 7 years ago

dbarrosop commented 7 years ago

DO NOT MERGE

Depends on napalm-automation/napalm-yang#61

This PR integrates napalm-yang into the drivers. See:

https://github.com/napalm-automation/napalm-base/compare/dbarrosop/napalm-yang?expand=1#diff-b284a28710cce90d9d9be3a7f4cabc8e

(gist with the execution https://gist.github.com/dbarrosop/8fae309ecbfe7d1207044aca5732beba)

"getters" are dynamic which means there is no dependency loop between napalm-yang and the drivers themselves. I just have to move the SUPPORTED_MODELS to napalm-yang which I will do once we are happy with the PR.

@mirceaulinic @ktbyers thoughts?

Note: test.py will go away before merging. That will be part of the documentation.

dbarrosop commented 7 years ago

Pinging @matejv and @bewing as I know they have been playing with napalm-yang as well.

dbarrosop commented 7 years ago

I have added a mechanism to print the models as well, I guess it's useful for reference.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.6%) to 58.46% when pulling f0aa88965027851930377664c1f6c41076700384 on dbarrosop/napalm-yang into e21f10f5f26b02d15ed0e73fe4e6476638d991e7 on develop.

mirceaulinic commented 6 years ago

Okay, Python 2 tests passed here. I think this only waits for python 3 support in napalm-yang @dbarrosop?

dbarrosop commented 6 years ago

I won't wait until napalm-yang has support for py3 because that will just delay things and napalm-yang is an optional module anyway. However, as I write some documentation on how to use this I am making minor adjustments so hold on this for a few more days.