Merge "OPNFLWPLUG-999 Spec - Reconciliation CLI and alarm for openflow nodes"
[openflowplugin.git] / docs / specs / southbound-cli.rst
1 .. contents:: Table of Contents
2    :depth: 3
3
4 ==============
5 Southbound CLI
6 ==============
7
8 `Southbound CLI Reviews <https://git.opendaylight.org/gerrit/#/c/63521/>`__
9
10 This spec addresses following enhancement in Openflowplugin module:
11
12 Addition of new Karaf feature `odl-openflowplugin-app-southbound-cli` under openflowplugin module that provides useful
13 CLIs for users. This feature won't be part of any existing openflowplugin feature and user needs to explicitly install
14 it in addition to the existing features.
15
16 Problem description
17 ===================
18 Currently there is no way of getting the formatted list of openflow nodes connected to the OpenDaylight controller. User
19 has to fetch operational inventory using Restconf and search for all the connected nodes. Even to get the list of ports
20 available under a OpenFlow node, user need to search the entire inventory dump. From user experience perspective it's
21 not really very helpful, and at scale fetching the entire inventor from data store can cause CPU spike for the
22 controller because of the huge data present under inventory tree.
23
24 Southbound CLI
25 ==============
26 New Karaf feature is developed that will provide command line interface to the user using which user can retrieving
27 the list of connected OpenFlow nodes and the ports available under each OpenFlow node.
28
29 Use Cases
30 ---------
31 * List of all OpenFlow node(s) connected to the OpenDaylight controller in either standalone or cluster environment.
32 * List ports information available under a connected OpenFlow node
33
34 Proposed change
35 ---------------
36 New karaf feature `odl-openflowplugin-app-southbound-cli` will be added and it will not be part of any existing
37 openflowplugin feature. User will have to explicitly install the feature to get the available CLIs.
38
39 Following 2 CLIs will be added:
40
41 * `openflow:getallnodes`
42 * `openflow:shownode`
43
44 `openflow:getallnodes` will display information like NodeId and NodeName(datapath description) for all the connected
45 nodes.
46
47 `openflow:shownode` will display information like NodeId, NodeName(datapath description) and Ports for a given
48 openflow node.
49
50 Yang changes
51 ------------
52 None
53
54 Targeted Release
55 ----------------
56 Oxygen
57
58 Alternatives
59 ------------
60 Use RestConf to fetch entire operational inventory and parse through it.
61
62 Usage
63 =====
64 Install ``odl-openflowplugin-app-southbound-cli`` feature as it is not part of any existing openflowplugin features.
65
66 List the connected openflow nodes under odl controller either in standalone or cluster environment. In clustered
67 environment user need to install this feature on all the three nodes if it wants to use any node to run these CLI
68 commands, but user also can choose to install it on a dedicated node only if that's the master node to run CLI commands.
69 This feature can be install at any point of time during or after controller start.
70
71 .. code-block:: bash
72    :caption: openflow:getallnodes
73
74    opendaylight-user@root>openflow:getallnodes
75    Number of nodes: 1
76    NodeId              NodeName
77
78    --------------------------------------------------------------------------
79    137313212546623     None
80
81
82 List the available ports under openflow node.
83
84 .. code-block:: bash
85    :caption: openflow:shownode
86
87    opendaylight-user@root>openflow:shownode -d 137313212546623
88    OFNode                   Name                 Ports
89    ------------------------------------------------------------------------------------
90    137313212546623          None                 br-int
91
92
93 Implementation
94 ==============
95 Assignee(s)
96 -----------
97 Primary assignee:
98 * Arunprakash D <d.arunprakash@ericsson.com>
99
100 Contributors:
101 * Gobinath Suganthan <gobinath@ericsson.com>
102
103 Work Items
104 ----------
105 * Implementation of cli to list the connected openflow nodes across standalone or clustered environment.
106 * Implementation of cli to list the ports available under openflow node.
107
108 Dependencies
109 ============
110 No new dependencies.
111
112 Testing
113 =======
114 Unit Tests
115 ----------
116 #. Verify CLI to list all the connected openflow nodes
117 #. Verify CLI to list all the ports under openflow node
118
119 CSIT
120 ----
121 None
122
123 Documentation Impact
124 ====================
125 None
126
127 References
128 ==========
129 None