aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-02-12 16:06:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-12 16:06:01 +0000
commit702a59b0ac36cfdd9eed43e539f953f5277877eb (patch)
tree6772fe2b3f009020109c247aae53c419f8fa7d70 /components
parentd67af8c778829f3116bef2d13f761286e1a34f16 (diff)
parentdba22de28e496ae2d6d2fde9384fd1187e4b8fc1 (diff)
Merge "Jython execution component and service"
Diffstat (limited to 'components')
-rw-r--r--components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Scripts/SampleResourceAssignmentProcessorScript.py13
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/CBA_Zip_Test.zipbin5382 -> 0 bytes
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py13
-rw-r--r--components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py12
-rw-r--r--components/scripts/python/ccsdk_blueprints/resource_assignment_utils.py14
-rw-r--r--components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py12
6 files changed, 64 insertions, 0 deletions
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Scripts/SampleResourceAssignmentProcessorScript.py b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Scripts/SampleResourceAssignmentProcessorScript.py
new file mode 100644
index 00000000..f9b53309
--- /dev/null
+++ b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Scripts/SampleResourceAssignmentProcessorScript.py
@@ -0,0 +1,13 @@
+from resource_assignment_processor_function import JythonComponentFunction
+from blueprint_constants import *
+
+
+class SampleJythonComponentNode(JythonComponentFunction):
+
+ def process(self, execution_request):
+ print "Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ return None
+
+ def recover(self, runtime_exception, execution_request):
+ print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/CBA_Zip_Test.zip b/components/model-catalog/blueprint-model/test-blueprint/CBA_Zip_Test.zip
deleted file mode 100755
index 77882ef1..00000000
--- a/components/model-catalog/blueprint-model/test-blueprint/CBA_Zip_Test.zip
+++ /dev/null
Binary files differ
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py
new file mode 100644
index 00000000..9729f04f
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py
@@ -0,0 +1,13 @@
+from abstract_ra_processor import AbstractRAProcessor
+from blueprint_constants import *
+
+
+class SampleRAProcessor(AbstractRAProcessor):
+
+ def process(self, execution_request):
+ print "Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ return None
+
+ def recover(self, runtime_exception, execution_request):
+ print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ return None
diff --git a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
new file mode 100644
index 00000000..f7d54ea8
--- /dev/null
+++ b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
@@ -0,0 +1,12 @@
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor import ResourceAssignmentProcessor
+
+
+class AbstractRAProcessor(ResourceAssignmentProcessor):
+
+ def process(self, execution_request):
+ print "Processing calling.."
+ return None
+
+ def recover(self, runtime_exception, execution_request):
+ print "Recovering calling.."
+ return None
diff --git a/components/scripts/python/ccsdk_blueprints/resource_assignment_utils.py b/components/scripts/python/ccsdk_blueprints/resource_assignment_utils.py
new file mode 100644
index 00000000..53cc5d70
--- /dev/null
+++ b/components/scripts/python/ccsdk_blueprints/resource_assignment_utils.py
@@ -0,0 +1,14 @@
+class ResourceAssignmentUtils:
+
+
+ @classmethod
+ def set_ressource_data_value(cls, ra, runtime_exception, value):
+ print "Set resource here..."
+ # TODO
+ return None
+
+ @staticmethod
+ def set_ressource_value(ra, runtime_exception, value):
+ print "Set resource here..."
+ # TODO
+ return None \ No newline at end of file
diff --git a/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py b/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py
new file mode 100644
index 00000000..8f68bfec
--- /dev/null
+++ b/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py
@@ -0,0 +1,12 @@
+from abstract_ra_processor import AbstractRAProcessor
+
+
+class SampleRAProcessorFunction(AbstractRAProcessor):
+
+ def process(self, execution_request):
+ print "Processing calling.."
+ return None
+
+ def recover(self, runtime_exception, execution_request):
+ print "Recovering calling.."
+ return None