use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fib.rpc.rev160121.RemoveFibEntryOutputBuilder in project netvirt by opendaylight.
the class FibRpcServiceImpl method removeFibEntry.
/**
* To remove FIB/LFIB/TST routes from specified dpn.
*/
@Override
public ListenableFuture<RpcResult<RemoveFibEntryOutput>> removeFibEntry(RemoveFibEntryInput input) {
Uint64 dpnId = input.getSourceDpid();
String vpnName = input.getVpnName();
Uint32 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 RpcResultBuilder.success(new RemoveFibEntryOutputBuilder().build()).buildFuture();
}
Aggregations