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:00 +0000 |
commit | 0cdc153207e76cb6e43a5aa3297a7dc39e5b48a5 (patch) | |
tree | c0ebba700fe124e694cb959147dc15234bac6a85 /functest/core/singlevm.py | |
parent | 68d82378787544cac8886bd719b9ada2765e24cb (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), {})) |