Fixed Topology Adapter to properly add Edge Properties
[controller.git] / opendaylight / md-sal / compatibility / sal-compatibility / src / main / java / org / opendaylight / controller / sal / compatibility / NodeMapping.xtend
index 4ad91c26779dcdfdb451200636c958ca3d4ae027..4378e7dffece701592936ce85dba77884c6ce8d8 100644 (file)
@@ -48,6 +48,7 @@ import java.util.Date
 import org.opendaylight.controller.sal.core.TimeStamp
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowNodeConnector
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowNode
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector
 
 public class NodeMapping {
 
@@ -171,6 +172,14 @@ public class NodeMapping {
         return new HashSet<org.opendaylight.controller.sal.core.Property>();
     }
 
+    public static def toADNodeConnectorProperties(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector nc) {
+        val fcnc = nc.getAugmentation(FlowCapableNodeConnector)
+        if (fcnc != null) {
+            return fcnc.toADNodeConnectorProperties
+        }
+        return new HashSet<org.opendaylight.controller.sal.core.Property>();
+    }
+
     public static def toADNodeConnectorProperties(FlowNodeConnector fcncu) {
         val props = new HashSet<org.opendaylight.controller.sal.core.Property>();
         if (fcncu != null) {