[lago-devel] ssh to non-host vm

Valentina Makarova makarovavs07 at gmail.com
Thu Jun 22 16:40:19 UTC 2017


Hello!

I try to use lago.ssh for ssh connection to non-host vm in
ovirt-system-tests.
And I have login/password (not root) for vm, but have not ssh-key.
I try to use lago.ssh.get_ssh_client() to get connection but there is next
code there:

if ssh_key:
client.connect(
ip_addr,
username=username,
password=password,
key_filename=ssh_key,
timeout=ssh_timeout,
)
else:
client.connect(
ip_addr,
username='root',
timeout=ssh_timeout,
)
break

But if I can't use key file, client should try to connect using
login/password.
And according this code I have to create empty file for this function and
delete it after.
(if ssh key != None but in is not existed file, client.connect )
Example is there:
https://github.com/vmakarova/ovirt-system-tests/commit/855dbdf379730d55daf51851052d71daa45d9a09

Is it a bug? Or is there some reasons for implementing this logic?

Sincerely, Valentina Makarova
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/lago-devel/attachments/20170622/a8061298/attachment.html>


More information about the lago-devel mailing list