aboutsummaryrefslogtreecommitdiffstats
path: root/api/utils/common.py
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-06-26 09:46:24 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-06-29 11:25:17 +0000
commitda62008a0a98cb8793ea42827a7da5e149edd144 (patch)
treef91e35eabe04ebb8c6618345c0fd1b76c5f37a2c /api/utils/common.py
parent1ff9df7e724eb0c981aebd5f5b8aa90db0da292b (diff)
Call core code directly in the API of run test case
JIRA: YARDSTICK-688 We need to call core code directly in the API of runTestCase. It would be more stable. Change-Id: I431a85ded7cd3b20da0462f947c25d91bb99decd Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'api/utils/common.py')
-rw-r--r--api/utils/common.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/api/utils/common.py b/api/utils/common.py
index f8b0d40ba..8398b8f60 100644
--- a/api/utils/common.py
+++ b/api/utils/common.py
@@ -13,10 +13,8 @@ import logging
from flask import jsonify
import six
-from api.utils.daemonthread import DaemonThread
-from yardstick.cmd.cli import YardstickCLI
-
logger = logging.getLogger(__name__)
+logger.setLevel(logging.DEBUG)
def translate_to_str(obj):
@@ -29,24 +27,6 @@ def translate_to_str(obj):
return obj
-def get_command_list(command_list, opts, args):
-
- command_list.append(args)
-
- command_list.extend(('--{}'.format(k) for k in opts if k != 'task-args'))
-
- task_args = opts.get('task-args', '')
- if task_args:
- command_list.extend(['--task-args', str(task_args)])
-
- return command_list
-
-
-def exec_command_task(command_list, task_dict): # pragma: no cover
- daemonthread = DaemonThread(YardstickCLI().api, (command_list, task_dict))
- daemonthread.start()
-
-
def error_handler(message):
logger.debug(message)
result = {