wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 52f2cd1 | 2018-11-08 21:20:04 -0800 | [diff] [blame^] | 2 | * Copyright 2018-present Open Networking Foundation |
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; |
Yi Tseng | fa394de | 2017-02-01 11:26:40 -0800 | [diff] [blame] | 19 | import org.onosproject.core.GroupId; |
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; |
Satish K | d70e957 | 2016-04-28 13:58:51 +0530 | [diff] [blame] | 23 | import org.onosproject.net.NetworkResource; |
samuel | 7a5691a | 2015-05-23 00:36:32 +0800 | [diff] [blame] | 24 | import org.onosproject.net.Path; |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 25 | import org.onosproject.net.provider.ProviderId; |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 26 | |
| 27 | /** |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 28 | * Describes a tunnel. |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 29 | */ |
Brian O'Connor | 2bed5ce | 2015-06-25 15:10:28 -0400 | [diff] [blame] | 30 | @Beta |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 31 | public interface TunnelDescription extends Description, Annotated { |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 32 | |
| 33 | /** |
| 34 | * Returns the tunnel id. |
| 35 | * |
| 36 | * @return tunnelId |
| 37 | */ |
| 38 | TunnelId id(); |
| 39 | |
| 40 | /** |
| 41 | * Returns the connection point source. |
| 42 | * |
| 43 | * @return tunnel source ConnectionPoint |
| 44 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 45 | TunnelEndPoint src(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 46 | |
| 47 | /** |
| 48 | * Returns the connection point destination. |
| 49 | * |
| 50 | * @return tunnel destination |
| 51 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 52 | TunnelEndPoint dst(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 53 | |
| 54 | /** |
| 55 | * Returns the tunnel type. |
| 56 | * |
| 57 | * @return tunnel type |
| 58 | */ |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 59 | Type type(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 60 | |
| 61 | /** |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 62 | * Returns group flow table id which a tunnel match up. |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 63 | * |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 64 | * @return OpenFlowGroupId |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 65 | */ |
Yi Tseng | fa394de | 2017-02-01 11:26:40 -0800 | [diff] [blame] | 66 | GroupId groupId(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 67 | |
jcc | 4a20a5f | 2015-04-30 15:43:39 +0800 | [diff] [blame] | 68 | /** |
| 69 | * Returns tunnel producer name. |
| 70 | * |
| 71 | * @return producer name |
| 72 | */ |
| 73 | ProviderId producerName(); |
| 74 | |
| 75 | /** |
| 76 | * Return the name of a tunnel. |
| 77 | * |
| 78 | * @return Tunnel Name |
| 79 | */ |
| 80 | TunnelName tunnelName(); |
samuel | 7a5691a | 2015-05-23 00:36:32 +0800 | [diff] [blame] | 81 | |
| 82 | /** |
| 83 | * Returns the path of the tunnel. |
| 84 | * |
| 85 | * @return the path of the tunnel |
| 86 | */ |
| 87 | Path path(); |
Satish K | d70e957 | 2016-04-28 13:58:51 +0530 | [diff] [blame] | 88 | |
| 89 | /** |
| 90 | * Returns the network resource backing the tunnel, e.g. lambda, VLAN id, MPLS tag, label stack. |
| 91 | * |
| 92 | * @return backing resource |
| 93 | */ |
| 94 | NetworkResource resource(); |
wei wei | 89ddc32 | 2015-03-22 16:29:04 -0500 | [diff] [blame] | 95 | } |