blob: 19e9ce2e363bdd0ad7d543b1fa920e2c45a0aedc [file] [log] [blame]
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +05301/*
Brian O'Connor0a4e6742016-09-15 23:03:10 -07002 * Copyright 2016-present Open Networking Laboratory
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +05303 *
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.pce.pceservice;
18
19import org.onosproject.incubator.net.tunnel.Tunnel;
20import org.onosproject.incubator.net.tunnel.TunnelId;
21import org.onosproject.net.intent.Constraint;
Priyanka Ba32f6da2016-09-02 16:10:21 +053022
23import java.util.Collection;
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +053024
25/**
26 * Abstraction of an entity which provides functionalities of pce path.
27 */
28public interface PcePath {
29
30 /**
31 * Returns the attribute path id.
32 *
33 * @return path id
34 */
35 TunnelId id();
36
37 /**
38 * Sets the attribute path id.
39 *
40 * @param id path id
41 */
42 void id(TunnelId id);
43
44 /**
45 * Returns the attribute ingress.
46 *
47 * @return source
48 */
49 String source();
50
51 /**
52 * Sets the attribute ingress.
53 *
54 * @param src pce source
55 */
56 void source(String src);
57
58 /**
59 * Returns the attribute egress.
60 *
61 * @return destination
62 */
63 String destination();
64
65 /**
66 * Sets the attribute egress.
67 *
68 * @param dst pce destination.
69 */
70 void destination(String dst);
71
72 /**
73 * Returns the attribute lspType.
74 *
75 * @return lspType
76 */
77 LspType lspType();
78
79 /**
80 * Returns the attribute symbolic-path-name.
81 *
82 * @return symbolic-path-name
83 */
84 String name();
85
86 /**
87 * Returns the attribute cost constraint.
88 *
89 * @return cost constraint
90 */
91 Constraint costConstraint();
92
93 /**
94 * Returns the attribute bandwidth constraint.
95 *
96 * @return bandwidth constraint
97 */
98 Constraint bandwidthConstraint();
99
100 /**
Priyanka Ba32f6da2016-09-02 16:10:21 +0530101 * Returns the list of explicit path objects.
102 *
103 * @return list of explicit path objects
104 */
105 Collection<ExplicitPathInfo> explicitPathInfo();
106
107 /**
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +0530108 * Copies only non-null or non-zero member variables.
109 *
110 * @param id path-id
111 * @return pce-path
112 */
113 PcePath copy(PcePath id);
114
115 /**
116 * Builder for pce path.
117 */
118 interface Builder {
119
120 /**
121 * Returns the builder object of path id.
122 *
123 * @param id path id
124 * @return builder object of path id
125 */
126 Builder id(String id);
127
128 /**
129 * Returns the builder object of ingress.
130 *
131 * @param source ingress
132 * @return builder object of ingress
133 */
134 Builder source(String source);
135
136 /**
137 * Returns the builder object of egress.
138 *
139 * @param destination egress
140 * @return builder object of egress
141 */
142 Builder destination(String destination);
143
144 /**
145 * Returns the builder object of lspType.
146 *
147 * @param lspType lsp type
148 * @return builder object of lsp type
149 */
150 Builder lspType(String lspType);
151
152 /**
153 * Returns the builder object of symbolic-path-name.
154 *
155 * @param n symbolic-path-name
156 * @return builder object of symbolic-path-name
157 */
158 Builder name(String n);
159
160 /**
161 * Returns the builder object of cost constraint.
162 *
163 * @param cost constraint
164 * @return builder object of cost constraint
165 */
166 Builder costConstraint(String cost);
167
168 /**
169 * Returns the builder object of bandwidth constraint.
170 *
171 * @param bandwidth constraint
172 * @return builder object of bandwidth constraint
173 */
174 Builder bandwidthConstraint(String bandwidth);
175
176 /**
177 * Copies tunnel information to local.
178 *
179 * @param tunnel pcc tunnel
180 * @return object of pce-path
181 */
182 Builder of(Tunnel tunnel);
183
184 /**
Priyanka Ba32f6da2016-09-02 16:10:21 +0530185 * Returns the builder object of ExplicitPathInfo.
186 *
187 * @param explicitPathInfo list of explicit path obj
188 * @return builder object of ExplicitPathInfo
189 */
190 Builder explicitPathInfo(Collection<ExplicitPathInfo> explicitPathInfo);
191
192 /**
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +0530193 * Builds object of pce path.
194 *
195 * @return object of pce path.
196 */
197 PcePath build();
198 }
199}