String routeDistinguisher = VpnUtil.getVpnRdFromVpnInstanceConfig(dataBroker, vpnName);
String rd = (routeDistinguisher == null) ? vpnName : routeDistinguisher;</BUG>
Boolean newDpnOnVpn = Boolean.FALSE;
synchronized (vpnName.intern()) {
WriteTransaction writeTxn = dataBroker.newWriteOnlyTransaction();
<BUG>InstanceIdentifier<VpnToDpnList> id = VpnUtil.getVpnToDpnListIdentifier(rd, dpnId);
</BUG>
Optional<VpnToDpnList> dpnInVpn = VpnUtil.read(dataBroker, LogicalDatastoreType.OPERATIONAL, id);
VpnInterfaces vpnInterface = new VpnInterfacesBuilder().setInterfaceName(intfName).build();
if (dpnInVpn.isPresent()) {

} else {
removeOrUpdateVpnToDpnList(vpnId, dpId, interfaceName, vpnName);
}
}
}
private void createOrUpdateVpnToDpnList(long vpnId, BigInteger dpnId, String intfName, String vpnName) {
String primaryRd = VpnUtil.getPrimaryRd(dataBroker, vpnName);
Boolean newDpnOnVpn = Boolean.FALSE;
synchronized (vpnName.intern()) {
WriteTransaction writeTxn = dataBroker.newWriteOnlyTransaction();
InstanceIdentifier<VpnToDpnList> id = VpnUtil.getVpnToDpnListIdentifier(primaryRd, dpnId);
Optional<VpnToDpnList> dpnInVpn = VpnUtil.read(dataBroker, LogicalDatastoreType.OPERATIONAL, id);
VpnInterfaces vpnInterface = new VpnInterfacesBuilder().setInterfaceName(intfName).build();
if (dpnInVpn.isPresent()) {
