diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-10-14 12:08:03 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-10-14 12:32:19 +0200 |
commit | 904377462f58464937d4cafeb8c432f024a85bd4 (patch) | |
tree | e60fabfa4c9ae175e2797d2900c7b201267b9005 /functest/opnfv_tests/openstack/tempest/tempest.py | |
parent | d0d471502ff7b5dfabf4a2ede79782c5708a463c (diff) |
Fix image properties parsing
It removes useless spaces and now conforms with oslo.conf dict.
New helpers and unit tests are available.
Change-Id: I20335c5e5c3840cc872e158c6072d97a3f2cb98c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/tempest.py')
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index c2ff98f6c..910b54615 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -27,6 +27,7 @@ from functest.core import singlevm from functest.opnfv_tests.openstack.tempest import conf_utils from functest.utils import config from functest.utils import env +from functest.utils import functest_utils LOGGER = logging.getLogger(__name__) @@ -384,15 +385,14 @@ class TempestCommon(singlevm.VmReady2): extra_properties = self.extra_properties.copy() if env.get('IMAGE_PROPERTIES'): extra_properties.update( - dict((k.strip(), v.strip()) for k, v in ( - item.split(': ') for item in env.get( - 'IMAGE_PROPERTIES').split(',')))) + functest_utils.convert_ini_to_dict( + env.get('IMAGE_PROPERTIES'))) extra_properties.update( getattr(config.CONF, '{}_extra_properties'.format( self.case_name), {})) rconfig.set( 'scenario', 'img_properties', - conf_utils.convert_dict_to_ini(extra_properties)) + functest_utils.convert_dict_to_ini(extra_properties)) with open(self.conf_file, 'wb') as config_file: rconfig.write(config_file) |