upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-common-types@2019-05-31.yang
1 module org-openroadm-common-types {
2   namespace "http://org/openroadm/common-types";
3   prefix org-openroadm-common-types;
4
5   organization
6     "Open ROADM MSA";
7   contact
8     "OpenROADM.org";
9   description
10     "YANG definitions of common types.
11
12       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
13       All other rights reserved.
14
15       Redistribution and use in source and binary forms, with or without modification,
16       are permitted provided that the following conditions are met:
17
18       * Redistributions of source code must retain the above copyright notice, this
19         list of conditions and the following disclaimer.
20       * Redistributions in binary form must reproduce the above copyright notice,
21         this list of conditions and the following disclaimer in the documentation and/or
22         other materials provided with the distribution.
23       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
24         contributors may be used to endorse or promote products derived from this software
25         without specific prior written permission.
26
27       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
28       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
31       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
33       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36       POSSIBILITY OF SUCH DAMAGE";
37
38   revision 2019-05-31 {
39     description
40       "Version 5.1.0";
41   }
42   revision 2019-03-29 {
43     description
44       "Version 5.0.0";
45   }
46   revision 2018-11-30 {
47     description
48       "Version 4.1.0";
49   }
50   revision 2018-09-28 {
51     description
52       "Version 4.0.0";
53   }
54   revision 2018-03-30 {
55     description
56       "Version 3.0.0";
57   }
58   revision 2017-12-15 {
59     description
60       "Version 2.2";
61   }
62   revision 2017-09-29 {
63     description
64       "Version 2.1";
65   }
66   revision 2017-06-26 {
67     description
68       "Version 2.0";
69   }
70   revision 2016-10-14 {
71     description
72       "Version 1.2";
73   }
74
75   typedef activate-notification-type {
76     type enumeration {
77       enum "activate" {
78         value 1;
79         description
80           "software or database activation";
81       }
82       enum "commit" {
83         value 2;
84         description
85           "commit the software or database.
86            For software activate, this event can happen in the following scenarios:
87              1) immediately when user issue sw-activate command without validationTimer
88                 or if the validationTimer is specified as 00-00-00;
89              2) when user issue cancel-validation-timer before it expires and with accept=true.
90            For database activate, this event can occur in the following scenarios:
91              1) immediately when user issue db-activate command without rollBackTimer
92                 or if the rollBackTimer is specified as 00-00-00;
93              2) when user issue cancel-rollback-timer before it expires and with accept=true.";
94       }
95       enum "cancel" {
96         value 3;
97         description
98           "cancel the database or software activation operation.
99            For software activate, this event can happen in the following cases:
100              1) when the validationTimer expires;
101              2) when the user issues cancel-validation-timer with accept=false.
102            For database activate, this event can happen in the following cases:
103              1) when the rollBackTimer expires;
104              2) when the user issues cancel-rollback-timer with accept=false.";
105       }
106     }
107     description
108       "Type of notification on software or database activation events";
109   }
110
111   typedef rpc-status {
112     type enumeration {
113       enum "Successful" {
114         value 1;
115       }
116       enum "Failed" {
117         value 2;
118       }
119     }
120     description
121       "status of RPC ";
122   }
123
124   typedef extended-rpc-status {
125     type enumeration {
126       enum "Successful" {
127         value 1;
128       }
129       enum "Failed" {
130         value 2;
131       }
132       enum "In-progress" {
133         value 3;
134       }
135     }
136     description
137       "status of RPC ";
138   }
139
140   typedef openroadm-version-type {
141     type enumeration {
142       enum "1.0" {
143         value 1;
144         description
145           "value for 1.0";
146       }
147       enum "2.0" {
148         value 2;
149         description
150           "value for 2.0";
151       }
152       enum "2.1" {
153         value 3;
154         description
155           "value for 2.1";
156       }
157       enum "2.2" {
158         value 4;
159         description
160           "value for 2.2";
161       }
162       enum "3.0" {
163         value 5;
164         description
165           "value for 3.0";
166       }
167       enum "3.1" {
168         value 6;
169         description
170           "value for 3.1";
171       }
172       enum "4.0" {
173         value 7;
174         description
175           "value for 4.0";
176       }
177       enum "2.2.1" {
178         value 8;
179         description
180           "value for 2.2.1";
181       }
182       enum "4.1" {
183         value 9;
184         description
185           "value for 4.1";
186       }
187       enum "3.1.1" {
188         value 10;
189         description
190           "value for 3.1.1";
191       }
192       enum "5.0" {
193         value 11;
194         description
195           "value for 5.0";
196       }
197       enum "5.1" {
198         value 12;
199         description
200           "value for 5.1";
201       }
202     }
203     description
204       "OpenROADM version enum type";
205   }
206
207   grouping rpc-response-status {
208     leaf status {
209       type rpc-status;
210       mandatory true;
211       description
212         "Successful or Failed";
213     }
214     leaf status-message {
215       type string;
216       description
217         "Gives a more detailed status";
218     }
219   }
220
221   grouping extended-rpc-response-status {
222     leaf status {
223       type extended-rpc-status;
224       mandatory true;
225       description
226         "Successful, Failed or In-progress";
227     }
228     leaf status-message {
229       type string;
230       description
231         "Gives a more detailed status.";
232     }
233   }
234
235   grouping eth-rate-and-burst-size {
236     description
237       "Grouping of ethernet committed rate and burst size.";
238     leaf committed-info-rate {
239       type uint32;
240       mandatory true;
241       description
242         "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
243     }
244     leaf committed-burst-size {
245       type uint16;
246       mandatory true;
247       description
248         "Committed Burst Size, unit in 1KB (K Byte).
249                 Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
250     }
251   }
252 }