blob: 0dccd353b08042a4aea672359724a2ba178132aa [file] [log] [blame]
jcc4a20a5f2015-04-30 15:43:39 +08001/*
Thomas Vachuska52f2cd12018-11-08 21:20:04 -08002 * Copyright 2018-present Open Networking Foundation
jcc4a20a5f2015-04-30 15:43:39 +08003 *
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 -070016
17package org.onosproject.incubator.net.tunnel;
jcc4a20a5f2015-04-30 15:43:39 +080018
19import java.util.Optional;
20
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040021import com.google.common.annotations.Beta;
jcc4a20a5f2015-04-30 15:43:39 +080022import org.onosproject.net.Annotated;
23import org.onosproject.net.ElementId;
24import org.onosproject.net.NetworkResource;
25import org.onosproject.net.PortNumber;
26import org.onosproject.net.Provided;
27
28/**
29 * Generic representation of a logical port entity in a consistent way,
30 * it is used to identify e.g., ODUk timeSlot, WDM lambda, etc.
31 * It supports nested case.
32 */
Brian O'Connor2bed5ce2015-06-25 15:10:28 -040033@Beta
jcc4a20a5f2015-04-30 15:43:39 +080034public interface OpticalTunnelEndPoint extends TunnelEndPoint, Annotated, Provided, NetworkResource {
35
36 /** Represents coarse tunnel point type classification. */
37 public enum Type {
38 /**
39 * Signifies optical data unit-based tunnel point.
40 */
41 TIMESLOT,
42
43 /**
44 * Signifies optical wavelength-based tunnel point.
45 */
46 LAMBDA
47 }
48
49 /**
50 * Returns the identifier.
51 *
52 * @return identifier
53 */
54 OpticalLogicId id();
55
56 /**
57 * Returns the parent network element to which this tunnel point belongs.
58 *
59 * @return parent network element
60 */
61 Optional<ElementId> elementId();
62
63 /**
64 * Returns the parent network port to which this tunnel point belongs, can not be be null.
65 *
66 * @return port number
67 */
68 Optional<PortNumber> portNumber();
69
70 /**
71 * Returns the parent tunnel point to which this tunnel point belongs, optional.
72 *
73 * @return parent tunnel point, if it is null, the parent is a physical port
74 */
75 Optional<OpticalTunnelEndPoint> parentPoint();
76
77 /**
78 * Indicates whether or not the port is global significant.
79 *
80 * @return true if the port is global significant
81 */
82 boolean isGlobal();
83
84 /**
85 * Returns the tunnel point type.
86 *
87 * @return tunnel point type
88 */
89 Type type();
90}