summaryrefslogtreecommitdiffstats
path: root/testcases/Dashboard/tempest2Dashboard.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-01 11:03:09 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2015-10-01 11:03:09 +0200
commit19c7d0ecfd453d5e631466401e454d4da3314f9b (patch)
treec1dac5451af1760f963d709772b5062ba2741983 /testcases/Dashboard/tempest2Dashboard.py
parent5901dd9a47b08c162acb631bf5acaeeb1b7ce745 (diff)
parent96bf9abe9b1b26a79dcc86900e8eb33d8544e773 (diff)
Merge branch 'master' into stable/arnoarno.2015.2.0
Diffstat (limited to 'testcases/Dashboard/tempest2Dashboard.py')
-rw-r--r--testcases/Dashboard/tempest2Dashboard.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/testcases/Dashboard/tempest2Dashboard.py b/testcases/Dashboard/tempest2Dashboard.py
new file mode 100644
index 000000000..8cbecbbc8
--- /dev/null
+++ b/testcases/Dashboard/tempest2Dashboard.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2015 Orange
+# morgan.richomme@orange.com
+#
+# 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
+#
+# This script is used to build json files for the dashboard
+# for the tempest test case
+#
+# v0.1: basic example
+#
+import logging
+import argparse
+import pprint
+# import json
+# import dashboard_utils
+import os
+import yaml
+
+pp = pprint.PrettyPrinter(indent=4)
+
+parser = argparse.ArgumentParser()
+parser.add_argument("repo_path", help="Path to the repository")
+parser.add_argument("-d", "--debug", help="Debug mode", action="store_true")
+args = parser.parse_args()
+
+""" logging configuration """
+logger = logging.getLogger('config_functest')
+logger.setLevel(logging.DEBUG)
+
+if not os.path.exists(args.repo_path):
+ logger.error("Repo directory not found '%s'" % args.repo_path)
+ exit(-1)
+
+with open(args.repo_path+"testcases/config_functest.yaml") as f:
+ functest_yaml = yaml.safe_load(f)
+f.close()
+
+""" global variables """
+# Directories
+HOME = os.environ['HOME']+"/"
+REPO_PATH = args.repo_path
+TEST_DB = functest_yaml.get("results").get("test_db_url")
+
+
+def format_tempest_for_dashboard(criteria):
+ logger.debug("generate dashboard json files for Tempest")