summaryrefslogtreecommitdiffstats
path: root/dovetail/utils
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-04-07 23:42:50 -0400
committerGeorg Kunz <georg.kunz@ericsson.com>2018-04-10 10:21:21 +0000
commitd596c9988d82cb6876b0acd12e79a89319bdbd0b (patch)
tree8cb05f39c1e447dddb383d272d2a83af944127af /dovetail/utils
parent8b0d80d556dfd7935b6464ec76b49c9c0e6249e0 (diff)
Decoupling Yardstick Docker config items from source code
There are some special Docker setting items when creating Yardstick Docker Containers. 1. Remove the extra settings which are required by Yardstick Danube. 2. Remove the settings for pushing results to DB because Dovetail plan to disable this function. 3. Move the other special Functest settings to config files. JIRA: DOVETAIL-640 Change-Id: Ic2d90393e227d7886b14d805eaa307b7aef56e4a Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/utils')
-rw-r--r--dovetail/utils/dovetail_config.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/dovetail/utils/dovetail_config.py b/dovetail/utils/dovetail_config.py
index 316be312..37a20dbe 100644
--- a/dovetail/utils/dovetail_config.py
+++ b/dovetail/utils/dovetail_config.py
@@ -67,12 +67,16 @@ class DovetailConfig(object):
@classmethod
def get_opts(cls, valid_type):
- if 'opts' in cls.dovetail_config[valid_type].keys():
- return cls.dovetail_config[valid_type]['opts']
+ 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):
- if 'envs' in cls.dovetail_config[valid_type].keys():
- return cls.dovetail_config[valid_type]['envs']
+ project_config = cls.dovetail_config[valid_type]
+ if 'envs' in project_config.keys():
+ if project_config['envs']:
+ return project_config['envs']
return ""