diff options
author | xudan <xudan16@huawei.com> | 2018-04-25 03:35:02 -0400 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2018-05-07 02:54:02 -0400 |
commit | 27109727907de0a275946765b201fbc0bd71116f (patch) | |
tree | ad8553f952bfead5b69be50d7a3f9a4290dccd80 /dovetail/utils/dovetail_config.py | |
parent | e112118754bbd297de52538d003fc21273e9cf3d (diff) |
Decoupling Bottlenecks Docker config items from source code
There are some special Docker setting items when creating
Bottlenecks Docker Cntainers.
Move the special settings to config files.
Disable the function to push results to DB.
JIRA: DOVETAIL-645
Change-Id: Icc033222edf74c0fe4853dede2794f4226fd4252
Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/utils/dovetail_config.py')
-rw-r--r-- | dovetail/utils/dovetail_config.py | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/dovetail/utils/dovetail_config.py b/dovetail/utils/dovetail_config.py index f582d4d7..394bcf73 100644 --- a/dovetail/utils/dovetail_config.py +++ b/dovetail/utils/dovetail_config.py @@ -22,9 +22,10 @@ class DovetailConfig(object): for extra_config_file in cls.dovetail_config['include_config']: - # The yardstick config file needs to be parsed later. - # Because it's related to the exact test case. - if extra_config_file.startswith("yardstick"): + # The yardstick and bottlenecks config files are with Jinja2. + # They need to be parsed later. + # All other config files should be transfer to like this gradually. + if extra_config_file.startswith(("yardstick", "bottlenecks")): continue else: file_path = os.path.join(conf_path, extra_config_file) @@ -59,19 +60,3 @@ class DovetailConfig(object): def update_non_envs(cls, path, value): if value: cls.set_leaf_dict(cls.dovetail_config, path, value) - - @classmethod - def get_opts(cls, valid_type): - project_config = cls.dovetail_config[valid_type] - if 'opts' in project_config.keys(): - if project_config['opts']: - return project_config['opts'] - return "" - - @classmethod - def get_envs(cls, valid_type): - project_config = cls.dovetail_config[valid_type] - if 'envs' in project_config.keys(): - if project_config['envs']: - return project_config['envs'] - return "" |