Change for device discovery on new-data model.
RcDevice is not implemented completely.
It is temporary implementation until all device archtecture is decicded.
Change-Id: Iea73bddbf859b869312d2590e0f31a18bd31aaf5
diff --git a/src/main/java/net/onrc/onos/datastore/topology/KVDevice.java b/src/main/java/net/onrc/onos/datastore/topology/KVDevice.java
index e076c14..805be62 100644
--- a/src/main/java/net/onrc/onos/datastore/topology/KVDevice.java
+++ b/src/main/java/net/onrc/onos/datastore/topology/KVDevice.java
@@ -55,6 +55,10 @@
private final byte[] mac;
private TreeSet<byte[]> portIds;
private transient boolean isPortIdsModified;
+
+ // Assume there is only one ip on a device now.
+ private int ip;
+ private long lastSeenTime;
// Assuming mac is unique cluster-wide
public static byte[] getDeviceID(final byte[] mac) {
@@ -199,4 +203,20 @@
return "[" + this.getClass().getSimpleName()
+ " " + ByteArrayUtil.toHexStringBuffer(mac, ":") + "]";
}
+
+ public int getIp() {
+ return ip;
+ }
+
+ public void setIp(int ip) {
+ this.ip = ip;
+ }
+
+ public long getLastSeenTime() {
+ return lastSeenTime;
+ }
+
+ public void setLastSeenTime(long lastSeenTime) {
+ this.lastSeenTime = lastSeenTime;
+ }
}