blob: 521ae37cbb87d2149d2866dfd7d00c82c03c47af [file] [log] [blame]
wei wei89ddc322015-03-22 16:29:04 -05001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
wei wei89ddc322015-03-22 16:29:04 -05003 *
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 Vachuskabf916ea2015-05-20 18:24:34 -070016package org.onosproject.incubator.net.tunnel;
wei wei89ddc322015-03-22 16:29:04 -050017
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040018import com.google.common.annotations.Beta;
Yi Tsengfa394de2017-02-01 11:26:40 -080019import org.onosproject.core.GroupId;
samuel7a5691a2015-05-23 00:36:32 +080020import org.onosproject.incubator.net.tunnel.Tunnel.Type;
jcc4a20a5f2015-04-30 15:43:39 +080021import org.onosproject.net.Annotated;
wei wei89ddc322015-03-22 16:29:04 -050022import org.onosproject.net.Description;
Satish Kd70e9572016-04-28 13:58:51 +053023import org.onosproject.net.NetworkResource;
samuel7a5691a2015-05-23 00:36:32 +080024import org.onosproject.net.Path;
jcc4a20a5f2015-04-30 15:43:39 +080025import org.onosproject.net.provider.ProviderId;
wei wei89ddc322015-03-22 16:29:04 -050026
27/**
jcc4a20a5f2015-04-30 15:43:39 +080028 * Describes a tunnel.
wei wei89ddc322015-03-22 16:29:04 -050029 */
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040030@Beta
jcc4a20a5f2015-04-30 15:43:39 +080031public interface TunnelDescription extends Description, Annotated {
wei wei89ddc322015-03-22 16:29:04 -050032
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 */
jcc4a20a5f2015-04-30 15:43:39 +080045 TunnelEndPoint src();
wei wei89ddc322015-03-22 16:29:04 -050046
47 /**
48 * Returns the connection point destination.
49 *
50 * @return tunnel destination
51 */
jcc4a20a5f2015-04-30 15:43:39 +080052 TunnelEndPoint dst();
wei wei89ddc322015-03-22 16:29:04 -050053
54 /**
55 * Returns the tunnel type.
56 *
57 * @return tunnel type
58 */
jcc4a20a5f2015-04-30 15:43:39 +080059 Type type();
wei wei89ddc322015-03-22 16:29:04 -050060
61 /**
jcc4a20a5f2015-04-30 15:43:39 +080062 * Returns group flow table id which a tunnel match up.
wei wei89ddc322015-03-22 16:29:04 -050063 *
jcc4a20a5f2015-04-30 15:43:39 +080064 * @return OpenFlowGroupId
wei wei89ddc322015-03-22 16:29:04 -050065 */
Yi Tsengfa394de2017-02-01 11:26:40 -080066 GroupId groupId();
wei wei89ddc322015-03-22 16:29:04 -050067
jcc4a20a5f2015-04-30 15:43:39 +080068 /**
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();
samuel7a5691a2015-05-23 00:36:32 +080081
82 /**
83 * Returns the path of the tunnel.
84 *
85 * @return the path of the tunnel
86 */
87 Path path();
Satish Kd70e9572016-04-28 13:58:51 +053088
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 wei89ddc322015-03-22 16:29:04 -050095}