blob: f01bb61e57b2752e38e88c5b9a66aeecc2c64ee0 [file] [log] [blame]
wei wei89ddc322015-03-22 16:29:04 -05001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
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
19import org.onosproject.net.ElementId;
20import org.onosproject.net.Path;
21import org.onosproject.net.provider.Provider;
22
23/**
24 * Abstraction of an entity providing tunnel setup/release services to the core.
25 */
26public interface TunnelProvider extends Provider {
27
28 /**
jcc4a20a5f2015-04-30 15:43:39 +080029 * Instructs the provider to setup a tunnel. It's used by consumers.
wei wei89ddc322015-03-22 16:29:04 -050030 *
31 * @param tunnel Tunnel
32 * @param path explicit route or null for the tunnel
33 */
34 void setupTunnel(Tunnel tunnel, Path path);
35
36 /**
37 * Instructs the provider to setup a tunnel given the respective device.
jcc4a20a5f2015-04-30 15:43:39 +080038 * It's used by consumers.
wei wei89ddc322015-03-22 16:29:04 -050039 *
40 * @param srcElement device
41 * @param tunnel Tunnel
42 * @param path explicit route (not null) for the tunnel
43 */
44 void setupTunnel(ElementId srcElement, Tunnel tunnel, Path path);
45
46 /**
jcc4a20a5f2015-04-30 15:43:39 +080047 * Instructs the provider to release a tunnel. It's used by consumers.
wei wei89ddc322015-03-22 16:29:04 -050048 *
49 * @param tunnel Tunnel
50 */
51 void releaseTunnel(Tunnel tunnel);
52
53 /**
54 * Instructs the provider to release a tunnel given the respective device.
jcc4a20a5f2015-04-30 15:43:39 +080055 * It's used by consumers.
wei wei89ddc322015-03-22 16:29:04 -050056 *
57 * @param srcElement device
58 * @param tunnel Tunnel
59 */
60 void releaseTunnel(ElementId srcElement, Tunnel tunnel);
61
62 /**
jcc4a20a5f2015-04-30 15:43:39 +080063 * Instructs the provider to update a tunnel. It's used by consumers. Maybe
64 * some consumers enable to update a tunnel.
wei wei89ddc322015-03-22 16:29:04 -050065 *
66 * @param tunnel Tunnel
jcc4a20a5f2015-04-30 15:43:39 +080067 * @param path explicit route (path changed) or null (path not changed) for
68 * the tunnel
wei wei89ddc322015-03-22 16:29:04 -050069 */
70 void updateTunnel(Tunnel tunnel, Path path);
71
72 /**
73 * Instructs the provider to update a tunnel given the respective device.
jcc4a20a5f2015-04-30 15:43:39 +080074 * It's used by consumers. Maybe some consumers enable to update a tunnel.
wei wei89ddc322015-03-22 16:29:04 -050075 *
76 * @param srcElement device
77 * @param tunnel Tunnel
jcc4a20a5f2015-04-30 15:43:39 +080078 * @param path explicit route (path changed) or null (path not changed) for
79 * the tunnel
wei wei89ddc322015-03-22 16:29:04 -050080 */
81 void updateTunnel(ElementId srcElement, Tunnel tunnel, Path path);
82
jcc4a20a5f2015-04-30 15:43:39 +080083 /**
84 * Signals that the provider has added a tunnel. It's used by producers.
85 *
86 * @param tunnel tunnel information
87 * @return tunnel identity
88 */
89 TunnelId tunnelAdded(TunnelDescription tunnel);
90
91 /**
92 * Signals that the provider has removed a tunnel. It's used by producers.
93 *
94 * @param tunnel tunnel information
95 */
96 void tunnelRemoved(TunnelDescription tunnel);
97
98 /**
99 * Signals that the a tunnel was changed (e.g., sensing changes of
100 * tunnel).It's used by producers.
101 *
102 * @param tunnel tunnel information
103 */
104 void tunnelUpdated(TunnelDescription tunnel);
wei wei89ddc322015-03-22 16:29:04 -0500105}