Allow SSH instance with username and password in scenario cases
Current scenario test cases only allow SSH with keypair.
Here we change the entrance where call SSH client:
scenario.manager.get_remote_client(). Check the ssh_auth_method to
decide which way should be picked, pass a None private to paramiko
if username/password has been chosen and vice versa.
Since disable ssh_auth_method makes most of the scenario test cases
meaningless, here the disable flag is not checked and the SSH method
is either username/password or private key.
TO test the modification for username/password authentication with
cirros, set tempest.conf as below and run senario test cases:
[compute]
...
image_ssh_user = cirros
image_ssh_password = cubswin:)
ssh_auth_method = configured #default is keypair
run_ssh = True #If want to test scenario.test_server_basic_opts
...
[scenario]
...
ssh_user = cirros
...
TODO in the next:
SSH username and password come from different config options.
e.g. some of the scenario cases use compute.image_ssh_password and
compute.image_ssh_user, some of them use scenario.ssh_user or
input-scenario.ssh_user_regex. And the rest use all of them. It's
hard for user to configure for all the cases since they need to
modify many places for username, password etc. It's better to use the
same place to configure them.
Change-Id: I48e3689c4040b18e887284b8eec3a6537c6adb50
Closes-Bug: #1400638
1 file changed