builder.setRoutePaths(routePaths);
}
- public void removeFibEntry(String rd, String prefix, TypedWriteTransaction<Configuration> writeConfigTxn) {
+ @SuppressWarnings("checkstyle:IllegalCatch")
+ public void removeFibEntry(String rd, String prefix, String eventSource,
+ TypedWriteTransaction<Configuration> writeConfigTxn) {
if (rd == null || rd.isEmpty()) {
LOG.error("Prefix {} not associated with vpn", prefix);
return;
}
- LOG.debug("removeFibEntry: Removing fib entry with destination prefix {} from vrf table for rd {}",
- prefix, rd);
-
- InstanceIdentifier.InstanceIdentifierBuilder<VrfEntry> idBuilder =
- InstanceIdentifier.builder(FibEntries.class)
- .child(VrfTables.class, new VrfTablesKey(rd)).child(VrfEntry.class, new VrfEntryKey(prefix));
- InstanceIdentifier<VrfEntry> vrfEntryId = idBuilder.build();
- if (writeConfigTxn != null) {
- writeConfigTxn.delete(vrfEntryId);
- } else {
- MDSALUtil.syncDelete(dataBroker, LogicalDatastoreType.CONFIGURATION, vrfEntryId);
+ try {
+ LOG.debug("removeFibEntry: Removing fib entry with destination prefix {} from vrf table for rd {}",
+ prefix, rd);
+
+ InstanceIdentifier.InstanceIdentifierBuilder<VrfEntry> idBuilder =
+ InstanceIdentifier.builder(FibEntries.class)
+ .child(VrfTables.class, new VrfTablesKey(rd)).child(VrfEntry.class,
+ new VrfEntryKey(prefix));
+ InstanceIdentifier<VrfEntry> vrfEntryId = idBuilder.build();
+ if (writeConfigTxn != null) {
+ writeConfigTxn.delete(vrfEntryId);
+ } else {
+ MDSALUtil.syncDelete(dataBroker, LogicalDatastoreType.CONFIGURATION, vrfEntryId);
+ }
+ LOG.error("removeFibEntry: Removed Fib Entry rd {} prefix {} source {} ",
+ rd, prefix, eventSource);
+ } catch (RuntimeException e) {
+ LOG.error("removeFibEntry: Unable to remove Fib Entry for rd {} prefix {} source {} ",
+ rd, prefix, eventSource);
}
- LOG.info("removeFibEntry: Removed Fib Entry rd {} prefix {}",rd, prefix);
}
/**
*/
public void removeOrUpdateFibEntry(String rd, String prefix, String nextHopToRemove,
TypedWriteTransaction<Configuration> writeConfigTxn) {
-
LOG.debug("Removing fib entry with destination prefix {} from vrf table for rd {} nextHop {}", prefix, rd,
nextHopToRemove);