blob: a1b97ffd777b2f6ad4c1571fec5510ec24002af3 [file] [log] [blame]
samuel8d6b0a92015-07-11 13:22:57 +08001/*
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.behaviour;
17
18import java.util.Collection;
19
20import org.onosproject.net.driver.HandlerBehaviour;
21
22/**
23 * Behaviour for handling various drivers for tunnel configuration.
24 */
25public interface TunnelConfig extends HandlerBehaviour {
26
27 /**
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070028 * Creates a tunnel on this device.
samuel8d6b0a92015-07-11 13:22:57 +080029 *
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070030 * @param tunnel tunnel descriptor
samuel8d6b0a92015-07-11 13:22:57 +080031 */
jiangruie2766822015-11-27 10:17:10 +080032 @Deprecated
samuel8d6b0a92015-07-11 13:22:57 +080033 void createTunnel(TunnelDescription tunnel);
34
35 /**
Hyunsun Moonaab8c672015-10-27 19:42:12 -070036 * Creates a tunnel interface on a given bridge of this device.
37 *
38 * @param bridgeName bridge name
39 * @param tunnel tunnel description
40 * @return true if succeeds, false otherwise
41 */
42 boolean createTunnelInterface(BridgeName bridgeName, TunnelDescription tunnel);
43
44 /**
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070045 * Removes a tunnel on this device.
samuel8d6b0a92015-07-11 13:22:57 +080046 *
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070047 * @param tunnel tunnel descriptor
samuel8d6b0a92015-07-11 13:22:57 +080048 */
49 void removeTunnel(TunnelDescription tunnel);
50
51 /**
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070052 * Updates a tunnel on this device.
samuel8d6b0a92015-07-11 13:22:57 +080053 *
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070054 * @param tunnel tunnel descriptor
samuel8d6b0a92015-07-11 13:22:57 +080055 */
56 void updateTunnel(TunnelDescription tunnel);
57
58 /**
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070059 * Returns tunnels created on this device.
samuel8d6b0a92015-07-11 13:22:57 +080060 *
Thomas Vachuskad894b5d2015-07-30 11:59:07 -070061 * @return collection of tunnels
samuel8d6b0a92015-07-11 13:22:57 +080062 */
63 Collection<TunnelDescription> getTunnels();
64
65}