remove tpce service-path 1.5 models
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-common-service-types@2016-10-14.yang
1 module org-openroadm-common-service-types {
2   namespace "http://org/openroadm/common/service/types";
3   prefix org-openroadm-common-service-types;
4
5   import ietf-yang-types {
6     prefix yang;
7   }
8   import ietf-inet-types {
9     prefix inet;
10   }
11   import org-openroadm-routing-constraints {
12     prefix org-openroadm-routing-constraints;
13     revision-date 2016-10-14;
14   }
15   import org-openroadm-topology {
16     prefix org-openroadm-topology;
17     revision-date 2016-10-14;
18   }
19   import org-openroadm-common-types {
20     prefix org-openroadm-common-types;
21     revision-date 2016-10-14;
22   }
23   import org-openroadm-resource-types {
24     prefix org-openroadm-resource-types;
25     revision-date 2016-10-14;
26   }
27
28   organization
29     "Open ROADM MSA";
30   contact
31     "OpenROADM.org";
32   description
33     "YANG definitions of common service types.
34
35       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
36       AT&T Intellectual Property.  All other rights reserved.
37
38       Redistribution and use in source and binary forms, with or without modification,
39       are permitted provided that the following conditions are met:
40
41       * Redistributions of source code must retain the above copyright notice, this
42         list of conditions and the following disclaimer.
43       * Redistributions in binary form must reproduce the above copyright notice,
44         this list of conditions and the following disclaimer in the documentation and/or
45         other materials provided with the distribution.
46       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
47         contributors may be used to endorse or promote products derived from this software
48         without specific prior written permission.
49
50       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
51       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
52       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
54       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
55       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
56       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
57       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
58       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
59       POSSIBILITY OF SUCH DAMAGE";
60
61   revision 2016-10-14 {
62     description
63       "Version 1.2";
64   }
65
66   grouping configuration-response-common {
67     container configuration-response-common {
68       leaf request-id {
69         type string;
70         mandatory true;
71       }
72       leaf response-code {
73         type string;
74         mandatory true;
75       }
76       leaf response-message {
77         type string;
78       }
79       leaf ack-final-indicator {
80         type string;
81         mandatory true;
82       }
83     }
84   }
85
86   grouping response-parameters {
87     container response-parameters {
88       uses org-openroadm-routing-constraints:routing-constraints;
89     }
90   }
91
92   grouping service-endpoint {
93     leaf service-format {
94       type service-format;
95       mandatory true;
96       description
97         "Format of the requested service: Ethernet, OTU, etc.";
98     }
99     leaf service-rate {
100       when "../service-format!='OMS'"{
101         description "service rate not applicable when service
102         format is roadmline";
103       }
104       type uint32;
105       mandatory true;
106       description
107         "Rate of the requested service in GBps";
108     }
109     leaf clli {
110       type string;
111       mandatory true;
112       description
113         "CLLI";
114     }
115     uses org-openroadm-resource-types:device-id;
116     container site;
117     container tx-direction {
118       uses service-port;
119       uses service-lgx;
120       uses service-tail;
121     }
122     container rx-direction {
123       uses service-port;
124       uses service-lgx;
125       uses service-tail;
126     }
127     leaf optic-type {
128       type org-openroadm-common-types:optic-types;
129     }
130     container router {
131       description
132         "Needed for communication with DWDM pluggable";
133       leaf node-id {
134         type string;
135         description
136           "Node id. This is reported against the service, but may not get reflected in the service in the network.";
137       }
138       leaf ip-address {
139         type inet:ip-address;
140         description
141           "Router IP Address. This is reported against the service, but may not get reflected in the service in the network.";
142       }
143       leaf url {
144         type string;
145         description
146           "URL needed for communication with DWDM pluggable. This is reported against the service, but may not get reflected in the service in the network.";
147       }
148     }
149     leaf user-label {
150       type string;
151       mandatory false;
152       description
153         "Label for service endpoint, defined by the user";
154     }
155   }
156
157   typedef rpc-actions {
158     description "rpc-actions include all the rpc methods";
159     type enumeration {
160       enum service-create {
161         value "1";
162       }
163       enum service-feasibility-check {
164         value "2";
165       }
166       enum service-delete {
167         value "3";
168       }
169       enum equipment-notification {
170         value "4";
171       }
172       enum temp-service-create {
173         value "5";
174       }
175       enum temp-service-delete {
176         value "6";
177       }
178       enum service-roll {
179         value "7";
180       }
181       enum service-reconfigure {
182         value "8";
183       }
184       enum service-restoration {
185         value "9";
186       }
187       enum service-reversion {
188         value "10";
189       }
190       enum service-reroute {
191         value "11";
192       }
193       enum service-reroute-confirm {
194         value "12";
195       }
196       enum network-re-optimization {
197         value "13";
198       }
199     }
200   }
201
202   grouping sdnc-request-header {
203     container sdnc-request-header {
204       leaf request-id {
205         type string;
206       }
207       leaf rpc-action {
208         type rpc-actions;
209       }
210       leaf notification-url {
211         type string;
212       }
213       leaf request-system-id{
214         type string;
215       }
216     }
217   }
218
219   grouping service-port {
220     container port {
221       leaf port-device-name {
222         type string;
223       }
224       leaf port-type {
225         type string;
226       }
227       leaf port-name {
228         type string;
229       }
230       leaf port-rack {
231         type string;
232       }
233       leaf port-shelf {
234         type string;
235       }
236       leaf port-slot {
237         type string;
238       }
239       leaf port-sub-slot {
240         type string;
241       }
242     }
243   }
244
245   grouping service-lgx {
246     container lgx {
247       leaf lgx-device-name {
248         type string;
249       }
250       leaf lgx-port-name {
251         type string;
252       }
253       leaf lgx-port-rack {
254         type string;
255       }
256       leaf lgx-port-shelf {
257         type string;
258       }
259     }
260   }
261
262   grouping service-tail {
263     container tail {
264       container tail-roadm {
265         description
266           "ROADM on which the transponder is connected to (TID, IP Address,
267            or FQDN)";
268         uses org-openroadm-resource-types:device-id;
269       }
270       container xponder-port {
271         description
272           "Muxponder port used in tail, that will get used as a service endpoint.";
273         leaf circuit-pack-name {
274           type string;
275         }
276         leaf port-name {
277           type string;
278         }
279       }
280       leaf tail-roadm-port-aid {
281         type string;
282         description
283           "This will provide the transponder port needed to inter-city ROADM
284            connection";
285       }
286       leaf tail-roadm-port-rack-location {
287         type string;
288         description
289           "Transponder's location";
290       }
291     }
292   }
293
294   grouping service-information {
295     leaf due-date {
296       type yang:date-and-time;
297       description
298         "Date and time service to be turn up. If time is not specified for a given date, default to  midnight. Service turned up immediately if no due date is specified";
299     }
300     leaf end-date {
301       type yang:date-and-time;
302       description
303         "Date and time service to be removed";
304       mandatory false;
305     }
306     leaf nc-code {
307       type string;
308       description
309         "NC code applied to wavelength service only.This is reported against the service, but may not get reflected in the service in the network.";
310     }
311     leaf nci-code {
312       type string;
313       description
314         "NCI code applied to wavelength service only.This is reported against the service, but may not get reflected in the service in the network.";
315     }
316     leaf secondary-nci-code {
317       type string;
318       description
319         "NC code applied to wavelength service only.This is reported against the service, but may not get reflected in the service in the network.";
320     }
321     leaf customer {
322       type string;
323       description
324         "To be included in ticket information.This is reported against the service, but may not get reflected in the service in the network.";
325     }
326     leaf customer-contact {
327       type string;
328       description
329         "Customer contact information To be included in ticket information. This is reported against the service, but may not get reflected in the service in the network.";
330     }
331     leaf operator-contact {
332       type string;
333       description
334         "Operator contact information to be included in ticket information. This is reported against the service, but may not get reflected in the service in the network.";
335     }
336   }
337
338   grouping service {
339     leaf service-name {
340       type string;
341       description
342         "Identifier for the service to be created in
343          the ROADM network, e.g., CLFI, CLCI, etc.";
344       mandatory true;
345     }
346     leaf common-id {
347       type string;
348       description
349         "To be used by the ROADM controller to identify the routing
350          constraints received from planning application (PED).";
351     }
352     uses sdnc-request-header;
353     leaf connection-type {
354       type connection-type;
355       mandatory true;
356       description
357         "Connection type";
358     }
359     leaf lifecycle-state {
360       type org-openroadm-common-types:lifecycle-state;
361       description
362         "Lifecycle State of service. Whether it is planned, deployed, in maintenance, etc.";
363     }
364     leaf administrative-state {
365       type org-openroadm-common-types:state;
366       description
367         "Administrative State: Intended state of service";
368     }
369     leaf operational-state {
370       type org-openroadm-common-types:state;
371       config false;
372       description
373         "Operational State: Actual state of service";
374     }
375     leaf condition {
376       type service-condition;
377       description
378         "Service Condition: Additional information about the state of the service. Only sent when applicable.";
379     }
380     container service-a-end {
381       uses service-endpoint;
382     }
383     container service-z-end {
384       uses service-endpoint;
385     }
386     uses org-openroadm-routing-constraints:routing-constraints;
387     uses service-information;
388     leaf latency {
389       type uint32;
390       description
391         "Latency on service";
392     }
393     leaf-list fiber-span-srlgs {
394       type string;
395       description
396         "Shared risk link group identifiers";
397     }
398     list equipment-srgs {
399       key "srg-number";
400       uses org-openroadm-resource-types:srg-number;
401     }
402     leaf-list supporting-service-name {
403       description
404         "The service name that this runs over top. If connection-type is service, then this is the related
405          connection-type = infrastructure service, for example.";
406       type string;
407     }
408     container topology {
409       uses org-openroadm-topology:topology;
410     }
411   }
412
413   grouping service-notification-result {
414     leaf service-name {
415       type string;
416       description
417         "Identifier for the service e.g., CLFI, CLCI, etc.";
418       mandatory true;
419     }
420     leaf actual-date {
421       type yang:date-and-time;
422       description
423         "Actual date and time (if successful)";
424     }
425   }
426
427   typedef service-format {
428     type enumeration {
429       enum "Ethernet" {
430         value 1;
431       }
432       enum "OTU" {
433         value 2;
434       }
435       enum "OC" {
436         value 3;
437       }
438       enum "STM" {
439         value 4;
440       }
441       enum "OMS" {
442         value 5;
443       }
444       enum "ODU" {
445         value 6;
446       }
447       enum "OTM" {
448         value 7;
449       }
450     }
451   }
452
453   typedef service-notification-types {
454     type enumeration {
455       enum "service-create-result" {
456         value 1;
457       }
458       enum "service-reconfigure-result" {
459         value 2;
460       }
461       enum "service-delete-result" {
462         value 3;
463       }
464       enum "service-roll-result" {
465         value 4;
466       }
467       enum "service-revert-result" {
468         value 5;
469       }
470       enum "service-reroute-result" {
471         value 6;
472       }
473       enum "service-restoration-result" {
474         value 7;
475       }
476       //Add Martial
477       enum "service-feasibility-check-result" {
478         value 8;
479       }
480     }
481   }
482
483   typedef connection-type {
484     type enumeration {
485       enum "service" {
486         value 1;
487       }
488       enum "infrastructure" {
489         value 2;
490       }
491       enum "roadm-line" {
492         value 3;
493       }
494     }
495   }
496
497   typedef service-condition {
498     type enumeration {
499       enum "restored-temporarily" {
500         value 1;
501       }
502       enum "re-routed-temporarily" {
503         value 2;
504       }
505       enum "activated-for-service" {
506         value 3;
507       }
508       enum "activated-for-further-check" {
509         value 4;
510       }
511       enum "activated-for-troubleshooting-failure" {
512         value 5;
513       }
514     }
515   }
516 }