From a829b372e0d6c5bb3e759a40b84e83ac56e409ee Mon Sep 17 00:00:00 2001 From: Liam Young Date: Tue, 7 Jul 2020 09:56:25 +0000 Subject: [PATCH] Use model tmpdor for key storage Use the model specific tmp dir to store the test ssh private key. This avoids the key being overwritten in CMR tests. Depends-On: https://github.com/openstack-charmers/zaza/pull/371 --- zaza/openstack/utilities/openstack.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/utilities/openstack.py b/zaza/openstack/utilities/openstack.py index 28ba29a..034cae3 100644 --- a/zaza/openstack/utilities/openstack.py +++ b/zaza/openstack/utilities/openstack.py @@ -2202,7 +2202,8 @@ def get_private_key_file(keypair_name): :returns: Path to file containing key :rtype: str """ - return 'tests/id_rsa_{}'.format(keypair_name) + tmp_dir = deployment_env.get_tmpdir() + return '{}/id_rsa_{}'.format(tmp_dir, keypair_name) def write_private_key(keypair_name, key):