aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario/basic_onboard.py
diff options
context:
space:
mode:
authormorganrol <morgan.richomme@orange.com>2021-04-21 14:45:24 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2021-04-21 14:04:19 +0000
commitea75b7596605a2bb7e5f51aa39ca6e5a962c59db (patch)
treeb6890b694829c866f941e23859d52a28e8046f0a /src/onaptests/scenario/basic_onboard.py
parent90e17b01f8b2cefd4f790f98882d603ed0987d85 (diff)
[EXCEPTIONS] Distinguish onaptests and onapsdk exception
there is no error_message method on onapsdk exception as a consequence we may raise a new excpetion when catching sdk exception leading to the non generation of the report Issue-ID: TEST-332 Signed-off-by: morganrol <morgan.richomme@orange.com> Change-Id: I42d1413ef142e29eeafdfe701f136ae45b097de4 (cherry picked from commit 0a9bc9eba1ada15ec1a2934f3baa465804f20e76)
Diffstat (limited to 'src/onaptests/scenario/basic_onboard.py')
-rw-r--r--src/onaptests/scenario/basic_onboard.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/onaptests/scenario/basic_onboard.py b/src/onaptests/scenario/basic_onboard.py
index 6277f9d..af689bd 100644
--- a/src/onaptests/scenario/basic_onboard.py
+++ b/src/onaptests/scenario/basic_onboard.py
@@ -34,9 +34,12 @@ class BasicOnboard(testcase.TestCase):
self.test.execute()
self.__logger.info("VNF basic_vm successfully onboarded")
self.result = 100
- except (OnapTestException, SDKException) as exc:
+ except OnapTestException as exc:
self.result = 0
self.__logger.error(exc.error_message)
+ except SDKException:
+ self.result = 0
+ self.__logger.error("SDK Exception")
finally:
self.stop_time = time.time()