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