diff options
Diffstat (limited to 'src/onaptests/scenario/basic_cnf.py')
-rw-r--r-- | src/onaptests/scenario/basic_cnf.py | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/src/onaptests/scenario/basic_cnf.py b/src/onaptests/scenario/basic_cnf.py index 30c3c3b..4d98398 100644 --- a/src/onaptests/scenario/basic_cnf.py +++ b/src/onaptests/scenario/basic_cnf.py @@ -5,8 +5,10 @@ import time from xtesting.core import testcase from onapsdk.configuration import settings -import onaptests.utils.exceptions as onap_test_exceptions +from onapsdk.exceptions import SDKException + from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep +from onaptests.utils.exceptions import OnapTestException class BasicCnf(testcase.TestCase): """Onboard then instantiate a simple CNF with ONAP.""" @@ -41,33 +43,9 @@ class BasicCnf(testcase.TestCase): else: self.__logger.info("No cleanup requested. Test completed.") self.result = 100 - except onap_test_exceptions.TestConfigurationException: - self.result = 0 - self.__logger.error("Basic CNF configuration error") - except onap_test_exceptions.ServiceInstantiateException: - self.result = 0 - self.__logger.error("Basic CNF service instantiation error") - except onap_test_exceptions.ServiceCleanupException: - self.result = 0 - self.__logger.error("Basic CNF service instance cleanup error") - except onap_test_exceptions.VnfInstantiateException: - self.result = 0 - self.__logger.error("Basic CNF Vnf instantiation error") - except onap_test_exceptions.VnfCleanupException: - self.result = 0 - self.__logger.error("Basic CNF Vnf instance cleanup error") - except onap_test_exceptions.ProfileInformationException: - self.__logger.error("Missing k8s profile information") - self.result = 0 - except onap_test_exceptions.ProfileCleanupException: - self.__logger.error("K8s profile deletion failed") - self.result = 0 - except onap_test_exceptions.VfModuleInstantiateException: - self.result = 0 - self.__logger.error("Basic CNF Module instantiation error") - except onap_test_exceptions.VfModuleCleanupException: - self.__logger.error("Basic CNF Module cleanup failed.") + except (OnapTestException, SDKException) as exc: self.result = 0 + self.__logger.error(exc.error_message) finally: self.stop_time = time.time() |