summaryrefslogtreecommitdiffstats
path: root/components/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'components/core/src')
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt16
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)
+
}