aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-02-08 17:24:58 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-08 17:24:58 +0000
commit1a5df3ce215a5502ff8e1045915e598ffada41c6 (patch)
tree284aaddcd73b8a5926289c3e0f072a8ffb0b13f5 /src/onaptests/scenario
parentba1faac52b28f752516ab075a5bda56058548e49 (diff)
parentdf5a03610d6f00ed8e8ee3e153de055fbc5dae94 (diff)
Merge "Python SDK 7.4.0 compatibility"
Diffstat (limited to 'src/onaptests/scenario')
-rw-r--r--src/onaptests/scenario/basic_network.py5
-rw-r--r--src/onaptests/scenario/basic_vm.py3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/onaptests/scenario/basic_network.py b/src/onaptests/scenario/basic_network.py
index 8aafd32..7a0b9f7 100644
--- a/src/onaptests/scenario/basic_network.py
+++ b/src/onaptests/scenario/basic_network.py
@@ -5,6 +5,7 @@ import time
from xtesting.core import testcase
from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
import onaptests.utils.exceptions as onap_test_exceptions
from onaptests.steps.instantiate.vl_ala_carte import YamlTemplateVlAlaCarteInstantiateStep
@@ -40,8 +41,8 @@ class BasicNetwork(testcase.TestCase):
time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
try:
self.test.cleanup()
- except ValueError as error:
- self.__logger.info("service deleted as expected {0}".format(error))
+ except SDKException as error:
+ self.__logger.info("service deletion error {0}".format(error))
self.result = 100
else:
self.__logger.info("No cleanup requested. Test completed.")
diff --git a/src/onaptests/scenario/basic_vm.py b/src/onaptests/scenario/basic_vm.py
index ff432db..1dac176 100644
--- a/src/onaptests/scenario/basic_vm.py
+++ b/src/onaptests/scenario/basic_vm.py
@@ -5,6 +5,7 @@ import time
from xtesting.core import testcase
from onapsdk.configuration import settings
+from onapsdk.exceptions import SDKException
import onaptests.utils.exceptions as onap_test_exceptions
from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep
@@ -45,6 +46,8 @@ class BasicVm(testcase.TestCase):
except onap_test_exceptions.OnapTestException as exc:
self.result = 0
self.__logger.error(exc.error_message)
+ except SDKException as error:
+ self.__logger.info("service error {0}".format(error))
finally:
self.stop_time = time.time()