cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gaurav Aradhye" <gaurav.arad...@clogeny.com>
Subject Review Request 27377: CLOUDSTACK-7408: sshClient.py - removing call to paramiko function load_host_keys(). This is used to load host keys from local file which is undesirable while running test cases
Date Thu, 30 Oct 2014 09:08:40 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27377/
-----------------------------------------------------------

Review request for cloudstack and SrikanteswaraRao Talluri.


Bugs: CLOUDSTACK-7408
    https://issues.apache.org/jira/browse/CLOUDSTACK-7408


Repository: cloudstack-git


Description
-------

This also reverts the commit https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=commit;h=e921ec6ec79c50096d58264d60c15091969ff888


Description:
The function load_host_keys is typically used to load the host keys from a local file (If
user has any such file, than the default system host key file). If this function is called
with a local host keys file, then keys from this file will be matched while connecting to
any host. If the key is not present, and if AutoAddPolicy is present, then the key will be
saved back to the local host key file.

While running test cases, we don't have any local host key file which we need to provide,
nor we want to save any new keys to local host key file.

In the code, we already have the AutoAddPolicy defined for missing keys. Hence in our case,
we are not loading any host keys file. Hence whenever we conect to a host, then the host key
will be saved in memory (not file) due to AutoAddPolicy and the connection will be successful
provided that the password or the private key file is correctly provided for the host. Hence
it is not necessary to call load_host_keys function.


Diffs
-----

  tools/marvin/marvin/lib/base.py 77faeeb 
  tools/marvin/marvin/lib/utils.py b58b59d 
  tools/marvin/marvin/sshClient.py f027890 

Diff: https://reviews.apache.org/r/27377/diff/


Testing
-------

Yes. Ran the test_reset_ssh_keypair test suite and all the tests passed.

Log:
Test Reset SSH keys for VM  already having SSH key ... === TestName: test_01_reset_ssh_keys
| Status : SUCCESS ===
ok
Reset SSH keys for VM  created from password enabled template and ... === TestName: test_02_reset_ssh_key_password_enabled_template
| Status : SUCCESS ===
ok
Reset SSH key for VM  having no SSH key ... === TestName: test_03_reset_ssh_with_no_key |
Status : SUCCESS ===
ok
Reset SSH keys for VM  created from password enabled template and ... === TestName: test_04_reset_key_passwd_enabled_no_key
| Status : SUCCESS ===
ok
Reset SSH keys for VM  already having SSH key when VM is in running ... === TestName: test_05_reset_key_in_running_state
| Status : SUCCESS ===
ok
Reset SSH keys for VM  created from password enabled template and ... === TestName: test_06_reset_key_passwd_enabled_vm_running
| Status : SUCCESS ===
ok
Verify API resetSSHKeyForVirtualMachine with incorrect parameters ... === TestName: test_07_reset_keypair_invalid_params
| Status : SUCCESS ===
ok
Verify API resetSSHKeyForVirtualMachine for non admin non root ... === TestName: test_01_reset_keypair_normal_user
| Status : SUCCESS ===
ok
Verify API resetSSHKeyForVirtualMachine for domain admin non root ... === TestName: test_02_reset_keypair_domain_admin
| Status : SUCCESS ===
ok
Verify API resetSSHKeyForVirtualMachine for domain admin root ... === TestName: test_03_reset_keypair_root_admin
| Status : SUCCESS ===
ok


Thanks,

Gaurav Aradhye


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message