X-Git-Url: https://gerrit.onap.org/r/gitweb?p=demo.git;a=blobdiff_plain;f=tutorials%2FApacheCNF%2Ftemplates%2Fcba%2FScripts%2Fkotlin%2FSimpleStatusCheck.kt;h=c1f59d98f913b14d92f6f87b65741da028909242;hp=c99dcd4f3342062d35086d79ed580c197f49ec41;hb=5762244a0c6282557169c8183e464f6950438122;hpb=0c85ee9fc85870f8ba39befc63b8351301d4842f diff --git a/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt b/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt index c99dcd4f..c1f59d98 100644 --- a/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt +++ b/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/SimpleStatusCheck.kt @@ -38,6 +38,7 @@ open class SimpleStatusCheck : AbstractScriptComponentFunction() { log.info("SIMPLE STATUS CHECK - START") val configValueSetup: ObjectNode = getDynamicProperties("config-deploy-setup") as ObjectNode + var checkCount: Int = getDynamicProperties("status-check-max-count").asInt() val bluePrintPropertiesService: BluePrintPropertiesService = this.functionDependencyInstanceAsType("bluePrintPropertiesService") @@ -46,7 +47,6 @@ open class SimpleStatusCheck : AbstractScriptComponentFunction() { val instanceApi = K8sPluginInstanceApi(k8sConfiguration) - var checkCount: Int = 30 // in the future to be read in from the input while (checkCount > 0) { var continueCheck = false configValueSetup.fields().forEach { it -> @@ -75,7 +75,6 @@ open class SimpleStatusCheck : AbstractScriptComponentFunction() { } override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { - log.info("Executing Recovery") this.addError("${runtimeException.message}") } }