Added support in the TopologyManager for processing explicitly configured
Topology Elements.

This is needed for the Optical topology use case.

Also, modified TopologyElement.getConfigState() : if there is no
CONFIG_STATE attribute, then return NOT_CONFIGURED as a default value.

Change-Id: I6e1c6899b750094948c106c1a6f981ec73774303
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyEvent.java b/src/main/java/net/onrc/onos/core/topology/TopologyEvent.java
index 82fa6e5..28a9821 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyEvent.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyEvent.java
@@ -218,6 +218,30 @@
     }
 
     /**
+     * Returns the config state of the topology element.
+     *
+     * @return the config state of the topology element.
+     */
+    public ConfigState getConfigState() {
+        if (mastershipEvent != null) {
+            return mastershipEvent.getConfigState();
+        }
+        if (switchEvent != null) {
+            return switchEvent.getConfigState();
+        }
+        if (portEvent != null) {
+            return portEvent.getConfigState();
+        }
+        if (linkEvent != null) {
+            return linkEvent.getConfigState();
+        }
+        if (hostEvent != null) {
+            return hostEvent.getConfigState();
+        }
+        return ConfigState.NOT_CONFIGURED;      // Default: not configured
+    }
+
+    /**
      * Checks if all events contained are equal.
      *
      * @param obj TopologyEvent to compare against