diff options
Diffstat (limited to 'dovetail/container.py')
-rw-r--r-- | dovetail/container.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dovetail/container.py b/dovetail/container.py index 3b040ca9..8e032c75 100644 --- a/dovetail/container.py +++ b/dovetail/container.py @@ -126,11 +126,14 @@ class Container(object): return None # for refstack, support user self_defined configuration - config_volume = "" - if type.lower() == "functest": - config_volume = \ - ' -v %s:%s ' % (dovetail_config['userconfig_dir'], - dovetail_config["functest"]['config']['dir']) + # for yardstick, support pod.yaml configuration + pod_file = os.path.join(dovetail_config['userconfig_dir'], 'pod.yaml') + if type.lower() == "yardstick" and not os.path.exists(pod_file): + cls.logger.error("File %s doesn't exist.", pod_file) + return None + config_volume = \ + ' -v %s:%s ' % (dovetail_config['userconfig_dir'], + dovetail_config["functest"]['config']['dir']) result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'], dovetail_config[type]['result']['dir']) |