diff options
author | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-11-19 12:48:31 -0500 |
---|---|---|
committer | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-11-28 19:46:23 -0500 |
commit | e96fa50ce96890932c2ed38c86ba0f42945c1623 (patch) | |
tree | c32ad96538155410931dba17788c536688d64b0a /components/core/src | |
parent | deb4aafefd02910d14746e70e391b057546ebd08 (diff) |
Implement Base Jython Executor function.
Change-Id: I3fb066a021de4a7b3aa1fce7f6c191bc3944fb51
Issue-ID: CCSDK-696
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'components/core/src')
-rw-r--r-- | components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt index f84b2c56..9da5b0ee 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt @@ -59,6 +59,8 @@ interface BluePrintRuntimeService<T> { fun resolveNodeTemplateArtifact(nodeTemplateName: String, artifactName: String): String
+ fun resolveNodeTemplateArtifactDefinition(nodeTemplateName: String, artifactName: String): ArtifactDefinition
+
fun setInputValue(propertyName: String, propertyDefinition: PropertyDefinition, value: JsonNode)
fun setWorkflowInputValue(workflowName: String, propertyName: String, propertyDefinition: PropertyDefinition, value: JsonNode)
@@ -269,15 +271,19 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl return propertyAssignmentValue
}
- override fun resolveNodeTemplateArtifact(nodeTemplateName: String,
- artifactName: String): String {
+ override fun resolveNodeTemplateArtifact(nodeTemplateName: String, artifactName: String): String {
+ val artifactDefinition: ArtifactDefinition = resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
+ val propertyAssignmentExpression = PropertyAssignmentService(this)
+ return propertyAssignmentExpression.artifactContent(artifactDefinition)
+ }
+
+ override fun resolveNodeTemplateArtifactDefinition(nodeTemplateName: String, artifactName: String): ArtifactDefinition {
val nodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
- val artifactDefinition: ArtifactDefinition = nodeTemplate.artifacts?.get(artifactName)
+ return nodeTemplate.artifacts?.get(artifactName)
?: throw BluePrintProcessorException(String.format("failed to get artifat definition {} from the node template"
, artifactName))
- val propertyAssignmentExpression = PropertyAssignmentService(this)
- return propertyAssignmentExpression.artifactContent(artifactDefinition)
+
}
|