aboutsummaryrefslogtreecommitdiffstats
path: root/api/utils
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-06-30 02:32:55 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-06-30 05:06:26 +0000
commit1b9eeb504ed9416c74e1caf8975b51ee6af86b29 (patch)
treeebffc173b165e3d29a0f95aa2b687b163c67288a /api/utils
parent9ba594fa3f34d551d34abd7582281ce081924c67 (diff)
Change prepareYardstickEnv to prepare_env and add log info
JIRA: YARDSTICK-697 Currently the action in env like prepareYardstickEnv, createGrafanaContainer, createInfluxDBContainer, this is not python style. So I do some change: prepareYardstickEnv->prepare_env createGrafanaContainer->create_grafana createInfluxDBContainer->create_influxdb And also add some log info in env_action. Change-Id: Ia91576b975f3de76b96e312779fda4911e7cac24 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'api/utils')
-rw-r--r--api/utils/common.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/api/utils/common.py b/api/utils/common.py
index 8398b8f60..eda9c17dd 100644
--- a/api/utils/common.py
+++ b/api/utils/common.py
@@ -13,8 +13,8 @@ import logging
from flask import jsonify
import six
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.DEBUG)
+LOG = logging.getLogger(__name__)
+LOG.setLevel(logging.DEBUG)
def translate_to_str(obj):
@@ -27,15 +27,6 @@ def translate_to_str(obj):
return obj
-def error_handler(message):
- logger.debug(message)
- result = {
- 'status': 'error',
- 'message': message
- }
- return jsonify(result)
-
-
def result_handler(status, data):
result = {
'status': status,