diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-12-20 11:48:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-20 11:48:16 +0000 |
commit | ef43b6cbc6b445762dd7d48491dfe670bac2f710 (patch) | |
tree | 290c9a11b011b2c0d4184b5dcd2b221227f1533d /functest/utils/env.py | |
parent | a60b03203e82f67fb47d4a794a6226a8471b7ecb (diff) | |
parent | 5721693e13fe1495541fdd14d9d5e3aed28ef042 (diff) |
Merge "Unified way to provide configurations and env variables(proposal 1)"
Diffstat (limited to 'functest/utils/env.py')
-rw-r--r-- | functest/utils/env.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/functest/utils/env.py b/functest/utils/env.py new file mode 100644 index 00000000..b6af767d --- /dev/null +++ b/functest/utils/env.py @@ -0,0 +1,18 @@ +import os + +default_envs = { + 'NODE_NAME': 'unknown_pod', + 'CI_DEBUG': 'true' +} + + +class Environment(object): + def __init__(self): + for k, v in os.environ.iteritems(): + self.__setattr__(k, v) + for k, v in default_envs.iteritems(): + if k not in os.environ: + self.__setattr__(k, v) + + +ENV = Environment() |