From 3a2872a0d9c01bde8aabcc35d79b40f6c03f1958 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Fri, 22 Mar 2019 17:21:30 -0400 Subject: Add output enrichment validation Change-Id: Iad7f2ef5a5cdfee3acd6104653c1a6fbb928bacb Issue-ID: CCSDK-1175 Signed-off-by: Muthuramalingam, Brinda Santh --- .../service/enhancer/BluePrintWorkflowEnhancerImpl.kt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'ms/controllerblueprints/modules/service/src') diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt index 091dfdafc..8379e5032 100644 --- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt +++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt @@ -1,5 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2019 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,11 +67,16 @@ open class BluePrintWorkflowEnhancerImpl(private val bluePrintRepoService: BlueP // Clean Dynamic Property Field, If present workflow.inputs?.remove(dynamicPropertyName) + // Enrich Workflow Inputs + enhanceWorkflowInputs(name, workflow) + + // Enrich Workflow Outputs + enhanceWorkflowOutputs(name, workflow) + // Enrich Only for Resource Assignment and Dynamic Input Properties if any enhanceStepTargets(name, workflow) - // Enrich Workflow Inputs - enhanceWorkflowInputs(name, workflow) + } open fun enhanceWorkflowInputs(name: String, workflow: Workflow) { @@ -80,6 +86,12 @@ open class BluePrintWorkflowEnhancerImpl(private val bluePrintRepoService: BlueP } } + open fun enhanceWorkflowOutputs(name: String, workflow: Workflow) { + workflow.outputs?.let { outputs -> + bluePrintTypeEnhancerService.enhancePropertyDefinitions(bluePrintRuntimeService, outputs) + } + } + private fun enhanceStepTargets(name: String, workflow: Workflow) { // Get the first Step Target NodeTemplate name( It may be Component or DG Node Template) -- cgit 1.2.3-korg