Interface L2TunnelHandler
-
- All Known Implementing Classes:
DefaultL2TunnelHandler
public interface L2TunnelHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classL2TunnelHandler.DirectionEnum helper for handling the direction of the pw.static classL2TunnelHandler.PipelinePwaas pipelines.static classL2TunnelHandler.ResultEnum helper to carry results of various operations.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description L2TunnelHandler.ResultcheckIfPwExists(long tunnelId, boolean pending)Check if pseudowire exists in the store.com.google.common.collect.ImmutableMap<String,org.onosproject.net.flowobjective.NextObjective>getInitNext()Returns the PW init next objective store.Set<L2TunnelDescription>getL2Descriptions(boolean pending)Combines policies and tunnels to create descriptions.List<L2TunnelPolicy>getL2PendingPolicies()Returns a copy of the pending l2 policies that exist in the store.List<L2Tunnel>getL2PendingTunnels()Returns a copy of the pending l2 tunnels that exist in the store.List<L2TunnelPolicy>getL2Policies()Returns a copy of the l2 policies that exist in the store.List<L2Tunnel>getL2Tunnels()Returns a copy of the l2 tunnels that exist in the store.com.google.common.collect.ImmutableMap<String,org.onosproject.net.flowobjective.NextObjective>getTermNext()Returns the PW termination next objective store.voidinit()voidremoveNextId(int nextId)Removes given next ID from both PW init/term next obj store.voidtearDown(Set<L2TunnelDescription> pwToRemove)Deprecated.onos-1.12 Do not use this method.L2TunnelHandler.ResultverifyGlobalValidity(L2TunnelDescription pwToAdd)Verifies global validity for existing pseudowires, both ones in the pending store and the ones installed.
-
-
-
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
-
-