remove tpce service-path 1.5 models
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-service@2019-05-31.yang
1 module org-openroadm-service {
2   namespace "http://org/openroadm/service";
3   prefix org-openroadm-service;
4
5   import ietf-yang-types {
6     prefix yang;
7     revision-date 2013-07-15;
8   }
9   import org-openroadm-routing-constraints {
10     prefix org-openroadm-routing-constraints;
11     revision-date 2019-03-29;
12   }
13   import org-openroadm-common-types {
14     prefix org-openroadm-common-types;
15     revision-date 2019-05-31;
16   }
17   import org-openroadm-resource-types {
18     prefix org-openroadm-resource-types;
19     revision-date 2018-11-30;
20   }
21   import org-openroadm-common-service-types {
22     prefix org-openroadm-common-service-types;
23     revision-date 2019-05-31;
24   }
25
26   organization
27     "Open ROADM MSA";
28   contact
29     "OpenROADM.org";
30   description
31     "YANG definitions of services.
32
33       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
34       All other rights reserved.
35
36       Redistribution and use in source and binary forms, with or without modification,
37       are permitted provided that the following conditions are met:
38
39       * Redistributions of source code must retain the above copyright notice, this
40         list of conditions and the following disclaimer.
41       * Redistributions in binary form must reproduce the above copyright notice,
42         this list of conditions and the following disclaimer in the documentation and/or
43         other materials provided with the distribution.
44       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
45         contributors may be used to endorse or promote products derived from this software
46         without specific prior written permission.
47
48       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
49       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
51       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
52       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
53       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
54       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
55       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57       POSSIBILITY OF SUCH DAMAGE";
58
59   revision 2019-05-31 {
60     description
61       "Version 5.1.0";
62   }
63   revision 2019-03-29 {
64     description
65       "Version 5.0.0";
66   }
67   revision 2018-11-30 {
68     description
69       "Version 4.1.0";
70   }
71   revision 2018-09-28 {
72     description
73       "Version 4.0.0";
74   }
75   revision 2018-05-30 {
76     description
77       "Version 3.1.0";
78   }
79   revision 2018-03-30 {
80     description
81       "Version 3.0.0";
82   }
83   revision 2017-12-15 {
84     description
85       "Version 2.2";
86   }
87   revision 2017-09-29 {
88     description
89       "Version 2.1";
90   }
91   revision 2017-07-28 {
92     description
93       "Version 2.0.1 - added revision-date to imports";
94   }
95   revision 2017-06-26 {
96     description
97       "Version 2.0";
98   }
99   revision 2016-10-14 {
100     description
101       "Version 1.2";
102   }
103
104   grouping service-feasibility-check-inputs {
105     leaf connection-type {
106       type org-openroadm-common-service-types:connection-type;
107     }
108     container service-a-end {
109       uses org-openroadm-common-service-types:service-endpoint;
110     }
111     container service-z-end {
112       uses org-openroadm-common-service-types:service-endpoint;
113     }
114     uses org-openroadm-routing-constraints:routing-constraints;
115     uses org-openroadm-common-service-types:routing-metric;
116     uses org-openroadm-common-service-types:service-resiliency;
117     leaf propose-equipment {
118       type enumeration {
119         enum "never" {
120           value 1;
121         }
122         enum "ifNeeded" {
123           value 2;
124         }
125         enum "always" {
126           value 3;
127         }
128       }
129       default "ifNeeded";
130       description
131         "Whether or not this request can propose new equipment that could
132          be used to fulfill this request. If never, the request will just
133          use existing deployed and planned equipment. If ifNeeded, routes using existing equipment
134          will be preferred. If always, a route with proposed equipment shall be returned, if possible";
135     }
136     uses org-openroadm-common-service-types:service-information;
137   }
138
139   grouping service-feasibility-check-outputs {
140     uses org-openroadm-common-service-types:response-parameters;
141     container service-a-end {
142       uses org-openroadm-common-service-types:service-endpoint;
143       list equipment-required {
144         key "equipment-identifier";
145         description
146           "List of required equipment, including equipment type, state and
147            quantity";
148         uses org-openroadm-common-service-types:equipment-info;
149       }
150     }
151     container service-z-end {
152       uses org-openroadm-common-service-types:service-endpoint;
153       list equipment-required {
154         key "equipment-identifier";
155         description
156           "List of required equipment, including equipment type, state and
157            quantity";
158         uses org-openroadm-common-service-types:equipment-info;
159       }
160     }
161     list intermediate-sites {
162       key "clli";
163       uses org-openroadm-common-service-types:service-endpoint;
164       list equipment-required {
165         key "equipment-identifier";
166         description
167           "List of required equipment, including equipment type, state and
168            quantity over entire route of service";
169         uses org-openroadm-common-service-types:equipment-info;
170       }
171     }
172   }
173
174   rpc service-create {
175     description
176       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
177        service-rpc-result Notification shall be sent.";
178     input {
179       leaf service-name {
180         type string;
181         mandatory true;
182         description
183           "Identifier for the service to be created in
184            the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
185       }
186       leaf common-id {
187         type string;
188         description
189           "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
190       }
191       uses org-openroadm-common-service-types:sdnc-request-header;
192       uses org-openroadm-common-service-types:routing-metric;
193       uses org-openroadm-common-service-types:service-resiliency;
194       leaf connection-type {
195         type org-openroadm-common-service-types:connection-type;
196         mandatory true;
197       }
198       container service-a-end {
199         uses org-openroadm-common-service-types:service-endpoint;
200       }
201       container service-z-end {
202         uses org-openroadm-common-service-types:service-endpoint;
203       }
204       uses org-openroadm-routing-constraints:routing-constraints;
205       uses org-openroadm-common-service-types:service-information;
206     }
207     output {
208       uses org-openroadm-common-service-types:configuration-response-common;
209       uses org-openroadm-common-service-types:response-parameters;
210     }
211   }
212   rpc service-create-result-notification-request {
213     description
214       "This is the callback notification that the controller invokes on the carrier system.";
215     input {
216       uses org-openroadm-common-service-types:configuration-response-common;
217       uses org-openroadm-common-service-types:service-identifiers-container;
218     }
219     output {
220       uses org-openroadm-common-service-types:configuration-response-common;
221     }
222   }
223   rpc service-create-complex-result-notification-request {
224     description
225       "This is the callback notification that the controller invokes on the carrier system.";
226     input {
227       uses org-openroadm-common-service-types:configuration-response-common;
228       uses org-openroadm-common-service-types:service-and-supporting-services;
229     }
230     output {
231       uses org-openroadm-common-service-types:configuration-response-common;
232     }
233   }
234   rpc service-delete-result-notification-request {
235     description
236       "This is the callback notification that the controller invokes on the carrier system.";
237     input {
238       uses org-openroadm-common-service-types:configuration-response-common;
239       uses org-openroadm-common-service-types:service-identifiers-container;
240     }
241     output {
242       uses org-openroadm-common-service-types:configuration-response-common;
243     }
244   }
245   rpc service-delete-complex-result-notification-request {
246     description
247       "This is the callback notification that the controller invokes on the carrier system.";
248     input {
249       uses org-openroadm-common-service-types:configuration-response-common;
250       uses org-openroadm-common-service-types:service-and-supporting-services;
251     }
252     output {
253       uses org-openroadm-common-service-types:configuration-response-common;
254     }
255   }
256   rpc service-feasibility-check {
257     description
258       "Whether a service was possible to be created, and if so
259        the routing constraints match and the a and z end connection that have
260        to match
261        Takes a potential service and determines if it is possible in the network
262        using equipment that is installed on the network, formally planned or proposed for planning.
263        No resources are reserved, provisioned or planned as a result of this operation";
264     input {
265       leaf common-id {
266         type string;
267         mandatory true;
268         description
269           "To be used by the ROADM controller to identify the routing constraints
270            received from planning application (PED).";
271       }
272       uses org-openroadm-common-service-types:sdnc-request-header;
273       uses service-feasibility-check-inputs;
274     }
275     output {
276       uses org-openroadm-common-service-types:configuration-response-common;
277       uses service-feasibility-check-outputs;
278     }
279   }
280   rpc service-feasibility-check-bulk {
281     description
282       "Whether a service was possible to be created, and if so
283        the routing constraints match and the a and z end connection that have
284        to match
285
286        Takes a list of potential services and determines if they are possible in the network
287        using equipment that is installed on the network, formally planned or proposed for planning.
288        All services are treated collectively to ensure that a given resource is not used more than once.
289        No resources are reserved, provisioned or planned as a result of this operation";
290     input {
291       uses org-openroadm-common-service-types:sdnc-request-header;
292       list service-request-list {
293         leaf common-id {
294           type string;
295           mandatory true;
296           description
297             "To be used by the ROADM controller to identify the routing constraints
298              received from planning application (PED).";
299         }
300         uses service-feasibility-check-inputs;
301       }
302     }
303     output {
304       uses org-openroadm-common-service-types:configuration-response-common;
305       list service-response-list {
306         uses service-feasibility-check-outputs;
307       }
308     }
309   }
310   rpc service-delete {
311     description
312       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
313        service-rpc-result Notification shall be sent. Once the service has been deleted, it no longer will appear in the service list";
314     input {
315       uses org-openroadm-common-service-types:sdnc-request-header;
316       container service-delete-req-info {
317         leaf service-name {
318           type string;
319           mandatory true;
320           description
321             "Identifier for the service to be deleted in
322              the ROADM network, e.g., CLFI, CLCI, etc.";
323         }
324         leaf due-date {
325           type yang:date-and-time;
326           description
327             "date and time service to be turned down. If missing, now.";
328         }
329         leaf tail-retention {
330           type enumeration {
331             enum "yes" {
332               value 1;
333               description
334                 "tails are left intact ";
335             }
336             enum "no" {
337               value 2;
338               description
339                 "tails are deleted";
340             }
341           }
342           mandatory true;
343         }
344       }
345     }
346     output {
347       uses org-openroadm-common-service-types:configuration-response-common;
348     }
349   }
350   rpc equipment-notification {
351     input {
352       uses org-openroadm-common-service-types:sdnc-request-header;
353       leaf equipment-id {
354         type string;
355         mandatory true;
356       }
357       leaf equipment-name {
358         type string;
359       }
360       leaf equipment-type {
361         type string;
362         mandatory true;
363         description
364           "The set of valid value is derived from the equipment-type grouping used in the device model.";
365       }
366       leaf equipment-vendor {
367         type string;
368         mandatory true;
369       }
370       leaf equipment-customer {
371         type string;
372       }
373       leaf equipment-clli {
374         type string;
375         mandatory true;
376       }
377       leaf equipment-ip {
378         type string;
379       }
380       leaf controller-id {
381         type string;
382         mandatory true;
383       }
384     }
385     output {
386       uses org-openroadm-common-service-types:configuration-response-common;
387     }
388   }
389   rpc temp-service-create {
390     input {
391       leaf common-id {
392         type string;
393         mandatory true;
394         description
395           "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
396       }
397       uses org-openroadm-common-service-types:sdnc-request-header;
398       leaf connection-type {
399         type org-openroadm-common-service-types:connection-type;
400         mandatory true;
401       }
402       container service-a-end {
403         uses org-openroadm-common-service-types:service-endpoint;
404       }
405       container service-z-end {
406         uses org-openroadm-common-service-types:service-endpoint;
407       }
408       uses org-openroadm-routing-constraints:routing-constraints;
409       uses org-openroadm-common-service-types:service-information;
410       uses org-openroadm-common-service-types:routing-metric;
411       uses org-openroadm-common-service-types:service-resiliency;
412     }
413     output {
414       uses org-openroadm-common-service-types:configuration-response-common;
415       uses org-openroadm-common-service-types:response-parameters;
416     }
417   }
418   rpc temp-service-delete {
419     input {
420       leaf common-id {
421         type string;
422         mandatory true;
423       }
424     }
425     output {
426       uses org-openroadm-common-service-types:configuration-response-common;
427     }
428   }
429   rpc service-roll {
430     description
431       "This rpc can be use to roll a service according to 2 possible options :
432          A new path may (no path pre-calculation) or may not be calculated according
433          to the parameters provided (which includes metrics). If path computation has been triggered
434          and is successful, a new path is provided, and the service can be rolled according to that path.";
435     input {
436       leaf service-name {
437         type string;
438         mandatory true;
439         description
440           "Identifier for the service to be rolled in
441            the ROADM network, e.g., CLFI, CLCI, etc.";
442       }
443       leaf due-date {
444         type yang:date-and-time;
445         description
446           "date and time service to be rolled";
447       }
448       uses org-openroadm-common-service-types:routing-metric;
449     }
450     output {
451       uses org-openroadm-common-types:rpc-response-status;
452     }
453   }
454   rpc service-reconfigure {
455     description
456       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
457        service-rpc-result Notification shall be sent.";
458     input {
459       leaf service-name {
460         type string;
461         mandatory true;
462         description
463           "Existing identifier for the service to be
464            reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
465       }
466       leaf new-service-name {
467         type string;
468         description
469           "New identifier for the service to be
470            reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
471       }
472       leaf common-id {
473         type string;
474         description
475           "To be used by the ROADM controller to identify the routing
476            constraints received from planning application (PED).";
477       }
478       leaf connection-type {
479         type org-openroadm-common-service-types:connection-type;
480       }
481       container service-a-end {
482         uses org-openroadm-common-service-types:service-endpoint;
483       }
484       container service-z-end {
485         uses org-openroadm-common-service-types:service-endpoint;
486       }
487       uses org-openroadm-routing-constraints:routing-constraints;
488       uses org-openroadm-common-service-types:service-information;
489       uses org-openroadm-common-service-types:routing-metric;
490       uses org-openroadm-common-service-types:service-resiliency;
491     }
492     output {
493       uses org-openroadm-common-types:rpc-response-status;
494     }
495   }
496   rpc service-restoration {
497     description
498       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
499        service-rpc-result Notification shall be sent.
500        This rpc can be use to reroute a service according to 2 possible options :
501         \t_Option1 : neither the backup-path-id nor the failure-case-id are provided, a new path shall be
502            calculated according to the parameters provided (which includes metrics). If path computation
503            is successful, a new path is provided, and the service is rerouted according to that path.
504         \t_Option2 : if a backup-path-id or a failure-case-id are provided, the service shall
505            be rerouted according to the corresponding path. If path computation is triggered and successful,
506            a new path is provided, and the service is rerouted according to that path.";
507     input {
508       leaf service-name {
509         type string;
510         mandatory true;
511         description
512           "Identifier for the service to be restored in
513            the ROADM network, e.g., CLFI, CLCI, etc.";
514       }
515       leaf option {
516         type enumeration {
517           enum "permanent" {
518             value 1;
519             description
520               "A spare regen can be used to restore the
521                service permanently without reverting back to the
522                original regen";
523           }
524           enum "temporary" {
525             value 2;
526             description
527               "a spare regen can be used to restore the
528                service temporarily.   The service needs to be reverted
529                back to the original regen transponder";
530           }
531         }
532         mandatory true;
533       }
534       leaf backup-path-id {
535         type uint8 {
536           range "1..255";
537         }
538         description
539           "When present, states that the service shall be rerouted according to a specific backup path";
540       }
541       leaf failure-case-id {
542         type string;
543         description
544           "When present, states that the service shall be rerouted according to a specific backup path.
545            This last corresponds to the provided failure case id";
546       }
547       uses org-openroadm-common-service-types:routing-metric;
548     }
549     output {
550       uses org-openroadm-common-types:rpc-response-status;
551     }
552   }
553   rpc service-reversion {
554     description
555       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
556        service-rpc-result Notification shall be sent.";
557     input {
558       leaf service-name {
559         type string;
560         mandatory true;
561         description
562           "Identifier for the service to be reverted
563            in the ROADM network, e.g., CLFI, CLCI, etc. ";
564       }
565       leaf due-date {
566         type yang:date-and-time;
567         description
568           "date and time service to be reverted";
569       }
570     }
571     output {
572       uses org-openroadm-common-types:rpc-response-status;
573     }
574   }
575   rpc service-reroute {
576     description
577       "Whether this request was validated and processed correctly. If successful, it returns the proposed new route.
578        If acceptable, this request should be followed by a service-reroute-confirm to complete the reroute operation.";
579     input {
580       leaf service-name {
581         type string;
582         mandatory true;
583         description
584           "Identifier for the service to be re-routed in
585            the ROADM network, e.g., CLFI, CLCI, etc.";
586       }
587       uses org-openroadm-common-service-types:routing-metric;
588       uses org-openroadm-common-service-types:service-resiliency;
589     }
590     output {
591       uses org-openroadm-common-types:rpc-response-status;
592       uses org-openroadm-routing-constraints:routing-constraints;
593     }
594   }
595   rpc service-reroute-confirm {
596     description
597       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
598        service-rpc-result Notification shall be sent.";
599     input {
600       leaf service-name {
601         type string;
602         mandatory true;
603         description
604           "Identifier for the service to be re-routed in
605            the ROADM network, e.g., CLFI, CLCI, etc.";
606       }
607       uses org-openroadm-routing-constraints:routing-constraints;
608     }
609     output {
610       uses org-openroadm-common-types:rpc-response-status;
611     }
612   }
613   rpc network-re-optimization {
614     input {
615       leaf service-name {
616         type string;
617         description
618           "Identifier for the service in the ROADM network,
619            e.g., CLFI, CLCI, etc. whose path is to be checked by the RNC
620            for re-optimization";
621       }
622       leaf a-end {
623         type string;
624         description
625           "Services whose A-ends are terminated at the
626            specified office location are to be checked by the RNC for
627            re-optimization";
628       }
629       leaf z-end {
630         type string;
631         description
632           "Services whose Z-ends are terminated at the
633            specified office location are to be checked by the RNC for
634            re-optimization ";
635       }
636       leaf pass-through {
637         type string;
638         description
639           "Services that are pass-through (either via
640            regen or express) at the specified office location are to
641            be checked by the RNC for re-optimization";
642       }
643       leaf customer-code {
644         type string;
645         description
646           "Services that belong to the specified customer
647            are to be checked by the RNC for re-optimization ";
648       }
649       uses org-openroadm-common-service-types:routing-metric;
650     }
651     output {
652       uses org-openroadm-common-types:rpc-response-status;
653       leaf optimization-candidate {
654         type string;
655       }
656     }
657   }
658   notification service-rpc-result {
659     description
660       "This Notification indicates result of service RPC";
661     leaf notification-type {
662       type org-openroadm-common-service-types:service-notification-types;
663     }
664     uses org-openroadm-common-types:rpc-response-status;
665     uses org-openroadm-common-service-types:service-notification-result;
666   }
667   notification service-traffic-flow {
668     description
669       "This Notification indicates that traffic is flowing again on the service after an administrative action has completed";
670     leaf service-name {
671       type string;
672       mandatory true;
673       description
674         "Identifier for the service being reported on";
675     }
676     leaf version-number {
677       type uint64;
678       description
679         "Identifier for the versioned service";
680     }
681     leaf actual-date {
682       type yang:date-and-time;
683       description
684         "Actual date and time traffic started flowing";
685     }
686   }
687   notification service-notification {
688     description
689       "This Notification that a service has been added, modified or removed.
690        A resourceCreation notification shall contain the created service in its entirety.
691        A resourceModified notification shall contain just the modified field, plus the service identifier
692        A resourceDeleted notification shall just contain the service identifier";
693     leaf notificationType {
694       type org-openroadm-resource-types:resource-notification-type;
695       description
696         "Whether this notification indicates a service creation, service modification or service deletion.";
697     }
698     leaf version-number {
699       type uint64;
700       description
701         "Identifier for the versioned service";
702     }
703     uses org-openroadm-common-service-types:service;
704   }
705   container service-list {
706     description
707       "List of service. Can only be created, deleted, modified, etc. using special RPCs. Will only contain one service with a given name.
708        Does not contain historical (deleted or rather those passed their end time) or draft services. If two services exist with the same
709        name (with non-lapping start-end times for example), this table will contain the current one. If only planned services exist for
710        the name, the one with the earliest start time will be present
711       ";
712     list services {
713       key "service-name";
714       uses org-openroadm-common-service-types:service;
715     }
716   }
717   container versioned-service-list {
718     description
719       "List of service, regardless of lifecycle state. Can only be created, deleted, modified, etc. using special RPCs. Can report more than one
720        version of a service, if supported by the implementation. May contain deleted services, multiple versions of the same service, as identified
721        by its name, etc.";
722     list services {
723       key "service-name version-number";
724       leaf version-number {
725         type uint64;
726       }
727       uses org-openroadm-common-service-types:service;
728     }
729   }
730   container temp-service-list {
731     description
732       "List of temporary services Can only be created, deleted, modified, etc. using special RPCs.";
733     list services {
734       key "common-id";
735       uses org-openroadm-common-service-types:service {
736         refine "service-name" {
737           mandatory false;
738         }
739       }
740     }
741   }
742 }