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:
Nathaniel Case 2018-05-21 17:51:21 -04:00 committed by GitHub
parent 8d39515914
commit eb818df1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 12 deletions

View file

@ -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':