Closed mirceaulinic closed 7 years ago
Aren't we overdoing it? Seems like a lot of code for something that you are not even supposed to be using in the first place as this break the whole assumption that napalm is vendor agnostic.
Seems like a lot of code for something that you are not even supposed to be using in the first place as this break the whole assumption that napalm is vendor agnostic.
The cli
method itself is not vendor agnostic in the first place.
However, it turns useful sometimes, and there's a real-world demand for features that are not covered yet by napalm (and there are quite a few). Some others won't ever be supported anyway, e.g. show processes extensive | match netconf
.
My easy assumption is that we can't put all the shows into functions in napalm, so we leave a 'back door' thus people can manipulate with, although it's not elegant.
Sent from my iPhone
On 18 Jul 2017, at 3:57 PM, David Barroso notifications@github.com wrote:
Aren't we overdoing it? Seems like a lot of code for something that you are not even supposed to be using in the first place as this break the whole assumption that napalm is vendor agnostic.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Yes, I am fine with the cli command. I just want to make sure we don't overdo it. We are adding +100 lines of code to a method that is "nice to have" only to workaround something the vendor decided not to implement. If this is such an important feature, why is people asking us instead of asking them?
and there's a real-world demand for features that are not covered
For example? I'd expect a bunch of issues requesting features backing that up ;)
Or even PRs, if they are using this method to do something useful with it I'd expect people to be parsing the output themselves. Or are they using napalm just to build an alternative for pssh
?
I have approved the PR as I mostly wanted to give some food for thought. Feel free to merge if you decide so after fixing the small CI issue.
One of the most common problems when using the
cli
method in napalm-junos is that Junos does not process the pipes. If we are anyway at enhancing the cli (https://github.com/napalm-automation/napalm-junos/pull/186) and align it to the behaviour with the other drivers (which can do piping), this PR addresses to process the piping inside napalm-junos.Ping @sincerywaing this might interest you as well. Thoughts?