Class ElanServiceProvider
- java.lang.Object
-
- org.opendaylight.infrautils.inject.AbstractLifecycle
-
- org.opendaylight.netvirt.elan.internal.ElanServiceProvider
-
- All Implemented Interfaces:
org.opendaylight.infrautils.inject.Lifecycle
,IElanService
,IEtreeService
@Singleton public class ElanServiceProvider extends org.opendaylight.infrautils.inject.AbstractLifecycle implements IElanService
-
-
Constructor Summary
Constructors Constructor Description ElanServiceProvider(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, ElanBridgeManager bridgeMgr, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, ElanUtils elanUtils, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService, org.opendaylight.ovsdb.utils.southbound.utils.SouthboundUtils southboundUtils, ElanInstanceCache elanInstanceCache, ElanInterfaceCache elanInterfaceCache, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArpResponderFlow(ArpResponderInput arpResponderInput)
Add ARP Responder Flow on the given dpn for the ingress interface.void
addElanInterface(java.lang.String elanInstanceName, java.lang.String interfaceName, @Nullable java.util.List<java.lang.String> staticMacAddresses, @Nullable java.lang.String description)
void
addEtreeInterface(java.lang.String etreeInstanceName, java.lang.String interfaceName, EtreeInterface.EtreeInterfaceType interfaceType, java.util.List<java.lang.String> staticMacAddresses, java.lang.String description)
void
addExternalTunnelArpResponderFlow(ArpResponderInput arpResponderInput, java.lang.String elanInstanceName)
Add ARP Responder Flow on the given dpn for the SR-IOV VMs ingress interface.void
addKnownL3DmacAddress(java.lang.String macAddress, java.lang.String elanInstanceName)
void
addStaticMacAddress(java.lang.String interfaceName, java.lang.String macAddress)
static boolean
compareWithExistingElanInstance(ElanInstance existingElanInstance, long macTimeOut, java.lang.String description)
boolean
createElanInstance(java.lang.String elanInstanceName, long macTimeout, java.lang.String description)
boolean
createEtreeInstance(java.lang.String elanInstanceName, long macTimeout, java.lang.String description)
void
createExternalElanNetwork(ElanInstance elanInstance)
protected void
createExternalElanNetwork(ElanInstance elanInstance, org.opendaylight.yangtools.yang.common.Uint64 dpId)
void
createExternalElanNetworks(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node node)
boolean
deleteElanInstance(java.lang.String elanInstanceName)
void
deleteElanInterface(java.lang.String interfaceName)
boolean
deleteEtreeInstance(java.lang.String etreeInstanceName)
void
deleteEtreeInterface(java.lang.String interfaceName)
void
deleteExternalElanNetwork(ElanInstance elanInstance)
protected void
deleteExternalElanNetwork(ElanInstance elanInstance, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
void
deleteExternalElanNetworks(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node node)
void
deleteStaticMacAddress(java.lang.String interfaceName, java.lang.String macAddress)
void
flushMACTable(java.lang.String elanInstanceName)
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnInterfaces>
getElanDpnInterfaceOperationalDataPath(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
@Nullable ElanInstance
getElanInstance(java.lang.String elanName)
java.util.List<ElanInstance>
getElanInstances()
@Nullable ElanInterface
getElanInterfaceByElanInterfaceName(java.lang.String interfaceName)
DpnInterfaces
getElanInterfaceInfoByElanDpn(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpId)
@NonNull java.util.List<java.lang.String>
getElanInterfaces(java.lang.String elanInstanceName)
java.util.Collection<MacEntry>
getElanMacTable(java.lang.String elanInstanceName)
@Nullable EtreeInterface
getEtreeInterfaceByElanInterfaceName(java.lang.String elanInterface)
java.lang.String
getExternalElanInterface(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
java.util.Collection<java.lang.String>
getExternalElanInterfaces(java.lang.String elanInstanceName)
void
handleKnownL3DmacAddress(java.lang.String macAddress, java.lang.String elanInstanceName, int addOrRemove)
boolean
isExternalInterface(java.lang.String interfaceName)
java.lang.Boolean
isOpenStackVniSemanticsEnforced()
void
removeArpResponderFlow(ArpResponderInput arpResponderInput)
Remove ARP Responder flow from the given dpn for the ingress interface.void
removeKnownL3DmacAddress(java.lang.String macAddress, java.lang.String elanInstanceName)
org.opendaylight.yangtools.yang.common.Uint32
retrieveNewElanTag(java.lang.String idKey)
Uses the IdManager to retrieve a brand new ElanTag.protected void
start()
protected void
stop()
void
updateElanInstance(java.lang.String elanInstanceName, long newMacTimout, java.lang.String newDescription)
void
updateElanInterface(java.lang.String elanInstanceName, java.lang.String interfaceName, java.util.List<java.lang.String> updatedStaticMacAddresses, java.lang.String newDescription)
void
updateExternalElanNetwork(ElanInstance elanInstance)
void
updateExternalElanNetworks(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node origNode, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node updatedNode)
-
-
-
Constructor Detail
-
ElanServiceProvider
@Inject public ElanServiceProvider(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, ElanBridgeManager bridgeMgr, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, ElanUtils elanUtils, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService, org.opendaylight.ovsdb.utils.southbound.utils.SouthboundUtils southboundUtils, ElanInstanceCache elanInstanceCache, ElanInterfaceCache elanInterfaceCache, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager)
-
-
Method Detail
-
start
protected void start() throws java.lang.Exception
- Specified by:
start
in classorg.opendaylight.infrautils.inject.AbstractLifecycle
- Throws:
java.lang.Exception
-
stop
protected void stop()
- Specified by:
stop
in classorg.opendaylight.infrautils.inject.AbstractLifecycle
-
isOpenStackVniSemanticsEnforced
public java.lang.Boolean isOpenStackVniSemanticsEnforced()
- Specified by:
isOpenStackVniSemanticsEnforced
in interfaceIElanService
-
createElanInstance
public boolean createElanInstance(java.lang.String elanInstanceName, long macTimeout, java.lang.String description)
- Specified by:
createElanInstance
in interfaceIElanService
-
createEtreeInstance
public boolean createEtreeInstance(java.lang.String elanInstanceName, long macTimeout, java.lang.String description)
- Specified by:
createEtreeInstance
in interfaceIEtreeService
-
getEtreeInterfaceByElanInterfaceName
public @Nullable EtreeInterface getEtreeInterfaceByElanInterfaceName(java.lang.String elanInterface)
- Specified by:
getEtreeInterfaceByElanInterfaceName
in interfaceIEtreeService
-
compareWithExistingElanInstance
public static boolean compareWithExistingElanInstance(ElanInstance existingElanInstance, long macTimeOut, java.lang.String description)
-
updateElanInstance
public void updateElanInstance(java.lang.String elanInstanceName, long newMacTimout, java.lang.String newDescription)
- Specified by:
updateElanInstance
in interfaceIElanService
-
deleteEtreeInstance
public boolean deleteEtreeInstance(java.lang.String etreeInstanceName)
- Specified by:
deleteEtreeInstance
in interfaceIEtreeService
-
deleteElanInstance
public boolean deleteElanInstance(java.lang.String elanInstanceName)
- Specified by:
deleteElanInstance
in interfaceIElanService
-
addEtreeInterface
public void addEtreeInterface(java.lang.String etreeInstanceName, java.lang.String interfaceName, EtreeInterface.EtreeInterfaceType interfaceType, java.util.List<java.lang.String> staticMacAddresses, java.lang.String description)
- Specified by:
addEtreeInterface
in interfaceIEtreeService
-
addElanInterface
public void addElanInterface(java.lang.String elanInstanceName, java.lang.String interfaceName, @Nullable java.util.List<java.lang.String> staticMacAddresses, @Nullable java.lang.String description)
- Specified by:
addElanInterface
in interfaceIElanService
-
updateElanInterface
public void updateElanInterface(java.lang.String elanInstanceName, java.lang.String interfaceName, java.util.List<java.lang.String> updatedStaticMacAddresses, java.lang.String newDescription)
- Specified by:
updateElanInterface
in interfaceIElanService
-
deleteEtreeInterface
public void deleteEtreeInterface(java.lang.String interfaceName)
- Specified by:
deleteEtreeInterface
in interfaceIEtreeService
-
deleteElanInterface
public void deleteElanInterface(java.lang.String interfaceName)
- Specified by:
deleteElanInterface
in interfaceIElanService
-
addStaticMacAddress
public void addStaticMacAddress(java.lang.String interfaceName, java.lang.String macAddress)
- Specified by:
addStaticMacAddress
in interfaceIElanService
-
deleteStaticMacAddress
public void deleteStaticMacAddress(java.lang.String interfaceName, java.lang.String macAddress)
- Specified by:
deleteStaticMacAddress
in interfaceIElanService
-
getElanMacTable
public java.util.Collection<MacEntry> getElanMacTable(java.lang.String elanInstanceName)
- Specified by:
getElanMacTable
in interfaceIElanService
-
flushMACTable
public void flushMACTable(java.lang.String elanInstanceName)
- Specified by:
flushMACTable
in interfaceIElanService
-
getElanInstance
public @Nullable ElanInstance getElanInstance(java.lang.String elanName)
- Specified by:
getElanInstance
in interfaceIElanService
-
getElanInstances
public java.util.List<ElanInstance> getElanInstances()
- Specified by:
getElanInstances
in interfaceIElanService
-
getElanInterfaces
public @NonNull java.util.List<java.lang.String> getElanInterfaces(java.lang.String elanInstanceName)
- Specified by:
getElanInterfaces
in interfaceIElanService
-
createExternalElanNetworks
public void createExternalElanNetworks(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node node)
- Specified by:
createExternalElanNetworks
in interfaceIElanService
-
createExternalElanNetwork
public void createExternalElanNetwork(ElanInstance elanInstance)
- Specified by:
createExternalElanNetwork
in interfaceIElanService
-
createExternalElanNetwork
protected void createExternalElanNetwork(ElanInstance elanInstance, org.opendaylight.yangtools.yang.common.Uint64 dpId)
-
updateExternalElanNetwork
public void updateExternalElanNetwork(ElanInstance elanInstance)
- Specified by:
updateExternalElanNetwork
in interfaceIElanService
-
deleteExternalElanNetworks
public void deleteExternalElanNetworks(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node node)
- Specified by:
deleteExternalElanNetworks
in interfaceIElanService
-
deleteExternalElanNetwork
public void deleteExternalElanNetwork(ElanInstance elanInstance)
- Specified by:
deleteExternalElanNetwork
in interfaceIElanService
-
deleteExternalElanNetwork
protected void deleteExternalElanNetwork(ElanInstance elanInstance, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
-
updateExternalElanNetworks
public void updateExternalElanNetworks(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node origNode, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node updatedNode)
- Specified by:
updateExternalElanNetworks
in interfaceIElanService
-
getExternalElanInterfaces
public java.util.Collection<java.lang.String> getExternalElanInterfaces(java.lang.String elanInstanceName)
- Specified by:
getExternalElanInterfaces
in interfaceIElanService
-
getExternalElanInterface
public java.lang.String getExternalElanInterface(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
- Specified by:
getExternalElanInterface
in interfaceIElanService
-
isExternalInterface
public boolean isExternalInterface(java.lang.String interfaceName)
- Specified by:
isExternalInterface
in interfaceIElanService
-
getElanInterfaceByElanInterfaceName
public @Nullable ElanInterface getElanInterfaceByElanInterfaceName(java.lang.String interfaceName)
- Specified by:
getElanInterfaceByElanInterfaceName
in interfaceIElanService
-
handleKnownL3DmacAddress
public void handleKnownL3DmacAddress(java.lang.String macAddress, java.lang.String elanInstanceName, int addOrRemove)
- Specified by:
handleKnownL3DmacAddress
in interfaceIElanService
-
addKnownL3DmacAddress
public void addKnownL3DmacAddress(java.lang.String macAddress, java.lang.String elanInstanceName)
- Specified by:
addKnownL3DmacAddress
in interfaceIElanService
-
removeKnownL3DmacAddress
public void removeKnownL3DmacAddress(java.lang.String macAddress, java.lang.String elanInstanceName)
- Specified by:
removeKnownL3DmacAddress
in interfaceIElanService
-
addArpResponderFlow
public void addArpResponderFlow(ArpResponderInput arpResponderInput)
Description copied from interface:IElanService
Add ARP Responder Flow on the given dpn for the ingress interface.- Specified by:
addArpResponderFlow
in interfaceIElanService
- Parameters:
arpResponderInput
- ArpResponder Input parameters- See Also:
ArpResponderInput
-
addExternalTunnelArpResponderFlow
public void addExternalTunnelArpResponderFlow(ArpResponderInput arpResponderInput, java.lang.String elanInstanceName)
Description copied from interface:IElanService
Add ARP Responder Flow on the given dpn for the SR-IOV VMs ingress interface.- Specified by:
addExternalTunnelArpResponderFlow
in interfaceIElanService
- Parameters:
arpResponderInput
- ArpResponder Input parameterselanInstanceName
- The elanInstance corresponding to the interface- See Also:
ArpResponderInput
-
removeArpResponderFlow
public void removeArpResponderFlow(ArpResponderInput arpResponderInput)
Description copied from interface:IElanService
Remove ARP Responder flow from the given dpn for the ingress interface.- Specified by:
removeArpResponderFlow
in interfaceIElanService
- Parameters:
arpResponderInput
- ArpResponder Input parameters- See Also:
ArpResponderInput
-
retrieveNewElanTag
public org.opendaylight.yangtools.yang.common.Uint32 retrieveNewElanTag(java.lang.String idKey)
Uses the IdManager to retrieve a brand new ElanTag.- Specified by:
retrieveNewElanTag
in interfaceIElanService
- Parameters:
idKey
- the id key- Returns:
- the integer
-
getElanDpnInterfaceOperationalDataPath
public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnInterfaces> getElanDpnInterfaceOperationalDataPath(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
- Specified by:
getElanDpnInterfaceOperationalDataPath
in interfaceIElanService
-
getElanInterfaceInfoByElanDpn
public DpnInterfaces getElanInterfaceInfoByElanDpn(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpId)
- Specified by:
getElanInterfaceInfoByElanDpn
in interfaceIElanService
-
-