Add state/status to Topology Element

Updated discovery to populate the status and config type

Changed status to admin status

Added to Kryo Serializer list

ONOS-1428

Change-Id: I38e5ecf2b45b95c148339d127d86592c0e9678ba
diff --git a/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java b/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java
index 6be8b13..de4194e 100644
--- a/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java
@@ -156,4 +156,24 @@
     public String getType() {
         return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET_LAYER);
     }
+
+    /**
+     * Returns the config state of topology element.
+     *
+     * @return ConfigState
+     */
+    @Override
+    public ConfigState getConfigState() {
+        return ConfigState.valueOf(getStringAttribute(TopologyElement.ELEMENT_CONFIG_STATE));
+    }
+
+    /**
+     * Returns the status of topology element.
+     *
+     * @return AdminStatus
+     */
+    @Override
+    public AdminStatus getStatus() {
+        return AdminStatus.valueOf(getStringAttribute(TopologyElement.ELEMENT_ADMIN_STATUS));
+    }
 }