@Service public class TunnelManager extends org.onosproject.net.provider.AbstractListenerProviderRegistry<TunnelEvent,TunnelListener,TunnelProvider,TunnelProviderService> implements TunnelService, TunnelAdminService, TunnelProviderRegistry
| Modifier and Type | Field and Description |
|---|---|
protected TunnelStore |
store |
| Constructor and Description |
|---|
TunnelManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
java.util.Collection<Tunnel> |
borrowTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
org.onosproject.net.Annotations... annotations)
Borrows all tunnels between source and destination.
|
java.util.Collection<Tunnel> |
borrowTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Tunnel.Type type,
org.onosproject.net.Annotations... annotations)
Borrows all specified type tunnels between source and destination.
|
Tunnel |
borrowTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelId tunnelId,
org.onosproject.net.Annotations... annotations)
Borrows a specific tunnel.
|
java.util.Collection<Tunnel> |
borrowTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelName tunnelName,
org.onosproject.net.Annotations... annotations)
Borrows a specific tunnel by tunnelName.
|
protected TunnelProviderService |
createProviderService(TunnelProvider provider) |
void |
deactivate() |
boolean |
downTunnel(org.onosproject.core.ApplicationId producerId,
TunnelId tunnelId)
Triggers removal of specified tunnel.
|
java.lang.Iterable<Tunnel> |
getTunnels(org.onosproject.net.DeviceId deviceId)
Returns the collection of tunnels applied on the specified device.
|
java.util.Collection<Tunnel> |
queryAllTunnels()
Returns all tunnels.
|
java.util.Collection<Tunnel> |
queryTunnel(Tunnel.Type type)
Returns all specified type tunnels.
|
java.util.Collection<Tunnel> |
queryTunnel(TunnelEndPoint src,
TunnelEndPoint dst)
Returns all tunnels between source point and destination point.
|
Tunnel |
queryTunnel(TunnelId tunnelId)
Returns a tunnel by a specific tunnel identity.
|
java.util.Collection<TunnelSubscription> |
queryTunnelSubscription(org.onosproject.core.ApplicationId consumerId)
Returns all tunnel subscription record by consumer.
|
void |
removeTunnel(TunnelId tunnelId)
Removes the provisioned tunnel.
|
void |
removeTunnels(TunnelEndPoint src,
TunnelEndPoint dst,
org.onosproject.net.provider.ProviderId producerName)
Removes the provisioned tunnel leading to and from the
specified labels.
|
void |
removeTunnels(TunnelEndPoint src,
TunnelEndPoint dst,
Tunnel.Type type,
org.onosproject.net.provider.ProviderId producerName)
Removes all provisioned tunnels leading to and from the
specified connection point.
|
boolean |
returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
org.onosproject.net.Annotations... annotations)
Returns all tunnels between source and destination back the store.
|
boolean |
returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Tunnel.Type type,
org.onosproject.net.Annotations... annotations)
Returns all specific type tunnels between source and destination back
store.
|
boolean |
returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelId tunnelId,
org.onosproject.net.Annotations... annotations)
Returns back a specific tunnel to store.
|
boolean |
returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelName tunnelName,
org.onosproject.net.Annotations... annotations)
Returns all specific name tunnel back store.
|
TunnelId |
setupTunnel(org.onosproject.core.ApplicationId producerId,
org.onosproject.net.ElementId srcElementId,
Tunnel tunnel,
org.onosproject.net.Path path)
Creates a tunnel with given path and default initial state.
|
int |
tunnelCount()
Returns all tunnels.
|
void |
updateTunnel(Tunnel tunnel,
org.onosproject.net.Path path)
Invokes the core to update a tunnel based on specified tunnel parameters.
|
void |
updateTunnelState(Tunnel tunnel,
Tunnel.State state)
Updates the state of a tunnel.
|
addListener, bindEventDispatcher, post, removeListener, unbindEventDispatcherdefaultProvider, getProvider, getProvider, getProvider, getProviders, register, unregister@Reference(cardinality=MANDATORY_UNARY) protected TunnelStore store
@Activate public void activate()
@Deactivate public void deactivate()
public void removeTunnel(TunnelId tunnelId)
TunnelAdminServiceremoveTunnel in interface TunnelAdminServicetunnelId - tunnel IDpublic void updateTunnel(Tunnel tunnel, org.onosproject.net.Path path)
TunnelAdminServiceupdateTunnel in interface TunnelAdminServicetunnel - Tunnelpath - explicit route (path changed) or null (path not changed) for the tunnelpublic void updateTunnelState(Tunnel tunnel, Tunnel.State state)
TunnelAdminServiceupdateTunnelState in interface TunnelAdminServicetunnel - tunnel to be changedstate - new state of the tunnelpublic void removeTunnels(TunnelEndPoint src, TunnelEndPoint dst, org.onosproject.net.provider.ProviderId producerName)
TunnelAdminServiceremoveTunnels in interface TunnelAdminServicesrc - source labeldst - destination labelproducerName - producer namepublic void removeTunnels(TunnelEndPoint src, TunnelEndPoint dst, Tunnel.Type type, org.onosproject.net.provider.ProviderId producerName)
TunnelAdminServiceremoveTunnels in interface TunnelAdminServicesrc - source connection pointdst - destination connection pointtype - tunnel typeproducerName - producer namepublic Tunnel borrowTunnel(org.onosproject.core.ApplicationId consumerId, TunnelId tunnelId, org.onosproject.net.Annotations... annotations)
TunnelServiceborrowTunnel in interface TunnelServiceconsumerId - a tunnel consumertunnelId - tunnel identify generated by onosannotations - Annotationspublic java.util.Collection<Tunnel> borrowTunnel(org.onosproject.core.ApplicationId consumerId, TunnelName tunnelName, org.onosproject.net.Annotations... annotations)
TunnelServiceborrowTunnel in interface TunnelServiceconsumerId - a tunnel consumertunnelName - tunnel nameannotations - Annotationspublic java.util.Collection<Tunnel> borrowTunnel(org.onosproject.core.ApplicationId consumerId, TunnelEndPoint src, TunnelEndPoint dst, org.onosproject.net.Annotations... annotations)
TunnelServiceborrowTunnel in interface TunnelServiceconsumerId - a tunnel consumersrc - a source point of tunnel.dst - a destination point of tunnelannotations - Annotationspublic java.util.Collection<Tunnel> borrowTunnel(org.onosproject.core.ApplicationId consumerId, TunnelEndPoint src, TunnelEndPoint dst, Tunnel.Type type, org.onosproject.net.Annotations... annotations)
TunnelServiceborrowTunnel in interface TunnelServiceconsumerId - a tunnel consumersrc - a source point of tunnel.dst - a destination point of tunneltype - tunnel typeannotations - Annotationspublic TunnelId setupTunnel(org.onosproject.core.ApplicationId producerId, org.onosproject.net.ElementId srcElementId, Tunnel tunnel, org.onosproject.net.Path path)
TunnelServicesetupTunnel in interface TunnelServiceproducerId - a tunnel producersrcElementId - element id of the sourcetunnel - to be createdpath - path of the tunnelpublic boolean downTunnel(org.onosproject.core.ApplicationId producerId,
TunnelId tunnelId)
TunnelServicedownTunnel in interface TunnelServiceproducerId - a tunnel producertunnelId - identity for the tunnel to be triggered for removalpublic boolean returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelId tunnelId,
org.onosproject.net.Annotations... annotations)
TunnelServicereturnTunnel in interface TunnelServiceconsumerId - a tunnel consumertunnelId - tunnel identify generated by ONOSannotations - Annotationspublic boolean returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelName tunnelName,
org.onosproject.net.Annotations... annotations)
TunnelServicereturnTunnel in interface TunnelServiceconsumerId - a tunnel consumertunnelName - tunnel nameannotations - Annotationspublic boolean returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
Tunnel.Type type,
org.onosproject.net.Annotations... annotations)
TunnelServicereturnTunnel in interface TunnelServiceconsumerId - a tunnel consumersrc - a source point of tunnel.dst - a destination point of tunneltype - tunnel typeannotations - Annotationspublic boolean returnTunnel(org.onosproject.core.ApplicationId consumerId,
TunnelEndPoint src,
TunnelEndPoint dst,
org.onosproject.net.Annotations... annotations)
TunnelServicereturnTunnel in interface TunnelServiceconsumerId - a tunnel consumersrc - a source point of tunnel.dst - a destination point of tunnel.annotations - Annotationspublic Tunnel queryTunnel(TunnelId tunnelId)
TunnelServicequeryTunnel in interface TunnelServicetunnelId - tunnel identify generated by tunnel producerpublic java.util.Collection<TunnelSubscription> queryTunnelSubscription(org.onosproject.core.ApplicationId consumerId)
TunnelServicequeryTunnelSubscription in interface TunnelServiceconsumerId - consumer identitypublic java.util.Collection<Tunnel> queryTunnel(Tunnel.Type type)
TunnelServicequeryTunnel in interface TunnelServicetype - tunnel typepublic java.util.Collection<Tunnel> queryTunnel(TunnelEndPoint src, TunnelEndPoint dst)
TunnelServicequeryTunnel in interface TunnelServicesrc - a source point of tunnel.dst - a destination point of tunnel.public java.util.Collection<Tunnel> queryAllTunnels()
TunnelServicequeryAllTunnels in interface TunnelServicepublic int tunnelCount()
TunnelServicetunnelCount in interface TunnelServiceprotected TunnelProviderService createProviderService(TunnelProvider provider)
createProviderService in class org.onosproject.net.provider.AbstractProviderRegistry<TunnelProvider,TunnelProviderService>public java.lang.Iterable<Tunnel> getTunnels(org.onosproject.net.DeviceId deviceId)
TunnelServicegetTunnels in interface TunnelServicedeviceId - device identifier