Add latest MEF NRP yang modules.
[unimgr.git] / nrp-api / src / main / yang / tapi-connectivity.yang
1 module tapi-connectivity {
2     namespace "urn:mef:yang:TapiConnectivity";
3     prefix tapi-connectivity;
4     import tapi-common {
5         prefix tapi-common;
6     }
7     import tapi-topology {
8         prefix tapi-topology;
9     }
10     organization "Metro Ethernet Forum (MEF)";
11     contact "MEF";
12     description "none";
13     revision 2017-02-27 {
14         description "MEF NRP 1.0.alpha";
15         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
16     }
17     augment "/tapi-common:context" {
18         uses connectivity-context;
19         description "none";
20     }
21     /***********************
22     * package object-classes
23     **********************/
24         grouping connection {
25             list connection-end-point {
26                 key 'uuid';
27                 config false;
28                 min-elements 2;
29                 uses connection-end-point;
30                 description "none";
31             }
32             list route {
33                 key 'local-id';
34                 config false;
35                 uses route;
36                 description "none";
37             }
38             leaf node {
39                 type leafref {
40                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';
41                 }
42                 config false;
43                 description "none";
44             }
45             list switch-control {
46                 key 'local-id';
47                 config false;
48                 uses switch-control;
49                 description "none";
50             }
51             container state {
52                 config false;
53                 uses tapi-common:operational-state-pac;
54                 description "none";
55             }
56             leaf layer-protocol-name {
57                 type tapi-common:layer-protocol-name;
58                 config false;
59                 description "none";
60             }
61             leaf direction {
62                 type tapi-common:forwarding-direction;
63                 config false;
64                 description "none";
65             }
66             uses tapi-common:resource-spec;
67             description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.
68                 At the lowest level of recursion, a FC represents a cross-connection within an NE.";
69         }
70         grouping connection-end-point {
71             list layer-protocol {
72                 key 'local-id';
73                 config false;
74                 min-elements 1;
75                 uses tapi-common:layer-protocol;
76                 description "none";
77             }
78             leaf-list client-node-edge-point {
79                 type leafref {
80                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
81                 }
82                 config false;
83                 description "none";
84             }
85             leaf server-node-edge-point {
86                 type leafref {
87                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
88                 }
89                 config false;
90                 description "none";
91             }
92             leaf peer-connection-end-point {
93                 type leafref {
94                     path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';
95                 }
96                 config false;
97                 description "none";
98             }
99             container state {
100                 config false;
101                 uses tapi-common:operational-state-pac;
102                 description "none";
103             }
104             leaf termination-direction {
105                 type tapi-common:termination-direction;
106                 config false;
107                 description "none";
108             }
109             leaf connection-port-direction {
110                 type tapi-common:port-direction;
111                 config false;
112                 description "The orientation of defined flow at the EndPoint.";
113             }
114             leaf connection-port-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             uses tapi-common:resource-spec;
120             description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 
121                 The structure of LTP supports all transport protocols including circuit and packet forms.";
122         }
123         grouping connectivity-constraint {
124             leaf service-type {
125                 type service-type;
126                 config false;
127                 description "none";
128             }
129             leaf service-level {
130                 type string;
131                 config false;
132                 description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";
133             }
134             container requested-capacity {
135                 config false;
136                 uses tapi-topology:capacity;
137                 description "none";
138             }
139             list cost-characteristic {
140                 key 'cost-name cost-value cost-algorithm';
141                 config false;
142                 uses tapi-topology:cost-characteristic;
143                 description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
144             }
145             list latency-characteristic {
146                 key 'traffic-property-name traffic-property-queing-latency';
147                 config false;
148                 uses tapi-topology:latency-characteristic;
149                 description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
150             }
151             leaf coroute-inclusion {
152                 type leafref {
153                     path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';
154                 }
155                 config false;
156                 description "none";
157             }
158             leaf-list diversity-exclusion {
159                 type leafref {
160                     path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';
161                 }
162                 config false;
163                 description "none";
164             }
165             uses tapi-common:local-class;
166             description "none";
167         }
168         grouping connectivity-service {
169             leaf-list connection {
170                 type leafref {
171                     path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';
172                 }
173                 config false;
174                 description "none";
175             }
176             list service-end-point {
177                 key 'local-id';
178                 min-elements 2;
179                 uses connectivity-service-end-point;
180                 description "none";
181             }
182             container conn-constraint {
183                 uses connectivity-constraint;
184                 description "none";
185             }
186             container topo-constraint {
187                 uses topology-constraint;
188                 description "none";
189             }
190             container schedule {
191                 uses tapi-common:time-range;
192                 description "none";
193             }
194             container state {
195                 uses tapi-common:admin-state-pac;
196                 description "none";
197             }
198             leaf direction {
199                 type tapi-common:forwarding-direction;
200                 description "none";
201             }
202             leaf layer-protocol-name {
203                 type tapi-common:layer-protocol-name;
204                 description "none";
205             }
206             uses tapi-common:service-spec;
207             description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.
208                 At the lowest level of recursion, a FC represents a cross-connection within an NE.";
209         }
210         grouping connectivity-service-end-point {
211             leaf service-interface-point {
212                 type leafref {
213                     path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';
214                 }
215                 config false;
216                 description "none";
217             }
218             leaf role {
219                 type tapi-common:port-role;
220                 config false;
221                 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. ";
222             }
223             leaf direction {
224                 type tapi-common:port-direction;
225                 config false;
226                 description "The orientation of defined flow at the EndPoint.";
227             }
228             leaf layer-protocol-name {
229                 type tapi-common:layer-protocol-name;
230                 config false;
231                 description "none";
232             }
233             uses tapi-common:local-class;
234             description "The association of the FC to LTPs is made via EndPoints.
235                 The EndPoint (EP) object class models the access to the FC function. 
236                 The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.  
237                 In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC. 
238                 It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.
239                 The EP replaces the Protection Unit of a traditional protection model. 
240                 The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";
241         }
242         grouping route {
243             leaf-list lower-connection {
244                 type leafref {
245                     path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';
246                 }
247                 config false;
248                 min-elements 1;
249                 description "none";
250             }
251             uses tapi-common:local-class;
252             description "The FC Route (FcRoute) object class models the individual routes of an FC. 
253                 The route of an FC object is represented by a list of FCs at a lower level. 
254                 Note that depending on the service supported by an FC, an the FC can have multiple routes.";
255         }
256         grouping connectivity-context {
257             list connectivity-service {
258                 key 'uuid';
259                 uses connectivity-service;
260                 description "none";
261             }
262             list connection {
263                 key 'uuid';
264                 config false;
265                 uses connection;
266                 description "none";
267             }
268             description "none";
269         }
270         grouping switch {
271             leaf-list selected-connection-end-point {
272                 type leafref {
273                     path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';
274                 }
275                 min-elements 1;
276                 description "none";
277             }
278             leaf-list selected-route {
279                 type leafref {
280                     path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';
281                 }
282                 min-elements 1;
283                 description "none";
284             }
285             leaf selection-control {
286                 type selection-control;
287                 description "Degree of administrative control applied to the switch selection.";
288             }
289             leaf selection-reason {
290                 type selection-reason;
291                 config false;
292                 description "The reason for the current switch selection.";
293             }
294             leaf switch-direction {
295                 type tapi-common:port-direction;
296                 description "Indicates whether the switch selects from ingress to the FC or to egress of the FC, or both.";
297             }
298             uses tapi-common:local-class;
299             description "The class models the switched forwarding of traffic (traffic flow) between FcPorts (ConnectionEndPoints) and is present where there is protection functionality in the FC (Connection). 
300                 If an FC exposes protection (having two or more FcPorts that provide alternative identical inputs/outputs), the FC will have one or more associated FcSwitch objects to represent the alternative flow choices visible at the edge of the FC.
301                 The FC switch represents and defines a protection switch structure encapsulated in the FC. 
302                 Essentially performs one of the functions of the Protection Group in a traditional model. It associates to 2 or more FcPorts each playing the role of a Protection Unit. 
303                 One or more protection, i.e. standby/backup, FcPorts provide protection for one or more working (i.e. regular/main/preferred) FcPorts where either protection or working can feed one or more protected FcPort.
304                 The switch may be used in revertive or non-revertive (symmetric) mode. When in revertive mode it may define a waitToRestore time.
305                 It may be used in one of several modes including source switch, destination switched, source and destination switched etc (covering cases such as 1+1 and 1:1).
306                 It may be locked out (prevented from switching), force switched or manual switched.
307                 It will indicate switch state and change of state.
308                 The switch can be switched away from all sources such that it becomes open and hence two coordinated switches can both feed the same LTP so long as at least one of the two is switched away from all sources (is 'open').
309                 The ability for a Switch to be 'high impedance' allows bidirectional ForwardingConstructs to be overlaid on the same bidirectional LTP where the appropriate control is enabled to prevent signal conflict.
310                 This ability allows multiple alternate routes to be present that otherwise would be in conflict.";
311         }
312         grouping switch-control {
313             leaf-list sub-switch-control {
314                 type leafref {
315                     path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:local-id';
316                 }
317                 description "none";
318             }
319             list switch {
320                 key 'local-id';
321                 uses switch;
322                 description "none";
323             }
324             container control-parameters {
325                 uses control-parameters-pac;
326                 description "none";
327             }
328             uses tapi-common:local-class;
329             description "Represents the capability to control and coordinate switches, to add/delete/modify FCs and to add/delete/modify LTPs/LPs so as to realize a protection scheme.";
330         }
331         grouping control-parameters-pac {
332             leaf prot-type {
333                 type protection-type;
334                 description "Indicates the protection scheme that is used for the ProtectionGroup.";
335             }
336             leaf reversion-mode {
337                 type reversion-mode;
338                 description "Indcates whether the protection scheme is revertive or non-revertive.";
339             }
340             leaf wait-to-revert-time {
341                 type uint64;
342                 default "15";
343                 description "If the protection system is revertive, this attribute specifies the time, in minutes, to wait after a fault clears on a higher priority (preferred) resource before reverting to the preferred resource.";
344             }
345             leaf hold-off-time {
346                 type uint64;
347                 description "This attribute indicates the time, in milliseconds, between declaration of signal degrade or signal fail, and the initialization of the protection switching algorithm.";
348             }
349             leaf is-lock-out {
350                 type boolean;
351                 description "none";
352             }
353             leaf is-frozen {
354                 type boolean;
355                 description "none";
356             }
357             leaf is-coordinated-switching-both-ends {
358                 type boolean;
359                 description "Is operating such that switching at both ends of each flow acorss the FC is coordinated at both ingress and egress ends.";
360             }
361             description "A list of control parameters to apply to a switch.";
362         }
363         grouping topology-constraint {
364             leaf-list include-topology {
365                 type leafref {
366                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
367                 }
368                 config false;
369                 description "none";
370             }
371             leaf-list avoid-topology {
372                 type leafref {
373                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
374                 }
375                 config false;
376                 description "none";
377             }
378             leaf-list include-path {
379                 type string;
380                 config false;
381                 description "none";
382             }
383             leaf-list exclude-path {
384                 type string;
385                 config false;
386                 description "none";
387             }
388             leaf-list include-link {
389                 type leafref {
390                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';
391                 }
392                 config false;
393                 description "none";
394             }
395             leaf-list exclude-link {
396                 type leafref {
397                     path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';
398                 }
399                 config false;
400                 description "none";
401             }
402             leaf-list preferred-transport-layer {
403                 type tapi-common:layer-protocol-name;
404                 config false;
405                 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";
406             }
407             uses tapi-common:local-class;
408             description "none";
409         }
410
411     /***********************
412     * package type-definitions
413     **********************/
414         typedef service-type {
415             type enumeration {
416                 enum point-to-point-connectivity {
417                     description "none";
418                 }
419                 enum point-to-multipoint-connectivty {
420                     description "none";
421                 }
422                 enum multipoint-connectivity {
423                     description "none";
424                 }
425             }
426             description "none";
427         }
428         typedef reversion-mode {
429             type enumeration {
430                 enum revertive {
431                     description "An FC switched to a lower priority (non-preferred) resource will revert to a higher priority (preferred) resource when that recovers (potentially after some hold-off time).";
432                 }
433                 enum non-revertive {
434                     description "An FC switched to a lower priority (non-preferred) resource will not revert to a higher priority (preferred) resource when that recovers.";
435                 }
436             }
437             description "The reversion mode associated with protection.";
438         }
439         typedef selection-control {
440             type enumeration {
441                 enum lock-out {
442                     description "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
443                         This overrides all other protection control states including forced.
444                         If the item is locked out then it cannot be used under any circumstances.
445                         Note: Only relevant when part of a protection scheme.";
446                 }
447                 enum normal {
448                     description "none";
449                 }
450                 enum manual {
451                     description "none";
452                 }
453                 enum forced {
454                     description "none";
455                 }
456             }
457             description "Possible degrees of administrative control applied to the Route selection.";
458         }
459         typedef selection-reason {
460             type enumeration {
461                 enum lockout {
462                     description "none";
463                 }
464                 enum normal {
465                     description "none";
466                 }
467                 enum manual {
468                     description "none";
469                 }
470                 enum forced {
471                     description "none";
472                 }
473                 enum wait-to-revert {
474                     description "none";
475                 }
476                 enum signal-degrade {
477                     description "none";
478                 }
479                 enum signal-fail {
480                     description "none";
481                 }
482             }
483             description "The cause of the current route selection.";
484         }
485         typedef protection-type {
486             type enumeration {
487                 enum linear-1-plus-1 {
488                     description "none";
489                 }
490                 enum linear-1-for-1 {
491                     description "none";
492                 }
493             }
494             description "none";
495         }
496
497     /***********************
498     * package interfaces
499     **********************/
500         rpc get-connection-details {
501             description "none";
502             input {
503                 leaf service-id-or-name {
504                     type string;
505                     description "none";
506                 }
507                 leaf connection-id-or-name {
508                     type string;
509                     description "none";
510                 }
511             }
512             output {
513                 container connection {
514                     uses connection;
515                     description "none";
516                 }
517             }
518         }
519         rpc get-connectivity-service-list {
520             description "none";
521             output {
522                 list service {
523                     uses connectivity-service;
524                     description "none";
525                 }
526             }
527         }
528         rpc get-connectivity-service-details {
529             description "none";
530             input {
531                 leaf service-id-or-name {
532                     type string;
533                     description "none";
534                 }
535             }
536             output {
537                 container service {
538                     uses connectivity-service;
539                     description "none";
540                 }
541             }
542         }
543         rpc create-connectivity-service {
544             description "none";
545             input {
546                 list sep {
547                     min-elements 2;
548                     uses connectivity-service-end-point;
549                     description "none";
550                 }
551                 container conn-constraint {
552                     uses connectivity-constraint;
553                     description "none";
554                 }
555                 container topo-constraint {
556                     uses topology-constraint;
557                     description "none";
558                 }
559                 leaf schedule {
560                     type string;
561                     description "none";
562                 }
563                 leaf state {
564                     type string;
565                     description "none";
566                 }
567             }
568             output {
569                 container service {
570                     uses connectivity-service;
571                     description "none";
572                 }
573             }
574         }
575         rpc update-connectivity-service {
576             description "none";
577             input {
578                 leaf service-id-or-name {
579                     type string;
580                     description "none";
581                 }
582                 container sep {
583                     uses connectivity-service-end-point;
584                     description "none";
585                 }
586                 container conn-constraint {
587                     uses connectivity-constraint;
588                     description "none";
589                 }
590                 container topo-constraint {
591                     uses topology-constraint;
592                     description "none";
593                 }
594                 leaf schedule {
595                     type string;
596                     description "none";
597                 }
598                 leaf state {
599                     type string;
600                     description "none";
601                 }
602             }
603             output {
604                 container service {
605                     uses connectivity-service;
606                     description "none";
607                 }
608             }
609         }
610         rpc delete-connectivity-service {
611             description "none";
612             input {
613                 leaf service-id-or-name {
614                     type string;
615                     description "none";
616                 }
617             }
618             output {
619                 container service {
620                     uses connectivity-service;
621                     description "none";
622                 }
623             }
624         }
625
626 }