3 import onaptests.utils.exceptions as onap_test_exceptions
4 from onapsdk.configuration import settings
5 from onaptests.scenario.basic_cnf_macro import BasicCnfMacro
7 if __name__ == "__main__":
8 # logging configuration for onapsdk, it is not requested for onaptests
9 # Correction requested in onapsdk to avoid having this duplicate code
10 logging.config.dictConfig(settings.LOG_CONFIG)
11 logger = logging.getLogger("Instantiate Apache CNF with macro procedure")
12 step = BasicCnfMacro(cleanup=settings.CLEANUP_FLAG)
15 if settings.CLEANUP_FLAG:
16 logger.info("Starting to clean up in {} seconds".format(settings.CLEANUP_ACTIVITY_TIMER))
17 time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
19 except onap_test_exceptions.TestConfigurationException:
20 logger.error("Ubuntu NSO VM configuration error")
21 except onap_test_exceptions.ServiceInstantiateException:
22 logger.error("Ubuntu NSO VM instantiation error")
23 except onap_test_exceptions.ServiceCleanupException:
24 logger.error("Ubuntu NSO VM instance cleanup error")
25 except onap_test_exceptions.VnfInstantiateException:
26 logger.error("Ubuntu NSO VM Vnf instantiation error")
27 except onap_test_exceptions.VnfCleanupException:
28 logger.error("Ubuntu NSO VM Vnf instance cleanup error")
29 except onap_test_exceptions.VfModuleInstantiateException:
30 logger.error("Ubuntu NSO VM Module instantiation error")
31 except onap_test_exceptions.VfModuleCleanupException:
32 logger.error("Ubuntu NSO VM Module cleanup error")