Thomas Vachuska

Fixing a defect where logical port numbers are listed as part of CLI arg completion.

Fixing a defect where devices imported with device id in uppercase are considered as different from those discovered in lowercase.
Fixed javadocs error from a rebase.

Change-Id: I76741022fb95d10a9a16fc9ce6d6443b166822ab
...@@ -15,9 +15,6 @@ ...@@ -15,9 +15,6 @@
15 */ 15 */
16 package org.onlab.onos.cli.net; 16 package org.onlab.onos.cli.net;
17 17
18 -import java.util.List;
19 -import java.util.SortedSet;
20 -
21 import org.apache.karaf.shell.console.Completer; 18 import org.apache.karaf.shell.console.Completer;
22 import org.apache.karaf.shell.console.completer.StringsCompleter; 19 import org.apache.karaf.shell.console.completer.StringsCompleter;
23 import org.onlab.onos.cli.AbstractShellCommand; 20 import org.onlab.onos.cli.AbstractShellCommand;
...@@ -25,6 +22,9 @@ import org.onlab.onos.net.Device; ...@@ -25,6 +22,9 @@ import org.onlab.onos.net.Device;
25 import org.onlab.onos.net.Port; 22 import org.onlab.onos.net.Port;
26 import org.onlab.onos.net.device.DeviceService; 23 import org.onlab.onos.net.device.DeviceService;
27 24
25 +import java.util.List;
26 +import java.util.SortedSet;
27 +
28 /** 28 /**
29 * ConnectPoint completer. 29 * ConnectPoint completer.
30 */ 30 */
...@@ -40,11 +40,12 @@ public class ConnectPointCompleter implements Completer { ...@@ -40,11 +40,12 @@ public class ConnectPointCompleter implements Completer {
40 // Generate the device ID/port number identifiers 40 // Generate the device ID/port number identifiers
41 for (Device device : service.getDevices()) { 41 for (Device device : service.getDevices()) {
42 SortedSet<String> strings = delegate.getStrings(); 42 SortedSet<String> strings = delegate.getStrings();
43 -
44 for (Port port : service.getPorts(device.id())) { 43 for (Port port : service.getPorts(device.id())) {
44 + if (!port.number().isLogical()) {
45 strings.add(device.id().toString() + "/" + port.number()); 45 strings.add(device.id().toString() + "/" + port.number());
46 } 46 }
47 } 47 }
48 + }
48 49
49 // Now let the completer do the work for figuring out what to offer. 50 // Now let the completer do the work for figuring out what to offer.
50 return delegate.complete(buffer, cursor, candidates); 51 return delegate.complete(buffer, cursor, candidates);
......
...@@ -43,6 +43,7 @@ public interface CodecService { ...@@ -43,6 +43,7 @@ public interface CodecService {
43 * 43 *
44 * @param entityClass entity class 44 * @param entityClass entity class
45 * @param codec JSON codec 45 * @param codec JSON codec
46 + * @param <T> entity type
46 */ 47 */
47 <T> void registerCodec(Class<T> entityClass, JsonCodec<T> codec); 48 <T> void registerCodec(Class<T> entityClass, JsonCodec<T> codec);
48 49
......
...@@ -34,7 +34,7 @@ public final class DeviceId extends ElementId { ...@@ -34,7 +34,7 @@ public final class DeviceId extends ElementId {
34 // Public construction is prohibited 34 // Public construction is prohibited
35 private DeviceId(URI uri) { 35 private DeviceId(URI uri) {
36 this.uri = uri; 36 this.uri = uri;
37 - this.str = uri.toString(); 37 + this.str = uri.toString().toLowerCase();
38 } 38 }
39 39
40 40
......
...@@ -9,8 +9,8 @@ public interface DatabaseService { ...@@ -9,8 +9,8 @@ public interface DatabaseService {
9 /** 9 /**
10 * Reads the specified key. 10 * Reads the specified key.
11 * @param tableName name of the table associated with this operation. 11 * @param tableName name of the table associated with this operation.
12 - * @return key key to read. 12 + * @param key key to read.
13 - * @returns value (and version) associated with this key. This calls returns null if the key does not exist. 13 + * @return value (and version) associated with this key. This calls returns null if the key does not exist.
14 */ 14 */
15 VersionedValue get(String tableName, String key); 15 VersionedValue get(String tableName, String key);
16 16
......
...@@ -249,6 +249,7 @@ public class DefaultTopology extends AbstractModel implements Topology { ...@@ -249,6 +249,7 @@ public class DefaultTopology extends AbstractModel implements Topology {
249 * 249 *
250 * @param src source device 250 * @param src source device
251 * @param dst destination device 251 * @param dst destination device
252 + * @param weight edge weight function
252 * @return set of shortest paths 253 * @return set of shortest paths
253 */ 254 */
254 Set<Path> getPaths(DeviceId src, DeviceId dst, LinkWeight weight) { 255 Set<Path> getPaths(DeviceId src, DeviceId dst, LinkWeight weight) {
......