From 1a00b9de56ef65eef2a0b269a514cb25491ac54b Mon Sep 17 00:00:00 2001 From: Delia Popescu Date: Tue, 9 Oct 2018 12:03:58 +0300 Subject: Ease configuring extra specs via env vars Ease configuring flavor extra specs, as well as image extra specs. Set environment variables for image_properties and flavor extra_specs for ovs|fdio scenario from the start. Image extra_properties and flavor extra_specs will continue to get updates from functest config file but so will from IMAGE_PROPERTIES and FLAVOR_EXTRA_SPECS env variables. Change-Id: Ie1c69e66d2e2e158915d214402fe44d9991c56d3 Signed-off-by: Delia Popescu --- functest/core/singlevm.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'functest/core') diff --git a/functest/core/singlevm.py b/functest/core/singlevm.py index b3a1417f6..ec7f967ec 100644 --- a/functest/core/singlevm.py +++ b/functest/core/singlevm.py @@ -155,6 +155,10 @@ class VmReady1(tenantnetwork.TenantNetwork1): self.flavor_disk)) self.__logger.debug("flavor: %s", flavor) flavor_extra_specs = self.flavor_extra_specs.copy() + if env.get('FLAVOR_EXTRA_SPECS'): + flavor_extra_specs.update( + functest_utils.convert_ini_to_dict( + env.get('FLAVOR_EXTRA_SPECS'))) flavor_extra_specs.update( getattr(config.CONF, '{}_flavor_extra_specs'.format(self.case_name), {})) @@ -183,6 +187,10 @@ class VmReady1(tenantnetwork.TenantNetwork1): self.flavor_alt_disk)) self.__logger.debug("flavor: %s", flavor) flavor_alt_extra_specs = self.flavor_alt_extra_specs.copy() + if env.get('FLAVOR_EXTRA_SPECS'): + flavor_alt_extra_specs.update( + functest_utils.convert_ini_to_dict( + env.get('FLAVOR_EXTRA_SPECS'))) flavor_alt_extra_specs.update( getattr(config.CONF, '{}_flavor_alt_extra_specs'.format(self.case_name), {})) -- cgit 1.2.3-korg