blob: e4f9a2c1a8d8766880dece317e6c0a0793b949d8 [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
25 public enum SubType {
26 /**
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
cheng fan7716ec92015-05-31 01:53:19 +080053 public enum PortType {
54 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 */
cheng fan7716ec92015-05-31 01:53:19 +080062 public 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
70 public SubType linkSubType();
71
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 */
77 public String linkState();
78
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 */
84 public int linkDistance();
85
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 */
92 public String linkCapacityType();
93
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 */
99 public int linkAvailValue();
100
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 */
106 public int linkMaxValue();
107
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 */
113 public PcepDpid linkSrcDeviceID();
114
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 */
120 public PcepDpid linkDstDeviceId();
121
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 */
chengfan359abf72015-07-02 23:33:16 +0800127 public 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 */
chengfan359abf72015-07-02 23:33:16 +0800134 public Port linkDstPort();
cheng fan48e832c2015-05-29 01:54:47 +0800135
136}