aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-04-24 10:05:02 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-04-24 19:40:52 +0000
commitf2136a47fd53fcbdc117899c6e134d7ceea46d85 (patch)
tree686a4b6a8903c37990bf533493d660167685f6d0 /ms/controllerblueprints/modules/service
parent535002fbb8b2ffeb81564b4ed8858889ac6404d4 (diff)
Multiples fixes
Change-Id: I83782006dc47a224e546b6877070d5e7e56dd2e6 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Delete the deployed blueprint if overriten Change-Id: I7e4f3a5c98388a965ef756467497ed31d23bc047 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Fix enhancement of workflow step for component Change-Id: I62c7904265495edb2b0a5bec0d64cfecd7573f97 Issue-ID: CCSDK-1168 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Update golden package Change-Id: I969fe9cf9b563911ebe4500fe8f3211aedb84593 Issue-ID: CCSDK-1231 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Do not fail to get execution property When prepareEnv fail, we should not fail by saying to property is not set. So set it as N/A until is get sets further done in the processing Change-Id: I06b9fcb9b1cf9e1605cef77864da9dbd18243800 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt20
1 files changed, 13 insertions, 7 deletions
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 8ea23136c..a8765eee1 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
@@ -100,10 +100,10 @@ open class BluePrintWorkflowEnhancerImpl(private val bluePrintRepoService: BlueP
when {
derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
- // DO Nothing
+ enhanceStepTargets(name, workflow, firstNodeTemplateName, false)
}
derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
- enhanceDGStepTargets(name, workflow, firstNodeTemplateName)
+ enhanceStepTargets(name, workflow, firstNodeTemplateName, true)
}
else -> {
throw BluePrintProcessorException("couldn't execute workflow($name) step mapped " +
@@ -113,15 +113,21 @@ open class BluePrintWorkflowEnhancerImpl(private val bluePrintRepoService: BlueP
}
- private fun enhanceDGStepTargets(name: String, workflow: Workflow, dgNodeTemplateName: String) {
+ private fun enhanceStepTargets(name: String, workflow: Workflow, nodeTemplateName: String, isDG: Boolean) {
- val dgNodeTemplate = bluePrintContext.nodeTemplateByName(dgNodeTemplateName)
+ val dependencyNodeTemplates: List<String>
+ if (isDG) {
+ val dgNodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
- // Get the Dependent Component Node Template Names
- val dependencyNodeTemplateNodes = dgNodeTemplate.properties?.get(PROPERTY_DEPENDENCY_NODE_TEMPLATES)
+ // Get the Dependent Component Node Template Names
+ val dependencyNodeTemplateNodes = dgNodeTemplate.properties?.get(PROPERTY_DEPENDENCY_NODE_TEMPLATES)
?: throw BluePrintException("couldn't get property($PROPERTY_DEPENDENCY_NODE_TEMPLATES) ")
- val dependencyNodeTemplates = JacksonUtils.getListFromJsonNode(dependencyNodeTemplateNodes, String::class.java)
+ dependencyNodeTemplates =
+ JacksonUtils.getListFromJsonNode(dependencyNodeTemplateNodes, String::class.java)
+ } else {
+ dependencyNodeTemplates = listOf(nodeTemplateName)
+ }
log.info("workflow($name) dependent component NodeTemplates($dependencyNodeTemplates)")