Interface L2TunnelHandler

    • Method Detail

      • init

        void init()
      • getL2Descriptions

        Set<L2TunnelDescription> getL2Descriptions​(boolean pending)
        Combines policies and tunnels to create descriptions.
        Parameters:
        pending - if it is true return pending to be installed pseudowires from the appropriate store, else return installed pseudowires
        Returns:
        Set of l2 tunnel descriptions.
      • getL2Policies

        List<L2TunnelPolicy> getL2Policies()
        Returns a copy of the l2 policies that exist in the store.
        Returns:
        The l2 policies
      • getL2Tunnels

        List<L2Tunnel> getL2Tunnels()
        Returns a copy of the l2 tunnels that exist in the store.
        Returns:
        The l2 tunnels.
      • getL2PendingPolicies

        List<L2TunnelPolicy> getL2PendingPolicies()
        Returns a copy of the pending l2 policies that exist in the store.
        Returns:
        The l2 policies
      • tearDown

        @Deprecated
        void tearDown​(Set<L2TunnelDescription> pwToRemove)
        Deprecated.
        onos-1.12 Do not use this method.
        Helper function to handle the pw removal.

        This method should for the mastership of the device because it is used only from network configuration updates, thus we only want one instance only to program each pseudowire.

        Parameters:
        pwToRemove - the pseudo wires to remove
      • getL2PendingTunnels

        List<L2Tunnel> getL2PendingTunnels()
        Returns a copy of the pending l2 tunnels that exist in the store.
        Returns:
        The l2 tunnels.
      • verifyGlobalValidity

        L2TunnelHandler.Result verifyGlobalValidity​(L2TunnelDescription pwToAdd)
        Verifies global validity for existing pseudowires, both ones in the pending store and the ones installed.
        Parameters:
        pwToAdd - the new pseudowire to add
        Returns:
        a Result describing the outcome
      • checkIfPwExists

        L2TunnelHandler.Result checkIfPwExists​(long tunnelId,
                                               boolean pending)
        Check if pseudowire exists in the store.
        Parameters:
        tunnelId - The tunnel id to check for.
        pending - Check in pending store for pseudowires.
        Returns:
        The result of the operation.
      • getInitNext

        com.google.common.collect.ImmutableMap<String,​org.onosproject.net.flowobjective.NextObjective> getInitNext()
        Returns the PW init next objective store.
        Returns:
        current contents of the l2InitiationNextObjStore
      • getTermNext

        com.google.common.collect.ImmutableMap<String,​org.onosproject.net.flowobjective.NextObjective> getTermNext()
        Returns the PW termination next objective store.
        Returns:
        current contents of the l2TerminationNextObjStore
      • removeNextId

        void removeNextId​(int nextId)
        Removes given next ID from both PW init/term next obj store.
        Parameters:
        nextId - next ID