def main():
    installers = utils.get_config('general.installers')
    versions = utils.get_config('general.versions')
    period = utils.get_config('general.period')

    LOG.info("*******************************************")
    LOG.info("*   Generating reporting scenario status  *")
    LOG.info("*   Data retention = %s days              *" % period)
    LOG.info("*                                         *")
    LOG.info("*******************************************")

    # For all the versions
    for version in versions:
        # For all the installers
        for installer in installers:
            # get scenarios results data
            scenarios = get_scenario_data(version, installer)
            for k, v in scenarios.items():
                generate_reporting_page(version, installer, k, v, period)
def do_statistic(data):
    ten_score = 0
    for v in data:
        ten_score += v

    last_count = utils.get_config(
        'general.nb_iteration_tests_success_criteria')
    last_data = data[:last_count]
    last_score = 0
    for v in last_data:
        last_score += v

    percent = utils.get_percent(last_data, data)
    status = str(percent)
    last_score = '{}/{}'.format(last_score, len(last_data))
    ten_score = '{}/{}'.format(ten_score, len(data))

    if '100' == status:
        LOG.info(">>>>> scenario OK, save the information")
    else:
        LOG.info(">>>> scenario not OK, last 4 iterations = %s, \
                    last 10 days = %s" % (last_score, ten_score))

    return last_score, ten_score, percent, status
Example #3
0
#
# 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 datetime
import os

import jinja2

import reporting.utils.reporting_utils as rp_utils
import reporting.utils.scenarioResult as sr

installers = rp_utils.get_config('general.installers')
PERIOD = rp_utils.get_config('general.period')

# Logger
logger = rp_utils.getLogger("Storperf-Status")
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'}
#
# 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 datetime
import os

import jinja2

import reporting.utils.reporting_utils as rp_utils
import reporting.utils.scenarioResult as sr

INSTALLERS = rp_utils.get_config('general.installers')
VERSIONS = rp_utils.get_config('general.versions')
PERIOD = rp_utils.get_config('general.period')

# Logger
LOGGER = rp_utils.getLogger("Bottlenecks-Status")
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 bottlenecks tests
BOTTLENECKS_TESTS = rp_utils.get_config('bottlenecks.test_list')
Example #5
0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
"""
vIMS reporting status
"""
from urllib2 import Request, urlopen, URLError
import json
import jinja2

import reporting.utils.reporting_utils as rp_utils

LOGGER = rp_utils.getLogger("vIMS")

PERIOD = rp_utils.get_config('general.period')
VERSIONS = rp_utils.get_config('general.versions')
URL_BASE = rp_utils.get_config('testapi.url')

LOGGER.info("****************************************")
LOGGER.info("*   Generating reporting vIMS          *")
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:
Example #6
0
Functest reporting status
"""

# Logger
LOGGER = rp_utils.getLogger("Functest-Status")

# Initialization
reportingDate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")

# init just connection_check to get the list of scenarios
# as all the scenarios run connection_check
healthcheck = tc.TestCase("connection_check", "functest", -1)

# Retrieve the Functest configuration to detect which tests are relevant
# according to the installer, scenario
cf = rp_utils.get_config('functest.test_conf')
period = rp_utils.get_config('general.period')
versions = rp_utils.get_config('general.versions')
installers = rp_utils.get_config('general.installers')
blacklist = rp_utils.get_config('functest.blacklist')
log_level = rp_utils.get_config('general.log.log_level')
exclude_noha = rp_utils.get_config('functest.exclude_noha')
exclude_virtual = rp_utils.get_config('functest.exclude_virtual')
tiers_for_scoring = {'healthcheck', 'smoke', 'vnf', 'features'}

LOGGER.info("*******************************************")
LOGGER.info("*                                         *")
LOGGER.info("*   Generating reporting scenario status  *")
LOGGER.info("*   Data retention: %s days               *", period)
LOGGER.info("*   Log level: %s                         *", log_level)
LOGGER.info("*                                         *")
Example #7
0
#
# 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 datetime
import os

import jinja2

import reporting.utils.reporting_utils as rp_utils
import reporting.utils.scenarioResult as sr

installers = rp_utils.get_config('general.installers')
versions = rp_utils.get_config('general.versions')
PERIOD = rp_utils.get_config('general.period')

# Logger
logger = rp_utils.getLogger("Storperf-Status")
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
storperf_tests = rp_utils.get_config('storperf.test_list')
Example #8
0
# 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
# SPDX-license-identifier: Apache-2.0

from datetime import datetime
import json
import os

from urllib2 import Request, urlopen, URLError
import jinja2

import reporting.utils.reporting_utils as rp_utils

INSTALLERS = rp_utils.get_config('general.installers')
ITEMS = ["tests", "Success rate", "duration"]

CURRENT_DIR = os.getcwd()

PERIOD = rp_utils.get_config('general.period')
CRITERIA_NB_TEST = 100
CRITERIA_DURATION = 1800
CRITERIA_SUCCESS_RATE = 100

logger = rp_utils.getLogger("Tempest")
logger.info("************************************************")
logger.info("*   Generating reporting Tempest_smoke_serial  *")
logger.info("*   Data retention = %s days                   *", PERIOD)
logger.info("*                                              *")
logger.info("************************************************")
Example #9
0
#!/usr/bin/python
#
# 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 requests
import yaml

import reporting.utils.reporting_utils as rp_utils

yardstick_conf = rp_utils.get_config('yardstick.test_conf')
response = requests.get(yardstick_conf)
yaml_file = yaml.safe_load(response.text)
reporting = yaml_file.get('reporting')

config = {}

for element in reporting:
    name = element['name']
    scenarios = element['scenario']
    for s in scenarios:
        if name not in config:
            config[name] = {}
        config[name][s] = True
# 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
# SPDX-license-identifier: Apache-2.0

from datetime import datetime
import json
import os

from urllib2 import Request, urlopen, URLError
import jinja2

import reporting.utils.reporting_utils as rp_utils

PODS = rp_utils.get_config('general.pods')
ITEMS = ["tests", "Success rate", "duration"]

CURRENT_DIR = os.getcwd()

PERIOD = rp_utils.get_config('general.period')
CRITERIA_NB_TEST = 100
CRITERIA_DURATION = 1800
CRITERIA_SUCCESS_RATE = 100

logger = rp_utils.getLogger("Tempest")
logger.info("************************************************")
logger.info("*   Generating reporting Tempest_smoke_serial  *")
logger.info("*   Data retention = %s days                   *", PERIOD)
logger.info("*                                              *")
logger.info("************************************************")
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
"""
vIMS reporting status
"""
from urllib2 import Request, urlopen, URLError
import json
import jinja2

import reporting.utils.reporting_utils as rp_utils

LOGGER = rp_utils.getLogger("vIMS")

PERIOD = rp_utils.get_config('general.period')
VERSIONS = rp_utils.get_config('general.versions')
URL_BASE = rp_utils.get_config('testapi.url')

LOGGER.info("****************************************")
LOGGER.info("*   Generating reporting vIMS          *")
LOGGER.info("*   Data retention = %s days           *", PERIOD)
LOGGER.info("*                                      *")
LOGGER.info("****************************************")

PODS = rp_utils.get_config('general.pods')
STEP_ORDER = ["initialisation", "orchestrator", "vnf", "test_vnf"]
LOGGER.info("Start vIMS reporting processing....")

# For all the versions
for version in VERSIONS:
  Functest reporting status
"""

# Logger
LOGGER = rp_utils.getLogger("ONAP-Functest-Status")

# Initialization
REPORTING_DATE = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")

# init just connection_check to get the list of scenarios
# as all the scenarios run connection_check
HEALTHCHECK_CASE = tc.TestCase("robot_healthcheck", "functest", -1)

# Retrieve the Functest configuration to detect which tests are relevant
# according to the installer, scenario
PERIOD = rp_utils.get_config('general.period')
VERSIONS = rp_utils.get_config('general.versions')
INSTALLERS = rp_utils.get_config('general.installers')
LOG_LEVEL = rp_utils.get_config('general.log.log_level')

TESTCASES = rp_utils.get_config('functest.test_list')

LOGGER.info("*******************************************")
LOGGER.info("*                                         *")
LOGGER.info("*   Generating reporting scenario status  *")
LOGGER.info("*   Data retention: %s days               *", PERIOD)
LOGGER.info("*   Log level: %s                         *", LOG_LEVEL)
LOGGER.info("*   Version: %s                           *", VERSIONS)
LOGGER.info("*   Installers! %s                        *", INSTALLERS)
LOGGER.info("*******************************************")
Example #13
0
Functest reporting status
"""

# Logger
LOGGER = rp_utils.getLogger("Functest-Status")

# Initialization
REPORTINGDATE = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")

# init just connection_check to get the list of scenarios
# as all the scenarios run connection_check
healthcheck = tc.TestCase("connection_check", "functest", -1)

# Retrieve the Functest configuration to detect which tests are relevant
# according to the pod, scenario
PERIOD = rp_utils.get_config('general.period')
VERSIONS = rp_utils.get_config('general.versions')
PODS = rp_utils.get_config('general.pods')
BLACKLIST = rp_utils.get_config('functest.blacklist')
LOG_LEVEL = rp_utils.get_config('general.log.log_level')

FUNCTEST_YAML_CONFIG = rp_utils.getFunctestConfig()

LOGGER.info("*******************************************")
LOGGER.info("*                                         *")
LOGGER.info("*   Generating reporting scenario status  *")
LOGGER.info("*   Data retention: %s days               *", PERIOD)
LOGGER.info("*   Log level: %s                         *", LOG_LEVEL)
LOGGER.info("*                                         *")
LOGGER.info("*******************************************")