diff options
author | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-03-24 19:15:31 +0100 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-03-28 22:21:25 +0200 |
commit | 06bf0ac45889ffe00fc6e27e68ffa15c2f519e6f (patch) | |
tree | ecf4c17542c62ee6c0433edcbccac5707370a8f1 /heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleErrorCheck.kt | |
parent | d2c5f361fa3a246dfa23c2c582ec498322a97282 (diff) |
Real vFW CNF config-assign and config-deploy
Implementation of vFW CNF config-assign and config-deploy with
utilization of CDS native components for configuration API
Change-Id: I016b186e1fcad0bf1285292f2e93e12a1d96b63e
Issue-ID: INT-1868
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleErrorCheck.kt')
-rw-r--r-- | heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleErrorCheck.kt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleErrorCheck.kt b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleErrorCheck.kt new file mode 100644 index 00000000..8e4a58ab --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/cba/Scripts/kotlin/SimpleErrorCheck.kt @@ -0,0 +1,41 @@ +/* + * Copyright © 2021 Orange + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts + +import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput +import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction +import org.slf4j.LoggerFactory + +open class SimpleErrorCheck : AbstractScriptComponentFunction() { + + private val log = LoggerFactory.getLogger(SimpleErrorCheck::class.java)!! + + override fun getName(): String { + return "SimpleErrorCheck" + } + + override suspend fun processNB(executionRequest: ExecutionServiceInput) { + log.info("SIMPLE ERROR CHECK - START") + + log.info("SIMPLE ERROR CHECK - END") + } + + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + log.info("Executing Recovery") + this.addError("${runtimeException.message}") + } +} |