Class ArpResponderHandler
- java.lang.Object
-
- org.opendaylight.netvirt.vpnmanager.arp.responder.ArpResponderHandler
-
@Singleton public class ArpResponderHandler extends java.lang.Object
Class that is responsible for handling ARP Responder flows which involves to differentiate between router and connected mac cases, identify DPNs and installation and uninstallation of flows.
-
-
Constructor Summary
Constructors Constructor Description ArpResponderHandler(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IElanService elanService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, VpnUtil vpnUtil)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArpResponderFlow(org.opendaylight.yangtools.yang.common.Uint64 dpnId, int lportTag, java.lang.String interfaceName, java.lang.String gatewayIp, java.lang.String mac)
Add ARP Responder flow, by invoking ELan RPC service.com.google.common.base.Optional<java.lang.String>
getGatewayMacAddressForInterface(VpnPortipToPort gwPort, java.lang.String ifName)
Get Mac address from given gateway port and interface name.void
removeArpResponderFlow(org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, java.lang.String ifName, java.lang.String gatewayIp, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid subnetUuid)
Remove ARP Responder flow when VM interface is removed, by invoking ELan RPC service.
-
-
-
Constructor Detail
-
ArpResponderHandler
@Inject public ArpResponderHandler(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IElanService elanService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, VpnUtil vpnUtil)
Constructor.- Parameters:
dataBroker
-dataBroker
elanService
-elanService
interfaceManager
-interfaceManager
itmRpcService
-itmRpcService
vpnUtil
-vpnUtil
-
-
Method Detail
-
addArpResponderFlow
public void addArpResponderFlow(org.opendaylight.yangtools.yang.common.Uint64 dpnId, int lportTag, java.lang.String interfaceName, java.lang.String gatewayIp, java.lang.String mac)
Add ARP Responder flow, by invoking ELan RPC service.- Parameters:
dpnId
- dpn Id on which ARP responder flow to be addedlportTag
- lport tag of the interfaceinterfaceName
- interface to which ARP responder flow to be addedgatewayIp
- gateway ip of the interfacemac
- mac address
-
removeArpResponderFlow
public void removeArpResponderFlow(org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, java.lang.String ifName, java.lang.String gatewayIp, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid subnetUuid)
Remove ARP Responder flow when VM interface is removed, by invoking ELan RPC service.- Parameters:
dpId
- dpn Id on which ARP responder flow to be removedlportTag
- lport tag of the interfaceifName
- interface to which ARP responder flow to be removedgatewayIp
- subnet gateway ipsubnetUuid
- subnet Id of the interface
-
getGatewayMacAddressForInterface
public com.google.common.base.Optional<java.lang.String> getGatewayMacAddressForInterface(VpnPortipToPort gwPort, java.lang.String ifName)
Get Mac address from given gateway port and interface name.- Parameters:
gwPort
- gateway portifName
- interface for which gateway to be retrieved- Returns:
- mac address if present else optional absent value
-
-