Search in sources :

Example 11 with TunnelProvider

use of org.onosproject.incubator.net.tunnel.TunnelProvider in project onos by opennetworkinglab.

the class TunnelManager method updateTunnel.

@Override
public void updateTunnel(Tunnel tunnel, Path path) {
    store.createOrUpdateTunnel(tunnel);
    if (tunnel.providerId() != null) {
        TunnelProvider provider = getProvider(tunnel.providerId());
        if (provider != null) {
            provider.updateTunnel(tunnel, path);
        }
    } else {
        Set<ProviderId> ids = getProviders();
        for (ProviderId providerId : ids) {
            TunnelProvider provider = getProvider(providerId);
            provider.updateTunnel(tunnel, path);
        }
    }
}
Also used : ProviderId(org.onosproject.net.provider.ProviderId) TunnelProvider(org.onosproject.incubator.net.tunnel.TunnelProvider)

Aggregations

TunnelProvider (org.onosproject.incubator.net.tunnel.TunnelProvider)11 ProviderId (org.onosproject.net.provider.ProviderId)10 Tunnel (org.onosproject.incubator.net.tunnel.Tunnel)9 DefaultTunnel (org.onosproject.incubator.net.tunnel.DefaultTunnel)7 TunnelId (org.onosproject.incubator.net.tunnel.TunnelId)5 DefaultTunnelDescription (org.onosproject.incubator.net.tunnel.DefaultTunnelDescription)3 TunnelDescription (org.onosproject.incubator.net.tunnel.TunnelDescription)3 DefaultOpticalTunnelEndPoint (org.onosproject.incubator.net.tunnel.DefaultOpticalTunnelEndPoint)2 IpTunnelEndPoint (org.onosproject.incubator.net.tunnel.IpTunnelEndPoint)2 OpticalTunnelEndPoint (org.onosproject.incubator.net.tunnel.OpticalTunnelEndPoint)2 TunnelEndPoint (org.onosproject.incubator.net.tunnel.TunnelEndPoint)2 SparseAnnotations (org.onosproject.net.SparseAnnotations)2 GroupId (org.onosproject.core.GroupId)1 TunnelService (org.onosproject.incubator.net.tunnel.TunnelService)1