VpnHelper.getVpnInterfaceVpnInstanceNamesString(update.getVpnInstanceNames()));
return Collections.emptyList();
}
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
for (VpnInstanceNames vpnInterfaceVpnInstance : update.getVpnInstanceNames()) {
String newVpnName = vpnInterfaceVpnInstance.getVpnName();
List<Adjacency> copyNewAdjs = new ArrayList<>(newAdjs);
String primaryRd = vpnUtil.getPrimaryRd(newVpnName);
if (!vpnUtil.isVpnPendingDelete(primaryRd)) {
// TODO Deal with sequencing — the config tx must only submitted if the oper tx goes in
- List<ListenableFuture<Void>> futures = new ArrayList<>();
futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(confTx -> {
futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(operTx -> {
InstanceIdentifier<VpnInterfaceOpDataEntry> vpnInterfaceOpIdentifier =
ListenableFutures.addErrorLogging(future, LOG, "update: failed for interface {} on vpn {}",
update.getName(), update.getVpnInstanceNames());
}
- return futures;
} else {
LOG.error("update: Ignoring update of vpnInterface {}, as newVpnInstance {} with primaryRd {}"
+ " is already marked for deletion", vpnInterfaceName, newVpnName, primaryRd);
}
}
- return Collections.emptyList();
+ return futures;
});
}
final Adjacencies updateAdjs = update.augmentation(Adjacencies.class);
final List<Adjacency> newAdjs = (updateAdjs != null && updateAdjs.getAdjacency() != null)
? updateAdjs.getAdjacency() : new ArrayList<>();
-
for (String newVpnName: newVpnList) {
String primaryRd = vpnUtil.getPrimaryRd(newVpnName);
isSwap = Boolean.TRUE;