aboutsummaryrefslogtreecommitdiffstats
path: root/run_basicvm_nomulticloud.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_basicvm_nomulticloud.py')
-rw-r--r--run_basicvm_nomulticloud.py26
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()