samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.net.behaviour; |
| 17 | |
| 18 | import java.util.Collection; |
| 19 | |
| 20 | import org.onosproject.net.driver.HandlerBehaviour; |
| 21 | |
| 22 | /** |
| 23 | * Behaviour for handling various drivers for tunnel configuration. |
| 24 | */ |
| 25 | public interface TunnelConfig extends HandlerBehaviour { |
| 26 | |
| 27 | /** |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 28 | * Creates a tunnel on this device. |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 29 | * |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 30 | * @param tunnel tunnel descriptor |
Ray Milkey | ea12532 | 2016-02-16 13:35:09 -0800 | [diff] [blame] | 31 | * @deprecated 1.3.0 Drake Release |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 32 | */ |
jiangrui | e276682 | 2015-11-27 10:17:10 +0800 | [diff] [blame] | 33 | @Deprecated |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 34 | void createTunnel(TunnelDescription tunnel); |
| 35 | |
| 36 | /** |
Hyunsun Moon | aab8c67 | 2015-10-27 19:42:12 -0700 | [diff] [blame] | 37 | * Creates a tunnel interface on a given bridge of this device. |
| 38 | * |
| 39 | * @param bridgeName bridge name |
| 40 | * @param tunnel tunnel description |
| 41 | * @return true if succeeds, false otherwise |
| 42 | */ |
| 43 | boolean createTunnelInterface(BridgeName bridgeName, TunnelDescription tunnel); |
| 44 | |
| 45 | /** |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 46 | * Removes a tunnel on this device. |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 47 | * |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 48 | * @param tunnel tunnel descriptor |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 49 | */ |
| 50 | void removeTunnel(TunnelDescription tunnel); |
| 51 | |
| 52 | /** |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 53 | * Updates a tunnel on this device. |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 54 | * |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 55 | * @param tunnel tunnel descriptor |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 56 | */ |
| 57 | void updateTunnel(TunnelDescription tunnel); |
| 58 | |
| 59 | /** |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 60 | * Returns tunnels created on this device. |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 61 | * |
Thomas Vachuska | d894b5d | 2015-07-30 11:59:07 -0700 | [diff] [blame] | 62 | * @return collection of tunnels |
samuel | 8d6b0a9 | 2015-07-11 13:22:57 +0800 | [diff] [blame] | 63 | */ |
| 64 | Collection<TunnelDescription> getTunnels(); |
| 65 | |
| 66 | } |