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.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/functest/utils/env.py b/functest/utils/env.py
index 86b2be3d..fa5245fb 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -1,4 +1,5 @@
import os
+import re
default_envs = {
'NODE_NAME': 'unknown_pod',
@@ -7,7 +8,9 @@ default_envs = {
'DEPLOY_TYPE': 'virt',
'INSTALLER_TYPE': None,
'INSTALLER_IP': None,
- 'BUILD_TAG': None
+ 'BUILD_TAG': None,
+ 'OS_ENDPOINT_TYPE': None,
+ 'OS_AUTH_URL': None
}
@@ -19,6 +22,20 @@ class Environment(object):
for k, v in default_envs.iteritems():
if k not in os.environ:
self.__setattr__(k, v)
+ self._set_ci_run()
+ self._set_ci_loop()
+
+ def _set_ci_run(self):
+ if self.BUILD_TAG:
+ self.IS_CI_RUN = True
+ else:
+ self.IS_CI_RUN = False
+
+ def _set_ci_loop(self):
+ if self.BUILD_TAG and re.search("daily", self.BUILD_TAG):
+ self.CI_LOOP = "daily"
+ else:
+ self.CI_LOOP = "weekly"
ENV = Environment()