Fixing "inconsistency will tunnel-port creation" issue
[vpnservice.git] / interfacemgr / interfacemgr-impl / src / main / java / org / opendaylight / vpnservice / interfacemgr / renderer / ovs / statehelpers / OvsInterfaceTopologyStateAddHelper.java
index bf37408a4781c0cbe47a71c4d59611193a8bbf2b..6a4724487f05e8ccb0f412872608919c95d0f158 100644 (file)
@@ -65,8 +65,10 @@ public class OvsInterfaceTopologyStateAddHelper {
             return futures;
         }
 
-        dpId = dpId.replaceAll("[^\\d.]", "");
-        BigInteger ovsdbDpId = new BigInteger(dpId, 16);
+        String datapathId = dpId.replaceAll("[^\\d.]", "");
+        BigInteger ovsdbDpId = new BigInteger(datapathId, 16);
+
+        LOG.info("adding dpId {} to bridge reference {}", datapathId, bridgeName);
         BridgeRefEntryKey bridgeRefEntryKey = new BridgeRefEntryKey(ovsdbDpId);
         InstanceIdentifier<BridgeRefEntry> bridgeEntryId =
                 InterfaceMetaUtils.getBridgeRefEntryIdentifier(bridgeRefEntryKey);
@@ -92,11 +94,9 @@ public class OvsInterfaceTopologyStateAddHelper {
             InterfaceKey interfaceKey = new InterfaceKey(portName);
             Interface iface = InterfaceManagerCommonUtils.getInterfaceFromConfigDS(interfaceKey, dataBroker);
             if (iface.getAugmentation(IfTunnel.class) != null) {
-                SouthboundUtils.addPortToBridge(bridgeIid, iface, bridgeNew, bridgeName, portName, dataBroker, t);
-                 InstanceIdentifier<TerminationPoint> tpIid = SouthboundUtils.createTerminationPointInstanceIdentifier(
-                        InstanceIdentifier.keyOf(bridgeIid.firstIdentifierOf(Node.class)), portName);
+                SouthboundUtils.addPortToBridge(bridgeIid, iface, bridgeNew, bridgeName, portName, dataBroker, futures);
                 InterfaceMetaUtils.createBridgeInterfaceEntryInConfigDS(bridgeEntryKey,
-                        new BridgeInterfaceEntryKey(portName), portName, tpIid, t);
+                        new BridgeInterfaceEntryKey(portName), portName, t);
             }
         }