blob: 936749ad9d982eaf5be35c792b0411fd2421a460 [file] [log] [blame]
wei wei89ddc322015-03-22 16:29:04 -05001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
wei wei89ddc322015-03-22 16:29:04 -05003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Thomas Vachuskabf916ea2015-05-20 18:24:34 -070016
17package org.onosproject.incubator.net.tunnel;
wei wei89ddc322015-03-22 16:29:04 -050018
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040019import com.google.common.annotations.Beta;
wei wei89ddc322015-03-22 16:29:04 -050020import org.onosproject.net.Path;
jcc4a20a5f2015-04-30 15:43:39 +080021import org.onosproject.net.provider.ProviderId;
wei wei89ddc322015-03-22 16:29:04 -050022
23/**
24 * Service for administering the inventory of provisioned tunnels.
25 */
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040026@Beta
wei wei89ddc322015-03-22 16:29:04 -050027public interface TunnelAdminService {
28
29 /**
30 * Removes the provisioned tunnel.
31 *
32 * @param tunnelId tunnel ID
33 */
34 void removeTunnel(TunnelId tunnelId);
35
36 /**
37 * Removes the provisioned tunnel leading to and from the
38 * specified labels.
39 *
40 * @param src source label
41 * @param dst destination label
jcc4a20a5f2015-04-30 15:43:39 +080042 * @param producerName producer name
wei wei89ddc322015-03-22 16:29:04 -050043 */
jcc4a20a5f2015-04-30 15:43:39 +080044 void removeTunnels(TunnelEndPoint src, TunnelEndPoint dst, ProviderId producerName);
wei wei89ddc322015-03-22 16:29:04 -050045
46 /**
47 * Removes all provisioned tunnels leading to and from the
48 * specified connection point.
49 *
50 * @param src source connection point
51 * @param dst destination connection point
52 * @param type tunnel type
jcc4a20a5f2015-04-30 15:43:39 +080053 * @param producerName producer name
wei wei89ddc322015-03-22 16:29:04 -050054 */
jcc4a20a5f2015-04-30 15:43:39 +080055 void removeTunnels(TunnelEndPoint src, TunnelEndPoint dst, Tunnel.Type type, ProviderId producerName);
wei wei89ddc322015-03-22 16:29:04 -050056
57 /**
58 * Invokes the core to update a tunnel based on specified tunnel parameters.
59 *
60 * @param tunnel Tunnel
61 * @param path explicit route (path changed) or null (path not changed) for the tunnel
62 */
63 void updateTunnel(Tunnel tunnel, Path path);
64
tony-liu1abfb632016-11-09 15:22:51 +080065 /**
66 * Updates the state of a tunnel.
67 *
68 * @param tunnel tunnel to be changed
69 * @param state new state of the tunnel
70 */
71 void updateTunnelState(Tunnel tunnel, Tunnel.State state);
wei wei89ddc322015-03-22 16:29:04 -050072}