Class ElanUtils


  • @Singleton
    public class ElanUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.common.util.concurrent.FutureCallback<org.opendaylight.mdsal.common.api.CommitInfo> DEFAULT_CALLBACK  
    • Constructor Summary

      Constructors 
      Constructor Description
      ElanUtils​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, ElanConfig elanConfig, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, ElanEtreeUtils elanEtreeUtils, ElanItmUtils elanItmUtils, ElanInterfaceCache elanInterfaceCache, org.opendaylight.genius.itm.api.IITMProvider iitmProvider, ElanGroupCache elanGroupCache)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addDmacRedirectToDispatcherFlows​(org.opendaylight.yangtools.yang.common.Uint32 elanTag, java.lang.String displayName, java.lang.String macAddress, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpnIds)  
      static org.opendaylight.genius.mdsalutil.FlowEntity buildDmacRedirectToDispatcherFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String dstMacAddress, java.lang.String displayName, org.opendaylight.yangtools.yang.common.Uint32 elanTag)  
      protected org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node buildDpnNode​(org.opendaylight.yangtools.yang.common.Uint64 dpnId)  
      org.opendaylight.genius.mdsalutil.FlowEntity buildKnownSmacFlow​(ElanInstance elanInfo, org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, long macTimeout, java.lang.String macAddress)  
      org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow buildLocalDmacFlowEntry​(org.opendaylight.yangtools.yang.common.Uint32 elanTag, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String ifName, java.lang.String macAddress, ElanInstance elanInfo, long ifTag)
      Builds the flow to be programmed in the DMAC table of the local DPN (that is, where the MAC is attached to).
      static java.util.List<org.opendaylight.genius.mdsalutil.MatchInfo> buildMatchesForElanTagShFlagAndDstMac​(long elanTag, boolean shFlag, java.lang.String macAddr)  
      org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow buildRemoteDmacFlowEntry​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId, org.opendaylight.yangtools.yang.common.Uint64 destDpId, long lportTagOrVni, org.opendaylight.yangtools.yang.common.Uint32 elanTag, java.lang.String macAddress, java.lang.String displayName, ElanInstance elanInstance)
      Builds a Flow to be programmed in a remote DPN's DMAC table.
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices> buildServiceId​(java.lang.String interfaceName, short serviceIndex)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface> createInterfaceStateInstanceIdentifier​(java.lang.String interfaceName)
      Creates the interface state instance identifier.
      static <T extends org.opendaylight.yangtools.yang.binding.DataObject>
      void
      delete​(org.opendaylight.mdsal.binding.api.DataBroker broker, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)  
      void deleteMacFlows​(@Nullable ElanInstance elanInfo, @Nullable org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, MacEntry macEntry, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> flowTx)  
      void deleteMacFlows​(ElanInstance elanInfo, org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, java.lang.String macAddress, boolean deleteSmac, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> flowTx)  
      void deleteSmacFlowOnly​(ElanInstance elanInfo, org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, java.lang.String macAddress, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> flowTx)  
      static <T> java.util.List<T> diffOf​(java.util.List<T> orig, java.util.List<T> updated)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel> getAllExternalTunnels​(org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
      Gets the all external tunnels.
      static java.lang.String getBcGroupUpdateKey​(java.lang.String elanName)  
      static org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices getBoundServices​(java.lang.String serviceName, short servicePriority, int flowPriority, org.opendaylight.yangtools.yang.common.Uint64 cookie, java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)  
      @NonNull java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getEgressActionsForInterface​(java.lang.String ifName, @Nullable java.lang.Long tunnelKey)
      Returns the list of Actions to be taken when sending the packet through an Elan interface.
      static @Nullable Elan getElanByName​(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String elanInstanceName)  
      static @Nullable Elan getElanByName​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx, java.lang.String elanInstanceName)  
      @NonNull java.util.List<DpnInterfaces> getElanDPNByName​(java.lang.String elanInstanceName)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnInterfaces> getElanDpnInterfaceOperationalDataPath​(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpId)
      Returns the InstanceIdentifier that points to the Interfaces of an Elan in a given DPN in the Operational DS.
      @Nullable ElanDpnInterfaces getElanDpnInterfacesList()  
      @Nullable ElanDpnInterfacesList getElanDpnInterfacesList​(java.lang.String elanName)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanDpnInterfacesList> getElanDpnOperationDataPath​(java.lang.String elanInstanceName)  
      @Nullable ElanTagName getElanInfoByElanTag​(org.opendaylight.yangtools.yang.common.Uint32 elanTag)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanTagName> getElanInfoEntriesOperationalDataPath​(org.opendaylight.yangtools.yang.common.Uint32 elanTag)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Elan> getElanInstanceOperationalDataPath​(java.lang.String elanInstanceName)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanInterface> getElanInterfaceConfigurationDataPathId​(java.lang.String interfaceName)  
      @Nullable DpnInterfaces getElanInterfaceInfoByElanDpn​(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpId)
      Returns the list of Interfaces that belong to an Elan on an specific DPN.
      static java.lang.String getElanInterfaceJobKey​(java.lang.String interfaceName)  
      ElanInterfaceMac getElanInterfaceMacByInterfaceName​(java.lang.String interfaceName)  
      static @Nullable ElanInterfaceMac getElanInterfaceMacByInterfaceName​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, java.lang.String interfaceName)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanInterfaceMac> getElanInterfaceMacEntriesOperationalDataPath​(java.lang.String interfaceName)  
      static long getElanLocalBCGId​(long elanTag)  
      java.util.List<MacEntry> getElanMacEntries​(java.lang.String elanName)  
      @Nullable MacTable getElanMacTable​(java.lang.String elanName)
      Gets the elan mac table.
      static @Nullable MacTable getElanMacTable​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, java.lang.String elanName)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacTable> getElanMacTableOperationalDataPath​(java.lang.String elanName)  
      static org.opendaylight.yangtools.yang.common.Uint64 getElanMetadataLabel​(long elanTag, boolean isSHFlagSet)  
      static long getElanRemoteBCGId​(long elanTag)  
      static long getElanRemoteBroadCastGroupID​(long elanTag)  
      static java.lang.String getElanServiceName​(java.lang.String elanName, java.lang.String interfaceName)  
      static long getEtreeLeafLocalBCGId​(long etreeLeafTag)  
      static long getEtreeLeafRemoteBCGId​(long etreeLeafTag)  
      @Nullable java.lang.String getExternalElanInterface​(java.lang.String elanInstanceName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)  
      @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel getExternalTunnel​(java.lang.String sourceDevice, java.lang.String destinationDevice, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
      Gets the external tunnel.
      @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel getExternalTunnel​(java.lang.String interfaceName, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
      Gets the external tunnel.
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> getFlowIid​(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow, org.opendaylight.yangtools.yang.common.Uint64 dpnId)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group> getGroupInstanceid​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, long groupId)  
      java.util.Map<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey,​org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getInstructionsInPortForOutGroup​(java.lang.String ifName)
      Constructs the Instructions that take the packet over a given interface.
      java.util.Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._if.indexes._interface.map.IfIndexInterface> getInterfaceInfoByInterfaceTag​(org.opendaylight.yangtools.yang.common.Uint32 interfaceTag)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._if.indexes._interface.map.IfIndexInterface> getInterfaceInfoEntriesOperationalDataPath​(org.opendaylight.yangtools.yang.common.Uint32 interfaceTag)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> getInterfaceMacEntriesIdentifierOperationalDataPath​(java.lang.String interfaceName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)  
      @Nullable MacEntry getInterfaceMacEntriesOperationalDataPath​(java.lang.String interfaceName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)  
      @Nullable MacEntry getInterfaceMacEntriesOperationalDataPathFromId​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> identifier)  
      static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface getInterfaceStateFromOperDS​(java.lang.String interfaceName, org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
      Gets the interface state from operational ds.
      static java.lang.String getIntTunnelTableFlowRef​(short tableId, int elanTag)
      Constructs the FlowName for flows installed in the Internal Tunnel Table, consisting in tableId + elanTag.
      @NonNull java.util.List<DpnInterfaces> getInvolvedDpnsInElan​(java.lang.String elanName)  
      static java.lang.String getKnownDynamicmacFlowRef​(short elanDmacTable, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String extDeviceNodeId, java.lang.String dstMacAddress, long elanTag, boolean shFlag)  
      static java.lang.String getKnownDynamicmacFlowRef​(org.opendaylight.yangtools.yang.common.Uint32 elanTag, java.lang.String macAddress)  
      java.util.Optional<MacEntry> getMacEntryForElanInstance​(java.lang.String elanName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)  
      java.util.Optional<MacEntry> getMacEntryForElanInstance​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx, java.lang.String elanName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)  
      @Nullable MacEntry getMacEntryFromElanMacId​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> identifier)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> getMacEntryOperationalDataPath​(java.lang.String elanName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)  
      @NonNull java.util.List<org.opendaylight.yangtools.yang.common.Uint64> getParticipatingDpnsInElanInstance​(java.lang.String elanInstanceName)
      This method is useful get all ELAN participating CSS dpIds to install program remote dmac entries and updating remote bc groups for tor integration.
      static java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> getPhysAddress​(java.util.List<java.lang.String> macAddress)  
      static @Nullable java.lang.String getRouterPordIdFromElanInstance​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, java.lang.String elanInstanceName)  
      java.util.Optional<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> getSourceIpAddress​(org.opendaylight.genius.mdsalutil.packet.Ethernet ethernet)  
      static java.util.List<StaticMacEntries> getStaticMacEntries​(java.util.List<java.lang.String> staticMacAddresses)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<StaticMacEntries> getStaticMacEntriesCfgDataPathIdentifier​(java.lang.String interfaceName, java.lang.String macAddress)  
      static java.util.List<org.opendaylight.genius.mdsalutil.MatchInfo> getTunnelIdMatchForFilterEqualsLPortTag​(int lportTag)
      Constructs the Matches that checks that the tunnel_id field contains a specific lportTag.
      static java.util.List<org.opendaylight.genius.mdsalutil.MatchInfo> getTunnelMatchesForServiceId​(org.opendaylight.yangtools.yang.common.Uint32 elanTag)  
      static org.opendaylight.yangtools.yang.common.Uint32 getVxlanSegmentationId​(ElanInstance elanInstance)  
      boolean isDpnPresent​(org.opendaylight.yangtools.yang.common.Uint64 dpnId)  
      static boolean isEmpty​(java.util.Collection collection)  
      static boolean isFlat​(ElanInstance elanInstance)  
      static boolean isInterfaceOperational​(java.lang.String interfaceName, org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
      Checks if is interface operational.
      static boolean isNotEmpty​(java.util.Collection collection)  
      java.lang.Boolean isOpenstackVniSemanticsEnforced()  
      boolean isTunnelInLogicalGroup​(java.lang.String interfaceName)  
      static boolean isVlan​(ElanInstance elanInstance)  
      static boolean isVxlan​(@Nullable ElanInstance elanInstance)  
      static boolean isVxlanNetworkOrVxlanSegment​(@Nullable ElanInstance elanInstance)  
      static org.opendaylight.infrautils.utils.concurrent.NamedSimpleReentrantLock.Acquired lockElanMacDPN​(long elanTag, java.lang.String macAddress, org.opendaylight.yangtools.yang.common.Uint64 dpnId)  
      static <T extends org.opendaylight.yangtools.yang.binding.DataObject>
      java.util.Optional<T>
      read​(@NonNull org.opendaylight.mdsal.binding.api.DataBroker broker, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
      Deprecated.
      Consider using read2(LogicalDatastoreType, InstanceIdentifier) with proper exception handling instead
      <T extends org.opendaylight.yangtools.yang.binding.DataObject>
      java.util.Optional<T>
      read2​(org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)  
      static void releaseId​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, java.lang.String poolName, java.lang.String idKey)  
      void removeArpResponderFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String ingressInterfaceName, java.lang.String ipAddress, int lportTag)  
      void removeDmacRedirectToDispatcherFlows​(org.opendaylight.yangtools.yang.common.Uint32 elanTag, java.lang.String macAddress, java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpnIds)  
      void removeTerminatingServiceAction​(org.opendaylight.yangtools.yang.common.Uint64 destDpId, int serviceId)  
      static org.opendaylight.yangtools.yang.common.Uint32 retrieveNewElanTag​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, java.lang.String idKey)
      Uses the IdManager to retrieve a brand new ElanTag.
      static java.util.List<com.google.common.util.concurrent.ListenableFuture<?>> returnFailedListenableFutureIfTransactionCommitFailedExceptionCauseOrElseThrow​(java.lang.RuntimeException exception)  
      void setupDMacFlowOnRemoteDpn​(ElanInstance elanInfo, org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, org.opendaylight.yangtools.yang.common.Uint64 dstDpId, java.lang.String macAddress, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowTx)  
      void setupMacFlows​(ElanInstance elanInfo, org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, long macTimeout, java.lang.String macAddress, boolean configureRemoteFlows, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowGroupTx)
      Setting SMAC, DMAC, UDMAC in this DPN and optionally in other DPNs.
      void setupRemoteDmacFlow​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId, org.opendaylight.yangtools.yang.common.Uint64 destDpId, int lportTag, org.opendaylight.yangtools.yang.common.Uint32 elanTag, java.lang.String macAddress, java.lang.String displayName, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowGroupTx, java.lang.String interfaceName, ElanInstance elanInstance)  
      void setupTermDmacFlows​(org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalApiManager, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowGroupTx)
      Installs a Flow in INTERNAL_TUNNEL_TABLE of the affected DPN that sends the packet through the specified interface if the tunnel_id matches the interface's lportTag.
      void syncUpdateGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group newGroup, long delayTime, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)  
      static ElanInstance updateOperationalDataStore​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, ElanInstance elanInstanceAdded, java.util.List<java.lang.String> elanInterfaces, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> operTx)
      Updates the Elan information in the Operational DS.
      static com.google.common.util.concurrent.ListenableFuture<?> waitForTransactionToComplete​(com.google.common.util.concurrent.ListenableFuture<?> future)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_CALLBACK

        public static final com.google.common.util.concurrent.FutureCallback<org.opendaylight.mdsal.common.api.CommitInfo> DEFAULT_CALLBACK
    • Constructor Detail

      • ElanUtils

        @Inject
        public ElanUtils​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                         org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
                         org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService,
                         org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
                         ElanConfig elanConfig,
                         org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
                         ElanEtreeUtils elanEtreeUtils,
                         ElanItmUtils elanItmUtils,
                         ElanInterfaceCache elanInterfaceCache,
                         org.opendaylight.genius.itm.api.IITMProvider iitmProvider,
                         ElanGroupCache elanGroupCache)
    • Method Detail

      • isOpenstackVniSemanticsEnforced

        public final java.lang.Boolean isOpenstackVniSemanticsEnforced()
      • retrieveNewElanTag

        public static org.opendaylight.yangtools.yang.common.Uint32 retrieveNewElanTag​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager,
                                                                                       java.lang.String idKey)
        Uses the IdManager to retrieve a brand new ElanTag.
        Parameters:
        idManager - the id manager
        idKey - the id key
        Returns:
        the integer
      • releaseId

        public static void releaseId​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager,
                                     java.lang.String poolName,
                                     java.lang.String idKey)
      • read

        @Deprecated
        public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> java.util.Optional<T> read​(@NonNull org.opendaylight.mdsal.binding.api.DataBroker broker,
                                                                                                                org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType,
                                                                                                                org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
        Deprecated.
        Consider using read2(LogicalDatastoreType, InstanceIdentifier) with proper exception handling instead
        Read utility.
        Type Parameters:
        T - T extends DataObject
        Parameters:
        broker - dataBroker
        datastoreType - Logical DataStore type
        path - IID to read
        Returns:
        the read value T
      • read2

        public <T extends org.opendaylight.yangtools.yang.binding.DataObject> java.util.Optional<T> read2​(org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType,
                                                                                                          org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
                                                                                                   throws java.lang.InterruptedException,
                                                                                                          java.util.concurrent.ExecutionException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • delete

        public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> void delete​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                                                                                 org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType,
                                                                                                 org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
      • getElanInterfaceConfigurationDataPathId

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanInterface> getElanInterfaceConfigurationDataPathId​(java.lang.String interfaceName)
      • getElanByName

        public static @Nullable Elan getElanByName​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                                   java.lang.String elanInstanceName)
      • getElanByName

        public static @Nullable Elan getElanByName​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx,
                                                   java.lang.String elanInstanceName)
                                            throws java.util.concurrent.ExecutionException,
                                                   java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • getElanInstanceOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Elan> getElanInstanceOperationalDataPath​(java.lang.String elanInstanceName)
      • getInterfaceMacEntriesOperationalDataPath

        public @Nullable MacEntry getInterfaceMacEntriesOperationalDataPath​(java.lang.String interfaceName,
                                                                            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)
      • getInterfaceMacEntriesOperationalDataPathFromId

        public @Nullable MacEntry getInterfaceMacEntriesOperationalDataPathFromId​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx,
                                                                                  org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> identifier)
                                                                           throws java.util.concurrent.ExecutionException,
                                                                                  java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • getInterfaceMacEntriesIdentifierOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> getInterfaceMacEntriesIdentifierOperationalDataPath​(java.lang.String interfaceName,
                                                                                                                                               org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)
      • getMacEntryForElanInstance

        public java.util.Optional<MacEntry> getMacEntryForElanInstance​(java.lang.String elanName,
                                                                       org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)
      • getMacEntryForElanInstance

        public java.util.Optional<MacEntry> getMacEntryForElanInstance​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx,
                                                                       java.lang.String elanName,
                                                                       org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)
                                                                throws java.util.concurrent.ExecutionException,
                                                                       java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • getMacEntryFromElanMacId

        public @Nullable MacEntry getMacEntryFromElanMacId​(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> tx,
                                                           org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> identifier)
                                                    throws java.util.concurrent.ExecutionException,
                                                           java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • getMacEntryOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacEntry> getMacEntryOperationalDataPath​(java.lang.String elanName,
                                                                                                                          org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress physAddress)
      • getElanMacTableOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<MacTable> getElanMacTableOperationalDataPath​(java.lang.String elanName)
      • getElanInterfaceMacByInterfaceName

        public ElanInterfaceMac getElanInterfaceMacByInterfaceName​(java.lang.String interfaceName)
      • getElanInterfaceMacByInterfaceName

        public static @Nullable ElanInterfaceMac getElanInterfaceMacByInterfaceName​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                                                                                    java.lang.String interfaceName)
      • getElanInterfaceMacEntriesOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanInterfaceMac> getElanInterfaceMacEntriesOperationalDataPath​(java.lang.String interfaceName)
      • getElanInterfaceInfoByElanDpn

        public @Nullable DpnInterfaces getElanInterfaceInfoByElanDpn​(java.lang.String elanInstanceName,
                                                                     org.opendaylight.yangtools.yang.common.Uint64 dpId)
        Returns the list of Interfaces that belong to an Elan on an specific DPN. Data retrieved from Elan's operational DS: elan-dpn-interfaces container.
        Parameters:
        elanInstanceName - name of the Elan to which the interfaces must belong to
        dpId - Id of the DPN where the interfaces are located
        Returns:
        the elan interface Info
      • getElanDpnInterfaceOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnInterfaces> getElanDpnInterfaceOperationalDataPath​(java.lang.String elanInstanceName,
                                                                                                                                       org.opendaylight.yangtools.yang.common.Uint64 dpId)
        Returns the InstanceIdentifier that points to the Interfaces of an Elan in a given DPN in the Operational DS. Data retrieved from Elans's operational DS: dpn-interfaces list
        Parameters:
        elanInstanceName - name of the Elan to which the interfaces must belong to
        dpId - Id of the DPN where the interfaces are located
        Returns:
        the elan dpn interface
      • getElanInfoByElanTag

        public @Nullable ElanTagName getElanInfoByElanTag​(org.opendaylight.yangtools.yang.common.Uint32 elanTag)
      • getElanInfoEntriesOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanTagName> getElanInfoEntriesOperationalDataPath​(org.opendaylight.yangtools.yang.common.Uint32 elanTag)
      • getInterfaceInfoByInterfaceTag

        public java.util.Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._if.indexes._interface.map.IfIndexInterface> getInterfaceInfoByInterfaceTag​(org.opendaylight.yangtools.yang.common.Uint32 interfaceTag)
      • getInterfaceInfoEntriesOperationalDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._if.indexes._interface.map.IfIndexInterface> getInterfaceInfoEntriesOperationalDataPath​(org.opendaylight.yangtools.yang.common.Uint32 interfaceTag)
      • getElanDpnOperationDataPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ElanDpnInterfacesList> getElanDpnOperationDataPath​(java.lang.String elanInstanceName)
      • getElanDpnInterfacesList

        public @Nullable ElanDpnInterfacesList getElanDpnInterfacesList​(java.lang.String elanName)
      • getElanDpnInterfacesList

        public @Nullable ElanDpnInterfaces getElanDpnInterfacesList()
      • getParticipatingDpnsInElanInstance

        public @NonNull java.util.List<org.opendaylight.yangtools.yang.common.Uint64> getParticipatingDpnsInElanInstance​(java.lang.String elanInstanceName)
        This method is useful get all ELAN participating CSS dpIds to install program remote dmac entries and updating remote bc groups for tor integration.
        Parameters:
        elanInstanceName - the elan instance name
        Returns:
        list of dpIds
      • getElanRemoteBroadCastGroupID

        public static long getElanRemoteBroadCastGroupID​(long elanTag)
      • getElanMacTable

        public @Nullable MacTable getElanMacTable​(java.lang.String elanName)
        Gets the elan mac table.
        Parameters:
        elanName - the elan name
        Returns:
        the elan mac table
      • getElanMacTable

        public static @Nullable MacTable getElanMacTable​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                                                         java.lang.String elanName)
      • getElanLocalBCGId

        public static long getElanLocalBCGId​(long elanTag)
      • getElanRemoteBCGId

        public static long getElanRemoteBCGId​(long elanTag)
      • getEtreeLeafLocalBCGId

        public static long getEtreeLeafLocalBCGId​(long etreeLeafTag)
      • getEtreeLeafRemoteBCGId

        public static long getEtreeLeafRemoteBCGId​(long etreeLeafTag)
      • getElanMetadataLabel

        public static org.opendaylight.yangtools.yang.common.Uint64 getElanMetadataLabel​(long elanTag,
                                                                                         boolean isSHFlagSet)
      • setupMacFlows

        public void setupMacFlows​(ElanInstance elanInfo,
                                  org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                  long macTimeout,
                                  java.lang.String macAddress,
                                  boolean configureRemoteFlows,
                                  org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowGroupTx)
        Setting SMAC, DMAC, UDMAC in this DPN and optionally in other DPNs.
        Parameters:
        elanInfo - the elan info
        interfaceInfo - the interface info
        macTimeout - the mac timeout
        macAddress - the mac address
        configureRemoteFlows - true if remote dmac flows should be configured as well
        writeFlowGroupTx - the flow group tx
      • setupDMacFlowOnRemoteDpn

        public void setupDMacFlowOnRemoteDpn​(ElanInstance elanInfo,
                                             org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                             org.opendaylight.yangtools.yang.common.Uint64 dstDpId,
                                             java.lang.String macAddress,
                                             org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowTx)
      • buildKnownSmacFlow

        public org.opendaylight.genius.mdsalutil.FlowEntity buildKnownSmacFlow​(ElanInstance elanInfo,
                                                                               org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                                                               long macTimeout,
                                                                               java.lang.String macAddress)
      • setupTermDmacFlows

        public void setupTermDmacFlows​(org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                       org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalApiManager,
                                       org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowGroupTx)
        Installs a Flow in INTERNAL_TUNNEL_TABLE of the affected DPN that sends the packet through the specified interface if the tunnel_id matches the interface's lportTag.
        Parameters:
        interfaceInfo - the interface info
        mdsalApiManager - the mdsal API manager
        writeFlowGroupTx - the writeFLowGroup tx
      • getIntTunnelTableFlowRef

        public static java.lang.String getIntTunnelTableFlowRef​(short tableId,
                                                                int elanTag)
        Constructs the FlowName for flows installed in the Internal Tunnel Table, consisting in tableId + elanTag.
        Parameters:
        tableId - table Id
        elanTag - elan Tag
        Returns:
        the Internal tunnel
      • getTunnelIdMatchForFilterEqualsLPortTag

        public static java.util.List<org.opendaylight.genius.mdsalutil.MatchInfo> getTunnelIdMatchForFilterEqualsLPortTag​(int lportTag)
        Constructs the Matches that checks that the tunnel_id field contains a specific lportTag.
        Parameters:
        lportTag - lportTag that must be checked against the tunnel_id field
        Returns:
        the list of match Info
      • getInstructionsInPortForOutGroup

        public java.util.Map<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey,​org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> getInstructionsInPortForOutGroup​(java.lang.String ifName)
        Constructs the Instructions that take the packet over a given interface.
        Parameters:
        ifName - Name of the interface where the packet must be sent over. It can be a local interface or a tunnel interface (internal or external)
        Returns:
        the Instruction
      • getEgressActionsForInterface

        public @NonNull java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> getEgressActionsForInterface​(java.lang.String ifName,
                                                                                                                                                             @Nullable java.lang.Long tunnelKey)
        Returns the list of Actions to be taken when sending the packet through an Elan interface. Note that this interface can refer to an ElanInterface where the Elan VM is attached to a DPN or an ITM tunnel interface where Elan traffic can be sent through. In this latter case, the tunnelKey is mandatory and it can hold serviceId for internal tunnels or the VNI for external tunnels.
        Parameters:
        ifName - the if name
        tunnelKey - the tunnel key
        Returns:
        the egress actions for interface
      • getInvolvedDpnsInElan

        public @NonNull java.util.List<DpnInterfaces> getInvolvedDpnsInElan​(java.lang.String elanName)
      • getElanDPNByName

        public @NonNull java.util.List<DpnInterfaces> getElanDPNByName​(java.lang.String elanInstanceName)
      • getKnownDynamicmacFlowRef

        public static java.lang.String getKnownDynamicmacFlowRef​(org.opendaylight.yangtools.yang.common.Uint32 elanTag,
                                                                 java.lang.String macAddress)
      • getKnownDynamicmacFlowRef

        public static java.lang.String getKnownDynamicmacFlowRef​(short elanDmacTable,
                                                                 org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                                                 java.lang.String extDeviceNodeId,
                                                                 java.lang.String dstMacAddress,
                                                                 long elanTag,
                                                                 boolean shFlag)
      • buildLocalDmacFlowEntry

        public org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow buildLocalDmacFlowEntry​(org.opendaylight.yangtools.yang.common.Uint32 elanTag,
                                                                                                                                org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                                                                                                                java.lang.String ifName,
                                                                                                                                java.lang.String macAddress,
                                                                                                                                ElanInstance elanInfo,
                                                                                                                                long ifTag)
        Builds the flow to be programmed in the DMAC table of the local DPN (that is, where the MAC is attached to). This flow consists in:

        Match: + elanTag in metadata + packet goes to a MAC locally attached Actions: + optionally, pop-vlan + set-vlan-id + output to ifName's portNumber

        Parameters:
        elanTag - the elan tag
        dpId - the dp id
        ifName - the if name
        macAddress - the mac address
        elanInfo - the elan info
        ifTag - the if tag
        Returns:
        the flow
      • setupRemoteDmacFlow

        public void setupRemoteDmacFlow​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId,
                                        org.opendaylight.yangtools.yang.common.Uint64 destDpId,
                                        int lportTag,
                                        org.opendaylight.yangtools.yang.common.Uint32 elanTag,
                                        java.lang.String macAddress,
                                        java.lang.String displayName,
                                        org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> writeFlowGroupTx,
                                        java.lang.String interfaceName,
                                        ElanInstance elanInstance)
      • buildRemoteDmacFlowEntry

        public org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow buildRemoteDmacFlowEntry​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId,
                                                                                                                                 org.opendaylight.yangtools.yang.common.Uint64 destDpId,
                                                                                                                                 long lportTagOrVni,
                                                                                                                                 org.opendaylight.yangtools.yang.common.Uint32 elanTag,
                                                                                                                                 java.lang.String macAddress,
                                                                                                                                 java.lang.String displayName,
                                                                                                                                 ElanInstance elanInstance)
        Builds a Flow to be programmed in a remote DPN's DMAC table. This flow consists in: Match: + elanTag in packet's metadata + packet going to a MAC known to be located in another DPN Actions: + set_tunnel_id + output ITM internal tunnel interface with the other DPN
        Parameters:
        srcDpId - the src Dpn Id
        destDpId - dest Dp Id
        lportTagOrVni - lportTag or network VNI
        elanTag - elan Tag
        macAddress - macAddress
        displayName - display Name
        elanInstance - elanInstance
        Returns:
        the flow remote Dmac
      • deleteMacFlows

        public void deleteMacFlows​(@Nullable ElanInstance elanInfo,
                                   @Nullable org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                   MacEntry macEntry,
                                   org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> flowTx)
                            throws java.util.concurrent.ExecutionException,
                                   java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • deleteMacFlows

        public void deleteMacFlows​(ElanInstance elanInfo,
                                   org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                   java.lang.String macAddress,
                                   boolean deleteSmac,
                                   org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> flowTx)
                            throws java.util.concurrent.ExecutionException,
                                   java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • deleteSmacFlowOnly

        public void deleteSmacFlowOnly​(ElanInstance elanInfo,
                                       org.opendaylight.genius.interfacemanager.globals.InterfaceInfo interfaceInfo,
                                       java.lang.String macAddress,
                                       org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> flowTx)
                                throws java.util.concurrent.ExecutionException,
                                       java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • updateOperationalDataStore

        public static ElanInstance updateOperationalDataStore​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager,
                                                              ElanInstance elanInstanceAdded,
                                                              java.util.List<java.lang.String> elanInterfaces,
                                                              org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx,
                                                              org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> operTx)
        Updates the Elan information in the Operational DS. It also updates the ElanInstance in the Config DS by setting the adquired elanTag.
        Parameters:
        idManager - the id manager
        elanInstanceAdded - the elan instance added
        elanInterfaces - the elan interfaces
        operTx - transaction
        Returns:
        the updated ELAN instance.
      • isDpnPresent

        public boolean isDpnPresent​(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • getElanServiceName

        public static java.lang.String getElanServiceName​(java.lang.String elanName,
                                                          java.lang.String interfaceName)
      • getBoundServices

        public static org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices getBoundServices​(java.lang.String serviceName,
                                                                                                                                                                                   short servicePriority,
                                                                                                                                                                                   int flowPriority,
                                                                                                                                                                                   org.opendaylight.yangtools.yang.common.Uint64 cookie,
                                                                                                                                                                                   java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> instructions)
      • buildServiceId

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices> buildServiceId​(java.lang.String interfaceName,
                                                                                                                                                                                                                                             short serviceIndex)
      • getTunnelMatchesForServiceId

        public static java.util.List<org.opendaylight.genius.mdsalutil.MatchInfo> getTunnelMatchesForServiceId​(org.opendaylight.yangtools.yang.common.Uint32 elanTag)
      • removeTerminatingServiceAction

        public void removeTerminatingServiceAction​(org.opendaylight.yangtools.yang.common.Uint64 destDpId,
                                                   int serviceId)
      • getExternalTunnel

        public @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel getExternalTunnel​(java.lang.String sourceDevice,
                                                                                                                                                     java.lang.String destinationDevice,
                                                                                                                                                     org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
        Gets the external tunnel.
        Parameters:
        sourceDevice - the source device
        destinationDevice - the destination device
        datastoreType - the datastore type
        Returns:
        the external tunnel
      • getExternalTunnel

        public @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel getExternalTunnel​(java.lang.String interfaceName,
                                                                                                                                                     org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
        Gets the external tunnel.
        Parameters:
        interfaceName - the interface name
        datastoreType - the datastore type
        Returns:
        the external tunnel
      • getAllExternalTunnels

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel> getAllExternalTunnels​(org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
        Gets the all external tunnels.
        Parameters:
        datastoreType - the data store type
        Returns:
        the all external tunnels
      • buildMatchesForElanTagShFlagAndDstMac

        public static java.util.List<org.opendaylight.genius.mdsalutil.MatchInfo> buildMatchesForElanTagShFlagAndDstMac​(long elanTag,
                                                                                                                        boolean shFlag,
                                                                                                                        java.lang.String macAddr)
      • isInterfaceOperational

        public static boolean isInterfaceOperational​(java.lang.String interfaceName,
                                                     org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
        Checks if is interface operational.
        Parameters:
        interfaceName - the interface name
        dataBroker - the data broker
        Returns:
        true, if is interface operational
      • getInterfaceStateFromOperDS

        public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface getInterfaceStateFromOperDS​(java.lang.String interfaceName,
                                                                                                                                                                          org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
        Gets the interface state from operational ds.
        Parameters:
        interfaceName - the interface name
        dataBroker - the data broker
        Returns:
        the interface state from oper ds
      • createInterfaceStateInstanceIdentifier

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface> createInterfaceStateInstanceIdentifier​(java.lang.String interfaceName)
        Creates the interface state instance identifier.
        Parameters:
        interfaceName - the interface name
        Returns:
        the instance identifier
      • waitForTransactionToComplete

        @CheckReturnValue
        public static com.google.common.util.concurrent.ListenableFuture<?> waitForTransactionToComplete​(com.google.common.util.concurrent.ListenableFuture<?> future)
      • isVxlan

        public static boolean isVxlan​(@Nullable ElanInstance elanInstance)
      • isVxlanNetworkOrVxlanSegment

        public static boolean isVxlanNetworkOrVxlanSegment​(@Nullable ElanInstance elanInstance)
      • getVxlanSegmentationId

        public static org.opendaylight.yangtools.yang.common.Uint32 getVxlanSegmentationId​(ElanInstance elanInstance)
      • isVlan

        public static boolean isVlan​(ElanInstance elanInstance)
      • isFlat

        public static boolean isFlat​(ElanInstance elanInstance)
      • addDmacRedirectToDispatcherFlows

        public void addDmacRedirectToDispatcherFlows​(org.opendaylight.yangtools.yang.common.Uint32 elanTag,
                                                     java.lang.String displayName,
                                                     java.lang.String macAddress,
                                                     java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpnIds)
      • removeDmacRedirectToDispatcherFlows

        public void removeDmacRedirectToDispatcherFlows​(org.opendaylight.yangtools.yang.common.Uint32 elanTag,
                                                        java.lang.String macAddress,
                                                        java.util.List<org.opendaylight.yangtools.yang.common.Uint64> dpnIds)
      • buildDmacRedirectToDispatcherFlow

        public static org.opendaylight.genius.mdsalutil.FlowEntity buildDmacRedirectToDispatcherFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                                                                                     java.lang.String dstMacAddress,
                                                                                                     java.lang.String displayName,
                                                                                                     org.opendaylight.yangtools.yang.common.Uint32 elanTag)
      • getExternalElanInterface

        public @Nullable java.lang.String getExternalElanInterface​(java.lang.String elanInstanceName,
                                                                   org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • lockElanMacDPN

        public static org.opendaylight.infrautils.utils.concurrent.NamedSimpleReentrantLock.Acquired lockElanMacDPN​(long elanTag,
                                                                                                                    java.lang.String macAddress,
                                                                                                                    org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • returnFailedListenableFutureIfTransactionCommitFailedExceptionCauseOrElseThrow

        public static java.util.List<com.google.common.util.concurrent.ListenableFuture<?>> returnFailedListenableFutureIfTransactionCommitFailedExceptionCauseOrElseThrow​(java.lang.RuntimeException exception)
      • getPhysAddress

        public static java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> getPhysAddress​(java.util.List<java.lang.String> macAddress)
      • getStaticMacEntries

        public static java.util.List<StaticMacEntries> getStaticMacEntries​(java.util.List<java.lang.String> staticMacAddresses)
      • getStaticMacEntriesCfgDataPathIdentifier

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<StaticMacEntries> getStaticMacEntriesCfgDataPathIdentifier​(java.lang.String interfaceName,
                                                                                                                                            java.lang.String macAddress)
      • diffOf

        public static <T> java.util.List<T> diffOf​(java.util.List<T> orig,
                                                   java.util.List<T> updated)
      • isEmpty

        public static boolean isEmpty​(java.util.Collection collection)
      • isNotEmpty

        public static boolean isNotEmpty​(java.util.Collection collection)
      • getSourceIpAddress

        public java.util.Optional<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress> getSourceIpAddress​(org.opendaylight.genius.mdsalutil.packet.Ethernet ethernet)
      • getElanMacEntries

        public java.util.List<MacEntry> getElanMacEntries​(java.lang.String elanName)
      • isTunnelInLogicalGroup

        public boolean isTunnelInLogicalGroup​(java.lang.String interfaceName)
      • getFlowIid

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> getFlowIid​(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow,
                                                                                                                                                                                      org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • getElanInterfaceJobKey

        public static java.lang.String getElanInterfaceJobKey​(java.lang.String interfaceName)
      • removeArpResponderFlow

        public void removeArpResponderFlow​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                           java.lang.String ingressInterfaceName,
                                           java.lang.String ipAddress,
                                           int lportTag)
      • getRouterPordIdFromElanInstance

        public static @Nullable java.lang.String getRouterPordIdFromElanInstance​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                                                                                 java.lang.String elanInstanceName)
      • buildDpnNode

        protected org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node buildDpnNode​(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • syncUpdateGroup

        public void syncUpdateGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                    org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group newGroup,
                                    long delayTime,
                                    org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
      • getGroupInstanceid

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group> getGroupInstanceid​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                                                                                      long groupId)
      • getBcGroupUpdateKey

        public static java.lang.String getBcGroupUpdateKey​(java.lang.String elanName)