Skip to content

Commit

Permalink
Add support for libssh connection type
Browse files Browse the repository at this point in the history
*  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.
  • Loading branch information
ganeshrn committed Jan 21, 2020
1 parent 05e2e18 commit d55d060
Show file tree
Hide file tree
Showing 3 changed files with 586 additions and 32 deletions.
4 changes: 2 additions & 2 deletions lib/ansible/plugins/cliconf/__init__.py
Expand Up @@ -340,7 +340,7 @@ def copy_file(self, source=None, destination=None, proto='scp', timeout=30):
remote host before triggering timeout exception
:return: None
"""
ssh = self._connection.paramiko_conn._connect_uncached()
ssh = self._connection.transport_conn._connect_uncached()
if proto == 'scp':
if not HAS_SCP:
raise AnsibleError("Required library scp is not installed. Please install it using `pip install scp`")
Expand All @@ -361,7 +361,7 @@ def get_file(self, source=None, destination=None, proto='scp', timeout=30):
:return: None
"""
"""Fetch file over scp/sftp from remote device"""
ssh = self._connection.paramiko_conn._connect_uncached()
ssh = self._connection.transport_conn._connect_uncached()
if proto == 'scp':
if not HAS_SCP:
raise AnsibleError("Required library scp is not installed. Please install it using `pip install scp`")
Expand Down

0 comments on commit d55d060

Please sign in to comment.