summaryrefslogtreecommitdiffstats
path: root/testsuites/posca/testcase_dashboard/posca_vnf_scale_out.py
diff options
context:
space:
mode:
authorAce Lee <liyin11@huawei.com>2017-12-04 08:59:59 +0000
committerYu Yang (Gabriel) <Gabriel.yuyang@huawei.com>2017-12-21 22:41:58 +0000
commit2c39839986088cdbf7230bb2df26171d70a9979b (patch)
tree656dd14286a1bef1133db6856a3ee2b8ceb28a4d /testsuites/posca/testcase_dashboard/posca_vnf_scale_out.py
parent5a3394264a38300ff5719738b3d48b1050296035 (diff)
VNF scale-out testcase
JIRA: BOTTLENECK-214 Bottlenecks VNF scale out testcase Change-Id: I05c4dec483062dd59c4b062516c8a6c1bc83ad6e Signed-off-by: Ace Lee <liyin11@huawei.com> (cherry picked from commit ea7c865700a777f6b99206d3f00fc6ed54001d2d)
Diffstat (limited to 'testsuites/posca/testcase_dashboard/posca_vnf_scale_out.py')
-rwxr-xr-xtestsuites/posca/testcase_dashboard/posca_vnf_scale_out.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuites/posca/testcase_dashboard/posca_vnf_scale_out.py b/testsuites/posca/testcase_dashboard/posca_vnf_scale_out.py
new file mode 100755
index 00000000..7c894b88
--- /dev/null
+++ b/testsuites/posca/testcase_dashboard/posca_vnf_scale_out.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+##############################################################################
+# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+import ConfigParser
+from elasticsearch import Elasticsearch
+import os
+import utils.logger as log
+from utils.parser import Parser as conf_parser
+
+LOG = log.Logger(__name__).getLogger()
+config = ConfigParser.ConfigParser()
+es = Elasticsearch()
+dashboard_path = os.path.join(conf_parser.test_dir,
+ "posca",
+ "testcase_dashboard")
+dashboard_dir = dashboard_path + "/"
+
+
+def dashboard_send_data(runner_config, test_data):
+ global es
+ # es_ip = runner_config['dashboard_ip'].split(':')
+ es = Elasticsearch([{'host': "172.17.0.5"}])
+ for i in test_data:
+ res = es.index(index="bottlenecks",
+ doc_type="vnf_scale_out",
+ body=i)
+ if res['created'] == "False":
+ LOG.error("date send to kibana have errors ",
+ test_data["data_body"])