You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Gaurav Aradhye <ga...@clogeny.com> on 2013/10/31 13:41:11 UTC

Review Request 15127: CLOUDSTACK-4495: Fixed TestResetSSHKeyUserRights.test_01_reset_keypair_normal_user

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

Review request for cloudstack and Girish Shilamkar.


Repository: cloudstack-git


Description
-------

Fixed test script issue which was checking the VM state by listing the VMs in a particular account and checking the state of first VM in the list.
It was assuming that there is only one VM in the account, in some cases earlier deleted VM was found in expunged/destroying state in the list.

Now the VMs are listed by VM id and state is checked.

Also did some code cleanup.


Diffs
-----

  test/integration/component/test_reset_ssh_keypair.py 4d0c45e 
  tools/marvin/marvin/codes.py 39ef950 

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


Testing
-------

Tested locally on KVM setup:

test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights)
Verify API resetSSHKeyForVirtualMachine for non admin non root ...
==> client.log <==CS_TEST]# tail -f client.log result.log
2013-10-31 01:27:19,814 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Check if the VM is properly deployed or
 not?
2013-10-31 01:27:19,834 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Stopping the virtual machine
2013-10-31 01:29:25,329 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Creating a new SSH keypair for account:
 test-5XE7P6
2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Created a new keypair with name: W44C6E
.pem
2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Writing the private key to local file
2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - File path: /tmp/W44C6E.pem
2013-10-31 01:29:25,410 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Resetting the SSH key pair for instance
: 452be90f-d0e9-4b28-afcd-251eea1c23c3
2013-10-31 01:29:55,601 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Starting the virtual machine after rese
tting the keypair
2013-10-31 01:30:05,725 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - SSHing with new keypair

==> result.log <==
ok


Thanks,

Gaurav Aradhye


Re: Review Request 15127: CLOUDSTACK-4495: Fixed TestResetSSHKeyUserRights.test_01_reset_keypair_normal_user

Posted by Girish Shilamkar <gi...@clogeny.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15127/#review27894
-----------------------------------------------------------



test/integration/component/test_reset_ssh_keypair.py
<https://reviews.apache.org/r/15127/#comment54310>

    If we are specifying vmid then no need to specify listall=True. Rest looks good.


- Girish Shilamkar


On Oct. 31, 2013, 12:41 p.m., Gaurav Aradhye wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15127/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2013, 12:41 p.m.)
> 
> 
> Review request for cloudstack and Girish Shilamkar.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Fixed test script issue which was checking the VM state by listing the VMs in a particular account and checking the state of first VM in the list.
> It was assuming that there is only one VM in the account, in some cases earlier deleted VM was found in expunged/destroying state in the list.
> 
> Now the VMs are listed by VM id and state is checked.
> 
> Also did some code cleanup.
> 
> 
> Diffs
> -----
> 
>   test/integration/component/test_reset_ssh_keypair.py 4d0c45e 
>   tools/marvin/marvin/codes.py 39ef950 
> 
> Diff: https://reviews.apache.org/r/15127/diff/
> 
> 
> Testing
> -------
> 
> Tested locally on KVM setup:
> 
> test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights)
> Verify API resetSSHKeyForVirtualMachine for non admin non root ...
> ==> client.log <==CS_TEST]# tail -f client.log result.log
> 2013-10-31 01:27:19,814 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Check if the VM is properly deployed or
>  not?
> 2013-10-31 01:27:19,834 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Stopping the virtual machine
> 2013-10-31 01:29:25,329 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Creating a new SSH keypair for account:
>  test-5XE7P6
> 2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Created a new keypair with name: W44C6E
> .pem
> 2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Writing the private key to local file
> 2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - File path: /tmp/W44C6E.pem
> 2013-10-31 01:29:25,410 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Resetting the SSH key pair for instance
> : 452be90f-d0e9-4b28-afcd-251eea1c23c3
> 2013-10-31 01:29:55,601 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Starting the virtual machine after rese
> tting the keypair
> 2013-10-31 01:30:05,725 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - SSHing with new keypair
> 
> ==> result.log <==
> ok
> 
> 
> Thanks,
> 
> Gaurav Aradhye
> 
>


Re: Review Request 15127: CLOUDSTACK-4495: Fixed TestResetSSHKeyUserRights.test_01_reset_keypair_normal_user

Posted by Girish Shilamkar <gi...@clogeny.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15127/#review27906
-----------------------------------------------------------

Ship it!


Ship It!

- Girish Shilamkar


On Oct. 31, 2013, 1:48 p.m., Gaurav Aradhye wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15127/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2013, 1:48 p.m.)
> 
> 
> Review request for cloudstack and Girish Shilamkar.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Fixed test script issue which was checking the VM state by listing the VMs in a particular account and checking the state of first VM in the list.
> It was assuming that there is only one VM in the account, in some cases earlier deleted VM was found in expunged/destroying state in the list.
> 
> Now the VMs are listed by VM id and state is checked.
> 
> Also did some code cleanup.
> 
> 
> Diffs
> -----
> 
>   test/integration/component/test_reset_ssh_keypair.py 4d0c45e 
>   tools/marvin/marvin/codes.py 39ef950 
> 
> Diff: https://reviews.apache.org/r/15127/diff/
> 
> 
> Testing
> -------
> 
> Tested locally on KVM setup:
> 
> test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights)
> Verify API resetSSHKeyForVirtualMachine for non admin non root ...
> ==> client.log <==CS_TEST]# tail -f client.log result.log
> 2013-10-31 01:27:19,814 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Check if the VM is properly deployed or
>  not?
> 2013-10-31 01:27:19,834 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Stopping the virtual machine
> 2013-10-31 01:29:25,329 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Creating a new SSH keypair for account:
>  test-5XE7P6
> 2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Created a new keypair with name: W44C6E
> .pem
> 2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Writing the private key to local file
> 2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - File path: /tmp/W44C6E.pem
> 2013-10-31 01:29:25,410 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Resetting the SSH key pair for instance
> : 452be90f-d0e9-4b28-afcd-251eea1c23c3
> 2013-10-31 01:29:55,601 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Starting the virtual machine after rese
> tting the keypair
> 2013-10-31 01:30:05,725 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - SSHing with new keypair
> 
> ==> result.log <==
> ok
> 
> 
> Thanks,
> 
> Gaurav Aradhye
> 
>


Re: Review Request 15127: CLOUDSTACK-4495: Fixed TestResetSSHKeyUserRights.test_01_reset_keypair_normal_user

Posted by Gaurav Aradhye <ga...@clogeny.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15127/
-----------------------------------------------------------

(Updated Oct. 31, 2013, 7:18 p.m.)


Review request for cloudstack and Girish Shilamkar.


Changes
-------

Removed unnecessary listall parameter.


Repository: cloudstack-git


Description
-------

Fixed test script issue which was checking the VM state by listing the VMs in a particular account and checking the state of first VM in the list.
It was assuming that there is only one VM in the account, in some cases earlier deleted VM was found in expunged/destroying state in the list.

Now the VMs are listed by VM id and state is checked.

Also did some code cleanup.


Diffs (updated)
-----

  test/integration/component/test_reset_ssh_keypair.py 4d0c45e 
  tools/marvin/marvin/codes.py 39ef950 

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


Testing
-------

Tested locally on KVM setup:

test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights)
Verify API resetSSHKeyForVirtualMachine for non admin non root ...
==> client.log <==CS_TEST]# tail -f client.log result.log
2013-10-31 01:27:19,814 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Check if the VM is properly deployed or
 not?
2013-10-31 01:27:19,834 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Stopping the virtual machine
2013-10-31 01:29:25,329 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Creating a new SSH keypair for account:
 test-5XE7P6
2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Created a new keypair with name: W44C6E
.pem
2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Writing the private key to local file
2013-10-31 01:29:25,402 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - File path: /tmp/W44C6E.pem
2013-10-31 01:29:25,410 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Resetting the SSH key pair for instance
: 452be90f-d0e9-4b28-afcd-251eea1c23c3
2013-10-31 01:29:55,601 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - Starting the virtual machine after rese
tting the keypair
2013-10-31 01:30:05,725 - DEBUG - test_01_reset_keypair_normal_user (test_reset_ssh_keypair.TestResetSSHKeyUserRights) - SSHing with new keypair

==> result.log <==
ok


Thanks,

Gaurav Aradhye