clustershell
clustershell copied to clipboard
netmiko worker
For cluster of random equipments, like switches, netmiko may be useful, so perhaps we should write a Worker for it.
I'm curious if any more thought has gone into this. As far as I can tell, all the current workers implement streams that the Engines can select/poll/epoll on. Paramiko (netmiko) doesn't appear to do this, so I'm curious how you planned to implement this. I am playing with a custom worker that doesn't deal with streams as file handles, but I've implemented the communication across a pipe to be able to use the existing Engines.
I don't see a strong push for the needs to connect to network equipment (netmiko), so far.
However, regarding paramiko, I see little interest in the project itself as it aims to reinvent OpenSSH. It lacks lots of feature of SSH, needs more work from sysadmin to deploy as (AFAIK) doesn't support ssh_config
files and so on...
Is your question more like: do you think supporting Engines not file-descriptor based? By the way, what's the event mechanism for Paramiko?
Theoretically, the Engine
API does not imply file descriptors, it should be possible to implement a different Engine
and EngineClient
which does not internally use them. But, as this is working that way in ClusterShell since the beginning, it is possible they are some part of the code that expects file descriptors...
We have a need to manage ethernet switches, and are evaluating if it makes the most sense to use something like Ansible or Puppet, or build something custom (which we would likely base on ClusterShell).
But yes, I was curious about supporting engines that are not file-descriptor based, for my custom worker. All the current workers expect fd-based engines, so there would need to be some way of signaling compatibility between workers and engines. Adding that is not high priority for me, I just wanted to know if anyone had thought about how netmiko was planning to be implemented, if it ever became important.
There is eventfd support in python so that might be useable for that? You can poll on eventfd and that will call the worker read function, so just use that to signal there is stuff to read.
(EDIT: well, if some part of the common code really needs fd and cannot be fixed to avoid poll, that is; just suggesting workarounds :p)