3 # Copyright (c) 2015 Orange
4 # morgan.richomme@orange.com
6 # This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # This script is used to build json files for the dashboard
13 # for the tempest test case
21 # import dashboard_utils
25 pp = pprint.PrettyPrinter(indent=4)
27 parser = argparse.ArgumentParser()
28 parser.add_argument("repo_path", help="Path to the repository")
29 parser.add_argument("-d", "--debug", help="Debug mode", action="store_true")
30 args = parser.parse_args()
32 """ logging configuration """
33 logger = logging.getLogger('config_functest')
34 logger.setLevel(logging.DEBUG)
36 if not os.path.exists(args.repo_path):
37 logger.error("Repo directory not found '%s'" % args.repo_path)
40 with open(args.repo_path+"testcases/config_functest.yaml") as f:
41 functest_yaml = yaml.safe_load(f)
44 """ global variables """
46 HOME = os.environ['HOME']+"/"
47 REPO_PATH = args.repo_path
48 TEST_DB = functest_yaml.get("results").get("test_db_url")
51 def format_tempest_for_dashboard(criteria):
52 logger.debug("generate dashboard json files for Tempest")