vFW CNF CDS Change Blueprint to BluePrint 75/124375/1
authorMichal Chabiera <michal.chabiera@orange.com>
Tue, 21 Sep 2021 08:16:15 +0000 (10:16 +0200)
committerMichal Chabiera <michal.chabiera@orange.com>
Tue, 21 Sep 2021 08:16:15 +0000 (10:16 +0200)
Kotlin scripts don't comile after modification in CDS. Some Blueprint have to be changed into BluePrint

Issue-ID: INT-1960
Signed-off-by: Michal Chabiera <michal.chabiera@orange.com>
Change-Id: Iffeb76249651d2fd0a987d5b6f9ad9bd4c04632a

heat/vFW_CNF_CDS/templates/cba/Definitions/vFW_CNF_CDS.json
heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/CollectorScript.kt
heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt
heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/K8sHealthCheck.kt
heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt

index 22f5749..86396d0 100644 (file)
                                     "script-type": "kotlin",
                                     "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.SimpleStatusCheck",
                                     "instance-dependencies": [
-                                        "blueprintPropertiesService"
+                                        "bluePrintPropertiesService"
                                     ],
                                     "dynamic-properties": "*simple-status-properties"
                                 }
                                     "script-type": "kotlin",
                                     "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.SimpleErrorCheck",
                                     "instance-dependencies": [
-                                        "blueprintPropertiesService"
+                                        "bluePrintPropertiesService"
                                     ],
                                     "dynamic-properties": "*simple-status-properties"
                                 }
                                     "script-type": "kotlin",
                                     "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.K8sHealthCheck",
                                     "instance-dependencies": [
-                                        "blueprintPropertiesService"
+                                        "bluePrintPropertiesService"
                                     ],
                                     "dynamic-properties": "*simple-status-properties"
                                 }
index a9de197..4e545bc 100644 (file)
@@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.JsonNode
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
 import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
 import org.onap.ccsdk.cds.controllerblueprints.core.logger
 
@@ -42,7 +42,7 @@ open class CollectorScript : AbstractScriptComponentFunction() {
         return try {
             bluePrintRuntimeService.getNodeTemplateAttributeValue(nodeTemplateName,
                     ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA)
-        } catch (exception: BlueprintProcessorException) { null }
+        } catch (exception: BluePrintProcessorException) { null }
     }
 
     override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
index 78254a8..b482156 100644 (file)
@@ -23,7 +23,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.template.
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.template.K8sConfigValueComponent
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
 import org.slf4j.LoggerFactory
 
@@ -84,7 +84,7 @@ open class ConfigDeploySetup() : ResourceAssignmentProcessor() {
             log.error(e.message, e)
             ResourceAssignmentUtils.setResourceDataValue(executionRequest, raRuntimeService, "ERROR")
 
-            throw BlueprintProcessorException("Failed in template key ($executionRequest) assignments, cause: ${e.message}", e)
+            throw BluePrintProcessorException("Failed in template key ($executionRequest) assignments, cause: ${e.message}", e)
         }
     }
 
index 68d83e0..dd87c6f 100644 (file)
@@ -19,7 +19,7 @@ import kotlinx.coroutines.delay
 import kotlinx.coroutines.joinAll
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sPluginInstanceApi
@@ -37,7 +37,7 @@ open class K8sHealthCheck : AbstractScriptComponentFunction() {
     }
 
     private fun initPluginApi(): K8sPluginInstanceApi {
-        val bluePrintPropertiesService: BlueprintPropertiesService = this.functionDependencyInstanceAsType("blueprintPropertiesService")!!
+        val bluePrintPropertiesService: BluePrintPropertiesService = this.functionDependencyInstanceAsType("bluePrintPropertiesService")!!
         val k8sConfiguration = K8sConnectionPluginConfiguration(bluePrintPropertiesService)
 
         return K8sPluginInstanceApi(k8sConfiguration)
@@ -120,6 +120,6 @@ open class K8sHealthCheck : AbstractScriptComponentFunction() {
 
     override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
         log.info("Executing Recovery")
-        bluePrintRuntimeService.getBlueprintError().addError("${runtimeException.message}", getName())
+        bluePrintRuntimeService.getBluePrintError().addError("${runtimeException.message}", getName())
     }
 }
index e2d1053..c067113 100644 (file)
 package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
 
 import com.fasterxml.jackson.databind.node.ObjectNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sPluginInstanceApi
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sRbInstanceStatus
 import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
 import org.slf4j.LoggerFactory
 
 open class SimpleStatusCheck : AbstractScriptComponentFunction() {
@@ -39,8 +39,8 @@ open class SimpleStatusCheck : AbstractScriptComponentFunction() {
 
         val configValueSetup: ObjectNode = getDynamicProperties("config-deploy-setup") as ObjectNode
 
-        val bluePrintPropertiesService: BlueprintPropertiesService =
-            this.functionDependencyInstanceAsType("blueprintPropertiesService")
+        val bluePrintPropertiesService: BluePrintPropertiesService =
+            this.functionDependencyInstanceAsType("bluePrintPropertiesService")
 
         val k8sConfiguration = K8sConnectionPluginConfiguration(bluePrintPropertiesService)
 
@@ -78,7 +78,7 @@ open class SimpleStatusCheck : AbstractScriptComponentFunction() {
             if (continueCheck) {
                 checkCount--
                 if (checkCount == 0)
-                    throw BlueprintException("Pods State verification failed")
+                    throw BluePrintException("Pods State verification failed")
                 Thread.sleep(10000L)
             } else
                 checkCount = 0