wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [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 | */ |
Thomas Vachuska | bf916ea | 2015-05-20 18:24:34 -0700 | [diff] [blame] | 16 | |
| 17 | package org.onosproject.incubator.net.tunnel; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 18 | |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 19 | import com.google.common.annotations.Beta; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 20 | import org.onosproject.net.Path; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 21 | import org.onosproject.net.provider.ProviderId; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Service for administering the inventory of provisioned tunnels. |
| 25 | */ |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 26 | @Beta |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 27 | public interface TunnelAdminService { |
| 28 | |
| 29 | /** |
| 30 | * Removes the provisioned tunnel. |
| 31 | * |
| 32 | * @param tunnelId tunnel ID |
| 33 | */ |
| 34 | void removeTunnel(TunnelId tunnelId); |
| 35 | |
| 36 | /** |
| 37 | * Removes the provisioned tunnel leading to and from the |
| 38 | * specified labels. |
| 39 | * |
| 40 | * @param src source label |
| 41 | * @param dst destination label |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 42 | * @param producerName producer name |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 43 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 44 | void removeTunnels(TunnelEndPoint src, TunnelEndPoint dst, ProviderId producerName); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * Removes all provisioned tunnels leading to and from the |
| 48 | * specified connection point. |
| 49 | * |
| 50 | * @param src source connection point |
| 51 | * @param dst destination connection point |
| 52 | * @param type tunnel type |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 53 | * @param producerName producer name |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 54 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 55 | void removeTunnels(TunnelEndPoint src, TunnelEndPoint dst, Tunnel.Type type, ProviderId producerName); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * Invokes the core to update a tunnel based on specified tunnel parameters. |
| 59 | * |
| 60 | * @param tunnel Tunnel |
| 61 | * @param path explicit route (path changed) or null (path not changed) for the tunnel |
| 62 | */ |
| 63 | void updateTunnel(Tunnel tunnel, Path path); |
| 64 | |
| 65 | } |