diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2022-10-21 17:36:17 +0200 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-10-21 16:17:40 +0000 |
commit | b3dd50eff64544200c0678b2e49cd822fc373927 (patch) | |
tree | cc5be58f4ed30bbe4684ef2333afc415771231d5 /tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt | |
parent | fa39bef3f4532802314cb89721e13c37555634b1 (diff) |
[APACHECNF] Update healthcheck and add scale workflowjakarta
Issue-ID: INT-2164
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I7cf59f58592321ec06d8d812bd081293130ec74d
(cherry picked from commit 5762244a0c6282557169c8183e464f6950438122)
Diffstat (limited to 'tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt')
-rw-r--r-- | tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt b/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt index 77d86d04..f925be06 100644 --- a/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt +++ b/tutorials/ApacheCNF/templates/cba/Scripts/kotlin/ConfigDeploySetup.kt @@ -70,17 +70,22 @@ open class ConfigDeploySetup() : ResourceAssignmentProcessor() { } } } else if (executionRequest.name == "replica-count") { - var value = raRuntimeService.getInputValue(executionRequest.name) retValue = "1" - if (!value.isNullOrMissing()) { - retValue = value.asText() - } else { - value = raRuntimeService.getInputValue("data") + try { + var value = raRuntimeService.getInputValue(executionRequest.name) if (!value.isNullOrMissing()) { - if (value["replicaCount"] != null) { - retValue = value["replicaCount"].asText() + retValue = value.asText() + } else { + value = raRuntimeService.getInputValue("data") + if (!value.isNullOrMissing()) { + if (value["replicaCount"] != null) { + retValue = value["replicaCount"].asText() + } } } + } catch (e: Exception) { + log.error(e.message, e) + log.info("Setting default replica count: 1") } } else if (executionRequest.name == "config-deploy-setup") { val modulesSdnc = raRuntimeService.getResolutionStore("vf-modules-list-sdnc")["vf-modules"] |