aboutsummaryrefslogtreecommitdiffstats
path: root/run_status.py
blob: 0c3aaf1c4ba1628a74045df9985c2cb052309b5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import logging.config
import onaptests.utils.exceptions as onap_test_exceptions
from onapsdk.configuration import settings
from onaptests.steps.cloud.check_status import CheckNamespaceStatusStep



if __name__ == "__main__":
    # logging configuration for onapsdk, it is not requested for onaptests
    # Correction requested in onapsdk to avoid having this duplicate code
    logging.config.dictConfig(settings.LOG_CONFIG)
    logger = logging.getLogger("Status Check")

    status = CheckNamespaceStatusStep(
        cleanup=settings.CLEANUP_FLAG)
    try:
        status.execute()
        status.cleanup()
    except onap_test_exceptions.TestConfigurationException:
        logger.error("Status Check configuration error")
    status.reports_collection.generate_report()