L2 Gw connection support and Elan manager changes
[vpnservice.git] / neutronvpn / neutronvpn-api / src / main / java / org / opendaylight / vpnservice / neutronvpn / api / l2gw / L2GatewayDevice.java
index 6e2c4da5e2eee2a1e1fe55ec2e3b022373710d38..9b218278503b90305674c4dd5d5753548ead573f 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.vpnservice.neutronvpn.api.l2gw;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
@@ -36,6 +37,9 @@ public class L2GatewayDevice {
     /** The ucast local macs. */
     List<LocalUcastMacs> ucastLocalMacs = Collections.synchronizedList(new ArrayList<LocalUcastMacs>());
 
+    /** the status of this device connectin */
+    AtomicBoolean connected = new AtomicBoolean(true);
+
     /**
      * VTEP device name mentioned with L2 Gateway.
      *
@@ -181,6 +185,14 @@ public class L2GatewayDevice {
         ucastLocalMacs.remove(localUcastMacs);
     }
 
+    public boolean isConnected() {
+        return connected.get();
+    }
+
+    public void setConnected(boolean connected) {
+        this.connected.set(connected);
+    }
+
     /*
      * (non-Javadoc)
      *