Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
diff --git a/net/api/src/main/java/org/onlab/onos/net/Port.java b/net/api/src/main/java/org/onlab/onos/net/Port.java
index 24fd533..cf9a2ce 100644
--- a/net/api/src/main/java/org/onlab/onos/net/Port.java
+++ b/net/api/src/main/java/org/onlab/onos/net/Port.java
@@ -1,20 +1,11 @@
 package org.onlab.onos.net;
 
-import java.util.Set;
-
 /**
  * Abstraction of a network port.
  */
 public interface Port {
 
     /**
-     * Port state.
-     */
-    enum State {
-        UP, DOWN, BLOCKED, UNKNOWN
-    }
-
-    /**
      * Returns the port number.
      *
      * @return port number
@@ -22,13 +13,6 @@
     PortNumber number();
 
     /**
-     * Returns the port state(s).
-     *
-     * @return port state set
-     */
-    Set<State> state();
-
-    /**
      * Indicates whether or not the port is currently up and active.
      *
      * @return true if the port is operational
@@ -36,13 +20,6 @@
     boolean isEnabled();
 
     /**
-     * Indicates whether or not the port is administratively blocked.
-     *
-     * @return true if the port is blocked
-     */
-    boolean isBlocked();
-
-    /**
      * Returns the identifier of the network element to which this port belongs.
      *
      * @return parent network element
diff --git a/net/api/src/main/java/org/onlab/onos/net/device/DefaultPortDescription.java b/net/api/src/main/java/org/onlab/onos/net/device/DefaultPortDescription.java
index c434ff5..1d52ac9 100644
--- a/net/api/src/main/java/org/onlab/onos/net/device/DefaultPortDescription.java
+++ b/net/api/src/main/java/org/onlab/onos/net/device/DefaultPortDescription.java
@@ -1,22 +1,18 @@
 package org.onlab.onos.net.device;
 
-import com.google.common.collect.ImmutableSet;
-import org.onlab.onos.net.Port;
 import org.onlab.onos.net.PortNumber;
 
-import java.util.Set;
-
 /**
  * Default implementation of immutable port description.
  */
 public class DefaultPortDescription implements PortDescription {
 
     private final PortNumber number;
-    private final Set<Port.State> state;
+    private final boolean isEnabled;
 
-    public DefaultPortDescription(PortNumber number, Set<Port.State> state) {
+    public DefaultPortDescription(PortNumber number, boolean isEnabled) {
         this.number = number;
-        this.state = ImmutableSet.copyOf(state);
+        this.isEnabled = isEnabled;
     }
 
     @Override
@@ -25,8 +21,8 @@
     }
 
     @Override
-    public Set<Port.State> portState() {
-        return state;
+    public boolean isEnabled() {
+        return isEnabled;
     }
 
 }
diff --git a/net/api/src/main/java/org/onlab/onos/net/device/PortDescription.java b/net/api/src/main/java/org/onlab/onos/net/device/PortDescription.java
index 2f86248..f0dc8ee 100644
--- a/net/api/src/main/java/org/onlab/onos/net/device/PortDescription.java
+++ b/net/api/src/main/java/org/onlab/onos/net/device/PortDescription.java
@@ -1,10 +1,7 @@
 package org.onlab.onos.net.device;
 
-import org.onlab.onos.net.Port;
 import org.onlab.onos.net.PortNumber;
 
-import java.util.Set;
-
 /**
  * Information about a port.
  */
@@ -20,10 +17,10 @@
     PortNumber portNumber();
 
     /**
-     * Returns the port state set.
+     * Indicates whether or not the port is up and active.
      *
-     * @return set of port states
+     * @return true if the port is active and has carrier signal
      */
-    Set<Port.State> portState();
+    boolean isEnabled();
 
 }
diff --git a/providers/of/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/of/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
index 4549e1d..71219b7 100644
--- a/providers/of/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
+++ b/providers/of/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
@@ -50,6 +50,8 @@
 
     private DeviceProviderService providerService;
 
+    private OpenFlowSwitchListener listener = new InternalDeviceProvider();
+
     /**
      * Creates an OpenFlow device provider.
      */
@@ -60,13 +62,14 @@
     @Activate
     public void activate() {
         providerService = providerRegistry.register(this);
-        controller.addListener(new InternalDeviceProvider());
+        controller.addListener(listener);
         log.info("Started");
     }
 
     @Deactivate
     public void deactivate() {
         providerRegistry.unregister(this);
+        controller.removeListener(listener);
         providerService = null;
         log.info("Stopped");
     }