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/LinkImpl.java b/src/main/java/net/onrc/onos/core/topology/LinkImpl.java
index 8379279..dea629e 100644
--- a/src/main/java/net/onrc/onos/core/topology/LinkImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/LinkImpl.java
@@ -121,4 +121,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));
+ }
}