blob: 4dc05de14dffb4351a6bf6eba86521eb96bc5c0a [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 */
16package org.onosproject.pcep.api;
17
chengfan359abf72015-07-02 23:33:16 +080018import org.onosproject.net.Port;
19
cheng fan48e832c2015-05-29 01:54:47 +080020/**
chengfan3e618792015-06-28 21:42:01 +080021 * Abstraction of a network infrastructure link.
cheng fan48e832c2015-05-29 01:54:47 +080022 */
23public interface PcepLink extends PcepOperator {
24
chengfan373aac52015-08-17 15:36:44 -050025 enum SubType {
cheng fan48e832c2015-05-29 01:54:47 +080026 /**
27 * Optical Transmission Section Link.
28 */
29 OTS,
30
31 /**
32 * Optical Physical Section Link.
33 */
34 OPS,
35
36 /**
37 * User-to-Network Interface Link.
38 */
39 UNI,
40
41 /**
42 * Optical channel Data Unit-k link.
43 */
44 ODUk,
45
46 /**
47 * Optical Transport Network link.
48 */
49 OTU,
50 }
51
52
chengfan373aac52015-08-17 15:36:44 -050053 enum PortType {
cheng fan7716ec92015-05-31 01:53:19 +080054 ODU_PORT, OCH_PORT, OMS_PORT
55 }
cheng fan48e832c2015-05-29 01:54:47 +080056
57 /**
chengfan3e618792015-06-28 21:42:01 +080058 * Returns the link endpoint port type.
cheng fan48e832c2015-05-29 01:54:47 +080059 *
60 * @return endpoint port type
61 */
chengfan373aac52015-08-17 15:36:44 -050062 PortType portType();
cheng fan48e832c2015-05-29 01:54:47 +080063
64 /**
chengfan3e618792015-06-28 21:42:01 +080065 * Returns the link sub type,OTS,OPS,PKT_OPTICAL or ODUK.
cheng fan48e832c2015-05-29 01:54:47 +080066 *
67 * @return link subType
68 */
69
chengfan373aac52015-08-17 15:36:44 -050070 SubType linkSubType();
cheng fan48e832c2015-05-29 01:54:47 +080071
72 /**
chengfan3e618792015-06-28 21:42:01 +080073 * Returns the link state, up or down.
cheng fan48e832c2015-05-29 01:54:47 +080074 *
75 * @return link state
76 */
chengfan373aac52015-08-17 15:36:44 -050077 String linkState();
cheng fan48e832c2015-05-29 01:54:47 +080078
79 /**
chengfan3e618792015-06-28 21:42:01 +080080 * Returns the distance of a link.
cheng fan48e832c2015-05-29 01:54:47 +080081 *
82 * @return distance
83 */
chengfan373aac52015-08-17 15:36:44 -050084 int linkDistance();
cheng fan48e832c2015-05-29 01:54:47 +080085
86 /**
chengfan3e618792015-06-28 21:42:01 +080087 * Returns the capacity type of a link,1: WAVELENGTHNUM, 2:SLOTNUM, 3,
cheng fan48e832c2015-05-29 01:54:47 +080088 * BANDWIDTH.
89 *
90 * @return capacity type
91 */
chengfan373aac52015-08-17 15:36:44 -050092 String linkCapacityType();
cheng fan48e832c2015-05-29 01:54:47 +080093
94 /**
chengfan3e618792015-06-28 21:42:01 +080095 * Returns the available capacity value ,such as available bandwidth.
cheng fan48e832c2015-05-29 01:54:47 +080096 *
97 * @return availValue
98 */
chengfan373aac52015-08-17 15:36:44 -050099 int linkAvailValue();
cheng fan48e832c2015-05-29 01:54:47 +0800100
101 /**
chengfan3e618792015-06-28 21:42:01 +0800102 * Returns the max capacity value ,such as max bandwidth.
cheng fan48e832c2015-05-29 01:54:47 +0800103 *
104 * @return maxValue
105 */
chengfan373aac52015-08-17 15:36:44 -0500106 int linkMaxValue();
cheng fan48e832c2015-05-29 01:54:47 +0800107
108 /**
chengfan3e618792015-06-28 21:42:01 +0800109 * Returns the source device did of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800110 *
111 * @return source did
112 */
chengfan373aac52015-08-17 15:36:44 -0500113 PcepDpid linkSrcDeviceID();
cheng fan48e832c2015-05-29 01:54:47 +0800114
115 /**
chengfan3e618792015-06-28 21:42:01 +0800116 * Returns the destination device did of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800117 *
118 * @return destination did
119 */
chengfan373aac52015-08-17 15:36:44 -0500120 PcepDpid linkDstDeviceId();
cheng fan48e832c2015-05-29 01:54:47 +0800121
122 /**
chengfan359abf72015-07-02 23:33:16 +0800123 * Returns the source port of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800124 *
125 * @return port number
126 */
chengfan373aac52015-08-17 15:36:44 -0500127 Port linkSrcPort();
cheng fan48e832c2015-05-29 01:54:47 +0800128
129 /**
chengfan359abf72015-07-02 23:33:16 +0800130 * Returns the destination port of a link.
cheng fan48e832c2015-05-29 01:54:47 +0800131 *
132 * @return port number
133 */
chengfan373aac52015-08-17 15:36:44 -0500134 Port linkDstPort();
cheng fan48e832c2015-05-29 01:54:47 +0800135
136}