blob: b43f40614edb13bfd7f1f246a81cc0b13fd7c9e6 [file] [log] [blame]
Henry Yu4b4a7eb2016-11-09 20:07:53 -05001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016 Open Networking Foundation
Henry Yu4b4a7eb2016-11-09 20:07:53 -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 */
16package org.onosproject.tetopology.management.api.link;
17
18import org.onosproject.tetopology.management.api.EncodingType;
19import org.onosproject.tetopology.management.api.SwitchingType;
20import org.onosproject.tetopology.management.api.TeStatus;
21import org.onosproject.tetopology.management.api.TeTopologyKey;
22
23import java.util.BitSet;
24import java.util.List;
25
26/**
27 * Abstraction of a TE link.
28 */
29public interface TeLink {
30 /**
31 * Indicates that the TE link belongs to an abstract topology.
32 */
33 public static final short BIT_ABSTRACT = 0;
34
35 /**
36 * Indicates that the underlay topology that supports this TE link
37 * is dynamically created as opposed to being created by provisioning.
38 */
39 public static final short BIT_DYNAMIC = 1;
40
41 /**
42 * Indicates that the underlay topology is committed to service.
43 */
44 public static final short BIT_COMMITTED = 2;
45
46 /**
47 * Indicates that the TE link connects 2 TE domains.
48 */
49 public static final short BIT_ACCESS_INTERDOMAIN = 3;
50
51 /**
52 * Indicates that the TE link is not numbered.
53 */
54 public static final short BIT_UNNUMBERED = 4;
55
56 /**
57 * Returns the TE link key.
58 *
59 * @return the TE link key
60 */
61 TeLinkTpKey teLinkKey();
62
63 /**
64 * Returns the key of the bi-directional peer TE link.
65 *
66 * @return peer TE link key
67 */
68 TeLinkTpKey peerTeLinkKey();
69
70 /**
71 * Returns the flags of this TE link.
72 *
73 * @return the flags
74 */
75 BitSet flags();
76
77 /**
78 * Returns the network layer switching type for this link.
79 *
80 * @return the network layer switching type
81 */
82 SwitchingType switchingLayer();
83
84 /**
85 * Returns the network layer encoding type for this link.
86 *
87 * @return the encoding type
88 */
89 EncodingType encodingLayer();
90
91 /**
92 * Returns the external link.
93 *
94 * @return the external link
95 */
96 ExternalLink externalLink();
97
98 /**
99 * Returns the underlay TE topology identifier for the link.
100 *
101 * @return the underlay TE topology id
102 */
103 TeTopologyKey underlayTeTopologyId();
104
105 /**
106 * Returns the primary path.
107 *
108 * @return underlay primary path
109 */
110 UnderlayPrimaryPath primaryPath();
111
112 /**
113 * Returns the backup paths.
114 *
115 * @return list of underlay backup paths
116 */
117 List<UnderlayBackupPath> backupPaths();
118
119 /**
120 * Returns the supporting tunnel protection type.
121 *
122 * @return the tunnel protection type
123 */
124 TunnelProtectionType tunnelProtectionType();
125
126 /**
127 * Returns the supporting tunnel's source tunnel termination point
128 * identifier.
129 *
130 * @return the source TTP id
131 */
132 long sourceTtpId();
133
134 /**
135 * Returns the supporting tunnel's destination tunnel termination
136 * point identifier.
137 *
138 * @return the destination TTP id
139 */
140 long destinationTtpId();
141
142 /**
143 * Returns the supporting tunnel identifier.
144 *
145 * @return the supporting tunnel id
146 */
147 TeTunnelId teTunnelId();
148
149 /**
150 * Returns the supporting TE link identifier.
151 *
152 * @return the supporting TE link id
153 */
154 TeLinkTpGlobalKey supportingTeLinkId();
155
156 /**
157 * Returns the source TE link identifier.
158 *
159 * @return the source link id
160 */
161 TeLinkTpGlobalKey sourceTeLinkId();
162
163 /**
164 * Returns the link cost.
165 *
166 * @return the cost
167 */
Hesam Rahimi41208102016-12-09 17:54:03 -0500168 Long cost();
Henry Yu4b4a7eb2016-11-09 20:07:53 -0500169
170 /**
171 * Returns the link delay.
172 *
173 * @return the delay
174 */
Hesam Rahimi41208102016-12-09 17:54:03 -0500175 Long delay();
Henry Yu4b4a7eb2016-11-09 20:07:53 -0500176
177 /**
178 * Returns the link SRLG values.
179 *
180 * @return the srlgs
181 */
182 List<Long> srlgs();
183
184 /**
185 * Returns the link administrative group.
186 *
187 * @return the adminGroup
188 */
189 Long administrativeGroup();
190
191 /**
192 * Returns the supported inter-layer locks.
193 *
194 * @return the inter-layer locks
195 */
196 List<Long> interLayerLocks();
197
198 /**
199 * Returns the maximum bandwidth at each priority level.
200 *
201 * @return a list of maximum bandwidths
202 */
203 float[] maxBandwidth();
204
205 /**
206 * Returns the available bandwidth at each priority level.
207 *
208 * @return a list of available bandwidths
209 */
210 float[] availBandwidth();
211
212 /**
213 * Returns the maximum available bandwidth for a LSP at each priority level.
214 *
215 * @return a list of maximum available bandwidths
216 */
217 float[] maxAvailLspBandwidth();
218
219 /**
220 * Returns the minimum available bandwidth for a LSP at each priority level.
221 *
222 * @return a list of minimum available bandwidths
223 */
224 float[] minAvailLspBandwidth();
225
226 /**
227 * Returns the administrative status of this TE link.
228 *
229 * @return the admin status
230 */
231 TeStatus adminStatus();
232
233 /**
234 * Returns the operational status of this TE link.
235 *
236 * @return the operational status
237 */
238 TeStatus opStatus();
239
240 /**
241 * Returns the link ODUk resources.
242 *
243 * @return the ODUk resources
244 */
245 OduResource oduResource();
246}