Propagate exceptions correctly
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Wed, 13 Mar 2019 21:39:15 +0000 (17:39 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Mon, 18 Mar 2019 16:52:39 +0000 (16:52 +0000)
Change-Id: Idaf66eeaa6e57d27c576099fd6ffdeb8b6d8d6c6
Issue-ID: CCSDK-1120
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/NetconfRpcExample.py
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/Rollback.py

index fce7c32..4cf635a 100644 (file)
@@ -42,5 +42,5 @@ class DescriptionExample(AbstractRAProcessor):
         return None
 
     def recover(self, runtime_exception, resource_assignment):
-        print "NoOp"
-        return None
+        print self.addError(runtime_exception.getMessage())
+        return None
\ No newline at end of file
index ed22989..2d22f8b 100644 (file)
@@ -57,5 +57,5 @@ class NetconfRpcExample(NetconfComponentFunction):
       log.error("Python Exception in the script {}", err)
 
   def recover(self, runtime_exception, execution_request):
-    print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+    print self.addError(runtime_exception.getMessage())
     return None
index 73419d7..deec470 100644 (file)
@@ -43,5 +43,5 @@ class Rollback(NetconfComponentFunction):
       log.error("Python Exception in the script {}", err)
 
   def recover(self, runtime_exception, execution_request):
-    print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+    print self.addError(runtime_exception.getMessage())
     return None