Adding device type
Adding device type on port(eg Ethernet Port,TPort,WPort), Link(Ethernet,Optical..) and Switch(Ethernet,Optical)
Updated Serializers.
Fixed javadoc issue for Enums.
ONOS-1428
Change-Id: Id3e3094f1fbf90154fff9a61e3c0ca36be69c281
diff --git a/src/main/java/net/onrc/onos/core/topology/PortImpl.java b/src/main/java/net/onrc/onos/core/topology/PortImpl.java
index 2521a9a..3f4cdfb 100644
--- a/src/main/java/net/onrc/onos/core/topology/PortImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/PortImpl.java
@@ -152,6 +152,18 @@
}
}
+ /**
+ * Returns the port type of this port.
+ *
+ * @return {@link net.onrc.onos.core.topology.PortType}
+ */
+ @Override
+ public PortType getPortType() {
+ return PortType.valueOf(getStringAttribute(TopologyElement.ELEMENT_TYPE,
+ PortType.ETHERNET_PORT.toString()));
+ }
+
+
@Override
public String getStringAttribute(String attr) {
return this.topology.getPortEvent(id).getStringAttribute(attr);