fixes guess_os for netconf connections (#33671)

* fixes guess_os for netconf connections

This change fixes invalid calls to play_context when the network_os is
not set and the connection attempts to guess the network_os.  The method
will now check the correct values for ssh key file and allow agent
instead of returning errors.

* fix up pep8 issues
This commit is contained in:
Peter Sprygada 2017-12-07 09:47:41 -05:00 committed by Kedar Kekan
parent 012a96dabd
commit 1699a39ad0
3 changed files with 6 additions and 5 deletions

View file

@ -141,10 +141,10 @@ class Netconf(NetconfBase):
port=obj._play_context.port or 830,
username=obj._play_context.remote_user,
password=obj._play_context.password,
key_filename=str(obj.key_filename),
key_filename=obj._play_context.private_key_file,
hostkey_verify=C.HOST_KEY_CHECKING,
look_for_keys=C.PARAMIKO_LOOK_FOR_KEYS,
allow_agent=obj.allow_agent,
allow_agent=obj._play_context.allow_agent,
timeout=obj._play_context.timeout
)
except SSHUnknownHostError as exc: