Class ElanL2GatewayMulticastUtils


  • @Singleton
    public class ElanL2GatewayMulticastUtils
    extends java.lang.Object
    The utility class to handle ELAN L2 Gateway related to multicast.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ExternalTeps> buildExternalTepPath​(java.lang.String elan, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tepIp)  
      protected ExternalTeps buildExternalTeps​(L2GatewayDevice device)  
      com.google.common.util.concurrent.ListenableFuture<?> deleteRemoteMcastMac​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName)
      Delete remote mcast mac from Hwvtep node.
      DesignatedSwitchForTunnel getDesignatedSwitchForExternalTunnel​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp, java.lang.String elanInstanceName)
      Gets the designated switch for external tunnel.
      org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager getInterfaceManager()  
      @NonNull java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBuckets​(ElanInstance elanInfo, @Nullable DpnInterfaces dpnInterfaces, org.opendaylight.yangtools.yang.common.Uint64 dpnId, int bucketId, long elanTag)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBucketsOfElanExternalTeps​(ElanInstance elanInfo, org.opendaylight.yangtools.yang.common.Uint64 dpnId, int bucketId)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBucketsOfElanL2GwDevices​(ElanInstance elanInfo, org.opendaylight.yangtools.yang.common.Uint64 dpnId, int bucketId)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBucketsOfL2gwDevices​(ElanInstance elanInfo, org.opendaylight.yangtools.yang.common.Uint64 dpnId, int bucketId)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupTunnelBuckets​(ElanDpnInterfacesList elanDpns, org.opendaylight.yangtools.yang.common.Uint64 dpnId, int bucketId, long elanTagOrVni)  
      org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getTepIpOfDesignatedSwitchForExternalTunnel​(L2GatewayDevice l2GwDevice, java.lang.String elanInstanceName)
      Gets the tep ip of designated switch for external tunnel.
      void init()  
      com.google.common.util.concurrent.ListenableFuture<java.lang.Void> prepareRemoteMcastMacUpdateOnDevice​(java.lang.String elanName, L2GatewayDevice dstDevice, boolean addCase, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress removedDstTep)  
      void setupElanBroadcastGroups​(ElanInstance elanInfo, DpnInterfaces dpnInterfaces, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)  
      void setupElanBroadcastGroups​(ElanInstance elanInfo, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)  
      void setupLeavesEtreeBroadcastGroups​(ElanInstance elanInfo, @Nullable DpnInterfaces dpnInterfaces, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)  
      void setupStandardElanBroadcastGroups​(ElanInstance elanInfo, @Nullable DpnInterfaces dpnInterfaces, org.opendaylight.yangtools.yang.common.Uint64 dpnId, boolean createCase, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)  
      void setupStandardElanBroadcastGroups​(ElanInstance elanInfo, DpnInterfaces dpnInterfaces, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)  
      java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> updateMcastMacsForAllElanDevices​(java.lang.String elanName, L2GatewayDevice device, boolean createCase)
      Update mcast macs for this elan.
      void updateRemoteBroadcastGroupForAllElanDpns​(ElanInstance elanInfo, boolean createCase, org.opendaylight.yangtools.yang.common.Uint64 addedDpn)  
      void updateRemoteMcastMacOnElanL2GwDevice​(java.lang.String elanName, L2GatewayDevice device)
      Update remote mcast mac on elan l2 gw device.
      void updateRemoteMcastMacOnElanL2GwDevices​(java.lang.String elanName)
      Updates the remote mcast mac table for all the devices in this elan includes all the dpn tep ips and other devices tep ips in broadcast locator set.
      • Methods inherited from class java.lang.Object

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

      • ElanL2GatewayMulticastUtils

        @Inject
        public ElanL2GatewayMulticastUtils​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                           ElanItmUtils elanItmUtils,
                                           ElanUtils elanUtils,
                                           org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
                                           org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
                                           ConfigMcastCache configMcastCache,
                                           ElanInstanceDpnsCache elanInstanceDpnsCache,
                                           ElanRefUtil elanRefUtil,
                                           ElanClusterUtils elanClusterUtils,
                                           org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator,
                                           Scheduler scheduler)
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • buildExternalTepPath

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ExternalTeps> buildExternalTepPath​(java.lang.String elan,
                                                                                                                    org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tepIp)
      • getInterfaceManager

        public org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager getInterfaceManager()
      • updateRemoteMcastMacOnElanL2GwDevices

        public void updateRemoteMcastMacOnElanL2GwDevices​(java.lang.String elanName)
        Updates the remote mcast mac table for all the devices in this elan includes all the dpn tep ips and other devices tep ips in broadcast locator set.
        Parameters:
        elanName - the elan to be updated
      • updateRemoteMcastMacOnElanL2GwDevice

        public void updateRemoteMcastMacOnElanL2GwDevice​(java.lang.String elanName,
                                                         L2GatewayDevice device)
        Update remote mcast mac on elan l2 gw device.
        Parameters:
        elanName - the elan name
        device - the device
      • prepareRemoteMcastMacUpdateOnDevice

        public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> prepareRemoteMcastMacUpdateOnDevice​(java.lang.String elanName,
                                                                                                                      L2GatewayDevice dstDevice,
                                                                                                                      boolean addCase,
                                                                                                                      org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress removedDstTep)
      • updateMcastMacsForAllElanDevices

        public java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> updateMcastMacsForAllElanDevices​(java.lang.String elanName,
                                                                                                                                   L2GatewayDevice device,
                                                                                                                                   boolean createCase)
        Update mcast macs for this elan. for all dpns in this elan recompute and update broadcast group for all l2gw devices in this elan recompute and update remote mcast mac entry
        Parameters:
        elanName - the elan name
        device - the device
        createCase - the update this device
        Returns:
        the listenable future
      • updateRemoteBroadcastGroupForAllElanDpns

        public void updateRemoteBroadcastGroupForAllElanDpns​(ElanInstance elanInfo,
                                                             boolean createCase,
                                                             org.opendaylight.yangtools.yang.common.Uint64 addedDpn)
      • setupElanBroadcastGroups

        public void setupElanBroadcastGroups​(ElanInstance elanInfo,
                                             org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                             org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
      • setupElanBroadcastGroups

        public void setupElanBroadcastGroups​(ElanInstance elanInfo,
                                             DpnInterfaces dpnInterfaces,
                                             org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                             org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
      • setupStandardElanBroadcastGroups

        public void setupStandardElanBroadcastGroups​(ElanInstance elanInfo,
                                                     DpnInterfaces dpnInterfaces,
                                                     org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                     org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
      • setupStandardElanBroadcastGroups

        public void setupStandardElanBroadcastGroups​(ElanInstance elanInfo,
                                                     @Nullable DpnInterfaces dpnInterfaces,
                                                     org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                     boolean createCase,
                                                     org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
      • setupLeavesEtreeBroadcastGroups

        public void setupLeavesEtreeBroadcastGroups​(ElanInstance elanInfo,
                                                    @Nullable DpnInterfaces dpnInterfaces,
                                                    org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                    org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
      • getRemoteBCGroupBuckets

        public @NonNull java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBuckets​(ElanInstance elanInfo,
                                                                                                                                                         @Nullable DpnInterfaces dpnInterfaces,
                                                                                                                                                         org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                                                         int bucketId,
                                                                                                                                                         long elanTag)
      • getRemoteBCGroupBucketsOfElanL2GwDevices

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBucketsOfElanL2GwDevices​(ElanInstance elanInfo,
                                                                                                                                                                 org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                                                                 int bucketId)
      • getRemoteBCGroupBucketsOfElanExternalTeps

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBucketsOfElanExternalTeps​(ElanInstance elanInfo,
                                                                                                                                                                  org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                                                                  int bucketId)
      • getRemoteBCGroupBucketsOfL2gwDevices

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupBucketsOfL2gwDevices​(ElanInstance elanInfo,
                                                                                                                                                             org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                                                             int bucketId)
      • getRemoteBCGroupTunnelBuckets

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket> getRemoteBCGroupTunnelBuckets​(ElanDpnInterfacesList elanDpns,
                                                                                                                                                      org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                                                      int bucketId,
                                                                                                                                                      long elanTagOrVni)
      • deleteRemoteMcastMac

        public com.google.common.util.concurrent.ListenableFuture<?> deleteRemoteMcastMac​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId,
                                                                                          java.lang.String logicalSwitchName)
        Delete remote mcast mac from Hwvtep node.
        Parameters:
        nodeId - the node id
        logicalSwitchName - the logical switch name
        Returns:
        the listenable future
      • getTepIpOfDesignatedSwitchForExternalTunnel

        public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress getTepIpOfDesignatedSwitchForExternalTunnel​(L2GatewayDevice l2GwDevice,
                                                                                                                                                        java.lang.String elanInstanceName)
        Gets the tep ip of designated switch for external tunnel.
        Parameters:
        l2GwDevice - the l2 gw device
        elanInstanceName - the elan instance name
        Returns:
        the tep ip of designated switch for external tunnel
      • getDesignatedSwitchForExternalTunnel

        public DesignatedSwitchForTunnel getDesignatedSwitchForExternalTunnel​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp,
                                                                              java.lang.String elanInstanceName)
        Gets the designated switch for external tunnel.
        Parameters:
        tunnelIp - the tunnel ip
        elanInstanceName - the elan instance name
        Returns:
        the designated switch for external tunnel