Class DhcpExternalTunnelManager
- java.lang.Object
-
- org.opendaylight.netvirt.dhcpservice.DhcpExternalTunnelManager
-
- All Implemented Interfaces:
IDhcpExternalTunnelManager
@Singleton public class DhcpExternalTunnelManager extends java.lang.Object implements IDhcpExternalTunnelManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
UNKNOWN_DMAC
-
Constructor Summary
Constructors Constructor Description DhcpExternalTunnelManager(org.opendaylight.mdsal.binding.api.DataBroker broker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalUtil, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, L2GatewayCache l2GatewayCache, IElanService ielanService, DhcpServiceCounters dhcpServiceCounters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrRemoveDhcpArpFlowforElan(java.lang.String elanInstanceName, boolean addFlow, java.lang.String dhcpIpAddress, java.lang.String dhcpMacAddress)
void
configureDhcpArpRequestResponseFlow(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String elanInstanceName, boolean addFlow, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String dhcpIpAddress, java.lang.String dhcpMacAddress)
@Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs
createRemoteMcastMac(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node dstDevice, java.lang.String logicalSwitchName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress internalTunnelIp)
org.opendaylight.yangtools.yang.common.Uint64
designateDpnId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns)
java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String>,java.util.Set<java.lang.String>>
getAvailableVMCache()
java.util.concurrent.ConcurrentMap<org.opendaylight.yangtools.yang.common.Uint64,java.util.Set<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String>>>
getDesignatedDpnsToTunnelIpElanNameCache()
java.lang.String
getExternalTunnelInterfaceName(java.lang.String sourceNode, java.lang.String dstNode)
static java.util.Optional<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node>
getNode(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, java.lang.String physicalSwitchNodeId)
java.util.Optional<SubnetToDhcpPort>
getSubnetDhcpPortData(java.lang.String elanInstanceName)
@Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress
getTunnelIpBasedOnElan(java.lang.String elanInstanceName, java.lang.String vmMacAddress)
java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String>,java.util.Set<java.lang.String>>
getTunnelIpElanNameToVmMacCache()
java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.Uint64,java.lang.String>,org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port>
getVniMacAddressToPortCache()
void
handleDesignatedDpnDown(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> listOfDpns)
java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>>
handleTunnelStateDown(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, org.opendaylight.yangtools.yang.common.Uint64 interfaceDpn)
java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>>
handleTunnelStateUp(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, org.opendaylight.yangtools.yang.common.Uint64 interfaceDpn)
void
init()
void
installDhcpDropActionOnDpn(org.opendaylight.yangtools.yang.common.Uint64 dpId)
void
installDhcpFlowsForVms(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns, org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, java.lang.String vmMacAddress)
void
installDhcpFlowsForVms(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, java.util.Set<java.lang.String> listVmMacAddress, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx)
void
installRemoteMcastMac(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
@NonNull org.opendaylight.yangtools.yang.common.Uint64
readDesignatedSwitchesForExternalTunnel(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
@Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port
readVniMacToPortCache(org.opendaylight.yangtools.yang.common.Uint64 vni, java.lang.String macAddress)
void
removeDesignatedSwitchForExternalTunnel(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
void
removeFromAvailableCache(org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String> tunnelIpElanName)
void
removeFromLocalCache(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
void
removeVniMacToPortCache(org.opendaylight.yangtools.yang.common.Uint64 vni, java.lang.String macAddress)
void
unInstallDhcpEntries(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String vmMacAddress, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx)
void
unInstallDhcpFlowsForVms(java.lang.String elanInstanceName, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns, java.lang.String vmMacAddress)
void
unInstallDhcpFlowsForVms(java.lang.String elanInstanceName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns)
void
updateCacheAndInstallNewFlows(java.util.List<org.opendaylight.yangtools.yang.common.Uint64> listOfDpns, org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String> pair, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx)
void
updateExistingVMTunnelIPCache(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.lang.String vmMacAddress)
void
updateLocalCache(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.lang.String vmMacAddress)
void
updateLocalCache(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
void
updateVniMacToPortCache(org.opendaylight.yangtools.yang.common.Uint64 vni, java.lang.String macAddress, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port port)
void
writeDesignatedSwitchForExternalTunnel(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
-
-
Field Detail
-
UNKNOWN_DMAC
public static final java.lang.String UNKNOWN_DMAC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DhcpExternalTunnelManager
@Inject public DhcpExternalTunnelManager(org.opendaylight.mdsal.binding.api.DataBroker broker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalUtil, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, L2GatewayCache l2GatewayCache, @Named("elanService") IElanService ielanService, DhcpServiceCounters dhcpServiceCounters)
-
-
Method Detail
-
getDesignatedDpnsToTunnelIpElanNameCache
public java.util.concurrent.ConcurrentMap<org.opendaylight.yangtools.yang.common.Uint64,java.util.Set<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String>>> getDesignatedDpnsToTunnelIpElanNameCache()
- Specified by:
getDesignatedDpnsToTunnelIpElanNameCache
in interfaceIDhcpExternalTunnelManager
-
getTunnelIpElanNameToVmMacCache
public java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String>,java.util.Set<java.lang.String>> getTunnelIpElanNameToVmMacCache()
- Specified by:
getTunnelIpElanNameToVmMacCache
in interfaceIDhcpExternalTunnelManager
-
getAvailableVMCache
public java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String>,java.util.Set<java.lang.String>> getAvailableVMCache()
- Specified by:
getAvailableVMCache
in interfaceIDhcpExternalTunnelManager
-
getVniMacAddressToPortCache
public java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.Uint64,java.lang.String>,org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port> getVniMacAddressToPortCache()
- Specified by:
getVniMacAddressToPortCache
in interfaceIDhcpExternalTunnelManager
-
init
@PostConstruct public void init()
-
designateDpnId
public org.opendaylight.yangtools.yang.common.Uint64 designateDpnId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns)
-
installDhcpFlowsForVms
public void installDhcpFlowsForVms(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns, org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, java.lang.String vmMacAddress)
-
installDhcpFlowsForVms
public void installDhcpFlowsForVms(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, java.util.Set<java.lang.String> listVmMacAddress, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
unInstallDhcpFlowsForVms
public void unInstallDhcpFlowsForVms(java.lang.String elanInstanceName, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns, java.lang.String vmMacAddress)
-
unInstallDhcpFlowsForVms
public void unInstallDhcpFlowsForVms(java.lang.String elanInstanceName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpns)
-
readDesignatedSwitchesForExternalTunnel
public @NonNull org.opendaylight.yangtools.yang.common.Uint64 readDesignatedSwitchesForExternalTunnel(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
writeDesignatedSwitchForExternalTunnel
public void writeDesignatedSwitchForExternalTunnel(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
removeDesignatedSwitchForExternalTunnel
public void removeDesignatedSwitchForExternalTunnel(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
installDhcpDropActionOnDpn
public void installDhcpDropActionOnDpn(org.opendaylight.yangtools.yang.common.Uint64 dpId)
-
updateLocalCache
public void updateLocalCache(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
updateLocalCache
public void updateLocalCache(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.lang.String vmMacAddress)
-
updateExistingVMTunnelIPCache
public void updateExistingVMTunnelIPCache(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName, java.lang.String vmMacAddress)
-
handleDesignatedDpnDown
public void handleDesignatedDpnDown(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> listOfDpns)
-
updateCacheAndInstallNewFlows
public void updateCacheAndInstallNewFlows(java.util.List<org.opendaylight.yangtools.yang.common.Uint64> listOfDpns, org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String> pair, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addOrRemoveDhcpArpFlowforElan
public void addOrRemoveDhcpArpFlowforElan(java.lang.String elanInstanceName, boolean addFlow, java.lang.String dhcpIpAddress, java.lang.String dhcpMacAddress)
-
configureDhcpArpRequestResponseFlow
public void configureDhcpArpRequestResponseFlow(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String elanInstanceName, boolean addFlow, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String dhcpIpAddress, java.lang.String dhcpMacAddress)
-
getSubnetDhcpPortData
public java.util.Optional<SubnetToDhcpPort> getSubnetDhcpPortData(java.lang.String elanInstanceName)
-
unInstallDhcpEntries
public void unInstallDhcpEntries(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String vmMacAddress, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
handleTunnelStateDown
public java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> handleTunnelStateDown(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, org.opendaylight.yangtools.yang.common.Uint64 interfaceDpn)
-
removeFromLocalCache
public void removeFromLocalCache(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
updateVniMacToPortCache
public void updateVniMacToPortCache(org.opendaylight.yangtools.yang.common.Uint64 vni, java.lang.String macAddress, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port port)
-
removeVniMacToPortCache
public void removeVniMacToPortCache(org.opendaylight.yangtools.yang.common.Uint64 vni, java.lang.String macAddress)
-
readVniMacToPortCache
public @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port readVniMacToPortCache(org.opendaylight.yangtools.yang.common.Uint64 vni, java.lang.String macAddress)
-
getExternalTunnelInterfaceName
public java.lang.String getExternalTunnelInterfaceName(java.lang.String sourceNode, java.lang.String dstNode)
-
getNode
public static java.util.Optional<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> getNode(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, java.lang.String physicalSwitchNodeId)
-
createRemoteMcastMac
public @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs createRemoteMcastMac(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node dstDevice, java.lang.String logicalSwitchName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress internalTunnelIp)
-
installRemoteMcastMac
public void installRemoteMcastMac(org.opendaylight.yangtools.yang.common.Uint64 designatedDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
-
handleTunnelStateUp
public java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> handleTunnelStateUp(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, org.opendaylight.yangtools.yang.common.Uint64 interfaceDpn)
-
removeFromAvailableCache
public void removeFromAvailableCache(org.apache.commons.lang3.tuple.Pair<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress,java.lang.String> tunnelIpElanName)
-
getTunnelIpBasedOnElan
public @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getTunnelIpBasedOnElan(java.lang.String elanInstanceName, java.lang.String vmMacAddress)
-
-