a29fd9d91339147fdcb50b35310d3725cdaa54cd
[ccsdk/features.git] /
1 module tapi-path-computation {
2     namespace "urn:onf:otcc:yang:tapi-path-computation";
3     prefix tapi-path-computation;
4     import tapi-topology {
5         prefix tapi-topology;
6     }
7     import tapi-common {
8         prefix tapi-common;
9     }
10     organization "ONF OTCC (Open Transport Configuration & Control) Project";
11     contact "
12         Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
13         Project List: <mailto:transport-api@opennetworking.org>
14         Editor: Karthik Sethuraman
15                 <mailto:karthik.sethuraman@necam.com>";
16     description "
17         This module contains TAPI Path Computation Model definitions.
18         Source: TapiPathComputation.uml
19         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.
20         License: This module is distributed under the Apache License 2.0";
21     revision 2018-08-31 {
22         description "ONF Transport API version 2.1.0
23         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
24         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md>";
25         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
26                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";
27     }
28     revision 2018-03-07 {
29         description "ONF Transport API version 2.0.2
30         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
31         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md>";
32         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
33                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML>";
34     }
35     revision 2018-02-16 {
36         description "ONF Transport API version 2.0.1
37         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
38         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md>";
39         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
40                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML>";
41     }
42     revision 2018-01-02 {
43         description "ONF Transport API version 2.0.0
44         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
45         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md>";
46         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
47                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML>";
48     }
49     augment "/tapi-common:context" {
50         uses path-computation-context-g;
51         description "Augments the base TAPI Context with PathComputationService information";
52     }
53
54     /*************************
55     * definitions of refrences
56     *************************/
57     grouping path-ref-g {
58         leaf path-uuid {
59             type leafref {
60                 path '/tapi-common:context/tapi-path-computation:path/tapi-path-computation:uuid';
61             }
62             description "none";
63         }
64         description "none";
65     }
66
67     /***********************
68     * package object-classes
69     **********************/
70         grouping path-g {
71             list link {
72                 uses tapi-topology:link-ref-g;
73                 key 'topology-uuid link-uuid';
74                 config false;
75                 min-elements 1;
76                 description "none";
77             }
78             container routing-constraint {
79                 config false;
80                 uses routing-constraint-g;
81                 description "none";
82             }
83             leaf direction {
84                 type tapi-common:forwarding-direction;
85                 description "none";
86             }
87             leaf layer-protocol-name {
88                 type tapi-common:layer-protocol-name;
89                 config false;
90                 description "none";
91             }
92             uses tapi-common:resource-spec-g;
93             description "Path is described by an ordered list of TE Links. A TE Link is defined by a pair of Node/NodeEdgePoint IDs. A Connection is realized by concatenating link resources (associated with a Link) and the lower-level connections (cross-connections) in the different nodes";
94         }
95         grouping path-service-end-point-g {
96             container service-interface-point {
97                 uses tapi-common:service-interface-point-ref-g;
98                 config false;
99                 description "none";
100             }
101             leaf layer-protocol-name {
102                 type tapi-common:layer-protocol-name;
103                 config false;
104                 description "none";
105             }
106             leaf layer-protocol-qualifier {
107                 type tapi-common:layer-protocol-qualifier;
108                 description "none";
109             }
110             container capacity {
111                 uses tapi-common:capacity-g;
112                 description "none";
113             }
114             leaf role {
115                 type tapi-common:port-role;
116                 config false;
117                 description "Each EP of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root)  in the context of the FC with respect to the FC function. ";
118             }
119             leaf direction {
120                 type tapi-common:port-direction;
121                 config false;
122                 description "The orientation of defined flow at the EndPoint.";
123             }
124             uses tapi-common:local-class-g;
125             description "The association of the FC to LTPs is made via EndPoints.
126                 The EndPoint (EP) object class models the access to the FC function.
127                 The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.
128                 In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC.
129                 It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.
130                 The EP replaces the Protection Unit of a traditional protection model.
131                 The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";
132         }
133         grouping path-computation-service-g {
134             list path {
135                 uses path-ref-g;
136                 key 'path-uuid';
137                 config false;
138                 min-elements 1;
139                 description "none";
140             }
141             list end-point {
142                 key 'local-id';
143                 min-elements 2;
144                 max-elements 2;
145                 uses path-service-end-point-g;
146                 description "none";
147             }
148             container routing-constraint {
149                 uses routing-constraint-g;
150                 description "none";
151             }
152             container topology-constraint {
153                 uses topology-constraint-g;
154                 description "none";
155             }
156             container objective-function {
157                 uses path-objective-function-g;
158                 description "none";
159             }
160             container optimization-constraint {
161                 uses path-optimization-constraint-g;
162                 description "none";
163             }
164             uses tapi-common:service-spec-g;
165             description "none";
166         }
167         grouping path-objective-function-g {
168             leaf bandwidth-optimization {
169                 type tapi-common:directive-value;
170                 config false;
171                 description "none";
172             }
173             leaf concurrent-paths {
174                 type tapi-common:directive-value;
175                 config false;
176                 description "none";
177             }
178             leaf cost-optimization {
179                 type tapi-common:directive-value;
180                 config false;
181                 description "none";
182             }
183             leaf link-utilization {
184                 type tapi-common:directive-value;
185                 config false;
186                 description "none";
187             }
188             leaf resource-sharing {
189                 type tapi-common:directive-value;
190                 config false;
191                 description "none";
192             }
193             uses tapi-common:local-class-g;
194             description "none";
195         }
196         grouping path-optimization-constraint-g {
197             leaf traffic-interruption {
198                 type tapi-common:directive-value;
199                 config false;
200                 description "none";
201             }
202             uses tapi-common:local-class-g;
203             description "none";
204         }
205         grouping routing-constraint-g {
206             list cost-characteristic {
207                 key 'cost-name';
208                 uses tapi-topology:cost-characteristic-g;
209                 description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
210             }
211             list latency-characteristic {
212                 key 'traffic-property-name';
213                 uses tapi-topology:latency-characteristic-g;
214                 description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
215             }
216             list risk-diversity-characteristic {
217                 key 'risk-characteristic-name';
218                 uses tapi-topology:risk-characteristic-g;
219                 description "none";
220             }
221             leaf diversity-policy {
222                 type diversity-policy;
223                 description "none";
224             }
225             leaf route-objective-function {
226                 type route-objective-function;
227                 description "none";
228             }
229             leaf route-direction {
230                 type tapi-common:forwarding-direction;
231                 description "none";
232             }
233             leaf is-exclusive {
234                 type boolean;
235                 default "true";
236                 description "To distinguish if the resources are to be exclusive to the service";
237             }
238             description "none";
239         }
240         grouping path-computation-context-g {
241             list path-comp-service {
242                 key 'uuid';
243                 uses path-computation-service-g;
244                 description "none";
245             }
246             list path {
247                 key 'uuid';
248                 config false;
249                 uses path-g;
250                 description "none";
251             }
252             description "none";
253         }
254         grouping topology-constraint-g {
255             list include-topology {
256                 uses tapi-topology:topology-ref-g;
257                 key 'topology-uuid';
258                 config false;
259                 description "none";
260             }
261             list avoid-topology {
262                 uses tapi-topology:topology-ref-g;
263                 key 'topology-uuid';
264                 config false;
265                 description "none";
266             }
267             list include-path {
268                 uses tapi-path-computation:path-ref-g;
269                 key 'path-uuid';
270                 config false;
271                 description "none";
272             }
273             list exclude-path {
274                 uses tapi-path-computation:path-ref-g;
275                 key 'path-uuid';
276                 config false;
277                 description "none";
278             }
279             list include-link {
280                 uses tapi-topology:link-ref-g;
281                 key 'topology-uuid link-uuid';
282                 config false;
283                 description "This is a loose constraint - that is it is unordered and could be a partial list ";
284             }
285             list exclude-link {
286                 uses tapi-topology:link-ref-g;
287                 key 'topology-uuid link-uuid';
288                 config false;
289                 description "none";
290             }
291             list include-node {
292                 uses tapi-topology:node-ref-g;
293                 key 'topology-uuid node-uuid';
294                 config false;
295                 description "This is a loose constraint - that is it is unordered and could be a partial list";
296             }
297             list exclude-node {
298                 uses tapi-topology:node-ref-g;
299                 key 'topology-uuid node-uuid';
300                 config false;
301                 description "none";
302             }
303             leaf-list preferred-transport-layer {
304                 type tapi-common:layer-protocol-name;
305                 config false;
306                 description "soft constraint requested by client to indicate the layer(s) of transport connection that it prefers to carry the service. This could be same as the service layer or one of the supported server layers";
307             }
308             description "none";
309         }
310
311     /***********************
312     * package type-definitions
313     **********************/
314         typedef route-objective-function {
315             type enumeration {
316                 enum MIN_WORK_ROUTE_HOP {
317                     description "none";
318                 }
319                 enum MIN_WORK_ROUTE_COST {
320                     description "none";
321                 }
322                 enum MIN_WORK_ROUTE_LATENCY {
323                     description "none";
324                 }
325                 enum MIN_SUM_OF_WORK_AND_PROTECTION_ROUTE_HOP {
326                     description "none";
327                 }
328                 enum MIN_SUM_OF_WORK_AND_PROTECTION_ROUTE_COST {
329                     description "none";
330                 }
331                 enum MIN_SUM_OF_WORK_AND_PROTECTION_ROUTE_LATENCY {
332                     description "none";
333                 }
334                 enum LOAD_BALANCE_MAX_UNUSED_CAPACITY {
335                     description "none";
336                 }
337             }
338             description "none";
339         }
340         typedef diversity-policy {
341             type enumeration {
342                 enum SRLG {
343                     description "none";
344                 }
345                 enum SRNG {
346                     description "none";
347                 }
348                 enum SNG {
349                     description "none";
350                 }
351                 enum NODE {
352                     description "none";
353                 }
354                 enum LINK {
355                     description "none";
356                 }
357             }
358             description "none";
359         }
360
361     /***********************
362     * package interfaces
363     **********************/
364         rpc compute-p-2-p-path {
365             description "none";
366             input {
367                 list sep {
368                     min-elements 2;
369                     max-elements 2;
370                     uses path-service-end-point-g;
371                     description "none";
372                 }
373                 container routing-constraint {
374                     uses routing-constraint-g;
375                     description "none";
376                 }
377                 container topology-constraint {
378                     uses topology-constraint-g;
379                     description "none";
380                 }
381                 container objective-function {
382                     uses path-objective-function-g;
383                     description "none";
384                 }
385             }
386             output {
387                 container service {
388                     uses path-computation-service-g;
389                     description "none";
390                 }
391             }
392         }
393         rpc optimize-p-2-p-path {
394             description "none";
395             input {
396                 leaf path-id-or-name {
397                     type string;
398                     description "none";
399                 }
400                 container routing-constraint {
401                     uses routing-constraint-g;
402                     description "none";
403                 }
404                 container optimization-constraint {
405                     uses path-optimization-constraint-g;
406                     description "none";
407                 }
408                 container objective-function {
409                     uses path-objective-function-g;
410                     description "none";
411                 }
412             }
413             output {
414                 container service {
415                     uses path-computation-service-g;
416                     description "none";
417                 }
418             }
419         }
420         rpc delete-p-2-p-path {
421             description "none";
422             input {
423                 leaf path-id-or-name {
424                     type string;
425                     description "none";
426                 }
427             }
428             output {
429                 container service {
430                     uses path-computation-service-g;
431                     description "none";
432                 }
433             }
434         }
435
436 }