wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 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 | package org.onosproject.incubator.net.tunnel; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 17 | |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 18 | import com.google.common.annotations.Beta; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 19 | import org.onosproject.core.DefaultGroupId; |
samuel | 7a5691a | 2015-05-23 00:36:32 +0800 | [diff] [blame] | 20 | import org.onosproject.incubator.net.tunnel.Tunnel.Type; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 21 | import org.onosproject.net.Annotated; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 22 | import org.onosproject.net.Description; |
samuel | 7a5691a | 2015-05-23 00:36:32 +0800 | [diff] [blame] | 23 | import org.onosproject.net.Path; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 24 | import org.onosproject.net.provider.ProviderId; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 25 | |
| 26 | /** |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 27 | * Describes a tunnel. |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 28 | */ |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 29 | @Beta |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 30 | public interface TunnelDescription extends Description, Annotated { |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * Returns the tunnel id. |
| 34 | * |
| 35 | * @return tunnelId |
| 36 | */ |
| 37 | TunnelId id(); |
| 38 | |
| 39 | /** |
| 40 | * Returns the connection point source. |
| 41 | * |
| 42 | * @return tunnel source ConnectionPoint |
| 43 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 44 | TunnelEndPoint src(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * Returns the connection point destination. |
| 48 | * |
| 49 | * @return tunnel destination |
| 50 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 51 | TunnelEndPoint dst(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * Returns the tunnel type. |
| 55 | * |
| 56 | * @return tunnel type |
| 57 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 58 | Type type(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 59 | |
| 60 | /** |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 61 | * Returns group flow table id which a tunnel match up. |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 62 | * |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 63 | * @return OpenFlowGroupId |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 64 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 65 | DefaultGroupId groupId(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 66 | |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 67 | /** |
| 68 | * Returns tunnel producer name. |
| 69 | * |
| 70 | * @return producer name |
| 71 | */ |
| 72 | ProviderId producerName(); |
| 73 | |
| 74 | /** |
| 75 | * Return the name of a tunnel. |
| 76 | * |
| 77 | * @return Tunnel Name |
| 78 | */ |
| 79 | TunnelName tunnelName(); |
samuel | 7a5691a | 2015-05-23 00:36:32 +0800 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * Returns the path of the tunnel. |
| 83 | * |
| 84 | * @return the path of the tunnel |
| 85 | */ |
| 86 | Path path(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 87 | } |