use of org.opendaylight.netvirt.elan.arp.responder.ArpResponderInput.ArpReponderInputBuilder in project netvirt by opendaylight.
the class ArpResponderHandler method removeArpResponderFlow.
/**
* Remove ARP Responder flow when VM interface is removed, by invoking ELan
* RPC service.
*
* @param dpId
* dpn Id on which ARP responder flow to be removed
* @param lportTag
* lport tag of the interface
* @param ifName
* interface to which ARP responder flow to be removed
* @param gatewayIp
* subnet gateway ip
* @param subnetUuid
* subnet Id of the interface
*/
public void removeArpResponderFlow(BigInteger dpId, int lportTag, String ifName, String gatewayIp, Uuid subnetUuid) {
if (gatewayIp == null) {
Optional<String> gwIpOptional = VpnUtil.getVpnSubnetGatewayIp(dataBroker, subnetUuid);
if (gwIpOptional.isPresent()) {
gatewayIp = gwIpOptional.get();
}
}
if (gatewayIp != null) {
ArpReponderInputBuilder builder = new ArpReponderInputBuilder();
builder.setDpId(dpId).setInterfaceName(ifName).setSpa(gatewayIp).setLportTag(lportTag);
elanService.removeArpResponderFlow(builder.buildForRemoveFlow());
}
}
Aggregations