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