import org.opendaylight.infrautils.caches.CacheProvider;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
LOG.info("addVpnInterface: Router interface {} for vpn {} on dpn {}", interfaceName,
vpnName, vpnInterface.getDpnId());
});
- ListenableFutures.addErrorLogging(future, LOG,
+ LoggingFutures.addErrorLogging(future, LOG,
"Error creating FIB entry for interface {} on VPN {}", vpnInterface.getName(), vpnName);
return Collections.singletonList(future);
});
for (Adjacency nextHop : nextHopsMap.values()) {
String rd = primaryRd;
String nexthopIpValue = nextHop.getIpAddress().split("/")[0];
- if (vpnInstanceOpData.getBgpvpnType() == VpnInstanceOpDataEntry.BgpvpnType.BGPVPNInternet
+ if (vpnInstanceOpData.getBgpvpnType() == VpnInstanceOpDataEntry.BgpvpnType.InternetBGPVPN
&& NWUtil.isIpv4Address(nexthopIpValue)) {
String prefix = nextHop.getIpAddress() == null ? "null" :
VpnUtil.getIpPrefix(nextHop.getIpAddress());
for (VpnInstanceOpDataEntry vpn : vpnsToExportRoute) {
List<VrfEntry> vrfEntries = vpnUtil.getAllVrfEntries(vpn.getVrfId());
if (vrfEntries != null) {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, confTx -> {
for (VrfEntry vrfEntry : vrfEntries) {
try {
deleteFibEntryForRouterInterface(vpnInterface, confTx, vpnName);
LOG.info("remove: Router interface {} for vpn {}", interfaceName, vpnName);
});
- ListenableFutures.addErrorLogging(future, LOG, "Error removing call for interface {} on VPN {}",
+ LoggingFutures.addErrorLogging(future, LOG, "Error removing call for interface {} on VPN {}",
vpnInterface.getName(), vpnName);
return Collections.singletonList(future);
}, DJC_MAX_RETRIES);
}
AdjacenciesOp adjacencies = vpnInterfaceOpDataEnteryOptional.get().augmentation(AdjacenciesOp.class);
- if (adjacencies != null && !adjacencies.getAdjacency().isEmpty()) {
+ if (adjacencies != null && adjacencies.getAdjacency() != null) {
Map<AdjacencyKey, Adjacency> nextHopsMap = adjacencies.nonnullAdjacency();
LOG.info("removeAdjacenciesFromVpn: NextHops for interface {} on dpn {} for vpn {} are {}",
interfaceName, dpnId, vpnName, nextHopsMap);
String primaryRd = vpnUtil.getPrimaryRd(newVpnName);
VpnInstanceOpDataEntry vpnInstanceOpDataEntry = vpnUtil.getVpnInstanceOpData(primaryRd);
if (vpnInstanceOpDataEntry.getBgpvpnType() == VpnInstanceOpDataEntry
- .BgpvpnType.BGPVPNExternal) {
+ .BgpvpnType.BGPVPN) {
externalBgpVpnList.add(newVpnName);
break;
}
String primaryRd = vpnUtil.getPrimaryRd(newVpnName);
VpnInstanceOpDataEntry vpnInstanceOpDataEntry = vpnUtil.getVpnInstanceOpData(primaryRd);
if (vpnInstanceOpDataEntry.getBgpvpnType() == VpnInstanceOpDataEntry
- .BgpvpnType.VPN) {
+ .BgpvpnType.BGPVPN) {
routerVpnList.add(newVpnName);
break;
}
MoreExecutors.directExecutor());
futures.add(configTxFuture);
for (ListenableFuture<Void> future : futures) {
- ListenableFutures.addErrorLogging(future, LOG, "update: failed for interface {} on vpn {}",
+ LoggingFutures.addErrorLogging(future, LOG, "update: failed for interface {} on vpn {}",
update.getName(), update.getVpnInstanceNames());
}
} else {