Fix the password input
When validate the authentication after rebuild, the new password
should be used. And the paramiko lib will check both key pair or
user/password at the same time.
Change-Id: I5efd55de6552db8269f5efbbca1397e49d81547f
Closes-bug: #1530783
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 71dfd96..aa6abff 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -172,11 +172,16 @@
self.assertEqual(new_name, server['name'])
if CONF.validation.run_validation:
- # TODO(jlanoux) add authentication with the provided password
+ # Authentication is attempted in the following order of priority:
+ # 1.The key passed in, if one was passed in.
+ # 2.Any key we can find through an SSH agent (if allowed).
+ # 3.Any "id_rsa", "id_dsa" or "id_ecdsa" key discoverable in
+ # ~/.ssh/ (if allowed).
+ # 4.Plain username/password auth, if a password was given.
linux_client = remote_client.RemoteClient(
self.get_server_ip(rebuilt_server),
self.ssh_user,
- self.password,
+ password,
self.validation_resources['keypair']['private_key'])
linux_client.validate_authentication()