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
[WIP]Add support for libssh connection type #66656
Conversation
* Add libssh connection type that uses pylibssh library (https://github.com/ansible/pylibssh) which is Python extension for libssh (https://www.libssh.org/) * Refactor network_cli connection plugin to work with both libssh and paramiko_ssh connetion type under the hood. The default connection type is set to libssh and can be configured using `ssh_transport_type` network_cli plugin configuration.
|
||
def _receive_data(self, buffer): | ||
if self._transport_type == 'libssh': | ||
while True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean?
while True: | |
while not self._ssh_shell.poll(): | |
pass |
Also, maybe it's worth adding some small sleep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably add ansible-pylibssh
to runtime deps.
The test
The test
|
The test
|
SUMMARY
pylibssh library (https://github.com/ansible/pylibssh)
which is Python extension for libssh (https://www.libssh.org/)
libssh and paramiko_ssh connection type under the hood.
The default connection type is set to libssh and can be
configured using
ssh_transport_type
network_cliplugin configuration.
ISSUE TYPE
COMPONENT NAME
plugins/connection/libssh.py
plugins/connection/network_cli.py
ADDITIONAL INFORMATION