mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Ios test fixes (#40503)
* Return messages generated from edit_config to module * This does not seem to work that way * Change test IP addresses to not conflict with device config
This commit is contained in:
@@ -183,7 +183,7 @@ class CliconfBase(with_metaclass(ABCMeta, object)):
|
||||
ssh = self._connection.paramiko_conn._connect_uncached()
|
||||
if proto == 'scp':
|
||||
if not HAS_SCP:
|
||||
self._connection.internal_error("Required library scp is not installed. Please install it using `pip install scp`")
|
||||
raise AnsibleError("Required library scp is not installed. Please install it using `pip install scp`")
|
||||
with SCPClient(ssh.get_transport(), socket_timeout=timeout) as scp:
|
||||
out = scp.put(source, destination)
|
||||
elif proto == 'sftp':
|
||||
@@ -195,7 +195,7 @@ class CliconfBase(with_metaclass(ABCMeta, object)):
|
||||
ssh = self._connection.paramiko_conn._connect_uncached()
|
||||
if proto == 'scp':
|
||||
if not HAS_SCP:
|
||||
self._connection.internal_error("Required library scp is not installed. Please install it using `pip install scp`")
|
||||
raise AnsibleError("Required library scp is not installed. Please install it using `pip install scp`")
|
||||
with SCPClient(ssh.get_transport(), socket_timeout=timeout) as scp:
|
||||
scp.get(source, destination)
|
||||
elif proto == 'sftp':
|
||||
|
||||
Reference in New Issue
Block a user