2 * Copyright © 2017-2018 AT&T Intellectual Property.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.interfaces
18 import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.data.DeviceResponse
20 interface NetconfRpcClientService {
28 * @param messageId message id of the request.
29 * @param configTarget config target ( running or candidate)
30 * @param messageTimeout message timeout of the request.
31 * @return Device response
33 fun lock(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
36 * @param messageId message id of the request.
37 * @param messageContent filter content.
38 * @param configTarget config target ( running or candidate)
39 * @param messageTimeout message timeout of the request.
40 * @return Device response
42 fun getConfig(messageId: String, messageContent: String, configTarget: String, messageTimeout: Int): DeviceResponse
45 * @param messageId message id of the request.
46 * @param configTarget config target ( running or candidate)
47 * @param messageTimeout message timeout of the request.
48 * @return Device response
50 fun deleteConfig(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
53 * @param messageId message id of the request.
54 * @param messageContent edit config content.
55 * @param reConnect reconnect session
56 * @param wait waiting time to perform operation ( 0 indicates no wait )
57 * @param lock lock the device before performing edit.
58 * @param configTarget config target ( running or candidate)
59 * @param editDefaultOperation edit default operation (merge | replace | create | delete | remove or
61 * @param clearCandidate commit after edit config
62 * @param commit clear candiate store before edit
63 * @param discardChanges Rollback on failure
64 * @param validate validate the config before commit
65 * @param unlock unlock device after edit
66 * @param preRestartWait
67 * @param postRestartWait
68 * @param messageTimeout message timeout of the request.
69 * @return Device response
71 fun editConfig(messageId: String, messageContent: String, reConnect: Boolean, wait: Int, lock: Boolean,
72 configTarget: String, editDefaultOperation: String, clearCandidate: Boolean, validate: Boolean, commit: Boolean,
73 discardChanges: Boolean, unlock: Boolean, preRestartWait: Int, postRestartWait: Int, messageTimeout: Int): DeviceResponse
76 * @param messageId message id of the request.
77 * @param configTarget config target ( running or candidate)
78 * @param messageTimeout message timeout of the request.
79 * @return Device response
81 fun validate(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
84 * @param messageId message id of the request.
85 * @param message optional commit message
86 * @param discardChanges Rollback on failure
87 * @param messageTimeout message timeout of the request.
88 * @return Device response
90 fun commit(messageId: String, message: String, discardChanges: Boolean, messageTimeout: Int): DeviceResponse
93 * @param messageId message id of the request.
94 * @param configTarget config target ( running or candidate)
95 * @param messageTimeout message timeout of the request.
96 * @return Device response
98 fun unLock(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
101 * @param messageId message id of the request.
102 * @param messageTimeout message timeout of the request.
103 * @return Device response
105 fun discardConfig(messageId: String, messageTimeout: Int): DeviceResponse
108 * @param messageId message id of the request.
109 * @param force force close
110 * @param messageTimeout message timeout of the request.
111 * @return Device response
113 fun close(messageId: String, force: Boolean, messageTimeout: Int): DeviceResponse
116 * Executes an RPC request to the netconf server.
118 * @param request the XML containing the RPC request for the server.
119 * @param messageId message id of the request.
120 * @param messageTimeout message timeout of the request.
121 * @return Device response
123 fun asyncRpc(request: String, messageId: String, messageTimeout: Int): DeviceResponse