aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/env.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/utils/env.py')
-rw-r--r--functest/utils/env.py18
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()