From d2278fcc87f91cfe71526f25b1c1c33580fd586b Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Wed, 10 May 2023 15:01:26 +0200 Subject: [PATCH] Set heat_plugin configs according to env MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It applies rally-openstack's logics for the duplicated heat_plugin config. Change-Id: I1fa6b927ee3016755d103195a1df3ce4bbeffe18 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/tempest/tempest.py | 9 +++++++++ requirements.txt | 1 + 2 files changed, 10 insertions(+) diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 808ccba33..1a6d81ddf 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -20,6 +20,7 @@ import shutil import subprocess import time +from oslo_utils import strutils import pkg_resources from six.moves import configparser from xtesting.core import testcase @@ -741,6 +742,14 @@ class TempestHeat(TempestCommon): rconfig.set('heat_plugin', 'admin_password', self.project.password) rconfig.set( 'heat_plugin', 'admin_project_name', self.project.project.name) + if os.environ.get('OS_CACERT'): + rconfig.set('heat_plugin', 'ca_file', os.environ.get('OS_CACERT')) + if os.environ.get('OS_INSECURE'): + rconfig.set( + 'heat_plugin', 'disable_ssl_certificate_validation', + strutils.bool_from_string(os.environ.get('OS_INSECURE'))) + rconfig.set('heat_plugin', 'endpoint_type', + os.environ.get('OS_INTERFACE', 'public')) rconfig.set('heat_plugin', 'image_ref', self.image_alt.id) rconfig.set('heat_plugin', 'instance_type', self.flavor_alt.id) rconfig.set('heat_plugin', 'minimal_image_ref', self.image.id) diff --git a/requirements.txt b/requirements.txt index 23fc58e52..64818cb35 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,3 +20,4 @@ tempest # Apache-2.0 rally rally-openstack munch # MIT +oslo.utils!=3.39.1,!=3.40.0,!=3.40.1 # Apache-2.0 -- 2.16.6