diff options
author | Delia Popescu <delia.popescu@enea.com> | 2018-10-09 12:03:58 +0300 |
---|---|---|
committer | Delia Popescu <delia.popescu@enea.com> | 2018-10-16 13:51:52 +0000 |
commit | b233980c6207848d48967f1e8125e41e309a6f5a (patch) | |
tree | 1af54123cf10dfa6334a06e3858f5fdbb26c2b9d /functest/core/singlevm.py | |
parent | 1d866c412c5803fed1c8e68a9e763577d3cd83f1 (diff) |
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 <delia.popescu@enea.com>
(cherry picked from commit 1a00b9de56ef65eef2a0b269a514cb25491ac54b)
Diffstat (limited to 'functest/core/singlevm.py')
-rw-r--r-- | functest/core/singlevm.py | 8 |
1 files changed, 8 insertions, 0 deletions
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), {})) |