diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-04-27 09:27:28 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-04-27 09:27:28 +0000 |
commit | 9609d6703dd434ac328ad6895a5a237f87dc8c44 (patch) | |
tree | db93711f9f9c4055cb716cecb5d76efc76181807 | |
parent | 3de6d98e7104a8435e294cd31a3133ac6e1e2fcc (diff) | |
parent | 896300ca7cd13749ad10609ade557b3140b2c269 (diff) | |
download | tempest-9609d6703dd434ac328ad6895a5a237f87dc8c44.tar.gz |
Merge "Allow SSH instance with username and password in scenario cases"
-rw-r--r-- | tempest/scenario/manager.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py index d2c41f08f..cc152d2c9 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -319,10 +319,18 @@ class ScenarioTest(tempest.test.BaseTestCase): if username is None: username = CONF.scenario.ssh_user - if private_key is None: - private_key = self.keypair['private_key'] + # Set this with 'keypair' or others to log in with keypair or + # username/password. + if CONF.compute.ssh_auth_method == 'keypair': + password = None + if private_key is None: + private_key = self.keypair['private_key'] + else: + password = CONF.compute.image_ssh_password + private_key = None linux_client = remote_client.RemoteClient(ip, username, - pkey=private_key) + pkey=private_key, + password=password) try: linux_client.validate_authentication() except Exception: |