OVSDB-438: missing operational node
[ovsdb.git] / hwvtepsouthbound / hwvtepsouthbound-impl / src / main / java / org / opendaylight / ovsdb / hwvtepsouthbound / HwvtepSouthboundUtil.java
index d38363959660dff02c9dbf1d76e26f7129fb4b29..aa6804f07ca59d468e8dc0194ae89af5f83a6792 100644 (file)
@@ -205,4 +205,12 @@ public class HwvtepSouthboundUtil {
         }
         return physicalNodeIid.firstIdentifierOf(Topology.class).child(Node.class , new NodeKey(new NodeId(nodeId)));
     }
+
+    public static Integer getRemotePort(Node node) {
+        HwvtepGlobalAugmentation augmentation = node.getAugmentation(HwvtepGlobalAugmentation.class);
+        if (augmentation != null && augmentation.getConnectionInfo() != null) {
+            return augmentation.getConnectionInfo().getRemotePort().getValue();
+        }
+        return 0;
+    }
 }