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 @@
*/
package org.onlab.onos.cli.net;
import java.util.List;
import java.util.SortedSet;
import org.apache.karaf.shell.console.Completer;
import org.apache.karaf.shell.console.completer.StringsCompleter;
import org.onlab.onos.cli.AbstractShellCommand;
......@@ -25,6 +22,9 @@ import org.onlab.onos.net.Device;
import org.onlab.onos.net.Port;
import org.onlab.onos.net.device.DeviceService;
import java.util.List;
import java.util.SortedSet;
/**
* ConnectPoint completer.
*/
......@@ -40,9 +40,10 @@ public class ConnectPointCompleter implements Completer {
// Generate the device ID/port number identifiers
for (Device device : service.getDevices()) {
SortedSet<String> strings = delegate.getStrings();
for (Port port : service.getPorts(device.id())) {
strings.add(device.id().toString() + "/" + port.number());
if (!port.number().isLogical()) {
strings.add(device.id().toString() + "/" + port.number());
}
}
}
......
......@@ -43,6 +43,7 @@ public interface CodecService {
*
* @param entityClass entity class
* @param codec JSON codec
* @param <T> entity type
*/
<T> void registerCodec(Class<T> entityClass, JsonCodec<T> codec);
......
......@@ -34,7 +34,7 @@ public final class DeviceId extends ElementId {
// Public construction is prohibited
private DeviceId(URI uri) {
this.uri = uri;
this.str = uri.toString();
this.str = uri.toString().toLowerCase();
}
......
......@@ -9,8 +9,8 @@ public interface DatabaseService {
/**
* Reads the specified key.
* @param tableName name of the table associated with this operation.
* @return key key to read.
* @returns value (and version) associated with this key. This calls returns null if the key does not exist.
* @param key key to read.
* @return value (and version) associated with this key. This calls returns null if the key does not exist.
*/
VersionedValue get(String tableName, String key);
......
......@@ -247,8 +247,9 @@ public class DefaultTopology extends AbstractModel implements Topology {
* Computes on-demand the set of shortest paths between source and
* destination devices.
*
* @param src source device
* @param dst destination device
* @param src source device
* @param dst destination device
* @param weight edge weight function
* @return set of shortest paths
*/
Set<Path> getPaths(DeviceId src, DeviceId dst, LinkWeight weight) {
......