Set heat_plugin configs according to env 09/74009/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 10 May 2023 13:01:26 +0000 (15:01 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 10 May 2023 13:01:26 +0000 (15:01 +0200)
It applies rally-openstack's logics for the
duplicated heat_plugin config.

Change-Id: I1fa6b927ee3016755d103195a1df3ce4bbeffe18
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/openstack/tempest/tempest.py
requirements.txt

index 808ccba..1a6d81d 100644 (file)
@@ -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)
index 23fc58e..64818cb 100644 (file)
@@ -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