blob: ea903429fddfc2ebec14d176affbb8ce8a26ac95 [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 */
16package org.onosproject.net.tunnel;
17
18import org.onosproject.net.ElementId;
19import org.onosproject.net.Path;
20import org.onosproject.net.provider.Provider;
21
22/**
23 * Abstraction of an entity providing tunnel setup/release services to the core.
24 */
25public interface TunnelProvider extends Provider {
26
27 /**
28 * Instructs the provider to setup a tunnel.
29 *
30 * @param tunnel Tunnel
31 * @param path explicit route or null for the tunnel
32 */
33 void setupTunnel(Tunnel tunnel, Path path);
34
35 /**
36 * Instructs the provider to setup a tunnel given the respective device.
37 *
38 * @param srcElement device
39 * @param tunnel Tunnel
40 * @param path explicit route (not null) for the tunnel
41 */
42 void setupTunnel(ElementId srcElement, Tunnel tunnel, Path path);
43
44 /**
45 * Instructs the provider to release a tunnel.
46 *
47 * @param tunnel Tunnel
48 */
49 void releaseTunnel(Tunnel tunnel);
50
51 /**
52 * Instructs the provider to release a tunnel given the respective device.
53 *
54 * @param srcElement device
55 * @param tunnel Tunnel
56 */
57 void releaseTunnel(ElementId srcElement, Tunnel tunnel);
58
59 /**
60 * Instructs the provider to update a tunnel.
61 *
62 * @param tunnel Tunnel
63 * @param path explicit route (path changed) or null (path not changed) for the tunnel
64 */
65 void updateTunnel(Tunnel tunnel, Path path);
66
67 /**
68 * Instructs the provider to update a tunnel given the respective device.
69 *
70 * @param srcElement device
71 * @param tunnel Tunnel
72 * @param path explicit route (path changed) or null (path not changed) for the tunnel
73 */
74 void updateTunnel(ElementId srcElement, Tunnel tunnel, Path path);
75
76}