From da1303759f22b7882b46fb8670704f2770bf46ed Mon Sep 17 00:00:00 2001 From: gummar Date: Tue, 3 Mar 2020 14:48:22 +0000 Subject: Fix case for all Software upgrade actions Issue-ID: CCSDK-2145 Signed-off-by: gummar Change-Id: Ie2a6b6c72997be65ac304f6cd1daac3a8aa85480 --- .../Scripts/kotlin/RestconfSoftwareUpgrade.kt | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt') diff --git a/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt b/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt index 07e804b95..9d00c60d8 100644 --- a/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt +++ b/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt @@ -60,10 +60,10 @@ class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() { restconfMountDevice(model.client, model.deviceId, mountPayload, mutableMapOf("Content-Type" to "application/json")) when (model.action) { - Action.PRE_CHECK -> processPrecheck(model) - Action.DOWNLOAD_NE_SW -> processDownloadNeSw(model) - Action.ACTIVATE_NE_SW -> processActivateNeSw(model) - Action.POST_CHECK -> processPostcheck(model) + Action.PRE_CHECK -> processPreCheck(model) + Action.DOWNLOAD_NE_SW -> processDownloadNESW(model) + Action.ACTIVATE_NE_SW -> processActivateNESW(model) + Action.POST_CHECK -> processPostCheck(model) Action.CANCEL -> processCancel(model) } @@ -74,7 +74,7 @@ class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() { } } - private suspend fun processPrecheck(model: SoftwareUpgradeModel) { + private suspend fun processPreCheck(model: SoftwareUpgradeModel) { log.debug("In PNF SW upgrade : processPreCheck") //Log the current configuration for the subtree val payloadObject = getCurrentConfig(model) @@ -82,8 +82,8 @@ class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() { log.info("PNF is Healthy!") } - private suspend fun processDownloadNeSw(model: SoftwareUpgradeModel) { - log.debug("In PNF SW upgrade : processDownloadNeSw") + private suspend fun processDownloadNESW(model: SoftwareUpgradeModel) { + log.debug("In PNF SW upgrade : processDownloadNESW") //Check if there is existing config for the targeted software version var downloadConfigPayload: String @@ -106,8 +106,8 @@ class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() { checkExecution(model) } - private suspend fun processActivateNeSw(model: SoftwareUpgradeModel) { - log.debug("In PNF SW upgrade : processActivateNeSw") + private suspend fun processActivateNESW(model: SoftwareUpgradeModel) { + log.debug("In PNF SW upgrade : processActivateNESW") //Check if the software is downloaded and ready to be activated if (checkIfSwReadyToPerformAction(Action.DOWNLOAD_NE_SW, model)) { var activateConfigPayload: String = contentFromResolvedArtifactNB("configure") @@ -124,8 +124,8 @@ class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() { } } - private suspend fun processPostcheck(model: SoftwareUpgradeModel) { - log.info("In PNF SW upgrade : processPostcheck") + private suspend fun processPostCheck(model: SoftwareUpgradeModel) { + log.info("In PNF SW upgrade : processPostCheck") //Log the current configuration for the subtree if (checkIfSwReadyToPerformAction(Action.POST_CHECK, model)) { log.info("PNF is healthy post activation!") @@ -175,10 +175,10 @@ class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() { } enum class Action(val actionName: String, val completionStatus: String) { - PRE_CHECK("precheck", "INITIALIZED"), - DOWNLOAD_NE_SW("downloadNeSw", "DOWNLOAD_COMPLETED"), - ACTIVATE_NE_SW("activateNeSw", "ACTIVATION_COMPLETED"), - POST_CHECK("postcheck", "ACTIVATION_COMPLETED"), + PRE_CHECK("preCheck", "INITIALIZED"), + DOWNLOAD_NE_SW("downloadNESW", "DOWNLOAD_COMPLETED"), + ACTIVATE_NE_SW("activateNESW", "ACTIVATION_COMPLETED"), + POST_CHECK("postCheck", "ACTIVATION_COMPLETED"), CANCEL("cancel", "CANCELLED") ; companion object{ -- cgit 1.2.3-korg