blob: c66a6ccb3c392b8f96a6849bc75f14b0373cdc2f [file] [log] [blame]
cheng fan48e832c2015-05-29 01:54:47 +08001/*
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
17package org.onosproject.pcep.api;
18
19import java.util.List;
20
21/**
22 * Abstraction of a generalized PCEP Tunnel entity (bandwidth pipe) for
23 * L2 networks or L1/L0 networks, representation of e.g., VLAN, L1 ODUk
24 * connection, WDM OCH, etc..
25 */
26public interface PcepTunnel extends PcepOperator {
27
28 /**
29 * Describe the type of a tunnel.
30 */
31 public static enum Type {
32
33 /**
34 * Signifies that this is a L0 OCH tunnel.
35 */
36 OCH,
37
38 /**
39 * Signifies that this is a L1 OTN tunnel.
40 */
41 OTN,
42
43 /**
44 * Signifies that this is a L2 tunnel.
45 */
46 UNI,
47 }
48
49 /**
50 * The ability of a tunnel.
51 */
52 public static enum Ability {
53 /**
54 * no protected tunnel,if the tunnel is broken ,then the user is out of
55 * service.
56 */
57 NOPROTECTED,
58
59 /**
60 * tunnel with rerouter ability.if a tunnel is broken, the tunnel will
61 * try to find another path to provider service.
62 */
63 SILVER,
64
65 /**
66 * tunnel with 1 + 1 rerouter ability.if a tunnel is broken, there'll be
67 * another tunnel providing service at once.
68 */
69 DIAMOND
70 }
71
72 public static enum PATHTYPE {
73
74 /**
75 * the preferred path.
76 */
77 FIRST,
78
79 /**
80 * the alternate path.
81 */
82 SECOND
83 }
84
85 /**
86 * Get the type of a tunnel.
87 *
88 * @return tunnel type
89 */
90 public Type type();
91
92 /**
93 * Get the name of a tunnel.
94 *
95 * @return tunnel name
96 */
97 public String name();
98
99 /**
100 * Get the device id of destination endpoint of a tunnel.
101 *
102 * @return device id
103 */
104 public PcepDpid srcDeviceID();
105
106 /**
107 * Get the device id of source endpoint of a tunnel.
108 *
109 * @return device id
110 */
111 public PcepDpid dstDeviceId();
112
113 /**
114 * Get source port of a tunnel.
115 *
116 * @return port number
117 */
118 public long srcPort();
119
120 /**
121 * Get destination port of a tunnel.
122 *
123 * @return port number
124 */
125 public long dstPort();
126
127 /**
128 * Get the bandwidth of a tunnel.
129 *
130 * @return bandwidth
131 */
132 public long bandWidth();
133
134 /**
135 * Get the tunnel id.
136 *
137 * @return id of the PCEP tunnel
138 */
139 public long id();
140
141 /**
142 * Get the detail hop list of a tunnel.
143 *
144 * @return hop list
145 */
146 public List<PcepHopNodeDescription> getHopList();
147
148 /**
149 * Get the instance of a pcep tunnel,a instance is used to mark the times of a tunnel created.
150 * instance and id identify a tunnel together.
151 *
152 * @return the instance of a tunnel.
153 */
154 public int getInstance();
155
156 /**
157 * Get the ability of a tunnel.NOPROTECTED,SILVER,or DIAMOND.
158 *
159 * @return ability of the tunenl
160 */
161 public Ability getSla();
162
163 /**
164 * Get the path type of a path if the tunnel's ability is diamond .
165 *
166 * @return the type of a path, the preferred or alternate.
167 */
168 public PATHTYPE getPathType();
169
170 /**
171 * Get the under lay tunnel id of VLAN tunnel.
172 *
173 * @return the tunnel id of a OCH tunnel under lay of a VLAN tunnel.
174 */
175 public long underLayTunnelId();
176
177}