blob: d5434370da2325ed4a83629c7141e67d6f1dbae1 [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;
Avantika-Huawei1e0a5862016-04-04 14:22:22 +053020
21import org.onosproject.incubator.net.tunnel.Tunnel.State;
wei wei89ddc322015-03-22 16:29:04 -050022import org.onosproject.net.provider.ProviderService;
23
24/**
25 * APIs for tunnel provider to notify the tunnel subSystem.
26 */
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040027@Beta
wei wei89ddc322015-03-22 16:29:04 -050028public interface TunnelProviderService extends ProviderService<TunnelProvider> {
29
30 /**
31 * Signals that the provider has added a tunnel.
32 *
33 * @param tunnel tunnel information
jcc4a20a5f2015-04-30 15:43:39 +080034 * @return tunnel identity
wei wei89ddc322015-03-22 16:29:04 -050035 */
jcc4a20a5f2015-04-30 15:43:39 +080036 TunnelId tunnelAdded(TunnelDescription tunnel);
wei wei89ddc322015-03-22 16:29:04 -050037
38 /**
Avantika-Huawei1e0a5862016-04-04 14:22:22 +053039 * Signals that the provider has added a tunnel with a status which may not
40 * be default, hence is provided as an input.
41 *
42 * @param tunnel tunnel information
43 * @param state tunnel working status
44 * @return tunnel identity
45 */
46 TunnelId tunnelAdded(TunnelDescription tunnel, State state);
47
48 /**
wei wei89ddc322015-03-22 16:29:04 -050049 * Signals that the provider has removed a tunnel.
50 *
51 * @param tunnel tunnel information
52 */
53 void tunnelRemoved(TunnelDescription tunnel);
54
55 /**
56 * Signals that the a tunnel was changed (e.g., sensing changes of tunnel).
57 *
58 * @param tunnel tunnel information
59 */
60 void tunnelUpdated(TunnelDescription tunnel);
61
samuel7a5691a2015-05-23 00:36:32 +080062 /**
63 * Signals that the a tunnel was queried.
64 *
65 * @param tunnelId tunnel identity
66 * @return tunnel entity
67 */
68 Tunnel tunnelQueryById(TunnelId tunnelId);
69
wei wei89ddc322015-03-22 16:29:04 -050070}