HostTracker StaticHost changes
[controller.git] / opendaylight / hosttracker_new / implementation / src / main / java / org / opendaylight / controller / hosttracker / internal / Device.java
index a97cb273837257a23a34460696de49cf29942241..fb81cddc964c3887ad30ee030f8600140faea922 100755 (executable)
@@ -78,6 +78,8 @@ public class Device implements IDevice {
     protected final Short[] vlanIds;
     protected volatile String dhcpClientName;
 
+    private boolean staticHost;
+
     /**
      * These are the old attachment points for the device that were valid no
      * more than INACTIVITY_TIME ago.
@@ -793,6 +795,7 @@ public class Device implements IDevice {
             byte[] macAddr = macLongToByte(this.getMACAddress());
             HostNodeConnector nc = new HostNodeConnector(macAddr, ip, n,
                     (short) 0);
+            nc.setStaticHost(this.isStaticHost());
             return nc;
         } catch (Exception e) {
             return null;
@@ -807,6 +810,14 @@ public class Device implements IDevice {
         return macAddr;
     }
 
+    public boolean isStaticHost(){
+        return this.staticHost;
+    }
+
+    public void setStaticHost(boolean isStatic){
+        this.staticHost = isStatic;
+    }
+
     @Override
     public String toString() {
         StringBuilder builder = new StringBuilder();