diff options
author | Cedric Ollivier <cedric.ollivier@orange.com> | 2018-10-06 06:20:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-10-06 06:20:38 +0000 |
commit | 6b0fa7ecb5aa0c0dead1d16c2811f5c47347a091 (patch) | |
tree | 2e215158d478583224b1ee6cd4397faf42e31f39 /functest/core | |
parent | 6efcc4fe7456663445e9fbda54bba3239288ad73 (diff) | |
parent | d7c5419ed8d3dcdb59f4f5f254de0c7bb7a0aec6 (diff) |
Merge "Use environment variable for image properties"
Diffstat (limited to 'functest/core')
-rw-r--r-- | functest/core/singlevm.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/functest/core/singlevm.py b/functest/core/singlevm.py index 71ed0690d..c9a8178b9 100644 --- a/functest/core/singlevm.py +++ b/functest/core/singlevm.py @@ -23,6 +23,7 @@ from xtesting.core import testcase from functest.core import tenantnetwork from functest.utils import config +from functest.utils import env class VmReady1(tenantnetwork.TenantNetwork1): @@ -73,6 +74,10 @@ class VmReady1(tenantnetwork.TenantNetwork1): """ assert self.cloud extra_properties = self.extra_properties.copy() + if env.get('IMG_PROP'): + extra_properties.update(dict((k.strip(), v.strip()) for k, v in + (item.split(': ') for item in + env.get('IMG_PROP').split(',')))) extra_properties.update( getattr(config.CONF, '{}_extra_properties'.format( self.case_name), {})) @@ -104,6 +109,10 @@ class VmReady1(tenantnetwork.TenantNetwork1): """ assert self.cloud extra_alt_properties = self.extra_alt_properties.copy() + if env.get('IMG_PROP'): + extra_alt_properties.update(dict((k.strip(), v.strip()) for k, v in + (item.split(': ') for item in + env.get('IMG_PROP').split(',')))) extra_alt_properties.update( getattr(config.CONF, '{}_extra_alt_properties'.format( self.case_name), {})) |