-
Notifications
You must be signed in to change notification settings - Fork 555
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 driver: eos_ssh for Arista devices without API #1014
Comments
Hey @TheRealBecks. I'd give that a 👍 as I'm well aware of the challenge with the eAPI licensing. I'm not sure what approach you've been working on, but I'd suggest the following to minimize the amount of code we're maintaining (and, implicitly, your work 😉) while re-using the existing code. In brief:
def _run_commands(self, commands):
if self.transport == 'ssh':
ret = []
for command in commands:
cmd_pipe = command + ' | json'
cmd_txt = self._netmiko_device.send_command(cmd_pipe)
cmd_json = json.loads(cmd_txt)
ret.append(cmd_json)
return ret
else:
return self.device.run_commands(commands) Something along these lines. the
result = self._run_commands(commands) I think that'd work well. Let me know if you have any questions or other thoughts! |
I would be okay with doing this as long as we do this in the way Mirceau describes. In other words, there is no parsing and everything is done via Or worded differently, we would basically be saying that SSH is just another transport and that we won't be doing any screen-scraping in the driver. Sound reasonable to everyone? |
I've run into a similar situation regarding access to the EOS API and was wondering about using ssh rather than https to connect to the devices from napalm. I don't see any thing in the code base that suggests this ever got integrated? If I were to make an effort to implement the ssh driver, would that still be welcome? |
Sure thing, @thomasbridge74 - as long as your implementation aligns to what we've discussed above, we'd welcome your contribution! 😉 |
I've just submitted a (WIP) pull request for some feedback. Please be gentle :) |
Any progress on this topic? |
Yes, this is now available in release 4.0.0, see https://github.com/napalm-automation/napalm/releases/tag/4.0.0. |
For an internal project I needed to create eos_ssh as a new driver as we have the EOS API not licensed (yet) and also not configured on our Arista devices. eos_ssh is a work in progress and I really like to contribute this driver to NAPALM, but first I wanted to know if you would integrate that driver?
It's not yet finished, but working great so far. If I get a GO from you I will work further on that project. So what do you think about that driver? :)
The text was updated successfully, but these errors were encountered: