2 ##############################################################################
3 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 from elasticsearch import Elasticsearch
13 import utils.logger as log
14 from utils.parser import Parser as conf_parser
16 LOG = log.Logger(__name__).getLogger()
17 config = ConfigParser.ConfigParser()
19 dashboard_path = os.path.join(conf_parser.test_dir,
22 dashboard_dir = dashboard_path + "/"
25 def dashboard_send_data(runner_config, test_data):
27 # es_ip = runner_config['dashboard_ip'].split(':')
28 es = Elasticsearch([{'host': "172.17.0.5"}])
30 res = es.index(index="bottlenecks",
31 doc_type="vnf_scale_out",
33 if res['created'] == "False":
34 LOG.error("date send to kibana have errors %s",
35 test_data["data_body"])