diff options
author | 2020-10-15 14:57:37 +0200 | |
---|---|---|
committer | 2020-10-15 16:27:50 +0200 | |
commit | e39466fadd289f279509e460f6222d9c08f53c56 (patch) | |
tree | a1651a3f07b6e503ea1a42575d7ca8a7b69d9db2 /run_basicvm_nomulticloud.py | |
parent | b7b9796d16a2e53e0e58ae9888dade1e89a0cc19 (diff) |
Fix bad path of the logs in the reporting page
Issue-ID: TEST-270
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: Ief03cf6916b417fb0c80c5086ffe8e73f3865329
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'run_basicvm_nomulticloud.py')
-rw-r--r-- | run_basicvm_nomulticloud.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/run_basicvm_nomulticloud.py b/run_basicvm_nomulticloud.py index 9ebefb8..a2e9cfd 100644 --- a/run_basicvm_nomulticloud.py +++ b/run_basicvm_nomulticloud.py @@ -1,5 +1,6 @@ import logging.config import time +import onaptests.utils.exceptions as onap_test_exceptions from onapsdk.configuration import settings from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep @@ -13,11 +14,24 @@ if __name__ == "__main__": basic_vm_instantiate = YamlTemplateVfModuleAlaCarteInstantiateStep( cleanup=settings.CLEANUP_FLAG) - basic_vm_instantiate.execute() - if settings.CLEANUP_FLAG: - time.sleep(settings.CLEANUP_ACTIVITY_TIMER) - try: + try: + basic_vm_instantiate.execute() + if settings.CLEANUP_FLAG: + time.sleep(settings.CLEANUP_ACTIVITY_TIMER) basic_vm_instantiate.cleanup() - except ValueError as error: - logger.info("service instance deleted as expected {0}".format(error)) + except onap_test_exceptions.TestConfigurationException: + logger.error("Basic VM configuration error") + except onap_test_exceptions.ServiceInstantiateException: + logger.error("Basic VM instantiation error") + except onap_test_exceptions.ServiceCleanupException: + logger.error("Basic VM instance cleanup error") + except onap_test_exceptions.VnfInstantiateException: + logger.error("Basic VM Vnf instantiation error") + except onap_test_exceptions.VnfCleanupException: + logger.error("Basic VM Vnf instance cleanup error") + except onap_test_exceptions.VfModuleInstantiateException: + logger.error("Basic VM Module instantiation error") + except onap_test_exceptions.VfModuleCleanupException: + logger.error("Basic VM Module cleanup error") + basic_vm_instantiate.reports_collection.generate_report() |