Jython execution component and service
authorSteve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
Tue, 12 Feb 2019 04:35:16 +0000 (23:35 -0500)
committerSteve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
Tue, 12 Feb 2019 13:07:00 +0000 (08:07 -0500)
Change-Id: I2610e73a9c7ba073b5fa9d148dcd6fb5b9ad9ae3
Issue-ID: CCSDK-696
Signed-off-by: Steve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Scripts/SampleResourceAssignmentProcessorScript.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/CBA_Zip_Test.zip [deleted file]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/resource_assignment_utils.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py [new file with mode: 0644]

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 (file)
index 0000000..f9b5330
--- /dev/null
@@ -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 (executable)
index 77882ef..0000000
Binary files a/components/model-catalog/blueprint-model/test-blueprint/CBA_Zip_Test.zip and /dev/null 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 (file)
index 0000000..9729f04
--- /dev/null
@@ -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 (file)
index 0000000..f7d54ea
--- /dev/null
@@ -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 (file)
index 0000000..53cc5d7
--- /dev/null
@@ -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 (file)
index 0000000..8f68bfe
--- /dev/null
@@ -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