commit | 8d9fddf8450d6a461d929d47c5a0a2470e33dda6 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Feb 10 13:32:16 2014 -0800 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Feb 10 14:24:27 2014 -0800 |
tree | b38d2683850e73cabd74ce8536c35bdbb4261259 | |
parent | 4bfdd53b4d1e5c43ea192cc1c46679a4332b4aa9 [diff] |
memo about Device and minor fix Change-Id: I33ca971ef35d033b34f1b153f56d3a9fce274804
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/AbstractNetworkGraph.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/AbstractNetworkGraph.java index d84de5f..b2f9247 100644 --- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/AbstractNetworkGraph.java +++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/AbstractNetworkGraph.java
@@ -97,7 +97,7 @@ public Iterable<Device> getDeviceByIp(InetAddress ipAddress) { Set<Device> devices = addr2Device.get(ipAddress); if (devices == null) { - return Collections.emptyList(); + return Collections.emptySet(); } return Collections.unmodifiableCollection(devices); }
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/Device.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/Device.java index e25e812..cd5ddf8 100644 --- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/Device.java +++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/Device.java
@@ -8,6 +8,8 @@ /** * Interface of Device Object exposed to the "NB" read-only Topology. * + * TODO What a Device Object represent is unclear at the moment. + * * Everything returned by these interfaces must be either Unmodifiable view, * immutable object, or a copy of the original "SB" In-memory Topology. * @@ -17,6 +19,7 @@ public Collection<InetAddress> getIpAddress(); + // Add requirement for Iteration order? Latest observed port first. public Iterable<Port> getAttachmentPoints(); public long getLastSeenTime();