aboutsummaryrefslogtreecommitdiffstats
path: root/run_basic_sdnc.py
blob: 18e6347fbb970e0ea2ac170162f4ba36112ef69a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import logging.config
from onapsdk.configuration import settings

from onaptests.scenario.basic_sdnc import BasicSdnc
import onaptests.utils.exceptions as onap_test_exceptions

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("Basic SDNC")

    basic_sdnc = BasicSdnc(cleanup=settings.CLEANUP_FLAG)
    try:
        basic_sdnc.run()
        basic_sdnc.clean()
    except onap_test_exceptions.TestConfigurationException:
        logger.error("Basic SDNC configuration error")