From cd809cb6b8bd4bd5002538d107aea1fb8adb0584 Mon Sep 17 00:00:00 2001 From: QiLiang Date: Tue, 29 Sep 2015 14:50:12 +0800 Subject: Support general configuration file Use openstack library oslo_config for parsing configuration options from the command line and configuration files. Refer http://docs.openstack.org/developer/oslo.config/ or rally source code for more info on oslo_config library usage. This patch is initially for test result dispatcher configuration, but it is very general to use. Usage: 0) install yardstick 1) mkdir /etc/yardstick 2) cp /etc/yardstick/yardstick.conf.sample \ /etc/yardstick/yardstick.conf 3) edit /etc/yardstick/yardstick.conf 4) run `yardstick task start xxx` cmd JIRA: YARDSTICK-61 Change-Id: I01677ef6e9ab7c1975aa193799195e850da73478 Signed-off-by: QiLiang --- yardstick/benchmark/runners/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'yardstick/benchmark/runners') diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py index d8783f3c1..265e5d158 100644 --- a/yardstick/benchmark/runners/base.py +++ b/yardstick/benchmark/runners/base.py @@ -15,10 +15,14 @@ import time log = logging.getLogger(__name__) +from oslo_config import cfg + import yardstick.common.utils as utils from yardstick.benchmark.scenarios import base as base_scenario from yardstick.dispatcher.base import Base as DispatcherBase +CONF = cfg.CONF + def _output_serializer_main(filename, queue): '''entrypoint for the singleton subprocess writing to outfile @@ -26,7 +30,7 @@ def _output_serializer_main(filename, queue): messing up the output file. ''' config = {} - config["type"] = "File" + config["type"] = CONF.dispatcher.capitalize() config["file_path"] = filename dispatcher = DispatcherBase.get(config) -- cgit 1.2.3-korg