Add latest MEF NRP yang modules.
[unimgr.git] / nrp-api / src / main / yang / tapi-topology.yang
1 module tapi-topology {
2     namespace "urn:mef:yang:TapiTopology";
3     prefix tapi-topology;
4     import tapi-common {
5         prefix tapi-common;
6     }
7     organization "Metro Ethernet Forum (MEF)";
8     contact "MEF";
9     description "none";
10     revision 2017-02-27 {
11         description "MEF NRP 1.0.alpha";
12         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
13     }
14     augment "/tapi-common:context" {
15         uses topology-context;
16         description "none";
17     }
18     /***********************
19     * package object-classes
20     **********************/
21         grouping link {
22             leaf-list node-edge-point {
23                 type leafref {
24                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
25                 }
26                 config false;
27                 min-elements 2;
28                 description "none";
29             }
30             leaf-list node {
31                 type leafref {
32                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';
33                 }
34                 config false;
35                 min-elements 2;
36                 description "none";
37             }
38             container state {
39                 config false;
40                 uses tapi-common:admin-state-pac;
41                 description "none";
42             }
43             container transfer-capacity {
44                 config false;
45                 uses transfer-capacity-pac;
46                 description "none";
47             }
48             container transfer-cost {
49                 config false;
50                 uses transfer-cost-pac;
51                 description "none";
52             }
53             container transfer-integrity {
54                 config false;
55                 uses transfer-integrity-pac;
56                 description "none";
57             }
58             container transfer-timing {
59                 config false;
60                 uses transfer-timing-pac;
61                 description "none";
62             }
63             container risk-parameter {
64                 config false;
65                 uses risk-parameter-pac;
66                 description "none";
67             }
68             container validation {
69                 config false;
70                 uses validation-pac;
71                 description "none";
72             }
73             container lp-transition {
74                 config false;
75                 uses layer-protocol-transition-pac;
76                 description "none";
77             }
78             leaf-list layer-protocol-name {
79                 type tapi-common:layer-protocol-name;
80                 config false;
81                 min-elements 1;
82                 description "none";
83             }
84             leaf direction {
85                 type tapi-common:forwarding-direction;
86                 config false;
87                 description "The directionality of the Link. 
88                     Is applicable to simple Links where all LinkEnds are BIDIRECTIONAL (the Link will be BIDIRECTIONAL) or UNIDIRECTIONAL (the Link will be UNIDIRECTIONAL). 
89                     Is not present in more complex cases.";
90             }
91             uses tapi-common:resource-spec;
92             description "The Link object class models effective adjacency between two or more ForwardingDomains (FD). ";
93         }
94         grouping node {
95             list owned-node-edge-point {
96                 key 'uuid';
97                 config false;
98                 uses node-edge-point;
99                 description "none";
100             }
101             leaf-list aggregated-node-edge-point {
102                 type leafref {
103                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
104                 }
105                 config false;
106                 description "none";
107             }
108             leaf encap-topology {
109                 type leafref {
110                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
111                 }
112                 config false;
113                 description "none";
114             }
115             container state {
116                 config false;
117                 uses tapi-common:admin-state-pac;
118                 description "none";
119             }
120             container transfer-capacity {
121                 config false;
122                 uses transfer-capacity-pac;
123                 description "none";
124             }
125             container transfer-cost {
126                 config false;
127                 uses transfer-cost-pac;
128                 description "none";
129             }
130             container transfer-integrity {
131                 config false;
132                 uses transfer-integrity-pac;
133                 description "none";
134             }
135             container transfer-timing {
136                 config false;
137                 uses transfer-timing-pac;
138                 description "none";
139             }
140             leaf-list layer-protocol-name {
141                 type tapi-common:layer-protocol-name;
142                 config false;
143                 min-elements 1;
144                 description "none";
145             }
146             uses tapi-common:resource-spec;
147             description "The ForwardingDomain (FD) object class models the “ForwardingDomain” topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding. 
148                 At the lowest level of recursion, an FD (within a network element (NE)) represents a switch matrix (i.e., a fabric). Note that an NE can encompass multiple switch matrices (FDs). ";
149         }
150         grouping topology {
151             list node {
152                 key 'uuid';
153                 config false;
154                 uses node;
155                 description "none";
156             }
157             list link {
158                 key 'uuid';
159                 config false;
160                 uses link;
161                 description "none";
162             }
163             leaf-list layer-protocol-name {
164                 type tapi-common:layer-protocol-name;
165                 config false;
166                 min-elements 1;
167                 description "none";
168             }
169             uses tapi-common:resource-spec;
170             description "The ForwardingDomain (FD) object class models the “ForwardingDomain” topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding. 
171                 At the lowest level of recursion, an FD (within a network element (NE)) represents a switch matrix (i.e., a fabric). Note that an NE can encompass multiple switch matrices (FDs). ";
172         }
173         grouping layer-protocol-transition-pac {
174             leaf-list transitioned-layer-protocol-name {
175                 type string;
176                 min-elements 2;
177                 description "Provides the ordered structure of layer protocol transitions encapsulated in the TopologicalEntity. The ordering relates to the LinkPort role.";
178             }
179             description "Relevant for a Link that is formed by abstracting one or more LTPs (in a stack) to focus on the flow and deemphasize the protocol transformation. 
180                 This abstraction is relevant when considering multi-layer routing. 
181                 The layer protocols of the LTP and the order of their application to the signal is still relevant and need to be accounted for. This is derived from the LTP spec details.
182                 This Pac provides the relevant abstractions of the LTPs and provides the necessary association to the LTPs involved.
183                 Links that included details in this Pac are often referred to as Transitional Links.";
184         }
185         grouping node-edge-point {
186             list layer-protocol {
187                 key 'local-id';
188                 config false;
189                 min-elements 1;
190                 uses tapi-common:layer-protocol;
191                 description "none";
192             }
193             leaf-list aggregated-node-edge-point {
194                 type leafref {
195                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
196                 }
197                 config false;
198                 description "none";
199             }
200             leaf-list mapped-service-interface-point {
201                 type leafref {
202                     path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';
203                 }
204                 description "none";
205             }
206             container state {
207                 config false;
208                 uses tapi-common:admin-state-pac;
209                 description "none";
210             }
211             leaf termination-direction {
212                 type tapi-common:termination-direction;
213                 config false;
214                 description "none";
215             }
216             leaf link-port-direction {
217                 type tapi-common:port-direction;
218                 config false;
219                 description "The orientation of defined flow at the LinkEnd.";
220             }
221             leaf link-port-role {
222                 type tapi-common:port-role;
223                 config false;
224                 description "Each LinkEnd of the Link has a role (e.g., symmetric, hub, spoke, leaf, root)  in the context of the Link with respect to the Link function. ";
225             }
226             uses tapi-common:resource-spec;
227             description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 
228                 The structure of LTP supports all transport protocols including circuit and packet forms.";
229         }
230         grouping risk-parameter-pac {
231             list risk-characteristic {
232                 key 'risk-characteristic-name';
233                 config false;
234                 min-elements 1;
235                 uses risk-characteristic;
236                 description "A list of risk characteristics for consideration in an analysis of shared risk. Each element of the list represents a specific risk consideration.";
237             }
238             description "The risk characteristics of a TopologicalEntity come directly from the underlying physical realization. 
239                 The risk characteristics propagate from the physical realization to the client and from the server layer to the client layer, this propagation may be modified by protection.
240                 A TopologicalEntity may suffer degradation or failure as a result of a problem in a part of the underlying realization.
241                 The realization can be partitioned into segments which have some relevant common failure modes.
242                 There is a risk of failure/degradation of each segment of the underlying realization.
243                 Each segment is a part of a larger physical/geographical unit that behaves as one with respect to failure (i.e. a failure will have a high probability of impacting the whole unit (e.g. all cables in the same duct).
244                 Disruptions to that larger physical/geographical unit will impact (cause failure/errors to) all TopologicalEntities that use any part of that larger physical/geographical entity.
245                 Any TopologicalEntity that uses any part of that larger physical/geographical unit will suffer impact and hence each TopologicalEntity shares risk.
246                 The identifier of each physical/geographical unit that is involved in the realization of each segment of a Topological entity can be listed in the RiskParameter_Pac of that TopologicalEntity.
247                 A segment has one or more risk characteristic.
248                 Shared risk between two TopologicalEntities compromises the integrity of any solution that use one of those TopologicalEntity as a backup for the other.
249                 Where two TopologicalEntities have a common risk characteristic they have an elevated probability of failing simultaneously compared to two TopologicalEntities that do not share risk characteristics.";
250         }
251         grouping transfer-capacity-pac {
252             container total-potential-capacity {
253                 config false;
254                 uses capacity;
255                 description "An optimistic view of the capacity of the TopologicalEntity assuming that any shared capacity is available to be taken.";
256             }
257             container available-capacity {
258                 config false;
259                 uses capacity;
260                 description "Capacity available to be assigned.";
261             }
262             list capacity-assigned-to-user-view {
263                 key 'total-size';
264                 config false;
265                 uses capacity;
266                 description "Capacity already assigned";
267             }
268             leaf capacity-interaction-algorithm {
269                 type string;
270                 config false;
271                 description "A reference to an algorithm that describes how various chunks of allocated capacity interact (e.g. when shared)";
272             }
273             description "The TopologicalEntity derives capacity from the underlying realization. 
274                 A TopologicalEntity may be an abstraction and virtualization of a subset of the underlying capability offered in a view or may be directly reflecting the underlying realization.
275                 A TopologicalEntity may be directly used in the view or may be assigned to another view for use.
276                 The clients supported by a multi-layer TopologicalEntity may interact such that the resources used by one client may impact those available to another. This is derived from the LTP spec details.
277                 Represents the capacity available to user (client) along with client interaction and usage. 
278                 A TopologicalEntity may reflect one or more client protocols and one or more members for each profile.";
279         }
280         grouping transfer-cost-pac {
281             list cost-characteristic {
282                 key 'cost-name cost-value cost-algorithm';
283                 config false;
284                 min-elements 1;
285                 uses cost-characteristic;
286                 description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
287             }
288             description "The cost characteristics of a TopologicalEntity not necessarily correlated to the cost of the underlying physical realization. 
289                 They may be quite specific to the individual TopologicalEntity e.g. opportunity cost. Relates to layer capacity
290                 There may be many perspectives from which cost may be considered  for a particular TopologicalEntity and hence many specific costs and potentially cost algorithms. 
291                 Using an entity will incur a cost. ";
292         }
293         grouping transfer-integrity-pac {
294             leaf error-characteristic {
295                 type string;
296                 config false;
297                 description "Describes the degree to which the signal propagated can be errored. 
298                     Applies to TDM systems as the errored signal will be propagated and not packet as errored packets will be discarded.";
299             }
300             leaf loss-characteristic {
301                 type string;
302                 config false;
303                 description "Describes the acceptable characteristic of lost packets where loss may result from discard due to errors or overflow.
304                     Applies to packet systems and not TDM (as for TDM errored signals are propagated unless grossly errored and overflow/underflow turns into timing slips).";
305             }
306             leaf repeat-delivery-characteristic {
307                 type string;
308                 config false;
309                 description "Primarily applies to packet systems where a packet may be delivered more than once (in fault recovery for example). 
310                     It can also apply to TDM where several frames may be received twice due to switching in a system with a large differential propagation delay.";
311             }
312             leaf delivery-order-characteristic {
313                 type string;
314                 config false;
315                 description "Describes the degree to which packets will be delivered out of sequence.
316                     Does not apply to TDM as the TDM protocols maintain strict order.";
317             }
318             leaf unavailable-time-characteristic {
319                 type string;
320                 config false;
321                 description "Describes the duration for which there may be no valid signal propagated.";
322             }
323             leaf server-integrity-process-characteristic {
324                 type string;
325                 config false;
326                 description "Describes the effect of any server integrity enhancement process on the characteristics of the TopologicalEntity.";
327             }
328             description "Transfer intergrity characteristic covers expected/specified/acceptable characteristic of degradation of the transfered signal.
329                 It includes all aspects of possible degradation of signal content as well as any damage of any form to the total TopologicalEntity and to the carried signals.
330                 Note that the statement is of total impact to the TopologicalEntity so any partial usage of the TopologicalEntity (e.g. a signal that does not use full capacity) will only suffer its portion of the impact.";
331         }
332         grouping transfer-timing-pac {
333             list latency-characteristic {
334                 key 'traffic-property-name traffic-property-queing-latency';
335                 config false;
336                 min-elements 1;
337                 uses latency-characteristic;
338                 description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
339             }
340             description "A TopologicalEntity will suffer effects from the underlying physical realization related to the timing of the information passed by the TopologicalEntity.";
341         }
342         grouping validation-pac {
343             list validation-mechanism {
344                 key 'validation-mechanism layer-protocol-adjacency-validated validation-robustness';
345                 config false;
346                 min-elements 1;
347                 uses validation-mechanism;
348                 description "Provides details of the specific validation mechanism(s) used to confirm the presence of an intended topologicalEntity.";
349             }
350             description "Validation covers the various adjacenct discovery and reachability verification protocols. Also may cover Information source and degree of integrity.";
351         }
352         grouping network-topology-service {
353             leaf-list topology {
354                 type leafref {
355                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
356                 }
357                 config false;
358                 description "none";
359             }
360             uses tapi-common:service-spec;
361             description "none";
362         }
363         grouping topology-context {
364             container nw-topology-service {
365                 config false;
366                 uses network-topology-service;
367                 description "none";
368             }
369             list topology {
370                 key 'uuid';
371                 config false;
372                 uses topology;
373                 description "none";
374             }
375             description "none";
376         }
377
378     /***********************
379     * package type-definitions
380     **********************/
381         grouping capacity {
382             leaf total-size {
383                 type fixed-capacity-value;
384                 description "Total capacity of the TopologicalEntity in MB/s";
385             }
386             leaf packet-bw-profile-type {
387                 type bandwidth-profile-type;
388                 description "none";
389             }
390             leaf committed-information-rate {
391                 type uint64;
392                 description "none";
393             }
394             leaf committed-burst-size {
395                 type uint64;
396                 description "none";
397             }
398             leaf peak-information-rate {
399                 type uint64;
400                 description "none";
401             }
402             leaf peak-burst-size {
403                 type uint64;
404                 description "none";
405             }
406             leaf color-aware {
407                 type boolean;
408                 description "none";
409             }
410             leaf coupling-flag {
411                 type boolean;
412                 description "none";
413             }
414             description "Information on capacity of a particular TopologicalEntity.";
415         }
416         grouping cost-characteristic {
417             leaf cost-name {
418                 type string;
419                 description "The cost characteristic will related to some aspect of the TopologicalEntity (e.g. $ cost, routing weight). This aspect will be conveyed by the costName.";
420             }
421             leaf cost-value {
422                 type string;
423                 description "The specific cost.";
424             }
425             leaf cost-algorithm {
426                 type string;
427                 description "The cost may vary based upon some properties of the TopologicalEntity. The rules for the variation are conveyed by the costAlgorithm.";
428             }
429             description "The information for a particular cost characteristic.";
430         }
431         typedef fixed-capacity-value {
432             type enumeration {
433                 enum not-applicable {
434                     description "none";
435                 }
436                 enum 10mbps {
437                     description "none";
438                 }
439                 enum 100mbps {
440                     description "none";
441                 }
442                 enum 1gbps {
443                     description "none";
444                 }
445                 enum 2-4gbps {
446                     description "none";
447                 }
448                 enum 10gbps {
449                     description "none";
450                 }
451                 enum 40gbps {
452                     description "none";
453                 }
454                 enum 100gbps {
455                     description "none";
456                 }
457                 enum 200gbps {
458                     description "none";
459                 }
460                 enum 400gbps {
461                     description "none";
462                 }
463             }
464             description "The Capacity (Bandwidth) values that are applicable for digital layers. ";
465         }
466         grouping latency-characteristic {
467             leaf fixed-latency-characteristic {
468                 type string;
469                 config false;
470                 description "A TopologicalEntity suffers delay caused by the realization of the servers (e.g. distance related; FEC encoding etc.) along with some client specific processing. This is the total average latency effect of the TopologicalEntity";
471             }
472             leaf jitter-characteristic {
473                 type string;
474                 config false;
475                 description "High frequency deviation from true periodicity of a signal and therefore a small high rate of change of transfer latency.
476                     Applies to TDM systems (and not packet).";
477             }
478             leaf wander-characteristic {
479                 type string;
480                 config false;
481                 description "Low frequency deviation from true periodicity of a signal and therefore a small low rate of change of transfer latency.
482                     Applies to TDM systems (and not packet).";
483             }
484             leaf traffic-property-name {
485                 type string;
486                 description "The identifier of the specific traffic property to which the queuing latency applies.";
487             }
488             leaf traffic-property-queing-latency {
489                 type string;
490                 description "The specific queuing latency for the traffic property.";
491             }
492             description "Provides information on latency characteristic for a particular stated trafficProperty.";
493         }
494         grouping risk-characteristic {
495             leaf risk-characteristic-name {
496                 type string;
497                 description "The name of the risk characteristic. The characteristic may be related to a specific degree of closeness. 
498                     For example a particular characteristic may apply to failures that are localized (e.g. to one side of a road) where as another characteristic may relate to failures that have a broader impact (e.g. both sides of a road that crosses a bridge).
499                     Depending upon the importance of the traffic being routed different risk characteristics will be evaluated.";
500             }
501             leaf-list risk-identifier-list {
502                 type string;
503                 min-elements 1;
504                 description "A list of the identifiers of each physical/geographic unit (with the specific risk characteristic) that is related to a segment of the TopologicalEntity.";
505             }
506             description "The information for a particular risk characteristic where there is a list of risk identifiers related to that characteristic.";
507         }
508         grouping validation-mechanism {
509             leaf validation-mechanism {
510                 type string;
511                 description "Name of mechanism used to validate adjacency";
512             }
513             leaf layer-protocol-adjacency-validated {
514                 type string;
515                 description "State of validatiion";
516             }
517             leaf validation-robustness {
518                 type string;
519                 description "Quality of validation (i.e. how likely is the stated validation to be invalid)";
520             }
521             description "Identifies the validation mechanism and describes the characteristics of that mechanism";
522         }
523         typedef bandwidth-profile-type {
524             type enumeration {
525                 enum not-applicable {
526                     description "none";
527                 }
528                 enum mef-10-x {
529                     description "none";
530                 }
531                 enum rfc-2697 {
532                     description "none";
533                 }
534                 enum rfc-2698 {
535                     description "none";
536                 }
537                 enum rfc-4115 {
538                     description "none";
539                 }
540             }
541             description "none";
542         }
543
544     /***********************
545     * package interfaces
546     **********************/
547         rpc get-topology-details {
548             description "none";
549             input {
550                 leaf topology-id-or-name {
551                     type string;
552                     description "none";
553                 }
554             }
555             output {
556                 container topology {
557                     uses topology;
558                     description "none";
559                 }
560             }
561         }
562         rpc get-node-details {
563             description "none";
564             input {
565                 leaf topology-id-or-name {
566                     type string;
567                     description "none";
568                 }
569                 leaf node-id-or-name {
570                     type string;
571                     description "none";
572                 }
573             }
574             output {
575                 container node {
576                     uses node;
577                     description "none";
578                 }
579             }
580         }
581         rpc get-node-edge-point-details {
582             description "none";
583             input {
584                 leaf topology-id-or-name {
585                     type string;
586                     description "none";
587                 }
588                 leaf node-id-or-name {
589                     type string;
590                     description "none";
591                 }
592                 leaf ep-id-or-name {
593                     type string;
594                     description "none";
595                 }
596             }
597             output {
598                 container node-edge-point {
599                     uses node-edge-point;
600                     description "none";
601                 }
602             }
603         }
604         rpc get-link-details {
605             description "none";
606             input {
607                 leaf topology-id-or-name {
608                     type string;
609                     description "none";
610                 }
611                 leaf link-id-or-name {
612                     type string;
613                     description "none";
614                 }
615             }
616             output {
617                 container link {
618                     uses link;
619                     description "none";
620                 }
621             }
622         }
623         rpc get-topology-list {
624             description "none";
625             output {
626                 list topology {
627                     uses topology;
628                     description "none";
629                 }
630             }
631         }
632
633 }