def main(): LOG.info("*******************************************") LOG.info("* Generating vsperf reporting status *") LOG.info("* Data retention = 50 days *") LOG.info("* *") LOG.info("*******************************************") data = reporting_utils.getScenarios("vsperf", None, "fuel", None, period=50) version_data = _get_version_data(data['vsperf']) for version in {'master', 'fraser', 'gambia'}: _generate_reporting(version, version_data.get(version, [])) LOG.info("End")
LOGGER.info("* Generating reporting scenario status *") LOGGER.info("* Data retention = %s days *", PERIOD) LOGGER.info("* *") LOGGER.info("*******************************************") # retrieve the list of bottlenecks tests BOTTLENECKS_TESTS = rp_utils.get_config('bottlenecks.test_list') LOGGER.info("Bottlenecks tests: %s", BOTTLENECKS_TESTS) # For all the versions for version in VERSIONS: # For all the installers for installer in INSTALLERS: # get scenarios results data scenario_results = rp_utils.getScenarios("bottlenecks", "posca_factor_ping", installer, version) LOGGER.info("scenario_results: %s", scenario_results) scenario_stats = rp_utils.getScenarioStats(scenario_results) LOGGER.info("scenario_stats: %s", scenario_stats) items = {} scenario_result_criteria = {} # From each scenarios get results list for s, s_result in scenario_results.items(): LOGGER.info("---------------------------------") LOGGER.info("installer %s, version %s, scenario %s", installer, version, s) ten_criteria = len(s_result)
reportingDate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M") logger.info("*******************************************") logger.info("* Generating reporting scenario status *") logger.info("* Data retention = %s days *" % PERIOD) logger.info("* *") logger.info("*******************************************") # retrieve the list of storperf tests versions = {'master'} # For all the versions for version in versions: # For all the installers for installer in installers: scenario_results = rp_utils.getScenarios("vsperf", None, installer, None, "installer") items = {} scenario_result_criteria = {} logger.info("installer %s, version %s, scenario ", installer, version) # From each scenarios get results list for s, s_result in scenario_results.items(): logger.info("---------------------------------") logger.info("installer %s, version %s, scenario %s", installer, version, s) ten_criteria = len(s_result) ten_score = 0 for v in s_result: if "PASS" in v['criteria']: ten_score += 1
# check that the directory exists, if not create it # (first run on new version) if not os.path.exists(scenario_directory): os.makedirs(scenario_directory) # initiate scenario file if it does not exist if not os.path.isfile(scenario_file_name): with open(scenario_file_name, "a") as my_file: LOGGER.debug("Create scenario file: %s", scenario_file_name) my_file.write("date,scenario,installer,detail,score\n") for installer in installers: # get scenarios scenario_results = rp_utils.getScenarios("functest", "connection_check", installer, version) # get nb of supported architecture (x86, aarch64) architectures = rp_utils.getArchitectures(scenario_results) LOGGER.info("Supported architectures: %s", architectures) for architecture in architectures: LOGGER.info("Architecture: %s", architecture) # Consider only the results for the selected architecture # i.e drop x86 for aarch64 and vice versa filter_results = rp_utils.filterArchitecture( scenario_results, architecture) scenario_stats = rp_utils.getScenarioStats(filter_results) items = {} scenario_result_criteria = {}
LOGGER.info("* Data retention = %s days *", PERIOD) LOGGER.info("* *") LOGGER.info("****************************************") INSTALLERS = rp_utils.get_config('general.installers') STEP_ORDER = ["initialisation", "orchestrator", "vnf", "test_vnf"] LOGGER.info("Start vIMS reporting processing....") # For all the versions for version in VERSIONS: for installer in INSTALLERS: # get nb of supported architecture (x86, aarch64) # get scenarios scenario_results = rp_utils.getScenarios("functest", "cloudify_ims", installer, version) architectures = rp_utils.getArchitectures(scenario_results) LOGGER.info("Supported architectures: %s", architectures) for architecture in architectures: LOGGER.info("Architecture: %s", architecture) # Consider only the results for the selected architecture # i.e drop x86 for aarch64 and vice versa filter_results = rp_utils.filterArchitecture(scenario_results, architecture) scenario_stats = rp_utils.getScenarioStats(filter_results) items = {} scenario_result_criteria = {}
logger.info("* Data retention = %s days *" % PERIOD) logger.info("* *") logger.info("*******************************************") # retrieve the list of storperf tests storperf_tests = rp_utils.get_config('storperf.test_list') logger.info("Storperf tests: %s" % storperf_tests) # For all the versions for version in versions: # For all the installers for installer in installers: # get scenarios results data # for the moment we consider only 1 case snia_steady_state scenario_results = rp_utils.getScenarios("storperf", "snia_steady_state", installer, version, "installer") # logger.info("scenario_results: %s" % scenario_results) scenario_stats = rp_utils.getScenarioStats(scenario_results) logger.info("scenario_stats: %s" % scenario_stats) items = {} scenario_result_criteria = {} # From each scenarios get results list for s, s_result in scenario_results.items(): logger.info("---------------------------------") logger.info("installer %s, version %s, scenario %s", installer, version, s) ten_criteria = len(s_result)
# check that the directory exists, if not create it # (first run on new version) if not os.path.exists(scenario_directory): os.makedirs(scenario_directory) # initiate scenario file if it does not exist if not os.path.isfile(scenario_file_name): with open(scenario_file_name, "a") as my_file: LOGGER.debug("Create scenario file: %s", scenario_file_name) my_file.write("date,scenario,installer,detail,score\n") for vizu_param in vizu_params: scenario_results = rp_utils.getScenarios("functest", "connection_check", vizu_param, version, vizu_mode) # get nb of supported architecture (x86, aarch64) architectures = rp_utils.getArchitectures(scenario_results) LOGGER.info("Supported architectures: %s", architectures) for architecture in architectures: LOGGER.info("Architecture: %s", architecture) # Consider only the results for the selected architecture # i.e drop x86 for aarch64 and vice versa filter_results = rp_utils.filterArchitecture( scenario_results, architecture) scenario_stats = rp_utils.getScenarioStats(filter_results) items = {} scenario_result_criteria = {}