aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-29 09:08:45 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-29 15:29:47 -0400
commitfd8845d494fa0f054e00012d3eb13a28d733ba59 (patch)
tree21da64f9f0e1eb10933db77a361a6eb28ca76e7c /components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
parentc4efe038f0a604a59331c69b34a415514a98a7df (diff)
Update golden blueprint
Change-Id: Ib80de8dfed834b0ed062adafd1b029eb715be3e5 Issue-ID: CCSDK-1149 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py36
1 files changed, 16 insertions, 20 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py b/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
index 4cf635afe..8482a89d3 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
+++ b/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
@@ -19,28 +19,24 @@ from java.lang import Exception as JavaException
class DescriptionExample(AbstractRAProcessor):
def process(self, resource_assignment):
- try:
- # get dependencies result
- value = self.raRuntimeService.getStringFromResolutionStore("vf-module-type")
-
- # logic based on dependency outcome
- result = ""
- if value == "vfw":
- result = "This is the Virtual Firewall entity"
- elif value == "vsn":
- result = "This is the Virtual Sink entity"
- elif value == "vpg":
- result = "This is the Virtual Packet Generator"
+ # get dependencies result
+ value = self.raRuntimeService.getStringFromResolutionStore("vf-module-type")
+
+ # logic based on dependency outcome
+ result = ""
+ if value == "vfw":
+ result = "This is the Virtual Firewall entity"
+ elif value == "vsn":
+ result = "This is the Virtual Sink entity"
+ elif value == "vpg":
+ result = "This is the Virtual Packet Generator"
- # set value for resource getting currently resolved
- self.set_resource_data_value(resource_assignment, result)
+ # set value for resource getting currently resolved
+ self.set_resource_data_value(resource_assignment, result)
- except JavaException, err:
- log.error("Java Exception in the script {}", err)
- except Exception, err:
- log.error("Python Exception in the script {}", err)
return None
def recover(self, runtime_exception, resource_assignment):
- print self.addError(runtime_exception.getMessage())
- return None \ No newline at end of file
+ log.error("Exception in the script {}", runtime_exception)
+ print self.addError(runtime_exception.cause.message)
+ return None