09192eee4f23281e2913741e8469f0a193beb4c8
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-service@2016-10-14.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   }
8   import org-openroadm-routing-constraints {
9     prefix org-openroadm-routing-constraints;
10   }
11   import org-openroadm-common-types {
12     prefix org-openroadm-common-types;
13     revision-date 2016-10-14;
14   }
15   import org-openroadm-resource-types {
16     prefix org-openroadm-resource-types;
17   }
18   import org-openroadm-common-service-types {
19     prefix org-openroadm-common-service-types;
20   }
21
22   organization
23     "Open ROADM MSA";
24   contact
25     "OpenROADM.org";
26   description
27     "YANG definitions of services.
28
29       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
30       AT&T Intellectual Property.  All other rights reserved.
31
32       Redistribution and use in source and binary forms, with or without modification,
33       are permitted provided that the following conditions are met:
34
35       * Redistributions of source code must retain the above copyright notice, this
36         list of conditions and the following disclaimer.
37       * Redistributions in binary form must reproduce the above copyright notice,
38         this list of conditions and the following disclaimer in the documentation and/or
39         other materials provided with the distribution.
40       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
41         contributors may be used to endorse or promote products derived from this software
42         without specific prior written permission.
43
44       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
45       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
48       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
50       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
53       POSSIBILITY OF SUCH DAMAGE";
54
55   revision 2016-10-14 {
56     description
57       "Version 1.2";
58   }
59
60   rpc service-create {
61     input {
62       leaf service-name {
63         type string;
64         description
65           "Identifier for the service to be created in
66            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.";
67         mandatory true;
68       }
69       leaf common-id {
70         type string;
71         description
72           "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
73       }
74       uses org-openroadm-common-service-types:sdnc-request-header;
75       leaf connection-type {
76         type org-openroadm-common-service-types:connection-type;
77         mandatory true;
78       }
79       container service-a-end {
80         uses org-openroadm-common-service-types:service-endpoint;
81       }
82       container service-z-end {
83         uses org-openroadm-common-service-types:service-endpoint;
84       }
85       uses org-openroadm-routing-constraints:routing-constraints;
86       uses org-openroadm-common-service-types:service-information;
87     }
88     output {
89       uses org-openroadm-common-service-types:configuration-response-common;
90       uses org-openroadm-common-service-types:response-parameters;
91     }
92     description
93       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
94        service-rpc-result Notification shall be sent.";
95   }
96   rpc service-feasibility-check {
97     input {
98       leaf common-id {
99         type string;
100         mandatory true;
101         description
102           "To be used by the ROADM controller to identify the routing
103            constraints received from planning application (PED).";
104       }
105       uses org-openroadm-common-service-types:sdnc-request-header;
106       leaf connection-type {
107         type org-openroadm-common-service-types:connection-type;
108       }
109       container service-a-end {
110         uses org-openroadm-common-service-types:service-endpoint;
111       }
112       container service-z-end {
113         uses org-openroadm-common-service-types:service-endpoint;
114       }
115       uses org-openroadm-routing-constraints:routing-constraints;
116       uses org-openroadm-common-service-types:service-information;
117     }
118     output {
119       uses org-openroadm-common-service-types:configuration-response-common;
120       uses org-openroadm-common-service-types:response-parameters;
121       container service-a-end {
122         uses org-openroadm-common-service-types:service-endpoint;
123         list equipment-required {
124           description
125             "List of required equipment, including equipment type and quantity";
126           key "eqipment-identifier";
127           leaf eqipment-identifier {
128             type string;
129           }
130           leaf equipment-type {
131             type string;
132           }
133           leaf equipment-quantity {
134             type uint32;
135           }
136         }
137       }
138       container service-z-end {
139         uses org-openroadm-common-service-types:service-endpoint;
140         list equipment-required {
141           description
142             "List of required equipment, including equipment type and quantity";
143           key "eqipment-identifier";
144           leaf eqipment-identifier {
145             type string;
146           }
147           leaf equipment-type {
148             type string;
149           }
150           leaf equipment-quantity {
151             type uint32;
152           }
153         }
154       }
155       list intermediate-sites {
156         key "clli";
157         uses org-openroadm-common-service-types:service-endpoint;
158         list equipment-required {
159           description
160             "List of required equipment, including equipment type and quantity";
161           key "eqipment-identifier";
162           leaf eqipment-identifier {
163             type string;
164           }
165           leaf equipment-type {
166             type string;
167           }
168           leaf equipment-quantity {
169             type uint32;
170           }
171         }
172       }
173     }
174     description
175       "Whether a service was possible to be created, and if so
176        the routing constraints match and the a and z end connection that have
177        to match";
178   }
179   rpc service-delete {
180     input {
181       uses org-openroadm-common-service-types:sdnc-request-header;
182       container service-delete-req-info {
183         leaf service-name {
184           type string;
185           description
186             "Identifier for the service to be deleted in
187              the ROADM network, e.g., CLFI, CLCI, etc.";
188           mandatory true;
189         }
190         leaf due-date {
191           type yang:date-and-time;
192           description
193             "date and time service to be turned down. If missing, now.";
194         }
195         leaf tail-retention {
196           type enumeration {
197             enum "yes" {
198               value 1;
199               description
200                 "tails are left intact ";
201             }
202             enum "no" {
203               value 2;
204               description
205                 "tails are deleted";
206             }
207           }
208           mandatory true;
209         }
210       }
211     }
212     output {
213       uses org-openroadm-common-service-types:configuration-response-common;
214     }
215     description
216       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
217        service-rpc-result Notification shall be sent. Once the service has been deleted, it no longer will appear in the service list";
218   }
219   rpc equipment-notification {
220     input {
221       uses org-openroadm-common-service-types:sdnc-request-header;
222       leaf equiptment-id {
223         type string;
224         mandatory true;
225       }
226       leaf equipment-name {
227         type string;
228       }
229       leaf equipemt-type {
230         type string;
231         mandatory true;
232       }
233       leaf equipment-vendor {
234         type string;
235         mandatory true;
236       }
237       leaf equipment-customer {
238         type string;
239       }
240       leaf equipment-clli {
241         type string;
242         mandatory true;
243       }
244       leaf equipment-ip {
245         type string;
246       }
247       leaf controller-id {
248         type string;
249         mandatory true;
250       }
251     }
252     output {
253       uses org-openroadm-common-service-types:configuration-response-common;
254     }
255   }
256   rpc temp-service-create {
257     input {
258       leaf common-id {
259         type string;
260         description
261           "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
262         mandatory true;
263       }
264       uses org-openroadm-common-service-types:sdnc-request-header;
265       leaf connection-type {
266         type org-openroadm-common-service-types:connection-type;
267         mandatory true;
268       }
269       container service-a-end {
270         uses org-openroadm-common-service-types:service-endpoint;
271       }
272       container service-z-end {
273         uses org-openroadm-common-service-types:service-endpoint;
274       }
275       uses org-openroadm-routing-constraints:routing-constraints;
276       uses org-openroadm-common-service-types:service-information;
277     }
278     output {
279       uses org-openroadm-common-service-types:configuration-response-common;
280       uses org-openroadm-common-service-types:response-parameters;
281     }
282   }
283   rpc temp-service-delete {
284     input {
285       leaf common-id {
286         type string;
287         mandatory true;
288       }
289     }
290     output {
291       uses org-openroadm-common-service-types:configuration-response-common;
292     }
293   }
294   rpc service-roll {
295     input {
296       leaf service-name {
297         type string;
298         mandatory true;
299         description
300           "Identifier for the service to be rolled in
301            the ROADM network, e.g., CLFI, CLCI, etc.";
302       }
303       leaf due-date {
304         type yang:date-and-time;
305         description
306           "date and time service to be rolled";
307       }
308     }
309     output {
310       uses org-openroadm-common-types:rpc-response-status;
311     }
312   }
313   rpc service-reconfigure {
314     input {
315       leaf service-name {
316         type string;
317         mandatory true;
318         description
319           "Existing identifier for the service to be
320            reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
321       }
322       leaf new-service-name {
323         type string;
324         description
325           "New identifier for the service to be
326            reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
327       }
328       leaf common-id {
329         type string;
330         description
331           "To be used by the ROADM controller to identify the routing
332            constraints received from planning application (PED).";
333       }
334       leaf connection-type {
335         type org-openroadm-common-service-types:connection-type;
336       }
337       container service-a-end {
338         uses org-openroadm-common-service-types:service-endpoint;
339       }
340       container service-z-end {
341         uses org-openroadm-common-service-types:service-endpoint;
342       }
343       uses org-openroadm-routing-constraints:routing-constraints;
344       uses org-openroadm-common-service-types:service-information;
345     }
346     output {
347       uses org-openroadm-common-types:rpc-response-status;
348     }
349     description
350       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
351        service-rpc-result Notification shall be sent.";
352   }
353   rpc service-restoration {
354     input {
355       leaf service-name {
356         type string;
357         mandatory true;
358         description
359           "Identifier for the service to be restored in
360            the ROADM network, e.g., CLFI, CLCI, etc.";
361       }
362       leaf option {
363         type enumeration {
364           enum "permanent" {
365             value 1;
366             description
367               "A spare regen can be used to restore the
368                service permanently without reverting back to the
369                original regen";
370           }
371           enum "temporary" {
372             value 2;
373             description
374               "a spare regen can be used to restore the
375                service temporarily.   The service needs to be reverted
376                back to the original regen transponder";
377           }
378         }
379         mandatory true;
380       }
381     }
382     output {
383       uses org-openroadm-common-types:rpc-response-status;
384     }
385     description
386       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
387        service-rpc-result Notification shall be sent.";
388   }
389   rpc service-reversion {
390     input {
391       leaf service-name {
392         type string;
393         mandatory true;
394         description
395           "Identifier for the service to be reverted
396            in the ROADM network, e.g., CLFI, CLCI, etc. ";
397       }
398       leaf due-date {
399         type yang:date-and-time;
400         description
401           "date and time service to be reverted";
402       }
403     }
404     output {
405       uses org-openroadm-common-types:rpc-response-status;
406     }
407     description
408       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
409        service-rpc-result Notification shall be sent.";
410   }
411   rpc service-reroute {
412     input {
413       leaf service-name {
414         type string;
415         mandatory true;
416         description
417           "Identifier for the service to be re-routed in
418            the ROADM network, e.g., CLFI, CLCI, etc.";
419       }
420     }
421     output {
422       uses org-openroadm-common-types:rpc-response-status;
423       uses org-openroadm-routing-constraints:routing-constraints;
424     }
425     description
426       "Whether this request was validated and processed correct. If sucessful, it return the proposed new route.
427        If acceptable, this request should be followed by a service-reroute-confirm to complete the reroute operation.";
428   }
429   rpc service-reroute-confirm {
430     input {
431       leaf service-name {
432         type string;
433         mandatory true;
434         description
435           "Identifier for the service to be re-routed in
436            the ROADM network, e.g., CLFI, CLCI, etc.";
437       }
438       uses org-openroadm-routing-constraints:routing-constraints;
439     }
440     output {
441       uses org-openroadm-common-types:rpc-response-status;
442     }
443     description
444       "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
445        service-rpc-result Notification shall be sent.";
446   }
447   rpc network-re-optimization {
448     input {
449       leaf service-name {
450         type string;
451         description
452           "Identifier for the service in the ROADM network,
453            e.g., CLFI, CLCI, etc. whose path is to be checked by the RNC
454            for re-optimization";
455       }
456       leaf a-end {
457         type string;
458         description
459           "Services whose A-ends are terminated at the
460            specified office location are to be checked by the RNC for
461            re-optimization";
462       }
463       leaf z-end {
464         type string;
465         description
466           "Services whose Z-ends are terminated at the
467            specified office location are to be checked by the RNC for
468            re-optimization ";
469       }
470       leaf pass-through {
471         type string;
472         description
473           "Services that are pass-through (either via
474            regen or express) at the specified office location are to
475            be checked by the RNC for re-optimization";
476       }
477       leaf customer-code {
478         type string;
479         description
480           "Services that belong to the specified customer
481            are to be checked by the RNC for re-optimization ";
482       }
483     }
484     output {
485       uses org-openroadm-common-types:rpc-response-status;
486       leaf optimization-candidate {
487         type string;
488       }
489     }
490   }
491   container service-list {
492     description
493       "List of service. Can only be created, deleted, modified, etc. using special RPCs.";
494     list services {
495       key "service-name";
496       uses org-openroadm-common-service-types:service;
497     }
498   }
499   container temp-service-list {
500     description
501       "List of temporary services Can only be created, deleted, modified, etc. using special RPCs.";
502     list services {
503       key "common-id";
504       uses org-openroadm-common-service-types:service {
505         refine "service-name" {
506           mandatory false;
507         }
508       }
509     }
510   }
511   notification service-rpc-result {
512     description
513       "This Notification indicates result of  service RPC";
514     leaf notification-type {
515       type org-openroadm-common-service-types:service-notification-types;
516     }
517     uses org-openroadm-common-types:rpc-response-status;
518     uses org-openroadm-common-service-types:service-notification-result;
519   }
520   notification service-traffic-flow {
521     description
522       "This Notification indicates that traffic is flowing again on the service after an administrative action has completed";
523     leaf service-name {
524       type string;
525       description
526         "Identifier for the service being reported on";
527       mandatory true;
528     }
529     leaf actual-date {
530       type yang:date-and-time;
531       description
532         "Actual date and time traffic started flowing";
533     }
534   }
535   notification service-notification {
536     description
537       "This Notification that a service has been added, modified or removed.
538        A resourceCreation notification shall contain the created service in its entirety.
539        A resourceMofified notification shall contain just the modified field, plus the service identifier
540        A resourceDeleted notification shall just contain the service identifier";
541     leaf notificationType {
542       type org-openroadm-resource-types:resource-notification-type;
543       description
544         "Whether this notification indicates a service creation, service modification or service deletion.";
545     }
546     uses org-openroadm-common-service-types:service;
547   }
548 }