Upgrade Network model from 2.1 to 4.1
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-common-types@2018-11-30.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 2018-11-30 {
39     description
40       "Version 4.1.0";
41   }
42   revision 2018-11-30 {
43     description
44       "Version 4.1.0";
45   }
46   revision 2018-09-28 {
47     description
48       "Version 4.0.0";
49   }
50   revision 2018-03-30 {
51     description
52       "Version 3.0.0";
53   }
54   revision 2017-12-15 {
55     description
56       "Version 2.2";
57   }
58   revision 2017-09-29 {
59     description
60       "Version 2.1";
61   }
62   revision 2017-06-26 {
63     description
64       "Version 2.0";
65   }
66   revision 2016-10-14 {
67     description
68       "Version 1.2";
69   }
70
71   typedef activate-notification-type {
72     type enumeration {
73       enum "activate" {
74         value 1;
75         description
76           "software or database activation";
77       }
78       enum "commit" {
79         value 2;
80         description
81           "commit the software or database.
82            For software activate, this event can happen in the following scenarios:
83              1) immediately when user issue sw-activate command without validationTimer
84                 or if the validationTimer is specified as 00-00-00;
85              2) when user issue cancel-validation-timer before it expires and with accept=true.
86            For database activate, this event can occur in the following scenarios:
87              1) immediately when user issue db-activate command without rollBackTimer
88                 or if the rollBackTimer is specified as 00-00-00;
89              2) when user issue cancel-rollback-timer before it expires and with accept=true.";
90       }
91       enum "cancel" {
92         value 3;
93         description
94           "cancel the database or software activation operation.
95            For software activate, this event can happen in the following cases:
96              1) when the validationTimer expires;
97              2) when the user issues cancel-validation-timer with accept=false.
98            For database activate, this event can happen in the following cases:
99              1) when the rollBackTimer expires;
100              2) when the user issues cancel-rollback-timer with accept=false.";
101       }
102     }
103     description
104       "Type of notification on software or database activation events";
105   }
106
107   typedef rpc-status {
108     type enumeration {
109       enum "Successful" {
110         value 1;
111       }
112       enum "Failed" {
113         value 2;
114       }
115     }
116     description
117       "status of RPC ";
118   }
119
120   typedef extended-rpc-status {
121     type enumeration {
122       enum "Successful" {
123         value 1;
124       }
125       enum "Failed" {
126         value 2;
127       }
128       enum "In-progress" {
129         value 3;
130       }
131     }
132     description
133       "status of RPC ";
134   }
135
136   typedef openroadm-version-type {
137     type enumeration {
138       enum "1.0" {
139         value 1;
140         description
141           "value for 1.0";
142       }
143       enum "2.0" {
144         value 2;
145         description
146           "value for 2.0";
147       }
148       enum "2.1" {
149         value 3;
150         description
151           "value for 2.1";
152       }
153       enum "2.2" {
154         value 4;
155         description
156           "value for 2.2";
157       }
158       enum "3.0" {
159         value 5;
160         description
161           "value for 3.0";
162       }
163       enum "3.1" {
164         value 6;
165         description
166           "value for 3.1";
167       }
168       enum "4.0" {
169         value 7;
170         description
171           "value for 4.0";
172       }
173       enum "2.2.1" {
174         value 8;
175         description
176           "value for 2.2.1";
177       }
178       enum "4.1" {
179         value 9;
180         description
181           "value for 4.1";
182       }
183       enum "3.1.1" {
184         value 10;
185         description
186           "value for 3.1.1";
187       }
188     }
189     description
190       "OpenROADM version enum type";
191   }
192
193   grouping rpc-response-status {
194     leaf status {
195       type rpc-status;
196       mandatory true;
197       description
198         "Successful or Failed";
199     }
200     leaf status-message {
201       type string;
202       description
203         "Gives a more detailed status";
204     }
205   }
206
207   grouping extended-rpc-response-status {
208     leaf status {
209       type extended-rpc-status;
210       mandatory true;
211       description
212         "Successful, Failed or In-progress";
213     }
214     leaf status-message {
215       type string;
216       description
217         "Gives a more detailed status.";
218     }
219   }
220
221   grouping eth-rate-and-burst-size {
222     description
223       "Grouping of ethernet committed rate and burst size.";
224     leaf committed-info-rate {
225       type uint32;
226       mandatory true;
227       description
228         "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
229     }
230     leaf committed-burst-size {
231       type uint16;
232       mandatory true;
233       description
234         "Committed Burst Size, unit in 1KB (K Byte).
235                 Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
236     }
237   }
238 }