diff options
author | 2019-03-27 13:22:51 -0400 | |
---|---|---|
committer | 2019-04-01 10:43:53 -0400 | |
commit | 40072d3dcc1d0193bba1ea9432c13ac24857be55 (patch) | |
tree | 2fe78015e772c4cbab4fd52184530b9e52c8c3af /ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts | |
parent | 38300292cbce3bb0500593f3cc44fe129cf5c877 (diff) |
Improve function interfaces
Change-Id: I24f45d39ac05491a4217101e00bcbf8d122e4e1a
Issue-ID: CCSDK-1137
Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts')
-rw-r--r-- | ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts index 88feddf49..4ab7ddc4b 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts +++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/scripts/InternalSimpleRestconf.cba.kts @@ -13,15 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:Suppress("unused") //TODO remove this line! +@file:Suppress("unused") - -import com.fasterxml.jackson.databind.node.ObjectNode -import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers -import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.RestconfComponentFunction -import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import org.slf4j.LoggerFactory open class EditConfigure : RestconfComponentFunction() { @@ -32,12 +27,12 @@ open class EditConfigure : RestconfComponentFunction() { return "EditConfigure" } - override fun process(executionRequest: ExecutionServiceInput) { + override suspend fun processNB(executionRequest: ExecutionServiceInput) { //val webClientService = restClientService("odlparent") TODO("not implemented") //To change body of created functions use File | Settings | File Templates. } - override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { TODO("not implemented") //To change body of created functions use File | Settings | File Templates. } } @@ -50,13 +45,12 @@ open class MountNEditConfigure : RestconfComponentFunction() { return "MountNEditConfigure" } - override fun process(executionRequest: ExecutionServiceInput) { - val webClientService = restClientService("odlparent") - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + override suspend fun processNB(executionRequest: ExecutionServiceInput) { + log.info("Processing Restconf Request : ${executionRequest.payload}") } - override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + addError("failed in restconf execution : ${runtimeException.message}") } } @@ -72,11 +66,11 @@ open class TestRestconfConfigure : RestconfComponentFunction() { return "TestRestconfConfigure" } - override fun process(executionRequest: ExecutionServiceInput) { + override suspend fun processNB(executionRequest: ExecutionServiceInput) { log.info("processing request..") } - override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { + override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { log.info("recovering..") } } |