Class ElanServiceProvider

  • All Implemented Interfaces:
    org.opendaylight.infrautils.inject.Lifecycle, IElanService, IEtreeService

    @Singleton
    public class ElanServiceProvider
    extends org.opendaylight.infrautils.inject.AbstractLifecycle
    implements IElanService
    • Constructor Detail

      • ElanServiceProvider

        @Inject
        public ElanServiceProvider​(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager,
                                   org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
                                   ElanBridgeManager bridgeMgr,
                                   org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
                                   ElanUtils elanUtils,
                                   org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService,
                                   org.opendaylight.ovsdb.utils.southbound.utils.SouthboundUtils southboundUtils,
                                   ElanInstanceCache elanInstanceCache,
                                   ElanInterfaceCache elanInterfaceCache,
                                   org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager)
    • Method Detail

      • start

        protected void start()
                      throws java.lang.Exception
        Specified by:
        start in class org.opendaylight.infrautils.inject.AbstractLifecycle
        Throws:
        java.lang.Exception
      • stop

        protected void stop()
        Specified by:
        stop in class org.opendaylight.infrautils.inject.AbstractLifecycle
      • createElanInstance

        public boolean createElanInstance​(java.lang.String elanInstanceName,
                                          long macTimeout,
                                          java.lang.String description)
        Specified by:
        createElanInstance in interface IElanService
      • createEtreeInstance

        public boolean createEtreeInstance​(java.lang.String elanInstanceName,
                                           long macTimeout,
                                           java.lang.String description)
        Specified by:
        createEtreeInstance in interface IEtreeService
      • compareWithExistingElanInstance

        public static boolean compareWithExistingElanInstance​(ElanInstance existingElanInstance,
                                                              long macTimeOut,
                                                              java.lang.String description)
      • updateElanInstance

        public void updateElanInstance​(java.lang.String elanInstanceName,
                                       long newMacTimout,
                                       java.lang.String newDescription)
        Specified by:
        updateElanInstance in interface IElanService
      • deleteEtreeInstance

        public boolean deleteEtreeInstance​(java.lang.String etreeInstanceName)
        Specified by:
        deleteEtreeInstance in interface IEtreeService
      • deleteElanInstance

        public boolean deleteElanInstance​(java.lang.String elanInstanceName)
        Specified by:
        deleteElanInstance in interface IElanService
      • addEtreeInterface

        public void addEtreeInterface​(java.lang.String etreeInstanceName,
                                      java.lang.String interfaceName,
                                      EtreeInterface.EtreeInterfaceType interfaceType,
                                      java.util.List<java.lang.String> staticMacAddresses,
                                      java.lang.String description)
        Specified by:
        addEtreeInterface in interface IEtreeService
      • addElanInterface

        public void addElanInterface​(java.lang.String elanInstanceName,
                                     java.lang.String interfaceName,
                                     @Nullable java.util.List<java.lang.String> staticMacAddresses,
                                     @Nullable java.lang.String description)
        Specified by:
        addElanInterface in interface IElanService
      • updateElanInterface

        public void updateElanInterface​(java.lang.String elanInstanceName,
                                        java.lang.String interfaceName,
                                        java.util.List<java.lang.String> updatedStaticMacAddresses,
                                        java.lang.String newDescription)
        Specified by:
        updateElanInterface in interface IElanService
      • addStaticMacAddress

        public void addStaticMacAddress​(java.lang.String interfaceName,
                                        java.lang.String macAddress)
        Specified by:
        addStaticMacAddress in interface IElanService
      • deleteStaticMacAddress

        public void deleteStaticMacAddress​(java.lang.String interfaceName,
                                           java.lang.String macAddress)
        Specified by:
        deleteStaticMacAddress in interface IElanService
      • flushMACTable

        public void flushMACTable​(java.lang.String elanInstanceName)
        Specified by:
        flushMACTable in interface IElanService
      • getElanInterfaces

        public @NonNull java.util.List<java.lang.String> getElanInterfaces​(java.lang.String elanInstanceName)
        Specified by:
        getElanInterfaces in interface IElanService
      • createExternalElanNetworks

        public void createExternalElanNetworks​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node node)
        Specified by:
        createExternalElanNetworks in interface IElanService
      • createExternalElanNetwork

        protected void createExternalElanNetwork​(ElanInstance elanInstance,
                                                 org.opendaylight.yangtools.yang.common.Uint64 dpId)
      • deleteExternalElanNetworks

        public void deleteExternalElanNetworks​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node node)
        Specified by:
        deleteExternalElanNetworks in interface IElanService
      • deleteExternalElanNetwork

        protected void deleteExternalElanNetwork​(ElanInstance elanInstance,
                                                 org.opendaylight.yangtools.yang.common.Uint64 dpnId)
      • updateExternalElanNetworks

        public void updateExternalElanNetworks​(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node origNode,
                                               org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node updatedNode)
        Specified by:
        updateExternalElanNetworks in interface IElanService
      • getExternalElanInterfaces

        public java.util.Collection<java.lang.String> getExternalElanInterfaces​(java.lang.String elanInstanceName)
        Specified by:
        getExternalElanInterfaces in interface IElanService
      • getExternalElanInterface

        public java.lang.String getExternalElanInterface​(java.lang.String elanInstanceName,
                                                         org.opendaylight.yangtools.yang.common.Uint64 dpnId)
        Specified by:
        getExternalElanInterface in interface IElanService
      • isExternalInterface

        public boolean isExternalInterface​(java.lang.String interfaceName)
        Specified by:
        isExternalInterface in interface IElanService
      • handleKnownL3DmacAddress

        public void handleKnownL3DmacAddress​(java.lang.String macAddress,
                                             java.lang.String elanInstanceName,
                                             int addOrRemove)
        Specified by:
        handleKnownL3DmacAddress in interface IElanService
      • addKnownL3DmacAddress

        public void addKnownL3DmacAddress​(java.lang.String macAddress,
                                          java.lang.String elanInstanceName)
        Specified by:
        addKnownL3DmacAddress in interface IElanService
      • removeKnownL3DmacAddress

        public void removeKnownL3DmacAddress​(java.lang.String macAddress,
                                             java.lang.String elanInstanceName)
        Specified by:
        removeKnownL3DmacAddress in interface IElanService
      • addExternalTunnelArpResponderFlow

        public void addExternalTunnelArpResponderFlow​(ArpResponderInput arpResponderInput,
                                                      java.lang.String elanInstanceName)
        Description copied from interface: IElanService
        Add ARP Responder Flow on the given dpn for the SR-IOV VMs ingress interface.
        Specified by:
        addExternalTunnelArpResponderFlow in interface IElanService
        Parameters:
        arpResponderInput - ArpResponder Input parameters
        elanInstanceName - The elanInstance corresponding to the interface
        See Also:
        ArpResponderInput
      • retrieveNewElanTag

        public org.opendaylight.yangtools.yang.common.Uint32 retrieveNewElanTag​(java.lang.String idKey)
        Uses the IdManager to retrieve a brand new ElanTag.
        Specified by:
        retrieveNewElanTag in interface IElanService
        Parameters:
        idKey - the id key
        Returns:
        the integer
      • getElanDpnInterfaceOperationalDataPath

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<DpnInterfaces> getElanDpnInterfaceOperationalDataPath​(java.lang.String elanInstanceName,
                                                                                                                                org.opendaylight.yangtools.yang.common.Uint64 dpnId)
        Specified by:
        getElanDpnInterfaceOperationalDataPath in interface IElanService