5d3c190c20488fe044d43f3da858fdfabb4c9a62
[ccsdk/cds.git] /
1 package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.interfaces
2
3 import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.data.DeviceResponse
4
5 interface NetconfRpcClientService {
6
7     fun disconnect()
8
9
10     fun reconnect()
11
12     /**
13      * @param messageId message id of the request.
14      * @param configTarget config target ( running or candidate)
15      * @param messageTimeout message timeout of the request.
16      * @return Device response
17      */
18     fun lock(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
19
20     /**
21      * @param messageId message id of the request.
22      * @param messageContent filter content.
23      * @param configTarget config target ( running or candidate)
24      * @param messageTimeout message timeout of the request.
25      * @return Device response
26      */
27     fun getConfig(messageId: String, messageContent: String, configTarget: String, messageTimeout: Int): DeviceResponse
28
29     /**
30      * @param messageId message id of the request.
31      * @param configTarget config target ( running or candidate)
32      * @param messageTimeout message timeout of the request.
33      * @return Device response
34      */
35     fun deleteConfig(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
36
37     /**
38      * @param messageId message id of the request.
39      * @param messageContent edit config content.
40      * @param reConnect reconnect session
41      * @param wait waiting time to perform operation ( 0 indicates no wait )
42      * @param lock lock the device before performing edit.
43      * @param configTarget config target ( running or candidate)
44      * @param editDefaultOperation edit default operation (merge | replace | create | delete | remove or
45      * delete)
46      * @param clearCandidate commit after edit config
47      * @param commit clear candiate store before edit
48      * @param discardChanges Rollback on failure
49      * @param validate validate the config before commit
50      * @param unlock unlock device after edit
51      * @param preRestartWait
52      * @param postRestartWait
53      * @param messageTimeout message timeout of the request.
54      * @return Device response
55      */
56     fun editConfig(messageId: String, messageContent: String, reConnect: Boolean, wait: Int, lock: Boolean,
57                    configTarget: String, editDefaultOperation: String, clearCandidate: Boolean, validate: Boolean, commit: Boolean,
58                    discardChanges: Boolean, unlock: Boolean, preRestartWait: Int, postRestartWait: Int, messageTimeout: Int): DeviceResponse
59
60     /**
61      * @param messageId message id of the request.
62      * @param configTarget config target ( running or candidate)
63      * @param messageTimeout message timeout of the request.
64      * @return Device response
65      */
66     fun validate(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
67
68     /**
69      * @param messageId message id of the request.
70      * @param message optional commit message
71      * @param discardChanges Rollback on failure
72      * @param messageTimeout message timeout of the request.
73      * @return Device response
74      */
75     fun commit(messageId: String, message: String, discardChanges: Boolean, messageTimeout: Int): DeviceResponse
76
77     /**
78      * @param messageId message id of the request.
79      * @param configTarget config target ( running or candidate)
80      * @param messageTimeout message timeout of the request.
81      * @return Device response
82      */
83     fun unLock(messageId: String, configTarget: String, messageTimeout: Int): DeviceResponse
84
85     /**
86      * @param messageId message id of the request.
87      * @param messageTimeout message timeout of the request.
88      * @return Device response
89      */
90     fun discardConfig(messageId: String, messageTimeout: Int): DeviceResponse
91
92     /**
93      * @param messageId message id of the request.
94      * @param force force close
95      * @param messageTimeout message timeout of the request.
96      * @return Device response
97      */
98     fun close(messageId: String, force: Boolean, messageTimeout: Int): DeviceResponse
99
100     /**
101      * Executes an RPC request to the netconf server.
102      *
103      * @param request the XML containing the RPC request for the server.
104      * @param messageId message id of the request.
105      * @param messageTimeout message timeout of the request.
106      * @return Device response
107      */
108     fun asyncRpc(request: String, messageId: String, messageTimeout: Int): DeviceResponse
109 }