Ray Milkey

Make CLI completers stop filling values when command line is complete

Added <null> tags to terminate <completers> lists in the CLI shell
config.  These null values stop completers from adding extra
arguments at the end of commands.  If a <null> is not added
at the end of a list of completers, that means use the last
completer as many times as possible.
...@@ -27,12 +27,14 @@ ...@@ -27,12 +27,14 @@
27 <action class="org.onlab.onos.cli.net.DevicePortsListCommand"/> 27 <action class="org.onlab.onos.cli.net.DevicePortsListCommand"/>
28 <completers> 28 <completers>
29 <ref component-id="deviceIdCompleter"/> 29 <ref component-id="deviceIdCompleter"/>
30 + <null/>
30 </completers> 31 </completers>
31 </command> 32 </command>
32 <command> 33 <command>
33 <action class="org.onlab.onos.cli.net.DeviceRemoveCommand"/> 34 <action class="org.onlab.onos.cli.net.DeviceRemoveCommand"/>
34 <completers> 35 <completers>
35 <ref component-id="deviceIdCompleter"/> 36 <ref component-id="deviceIdCompleter"/>
37 + <null/>
36 </completers> 38 </completers>
37 </command> 39 </command>
38 <command> 40 <command>
...@@ -40,6 +42,8 @@ ...@@ -40,6 +42,8 @@
40 <completers> 42 <completers>
41 <ref component-id="deviceIdCompleter"/> 43 <ref component-id="deviceIdCompleter"/>
42 <ref component-id="roleCompleter"/> 44 <ref component-id="roleCompleter"/>
45 + <ref component-id="roleCompleter"/>
46 + <null/>
43 </completers> 47 </completers>
44 </command> 48 </command>
45 49
...@@ -47,6 +51,7 @@ ...@@ -47,6 +51,7 @@
47 <action class="org.onlab.onos.cli.net.LinksListCommand"/> 51 <action class="org.onlab.onos.cli.net.LinksListCommand"/>
48 <completers> 52 <completers>
49 <ref component-id="deviceIdCompleter"/> 53 <ref component-id="deviceIdCompleter"/>
54 + <null/>
50 </completers> 55 </completers>
51 </command> 56 </command>
52 57
...@@ -57,6 +62,8 @@ ...@@ -57,6 +62,8 @@
57 <action class="org.onlab.onos.cli.net.PathListCommand"/> 62 <action class="org.onlab.onos.cli.net.PathListCommand"/>
58 <completers> 63 <completers>
59 <ref component-id="deviceIdCompleter"/> 64 <ref component-id="deviceIdCompleter"/>
65 + <ref component-id="deviceIdCompleter"/>
66 + <null/>
60 </completers> 67 </completers>
61 </command> 68 </command>
62 69
...@@ -67,12 +74,15 @@ ...@@ -67,12 +74,15 @@
67 <action class="org.onlab.onos.cli.net.IntentRemoveCommand"/> 74 <action class="org.onlab.onos.cli.net.IntentRemoveCommand"/>
68 <completers> 75 <completers>
69 <ref component-id="intentIdCompleter"/> 76 <ref component-id="intentIdCompleter"/>
77 + <null/>
70 </completers> 78 </completers>
71 </command> 79 </command>
72 <command> 80 <command>
73 <action class="org.onlab.onos.cli.net.AddHostToHostIntentCommand"/> 81 <action class="org.onlab.onos.cli.net.AddHostToHostIntentCommand"/>
74 <completers> 82 <completers>
75 <ref component-id="hostIdCompleter"/> 83 <ref component-id="hostIdCompleter"/>
84 + <ref component-id="hostIdCompleter"/>
85 + <null/>
76 </completers> 86 </completers>
77 </command> 87 </command>
78 <command> 88 <command>
...@@ -80,6 +90,7 @@ ...@@ -80,6 +90,7 @@
80 <completers> 90 <completers>
81 <ref component-id="connectPointCompleter"/> 91 <ref component-id="connectPointCompleter"/>
82 <ref component-id="connectPointCompleter"/> 92 <ref component-id="connectPointCompleter"/>
93 + <null/>
83 </completers> 94 </completers>
84 </command> 95 </command>
85 <command> 96 <command>
...@@ -93,6 +104,8 @@ ...@@ -93,6 +104,8 @@
93 <completers> 104 <completers>
94 <ref component-id="connectPointCompleter"/> 105 <ref component-id="connectPointCompleter"/>
95 <ref component-id="connectPointCompleter"/> 106 <ref component-id="connectPointCompleter"/>
107 + <ref component-id="nullCompleter"/>
108 + <null/>
96 </completers> 109 </completers>
97 </command> 110 </command>
98 111
...@@ -103,12 +116,14 @@ ...@@ -103,12 +116,14 @@
103 <action class="org.onlab.onos.cli.net.ClusterDevicesCommand"/> 116 <action class="org.onlab.onos.cli.net.ClusterDevicesCommand"/>
104 <completers> 117 <completers>
105 <ref component-id="clusterIdCompleter"/> 118 <ref component-id="clusterIdCompleter"/>
119 + <null/>
106 </completers> 120 </completers>
107 </command> 121 </command>
108 <command> 122 <command>
109 <action class="org.onlab.onos.cli.net.ClusterLinksCommand"/> 123 <action class="org.onlab.onos.cli.net.ClusterLinksCommand"/>
110 <completers> 124 <completers>
111 <ref component-id="clusterIdCompleter"/> 125 <ref component-id="clusterIdCompleter"/>
126 + <null/>
112 </completers> 127 </completers>
113 </command> 128 </command>
114 129
...@@ -121,6 +136,7 @@ ...@@ -121,6 +136,7 @@
121 <completers> 136 <completers>
122 <ref component-id="flowRuleStatusCompleter"/> 137 <ref component-id="flowRuleStatusCompleter"/>
123 <ref component-id="deviceIdCompleter"/> 138 <ref component-id="deviceIdCompleter"/>
139 + <null/>
124 </completers> 140 </completers>
125 </command> 141 </command>
126 142
...@@ -137,5 +153,6 @@ ...@@ -137,5 +153,6 @@
137 <bean id="intentIdCompleter" class="org.onlab.onos.cli.net.IntentIdCompleter"/> 153 <bean id="intentIdCompleter" class="org.onlab.onos.cli.net.IntentIdCompleter"/>
138 <bean id="flowRuleStatusCompleter" class="org.onlab.onos.cli.net.FlowRuleStatusCompleter"/> 154 <bean id="flowRuleStatusCompleter" class="org.onlab.onos.cli.net.FlowRuleStatusCompleter"/>
139 <bean id="connectPointCompleter" class="org.onlab.onos.cli.net.ConnectPointCompleter"/> 155 <bean id="connectPointCompleter" class="org.onlab.onos.cli.net.ConnectPointCompleter"/>
156 + <bean id="nullCompleter" class="org.apache.karaf.shell.console.completer.NullCompleter"/>
140 157
141 </blueprint> 158 </blueprint>
......