1 .. contents:: Table of Contents
4 ============================
5 Reconciliation CLI and Alarm
6 ============================
8 This spec addresses following enhancement in Openflowplugin module:
10 Addition of user triggered reconciliation via karaf cli command or rpc in Openflowplugin.
14 Whenever there is a state (flow/group) mismatch between config inventory and Openflow switch, user has to either restart
15 the Openflow switch or odl controller. This will sync the state again between odl controller and Openflow switch.
19 User can trigger reconciliation to sync the state between controller and Openflow switch. It can be done either via
20 karaf cli command or rest rpc.
24 Reconciliation alarm will be generated whenever user trigger the reconciliation via cli command or rest rpc and the
25 same will be cleared once reconciliation is completed.
30 a. Trigger reconciliation for a single Openflow switch
31 b. Trigger reconciliation for a list of Openflow switch
32 c. Trigger reconciliation for all the connected Openflow switches
33 d. Raise alarm whenever user triggers reconciliation for a Openflow switch
34 e. Clear the alarm when the reconciliation completed for a Openflow swtich
38 Karaf CLI command will be added to trigger reconciliation for the given Openflow nodes.
39 Rest rpc will be exposed to trigger reconciliation for the given Openflow nodes.
41 Feature `odl-openflowplugin-app-southbound-cli` should be installed in order to get these karaf cli and rest rpc.
42 This feature is not part of any existing openflowplugin features and has to be installed explicitly by user.
44 Ref: `Southbound CLI <https://docs.opendaylight.org/projects/openflowplugin/en/latest/specs/southbound-cli.html>`__
46 Below two CLIs will be added,
49 * openflow:getreconciliationcount
59 :caption: reconciliation.yang
61 container reconciliation-counter {
62 description "Number of reconciliation triggered for openflow nodes";
64 list reconcile-counter {
82 leaf last-request-time {
83 description "Timestamp when reconciliation was last requested";
88 container reconciliation-state {
89 description "Reconciliation state for the given openflow nodes";
91 list reconciliation-state-list {
93 uses node-reconcile-state;
97 grouping node-reconcile-state {
102 description "Expresses the current state of the reconcile on a specific NODE";
112 description "Request the reconciliation for given device or set of devices to the controller."
115 description "List of nodes to be reconciled";
118 leaf reconcile-all-nodes {
119 description "Flag to indicate that all nodes to be reconciled";
129 leaf-list inprogress-nodes {
130 description "List of nodes that are already in reconciling mode";
142 Disconnect the device from controller and reconnect or restart the controller.
147 * POST: http://localhost:8181/restconf/operations/reconciliation:reconcile
148 * GET: http://localhost:8181/restconf/operational/reconciliation:reconciliation-counter
152 Install ``odl-openflowplugin-app-southbound-cli`` feature.
156 Trigger reconciliation for a connected openflow node via cli command ``openflow:reconcile``.
159 :caption: openflow:reconcile
161 opendaylight-user@root>openflow:reconcile 244711506862915
162 reconcile successfully completed for the nodes
164 Trigger reconciliation for all the connected openflow nodes via cli command ``openflow:reconcile -all``.
167 :caption: openflow:reconcile -all
169 opendaylight-user@root>openflow:reconcile -all
170 reconcile successfully completed for the nodes
172 Get details about number of times user triggered reconciliation for openflow nodes via ``openflow:getreconciliationcount``.
175 :caption: openflow:getreconciliationcount
177 opendaylight-user@root>openflow:getreconcilecount
178 NodeId ReconcileSuccessCount ReconcileFailureCount LastReconcileTime
179 ------------------------------------------------------------------------------------------------
180 244711506862915 2 0 2018-06-06T11:51:51.989
184 Trigger reconciliation for a single datapath node.
187 :caption: http://localhost:8181/restconf/operations/reconciliation:reconcile
189 POST /restconf/operations/reconciliation:reconcile
192 "nodes":["244711506862915"]
197 Get reconciliation counter details
200 :caption: http://localhost:8181/restconf/operational/reconciliation:reconciliation-counter
202 GET /restconf/operational/reconciliation:reconciliation-counter
207 http://localhost:8181/restconf/operational/reconciliation:reconciliation-counter
211 "reconciliation-counter": {
212 "reconcile-counter": [
214 "node-id": 244711506862915,
216 "last-request-time": "2018-06-06T12:09:53.325"
223 Trigger reconciliation for a openflow switch using routed rpc. This rpc will be exposed without installing southbound-cli
224 feature and user can trigger reconciliation for the given Openflow node. This will not affect the counter and alarm.
227 :caption: http://localhost:8181/restconf/operations/reconciliation:reconcile-node
229 POST /restconf/operations/reconciliation:reconcile-node
232 "nodeId": "244711506862915",
233 "node": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:244711506862915']"
238 http://localhost:8181/restconf/operations/reconciliation:reconcile-node
253 * Arunprakash D <d.arunprakash@ericsson.com>
257 * Suja T <suja.t@ericsson.com>
258 * Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
262 * Implementation of cli to trigger reconciliation for openflow node(s).
263 * Implementation of reconciliation alarm for user triggered reconciliation.
273 #. Verify reconciliation for single openflow node
274 #. Verify reconciliation for list of openflow nodes
275 #. Verify reconciliation for all the openflow nodes
276 #. Verify reconciliation alarm generated for user triggered reconciliation node
277 #. Verify reconciliation alarm cleared once the reconciliation completed