Migrate ccsdk/apps to ccsdk/cds
[ccsdk/cds.git] / ms / blueprintsprocessor / functions / restconf-executor / src / main / kotlin / scripts / InternalSimpleRestconf.cba.kts
1 /*
2  *  Copyright © 2018 IBM.
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  */
16 @file:Suppress("unused") //TODO remove this line!
17
18
19 import com.fasterxml.jackson.databind.node.ObjectNode
20 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
21 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
22 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
23 import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.RestconfComponentFunction
24 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
25 import org.slf4j.LoggerFactory
26
27 open class EditConfigure : RestconfComponentFunction() {
28
29     val log = LoggerFactory.getLogger(EditConfigure::class.java)!!
30
31     override fun getName(): String {
32         return "EditConfigure"
33     }
34
35     override fun process(executionRequest: ExecutionServiceInput) {
36         //val webClientService = restClientService("odlparent")
37         TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
38     }
39
40     override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
41         TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
42     }
43 }
44
45 open class MountNEditConfigure : RestconfComponentFunction() {
46
47     val log = LoggerFactory.getLogger(MountNEditConfigure::class.java)!!
48
49     override fun getName(): String {
50         return "MountNEditConfigure"
51     }
52
53     override fun process(executionRequest: ExecutionServiceInput) {
54         val webClientService = restClientService("odlparent")
55         TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
56     }
57
58     override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
59         TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
60     }
61
62 }
63
64 /**
65  * This is for used for Testing only
66  */
67 open class TestRestconfConfigure : RestconfComponentFunction() {
68
69     val log = LoggerFactory.getLogger(TestRestconfConfigure::class.java)!!
70
71     override fun getName(): String {
72         return "TestRestconfConfigure"
73     }
74
75     override fun process(executionRequest: ExecutionServiceInput) {
76         log.info("processing request..")
77     }
78
79     override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
80         log.info("recovering..")
81     }
82 }