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.api
18 interface NetconfRpcService {
22 * @param messageId message id of the request.
23 * @param configTarget datastore ( running or candidate)
24 * @param messageTimeout message timeout of the request.
25 * @return Device response
27 fun lock(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
31 * @param messageId message id of the request.
32 * @param filter filter content.
33 * @param configTarget config target ( running or candidate)
34 * @param messageTimeout message timeout of the request.
35 * @return Device response
37 fun getConfig(messageId: String, filter: String, configTarget: String, messageTimeout: Int): DeviceResponse
40 * Delete config from datastore
41 * @param messageId message id of the request.
42 * @param configTarget config target ( running or candidate)
43 * @param messageTimeout message timeout of the request.
44 * @return Device response
46 fun deleteConfig(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
50 * @param messageId message id of the request.
51 * @param messageContent edit config content.
52 * @param lock lock the device before performing edit.
53 * @param configTarget config target ( running or candidate)
54 * @param editDefaultOperation edit default operation (merge | replace | create | delete | remove or
56 * @param clearCandidate commit after edit config
57 * @param commit clear candiate store before edit
58 * @param discardChanges Rollback on failure
59 * @param validate validate the config before commit
60 * @param unlock unlock device after edit
61 * @param messageTimeout message timeout of the request.
62 * @return Device response
64 fun editConfig(messageId: String, messageContent: String, lock: Boolean, configTarget: String,
65 editDefaultOperation: String, deleteConfig: Boolean, validate: Boolean, commit: Boolean,
66 discardChanges: Boolean, unlock: Boolean, messageTimeout: Int): DeviceResponse
70 * @param messageId message id of the request.
71 * @param configTarget config target ( running or candidate)
72 * @param messageTimeout message timeout of the request.
73 * @return Device response
75 fun validate(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
79 * @param messageId message id of the request.
80 * @param discardChanges Rollback on failure
81 * @param messageTimeout message timeout of the request.
82 * @return Device response
84 fun commit(messageId: String, discardChanges: Boolean, messageTimeout: Int): DeviceResponse
88 * @param messageId message id of the request.
89 * @param configTarget config target ( running or candidate)
90 * @param messageTimeout message timeout of the request.
91 * @return Device response
93 fun unLock(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
97 * @param messageId message id of the request.
98 * @param messageTimeout message timeout of the request.
99 * @return Device response
101 fun discardConfig(messageId: String, messageTimeout: Int): DeviceResponse
105 * @param messageId message id of the request.
106 * @param force force closeSession
107 * @param messageTimeout message timeout of the request.
108 * @return Device response
110 fun closeSession(messageId: String, force: Boolean, messageTimeout: Int): DeviceResponse
113 * Executes an RPC request to the netconf server.
115 * @param request the XML containing the RPC request for the server.
116 * @param messageId message id of the request.
117 * @param messageTimeout message timeout of the request.
118 * @return Device response
120 fun asyncRpc(request: String, messageId: String, messageTimeout: Int): DeviceResponse