Class ElanL2GatewayUtils


  • @Singleton
    public class ElanL2GatewayUtils
    extends java.lang.Object
    It gathers a set of utility methods that handle ELAN configuration in external Devices (where external means "not-CSS". As of now: TORs).

    It makes use of HwvtepUtils class located under ovsdb/hwvtepsouthbound project for low-level mdsal operations

    Author:
    eperefr
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean areMLAGDevices​(L2GatewayDevice l2GatewayDevice, L2GatewayDevice otherL2GatewayDevice)
      Are MLAG devices.
      void cancelDeleteLogicalSwitch​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName)  
      static boolean checkIfPhyLocatorAlreadyExistsInRemoteMcastEntry​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs remoteMcastMac, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress expectedPhyLocatorIp)
      Check if phy locator already exists in remote mcast entry.
      void close()  
      static void createItmTunnels​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, java.lang.String hwvtepId, java.lang.String psName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp)  
      void deleteElanL2GwDevicesUcastLocalMacsFromDpn​(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      Delete elan l2 gateway devices ucast local macs from dpn.
      com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> deleteElanMacsFromL2GatewayDevice​(java.lang.String hwvtepNodeId, java.lang.String elanName)
      Delete elan macs from L2 gateway device.
      This includes deleting ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.
      void deleteL2GwDeviceUcastLocalMacsFromElan​(L2GatewayDevice l2GatewayDevice, java.lang.String elanName)
      Delete l2 gateway device ucast local macs from elan.
      Deletes macs from internal ELAN nodes and also on rest of external l2 gateway devices which are part of the ELAN.
      com.google.common.util.concurrent.ListenableFuture<java.lang.Void> deleteVlanBindingsFromL2GatewayDevice​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice, java.lang.Integer defaultVlanId)
      Delete vlan bindings from l2 gateway device.
      @Nullable org.opendaylight.yangtools.yang.common.Uint64 getDpidFromInterface​(java.lang.String interfaceName)
      Gets the dpid from interface.
      java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> getElanDpnMacsFromInterfaces​(java.util.Set<java.lang.String> lstElanInterfaceNames)
      gets the macs addresses for elan interfaces.
      @NonNull java.util.Collection<DpnInterfaces> getElanDpns​(java.lang.String elanName)  
      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs> getElanMacTableEntriesMacs​(java.lang.String elanName, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId, java.lang.String logicalSwitchName)
      Gets the elan mac table entries as remote ucast macs.
      static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface getInterfaceFromConfigDS​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey, org.opendaylight.mdsal.binding.api.DataBroker dataBroker)  
      static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> getInterfaceIdentifier​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey)  
      static java.lang.String getL2GatewayConnectionJobKey​(java.lang.String logicalSwitchName)
      Gets the l2 gateway connection job key.
      java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> getL2GwDeviceLocalMacs​(java.lang.String elanName, L2GatewayDevice l2gwDevice)
      Gets the l2 gw device local macs.
      void getL2GwDeviceLocalMacsAndRunCallback​(java.lang.String elanName, L2GatewayDevice l2gwDevice, java.util.function.Function<java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress>,​java.lang.Void> function)  
      long getLogicalSwitchDeleteDelaySecs()  
      static java.lang.String getLogicalSwitchFromElan​(java.lang.String elanName)
      Gets the logical switch name from elan name.
      static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs> getOtherDevicesMacs​(java.lang.String elanName, L2GatewayDevice l2GatewayDeviceToBeConfigured, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId, java.lang.String logicalSwitchName)
      Gets the l2 gateway devices ucast local macs as remote ucast macs.
      java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> getRemoteUcastMacs​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String logicalSwitch, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
      Gets the remote ucast macs from hwvtep node filtering based on logical switch.
      java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> installDmacFlowsOnDpn​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, L2GatewayDevice l2gwDevice, ElanInstance elan, java.lang.String interfaceName)
      Install dmac flows on dpn.
      void installElanL2gwDevicesLocalMacsInDpn​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, ElanInstance elan, java.lang.String interfaceName)
      Install elan l2gw devices local macs in dpn.
      com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> installElanMacsInL2GatewayDevice​(java.lang.String elanName, L2GatewayDevice l2GatewayDevice)
      Install ELAN macs in L2 Gateway device.
      This includes installing ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.
      void installL2gwDeviceMacsInDpn​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId l2gwDeviceNodeId, ElanInstance elan, java.lang.String interfaceName)
      Install external device local macs in dpn.
      void installL2GwUcastMacInElan​(ElanInstance elan, L2GatewayDevice extL2GwDevice, java.lang.String macToBeAdded, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs localUcastMacs, @Nullable java.lang.String interfaceName)  
      org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs readRemoteMcastMac​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
      Gets the remote mcast mac.
      com.google.common.util.concurrent.FluentFuture<?> removeMacsFromElanExternalDevices​(ElanInstance elanInstance, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> macAddresses)
      Removes the given MAC Addresses from all the External Devices belonging to the specified ELAN.
      void scheduleAddDpnMacInExtDevices​(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses)  
      void scheduleAddDpnMacsInExtDevice​(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses, L2GatewayDevice externalDevice)  
      void scheduleDeleteLogicalSwitch​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName)  
      void scheduleDeleteLogicalSwitch​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName, boolean clearUcast)  
      void unInstallL2GwUcastMacFromElanDpns​(ElanInstance elan, L2GatewayDevice l2GwDevice, java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
      Uninstall l2gw macs from other DPNs in the elan instance provided.
      void unInstallL2GwUcastMacFromL2gwDevices​(java.lang.String elanName, L2GatewayDevice l2GwDevice, java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
      Uninstall l2gw macs from other l2gw devices in the elanName provided.
      com.google.common.util.concurrent.ListenableFuture<java.lang.Void> updateVlanBindingsInL2GatewayDevice​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String psName, java.lang.String interfaceName, java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindings> vlanBindings)
      Update vlan bindings in l2 gateway device.
      com.google.common.util.concurrent.ListenableFuture<java.lang.Void> updateVlanBindingsInL2GatewayDevice​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice, java.lang.Integer defaultVlanId)
      Update vlan bindings in l2 gateway device.
      • Methods inherited from class java.lang.Object

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

      • ElanL2GatewayUtils

        @Inject
        public ElanL2GatewayUtils​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                  ElanDmacUtils elanDmacUtils,
                                  ElanItmUtils elanItmUtils,
                                  ElanClusterUtils elanClusterUtils,
                                  org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService,
                                  org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator,
                                  ElanUtils elanUtils,
                                  Scheduler scheduler,
                                  ElanConfig elanConfig,
                                  ElanInstanceCache elanInstanceCache,
                                  ElanInstanceDpnsCache elanInstanceDpnsCache)
    • Method Detail

      • close

        @PreDestroy
        public void close()
      • getLogicalSwitchDeleteDelaySecs

        public long getLogicalSwitchDeleteDelaySecs()
      • getElanDpnMacsFromInterfaces

        public java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> getElanDpnMacsFromInterfaces​(java.util.Set<java.lang.String> lstElanInterfaceNames)
        gets the macs addresses for elan interfaces.
        Parameters:
        lstElanInterfaceNames - the lst elan interface names
        Returns:
        the list
      • checkIfPhyLocatorAlreadyExistsInRemoteMcastEntry

        public static boolean checkIfPhyLocatorAlreadyExistsInRemoteMcastEntry​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId,
                                                                               org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs remoteMcastMac,
                                                                               org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress expectedPhyLocatorIp)
        Check if phy locator already exists in remote mcast entry.
        Parameters:
        nodeId - the node id
        remoteMcastMac - the remote mcast mac
        expectedPhyLocatorIp - the expected phy locator ip
        Returns:
        true, if successful
      • readRemoteMcastMac

        public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs readRemoteMcastMac​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId,
                                                                                                                                                                   java.lang.String logicalSwitchName,
                                                                                                                                                                   org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
        Gets the remote mcast mac.
        Parameters:
        nodeId - the node id
        logicalSwitchName - the logical switch name
        datastoreType - the datastore type
        Returns:
        the remote mcast mac
      • removeMacsFromElanExternalDevices

        public com.google.common.util.concurrent.FluentFuture<?> removeMacsFromElanExternalDevices​(ElanInstance elanInstance,
                                                                                                   java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> macAddresses)
        Removes the given MAC Addresses from all the External Devices belonging to the specified ELAN.
        Parameters:
        elanInstance - the elan instance
        macAddresses - the mac addresses
        Returns:
        Future which completes once the removal is done.
      • installL2gwDeviceMacsInDpn

        public void installL2gwDeviceMacsInDpn​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                               org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId l2gwDeviceNodeId,
                                               ElanInstance elan,
                                               java.lang.String interfaceName)
        Install external device local macs in dpn.
        Parameters:
        dpnId - the dpn id
        l2gwDeviceNodeId - the l2gw device node id
        elan - the elan
        interfaceName - the interface name
      • installDmacFlowsOnDpn

        public java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> installDmacFlowsOnDpn​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                                                                        L2GatewayDevice l2gwDevice,
                                                                                                                        ElanInstance elan,
                                                                                                                        java.lang.String interfaceName)
        Install dmac flows on dpn.
        Parameters:
        dpnId - the dpn id
        l2gwDevice - the l2gw device
        elan - the elan
        interfaceName - the interface name
      • installElanL2gwDevicesLocalMacsInDpn

        public void installElanL2gwDevicesLocalMacsInDpn​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                         ElanInstance elan,
                                                         java.lang.String interfaceName)
        Install elan l2gw devices local macs in dpn.
        Parameters:
        dpnId - the dpn id
        elan - the elan
        interfaceName - the interface name
      • installL2GwUcastMacInElan

        public void installL2GwUcastMacInElan​(ElanInstance elan,
                                              L2GatewayDevice extL2GwDevice,
                                              java.lang.String macToBeAdded,
                                              org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs localUcastMacs,
                                              @Nullable java.lang.String interfaceName)
      • unInstallL2GwUcastMacFromL2gwDevices

        public void unInstallL2GwUcastMacFromL2gwDevices​(java.lang.String elanName,
                                                         L2GatewayDevice l2GwDevice,
                                                         java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
        Uninstall l2gw macs from other l2gw devices in the elanName provided.
        Parameters:
        elanName - - Elan Name for which other l2gw devices will be scanned.
        l2GwDevice - - l2gwDevice whose macs are required to be cleared from other devices.
        macAddresses - - Mac address to be cleared.
      • unInstallL2GwUcastMacFromElanDpns

        public void unInstallL2GwUcastMacFromElanDpns​(ElanInstance elan,
                                                      L2GatewayDevice l2GwDevice,
                                                      java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
        Uninstall l2gw macs from other DPNs in the elan instance provided.
        Parameters:
        elan - - Elan Instance for which other DPNs will be scanned.
        l2GwDevice - - l2gwDevice whose macs are required to be cleared from other devices.
        macAddresses - - Mac address to be cleared.
      • deleteElanL2GwDevicesUcastLocalMacsFromDpn

        public void deleteElanL2GwDevicesUcastLocalMacsFromDpn​(java.lang.String elanName,
                                                               org.opendaylight.yangtools.yang.common.Uint64 dpnId)
        Delete elan l2 gateway devices ucast local macs from dpn.
        Parameters:
        elanName - the elan name
        dpnId - the dpn id
      • getL2GwDeviceLocalMacsAndRunCallback

        public void getL2GwDeviceLocalMacsAndRunCallback​(java.lang.String elanName,
                                                         L2GatewayDevice l2gwDevice,
                                                         java.util.function.Function<java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress>,​java.lang.Void> function)
      • deleteElanMacsFromL2GatewayDevice

        public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> deleteElanMacsFromL2GatewayDevice​(java.lang.String hwvtepNodeId,
                                                                                                                                                        java.lang.String elanName)
        Delete elan macs from L2 gateway device.
        This includes deleting ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.
        Parameters:
        hwvtepNodeId - the hwvtepNodeId
        elanName - the elan name
        Returns:
        the listenable future
      • getRemoteUcastMacs

        public java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> getRemoteUcastMacs​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId,
                                                                                                                                                java.lang.String logicalSwitch,
                                                                                                                                                org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
        Gets the remote ucast macs from hwvtep node filtering based on logical switch.
        Parameters:
        hwvtepNodeId - the hwvtep node id
        logicalSwitch - the logical switch
        datastoreType - the datastore type
        Returns:
        the remote ucast macs
      • installElanMacsInL2GatewayDevice

        public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> installElanMacsInL2GatewayDevice​(java.lang.String elanName,
                                                                                                                                                       L2GatewayDevice l2GatewayDevice)
        Install ELAN macs in L2 Gateway device.
        This includes installing ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.
        Parameters:
        elanName - the elan name
        l2GatewayDevice - the l2 gateway device which has to be configured
        Returns:
        the listenable future
      • getOtherDevicesMacs

        public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs> getOtherDevicesMacs​(java.lang.String elanName,
                                                                                                                                                                                           L2GatewayDevice l2GatewayDeviceToBeConfigured,
                                                                                                                                                                                           org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId,
                                                                                                                                                                                           java.lang.String logicalSwitchName)
        Gets the l2 gateway devices ucast local macs as remote ucast macs.
        Parameters:
        elanName - the elan name
        l2GatewayDeviceToBeConfigured - the l2 gateway device to be configured
        hwVtepNodeId - the hw vtep node Id to be configured
        logicalSwitchName - the logical switch name
        Returns:
        the l2 gateway devices macs as remote ucast macs
      • areMLAGDevices

        public static boolean areMLAGDevices​(L2GatewayDevice l2GatewayDevice,
                                             L2GatewayDevice otherL2GatewayDevice)
        Are MLAG devices.
        Parameters:
        l2GatewayDevice - the l2 gateway device
        otherL2GatewayDevice - the other l2 gateway device
        Returns:
        true, if both the specified l2 gateway devices are part of same MLAG
      • getElanMacTableEntriesMacs

        public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs> getElanMacTableEntriesMacs​(java.lang.String elanName,
                                                                                                                                                                                           org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId,
                                                                                                                                                                                           java.lang.String logicalSwitchName)
        Gets the elan mac table entries as remote ucast macs.
        Note: ELAN MAC table only contains internal switches MAC's. It doesn't contain external device MAC's.
        Parameters:
        elanName - the elan name
        hwVtepNodeId - the hw vtep node id
        logicalSwitchName - the logical switch name
        Returns:
        the elan mac table entries as remote ucast macs
      • getDpidFromInterface

        public @Nullable org.opendaylight.yangtools.yang.common.Uint64 getDpidFromInterface​(java.lang.String interfaceName)
        Gets the dpid from interface.
        Parameters:
        interfaceName - the interface name
        Returns:
        the dpid from interface
      • updateVlanBindingsInL2GatewayDevice

        public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> updateVlanBindingsInL2GatewayDevice​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId,
                                                                                                                      java.lang.String logicalSwitchName,
                                                                                                                      org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice,
                                                                                                                      java.lang.Integer defaultVlanId)
        Update vlan bindings in l2 gateway device.
        Parameters:
        nodeId - the node id
        logicalSwitchName - the logical switch name
        hwVtepDevice - the hardware device
        defaultVlanId - the default vlan id
        Returns:
        the listenable future
      • updateVlanBindingsInL2GatewayDevice

        public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> updateVlanBindingsInL2GatewayDevice​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId,
                                                                                                                      java.lang.String psName,
                                                                                                                      java.lang.String interfaceName,
                                                                                                                      java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindings> vlanBindings)
        Update vlan bindings in l2 gateway device.
        Parameters:
        nodeId - the node id
        psName - the physical switch name
        interfaceName - the interface in physical switch
        vlanBindings - the vlan bindings to be configured
        Returns:
        the listenable future
      • deleteVlanBindingsFromL2GatewayDevice

        public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> deleteVlanBindingsFromL2GatewayDevice​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId,
                                                                                                                        org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice,
                                                                                                                        java.lang.Integer defaultVlanId)
        Delete vlan bindings from l2 gateway device.
        Parameters:
        nodeId - the node id
        hwVtepDevice - the hw vtep device
        defaultVlanId - the default vlan id
        Returns:
        the listenable future
      • getLogicalSwitchFromElan

        public static java.lang.String getLogicalSwitchFromElan​(java.lang.String elanName)
        Gets the logical switch name from elan name.
        Parameters:
        elanName - the elan name
        Returns:
        the logical switch from elan name
      • getL2GatewayConnectionJobKey

        public static java.lang.String getL2GatewayConnectionJobKey​(java.lang.String logicalSwitchName)
        Gets the l2 gateway connection job key.
        Parameters:
        logicalSwitchName - the logical switch name
        Returns:
        the l2 gateway connection job key
      • getInterfaceIdentifier

        public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> getInterfaceIdentifier​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey)
      • getInterfaceFromConfigDS

        public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface getInterfaceFromConfigDS​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey,
                                                                                                                                                                 org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
      • deleteL2GwDeviceUcastLocalMacsFromElan

        public void deleteL2GwDeviceUcastLocalMacsFromElan​(L2GatewayDevice l2GatewayDevice,
                                                           java.lang.String elanName)
        Delete l2 gateway device ucast local macs from elan.
        Deletes macs from internal ELAN nodes and also on rest of external l2 gateway devices which are part of the ELAN.
        Parameters:
        l2GatewayDevice - the l2 gateway device whose ucast local macs to be deleted from elan
        elanName - the elan name
      • createItmTunnels

        public static void createItmTunnels​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                                            org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
                                            java.lang.String hwvtepId,
                                            java.lang.String psName,
                                            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp)
      • scheduleAddDpnMacInExtDevices

        public void scheduleAddDpnMacInExtDevices​(java.lang.String elanName,
                                                  org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                                  java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses)
      • scheduleAddDpnMacsInExtDevice

        public void scheduleAddDpnMacsInExtDevice​(java.lang.String elanName,
                                                  org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                                  java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses,
                                                  L2GatewayDevice externalDevice)
      • scheduleDeleteLogicalSwitch

        public void scheduleDeleteLogicalSwitch​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId,
                                                java.lang.String lsName)
      • scheduleDeleteLogicalSwitch

        public void scheduleDeleteLogicalSwitch​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId,
                                                java.lang.String lsName,
                                                boolean clearUcast)
      • cancelDeleteLogicalSwitch

        public void cancelDeleteLogicalSwitch​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId,
                                              java.lang.String lsName)
      • getElanDpns

        public @NonNull java.util.Collection<DpnInterfaces> getElanDpns​(java.lang.String elanName)
      • getL2GwDeviceLocalMacs

        public java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> getL2GwDeviceLocalMacs​(java.lang.String elanName,
                                                                                                                                                          L2GatewayDevice l2gwDevice)
        Gets the l2 gw device local macs.
        Parameters:
        elanName - name of the elan
        l2gwDevice - the l2gw device
        Returns:
        the l2 gw device local macs