From faa9ee4065f79b86baa4dc9f6c8f723dd6631283 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Thu, 12 Mar 2020 08:29:49 +0100 Subject: [PATCH] Get configured nova key file path relative to tobiko.conf file Change-Id: I5f9af93ec7e0ee8702b4ce296aff9a83b005c995 --- tobiko/openstack/stacks/_nova.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tobiko/openstack/stacks/_nova.py b/tobiko/openstack/stacks/_nova.py index 67d0e07a0..86baccf90 100644 --- a/tobiko/openstack/stacks/_nova.py +++ b/tobiko/openstack/stacks/_nova.py @@ -36,7 +36,7 @@ CONF = config.CONF class KeyPairStackFixture(heat.HeatStackFixture): template = _hot.heat_template_file('nova/key_pair.yaml') - key_file = os.path.expanduser(CONF.tobiko.nova.key_file) + key_file = tobiko.tobiko_config_path(CONF.tobiko.nova.key_file) public_key = None private_key = None @@ -52,7 +52,7 @@ class KeyPairStackFixture(heat.HeatStackFixture): self.public_key = as_str(fd.read()) def create_key_file(self): - key_file = os.path.realpath(self.key_file) + key_file = self.key_file if not os.path.isfile(key_file): key_dir = os.path.dirname(key_file) tobiko.makedirs(key_dir)