summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-17 11:15:28 -0500
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-17 11:15:28 -0500
commit430152b368c2bf7458f9bbfb46841b9c2f31110f (patch)
tree4515ecf17b71bb0b7ffdbc6f83b473cfcdfcb8cb /ms/blueprintsprocessor/functions
parent6de2171cd73873d5d2f5252e7238cb8d31aca806 (diff)
Change to base sli provider interfaces.
Change-Id: Icf16aa602ba107e2b2095f756f0c3af6f38891f5 Issue-ID: CCSDK-672 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions')
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt8
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt6
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolutionprocessor/ResourceAssignmentProcessor.kt2
3 files changed, 8 insertions, 8 deletions
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
index 166af0f7..5eb40225 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
@@ -43,7 +43,7 @@ open class ComponentJythonExecutor(private val pythonExecutorProperty: PythonExe
lateinit var applicationContext: ApplicationContext
fun populateJythonComponentInstance(executionServiceInput: ExecutionServiceInput) {
- val bluePrintContext = bluePrintRuntimeService!!.bluePrintContext()
+ val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val operationAssignment: OperationAssignment = bluePrintContext
.nodeTemplateInterfaceOperation(nodeTemplateName, interfaceName, operationName)
@@ -53,14 +53,14 @@ open class ComponentJythonExecutor(private val pythonExecutorProperty: PythonExe
val artifactName: String = operationAssignment.implementation?.primary
?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
- val artifactDefinition = bluePrintRuntimeService!!.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
+ val artifactDefinition = bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
val pythonFileName = artifactDefinition.file
?: throw BluePrintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
val pythonClassName = FilenameUtils.getBaseName(pythonFileName)
- val content: String? = bluePrintRuntimeService!!.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
+ val content: String? = bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
checkNotEmptyNThrow(content, "artifact ($artifactName) content is empty")
@@ -85,7 +85,7 @@ open class ComponentJythonExecutor(private val pythonExecutorProperty: PythonExe
override fun process(executionServiceInput: ExecutionServiceInput) {
- log.info("Processing : ${operationInputs}")
+ log.info("Processing : $operationInputs")
checkNotNull(bluePrintRuntimeService) { "failed to get bluePrintRuntimeService" }
// Populate Component Instance
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
index e5feb257..0becc00c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
@@ -39,12 +39,12 @@ open class ResourceResolutionComponent(private val resourceResolutionService: Re
val artifactPrefixNamesNode = getOperationInput(ResourceResolutionConstants.INPUT_ARTIFACT_PREFIX_NAMES)
val artifactPrefixNames = JacksonUtils.getListFromJsonNode(artifactPrefixNamesNode, String::class.java)
- ?: throw BluePrintProcessorException("coundn't transform ${artifactPrefixNamesNode.asText()} to string array")
+ ?: throw BluePrintProcessorException("couldn't transform ${artifactPrefixNamesNode.asText()} to string array")
- val resolvedParamContents = resourceResolutionService.resolveResources(bluePrintRuntimeService!!, nodeTemplateName, artifactPrefixNames)
+ val resolvedParamContents = resourceResolutionService.resolveResources(bluePrintRuntimeService, nodeTemplateName, artifactPrefixNames)
// Set Output Attributes
- bluePrintRuntimeService!!.setNodeTemplateAttributeValue(nodeTemplateName,
+ bluePrintRuntimeService.setNodeTemplateAttributeValue(nodeTemplateName,
ResourceResolutionConstants.OUTPUT_ASSIGNMENT_PARAMS, resolvedParamContents.asJsonNode())
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolutionprocessor/ResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolutionprocessor/ResourceAssignmentProcessor.kt
index 2b19c8b8..d13df9bc 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolutionprocessor/ResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolutionprocessor/ResourceAssignmentProcessor.kt
@@ -34,7 +34,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
open fun resourceDefinition(name: String): ResourceDefinition {
- return resourceDictionaries.get(name)
+ return resourceDictionaries[name]
?: throw BluePrintProcessorException("couldn't get resource definition($name)")
}