use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryInput in project netvirt by opendaylight.
the class FibRpcServiceImpl method removeFibEntry.
/**
* To remove FIB/LFIB/TST routes from specified dpn.
*/
@Override
public Future<RpcResult<Void>> removeFibEntry(RemoveFibEntryInput input) {
BigInteger dpnId = input.getSourceDpid();
String vpnName = input.getVpnName();
long vpnId = getVpnId(dataBroker, vpnName);
String vpnRd = getVpnRd(dataBroker, vpnName);
String ipAddress = input.getIpAddress();
LOG.info("Delete custom FIB entry - {} on dpn {} for VPN {} ", ipAddress, dpnId, vpnName);
LOG.info("REMOVE: Removing Custom Fib Entry rd {} prefix {} label {}", vpnRd, ipAddress, input.getServiceId());
removeLocalFibEntry(dpnId, vpnId, ipAddress);
IpAddresses.IpAddressSource ipAddressSource = IpAddresses.IpAddressSource.forValue(input.getIpAddressSource().getIntValue());
vpnFootprintService.updateVpnToDpnMapping(dpnId, vpnName, vpnRd, null, /* interfaceName*/
new ImmutablePair<>(ipAddressSource, ipAddress), false);
LOG.info("REMOVE: Removed Custom Fib Entry rd {} prefix {} label {}", vpnRd, ipAddress, input.getServiceId());
return Futures.immediateFuture(RpcResultBuilder.<Void>success().build());
}
Aggregations