diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-26 09:49:13 -0400 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-26 09:49:13 -0400 |
commit | 72d22a4339db09824d46746dacbba1e141763dc0 (patch) | |
tree | 7fbfea4b81afca0bc0c95e5d4b810f236f4dea29 /components/scripts/python/ccsdk_blueprints | |
parent | ef6983b670796becfa66c69075c1829e8f9aef4b (diff) |
Migrate ccdsk/apps to ccsdk/cds
Change-Id: I020a2ccec4e691717f888e8bd2afec91a7c4e987
Issue-ID: CCSDK-1178
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'components/scripts/python/ccsdk_blueprints')
7 files changed, 0 insertions, 123 deletions
diff --git a/components/scripts/python/ccsdk_blueprints/__init__.py b/components/scripts/python/ccsdk_blueprints/__init__.py deleted file mode 100644 index e69de29b..00000000 --- a/components/scripts/python/ccsdk_blueprints/__init__.py +++ /dev/null diff --git a/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py b/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py deleted file mode 100644 index 1ffa75d4..00000000 --- a/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py +++ /dev/null @@ -1,15 +0,0 @@ -from org.onap.ccsdk.apps.blueprintsprocessor.services.execution import AbstractComponentFunction - - -class AbstractPythonComponentFunction(AbstractComponentFunction): - - def __init__(self): - AbstractComponentFunction.__init__(self) - - def process(self, execution_request): - print "Processing calling from parent..." - return None - - def recover(self, runtime_exception, execution_request): - print "Recovering calling from parent..." - return None diff --git a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py deleted file mode 100644 index 6489b1e7..00000000 --- a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py +++ /dev/null @@ -1,29 +0,0 @@ -from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor import \ - ResourceAssignmentProcessor -from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils import \ - ResourceAssignmentUtils -from org.onap.ccsdk.apps.controllerblueprints.core import \ - BluePrintProcessorException - - -class AbstractRAProcessor(ResourceAssignmentProcessor): - - def process(self, resource_assignment): - print "Processing.." - return None - - def recover(self, runtime_exception, resource_assignment): - print "Recovering.." - return None - - def set_resource_data_value(self, resource_assignment, value): - try: - if value is not None: - ResourceAssignmentUtils.Companion.setResourceDataValue( - resource_assignment, self.raRuntimeService, value) - else: - ResourceAssignmentUtils.Companion.setFailedResourceDataValue( - resource_assignment, "Fail to resolve value") - except BluePrintProcessorException, err: - raise BluePrintProcessorException( - "Error on resource assignment. Message = " + err.message) diff --git a/components/scripts/python/ccsdk_blueprints/blueprint_constants.py b/components/scripts/python/ccsdk_blueprints/blueprint_constants.py deleted file mode 100644 index 50246773..00000000 --- a/components/scripts/python/ccsdk_blueprints/blueprint_constants.py +++ /dev/null @@ -1,26 +0,0 @@ - -PROPERTY_BLUEPRINT_PROCESS_ID= "blueprint-process-id" -PROPERTY_BLUEPRINT_BASE_PATH= "blueprint-basePath" -PROPERTY_BLUEPRINT_RUNTIME= "blueprint-runtime" -PROPERTY_BLUEPRINT_INPUTS_DATA= "blueprint-inputs-data" -PROPERTY_BLUEPRINT_CONTEXT= "blueprint-context" -PROPERTY_BLUEPRINT_NAME= "template_name" -PROPERTY_BLUEPRINT_VERSION= "template_version" -PROPERTY_BLUEPRINT_USER_SYSTEM= "System" -PROPERTY_BLUEPRINT_STATUS_SUCCESS= "success" -PROPERTY_BLUEPRINT_STATUS_FAILURE= "failure" - -METADATA_USER_GROUPS = "user-groups" -METADATA_TEMPLATE_NAME = "template_name" -METADATA_TEMPLATE_VERSION = "template_version" -METADATA_TEMPLATE_AUTHOR = "template_author" -METADATA_TEMPLATE_TAGS = "template_tags" -METADATA_WORKFLOW_NAME = "workflow_name" - -PAYLOAD_DATA = "payload-data" -PROPERTY_CURRENT_STEP = "current-step" -PROPERTY_CURRENT_NODE_TEMPLATE = "current-node-template" -PROPERTY_CURRENT_INTERFACE = "current-interface" -PROPERTY_CURRENT_OPERATION = "current-operation" -PROPERTY_CURRENT_IMPLEMENTATION = "current-implementation" -PROPERTY_EXECUTION_REQUEST = "execution-request" diff --git a/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py b/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py deleted file mode 100644 index 7c7beff7..00000000 --- a/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py +++ /dev/null @@ -1,21 +0,0 @@ -class BluePrintRuntimeService: - - def __init__(self, bps): - self.bps = bps - - def resolveNodeTemplateArtifact(self, node_template_name, artifact_name): - return self.bps.resolveNodeTemplateArtifact(node_template_name, artifact_name) - - def setNodeTemplateAttributeValue(self, nodeTemplateName, attributeName, value): - return self.bps.setNodeTemplateAttributeValue(nodeTemplateName, attributeName, value) - - def setNodeTemplatePropertyValue(self, nodeTemplateName, propertyName, value): - return self.bps.setNodeTemplatePropertyValue(nodeTemplateName, propertyName, value) - - def put_resolution_store(self, ra_name, value): - self.bps.putResolutionStore(ra_name, value) - return None - - def put_dictionary_store(self, ra_dictionary_name, value): - self.bps.putResolutionStore(ra_dictionary_name, value) - return None diff --git a/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py b/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py deleted file mode 100644 index a1e6c5d3..00000000 --- a/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py +++ /dev/null @@ -1,18 +0,0 @@ -from abstract_blueprint_function import AbstractPythonComponentFunction -from blueprint_constants import * - - -class SampleBlueprintComponent(AbstractPythonComponentFunction): - - def __init__(self): - AbstractPythonComponentFunction.__init__(self) - - def process(self, execution_request): - super(SamplePythonComponentNode, self).process(execution_request) - print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH - return None - - def recover(self, runtime_exception, execution_request): - super(SamplePythonComponentNode, self).recover(runtime_exception, execution_request) - print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH - return None diff --git a/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py b/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py deleted file mode 100644 index fa821082..00000000 --- a/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py +++ /dev/null @@ -1,14 +0,0 @@ -from abstract_ra_processor import AbstractRAProcessor -from blueprint_constants import * - - -class SampleRAProcessorFunction(AbstractRAProcessor): - - def process(self, resource_assignment): - print "Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH - self.set_resource_data_value(resource_assignment, "") - return None - - def recover(self, runtime_exception, resource_assignment): - print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH - return None |