3 # pylint: disable=missing-docstring
12 class Environment(object): # pylint: disable=too-few-public-methods
15 'NODE_NAME': 'unknown_pod',
16 'DEPLOY_SCENARIO': 'os-nosdn-nofeature-noha',
17 'DEPLOY_TYPE': 'virt',
18 'INSTALLER_TYPE': None,
21 'OS_ENDPOINT_TYPE': None,
23 'CONFIG_FUNCTEST_YAML': pkg_resources.resource_filename(
24 'functest', 'ci/config_functest.yaml'),
26 'OS_REGION_NAME': 'RegionOne'
30 for key, value in six.iteritems(os.environ):
31 setattr(self, key, value)
32 for key, value in six.iteritems(self.default_envs):
33 if key not in os.environ:
34 setattr(self, key, value)
36 if 'CI_LOOP' not in os.environ:
39 def _set_ci_run(self):
40 if getattr(self, "BUILD_TAG"):
41 setattr(self, "IS_CI_RUN", True)
43 setattr(self, "IS_CI_RUN", False)
45 def _set_ci_loop(self):
46 if (getattr(self, "BUILD_TAG") and
47 re.search("daily", getattr(self, "BUILD_TAG"))):
48 setattr(self, "CI_LOOP", "daily")
50 setattr(self, "CI_LOOP", "weekly")