+ public BigInteger getDpnForInterface(Interface intrf) {
+ try {
+ NodeConnector port = getNodeConnectorFromDataStore(intrf);
+ NodeConnectorId id = null;
+ if(port == null) {
+ id = getNodeConnectorIdFromInterface(intrf);
+ } else {
+ id = port.getId();
+ }
+ //TODO: This should be an MDSAL Util method
+ return new BigInteger(IfmUtil.getDpnFromNodeConnectorId(id));
+ } catch (NullPointerException e) {
+ LOG.error("dpn for Interface {} not found", intrf.getName(), e);
+ }
+ return BigInteger.ZERO;
+ }
+
+ BigInteger getDpnForInterface(String ifName) {
+ Interface iface = getInterfaceByIfName(ifName);
+ if(iface != null) {
+ return getDpnForInterface(iface);
+ }
+ LOG.error("Interface {} doesn't exist", ifName);
+ return BigInteger.ZERO;
+ }
+
+ String getEndpointIpForDpn(BigInteger dpnId) {