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