upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-resource-types@2018-11-30.yang
1 module org-openroadm-resource-types {
2   namespace "http://org/openroadm/resource/types";
3   prefix org-openroadm-resource-types;
4
5   import org-openroadm-common-node-types {
6     prefix org-openroadm-common-node-types;
7     revision-date 2018-11-30;
8   }
9
10   organization
11     "Open ROADM MSA";
12   contact
13     "OpenROADM.org";
14   description
15     "YANG definitions of common resource types.
16
17       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
18       All other rights reserved.
19
20       Redistribution and use in source and binary forms, with or without modification,
21       are permitted provided that the following conditions are met:
22
23       * Redistributions of source code must retain the above copyright notice, this
24         list of conditions and the following disclaimer.
25       * Redistributions in binary form must reproduce the above copyright notice,
26         this list of conditions and the following disclaimer in the documentation and/or
27         other materials provided with the distribution.
28       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
29         contributors may be used to endorse or promote products derived from this software
30         without specific prior written permission.
31
32       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
33       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
35       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
36       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
37       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
38       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41       POSSIBILITY OF SUCH DAMAGE";
42
43   revision 2018-11-30 {
44     description
45       "Version 4.1.0";
46   }
47   revision 2018-09-28 {
48     description
49       "Version 4.0.0";
50   }
51   revision 2018-03-30 {
52     description
53       "Version 3.0.0";
54   }
55   revision 2017-12-15 {
56     description
57       "Version 2.2";
58   }
59   revision 2017-09-29 {
60     description
61       "Version 2.1";
62   }
63   revision 2017-06-26 {
64     description
65       "Version 2.0";
66   }
67   revision 2016-10-14 {
68     description
69       "Version 1.2";
70   }
71
72   typedef resource-type-enum {
73     type enumeration {
74       enum "other" {
75         value 1;
76         description
77           "Resource of type not found in list.";
78       }
79       enum "device" {
80         value 2;
81         description
82           "device - ROAMD, Xponder, etc";
83       }
84       enum "degree" {
85         value 3;
86         description
87           "degree";
88       }
89       enum "shared-risk-group" {
90         value 4;
91         description
92           "shared-risk-group";
93       }
94       enum "connection" {
95         value 5;
96         description
97           "connection - this is used by roadm-connection and odu-connection
98            since they are mutually exclusive in the model";
99       }
100       enum "connection-map" {
101         value 6;
102         description
103           "connection-map";
104       }
105       enum "port" {
106         value 7;
107         description
108           "port";
109       }
110       enum "circuit-pack" {
111         value 8;
112         description
113           "circuit pack";
114       }
115       enum "internal-link" {
116         value 9;
117         description
118           "internal-link";
119       }
120       enum "physical-link" {
121         value 10;
122         description
123           "physical-link";
124       }
125       enum "interface" {
126         value 11;
127         description
128           "interface";
129       }
130       enum "shelf" {
131         value 12;
132         description
133           "shelf";
134       }
135       enum "service" {
136         value 13;
137         description
138           "service";
139       }
140       enum "odu-sncp-pg" {
141         value 14;
142         description
143           "odu-sncp-pg";
144       }
145       enum "line-amplifier" {
146         value 15;
147         description
148           "line-amplifier";
149       }
150       enum "xponder" {
151         value 16;
152         description
153           "xponder";
154       }
155       enum "versioned-service" {
156         value 17;
157         description
158           "versioned-service";
159       }
160       enum "temp-service" {
161         value 18;
162         description
163           "temp-service";
164       }
165     }
166   }
167
168   typedef resource-notification-type {
169     type enumeration {
170       enum "resourceCreation" {
171         value 1;
172         description
173           "A new instance of a resource has been created.";
174       }
175       enum "resourceModification" {
176         value 2;
177         description
178           "An existing instance of a resource has been modified. This shall be triggered by changes in configuration, state, status etc.
179            It shall not be triggered by changes in performance measurements, power and temperature readings or any other data that is highly volatile. ";
180       }
181       enum "resourceDeletion" {
182         value 3;
183         description
184           "An existing instance of a resource has been removed.";
185       }
186     }
187     description
188       "Type of notification about a resource";
189   }
190
191   grouping resource-type {
192     leaf type {
193       type resource-type-enum;
194       mandatory true;
195     }
196     leaf extension {
197       type string;
198       mandatory false;
199     }
200   }
201
202   grouping device-id {
203     description
204       "Device identifier. Unique within the Controller.";
205     leaf node-id {
206       type org-openroadm-common-node-types:node-id-type;
207       description
208         "Node Id is a globally unique identifier for a device.
209          Same as leafref value in model, if applicable.";
210     }
211   }
212
213   grouping circuit-pack-name {
214     leaf circuit-pack-name {
215       type string;
216       mandatory true;
217       description
218         "Circuit-Pack identifier. Unique within the context of a device.
219          Same as leafref value in model, if applicable.";
220     }
221   }
222
223   grouping port-name {
224     uses circuit-pack-name;
225     leaf port-name {
226       type string;
227       description
228         "Port identifier. Unique within the context of a circuit-pack.
229          Same as leafref value in model, if applicable.";
230     }
231   }
232
233   grouping physical-link-name {
234     leaf physical-link-name {
235       type string;
236       mandatory true;
237       description
238         "Physical Link identifier. Unique within the context of a device.
239          Same as leafref value in model, if applicable.";
240     }
241   }
242
243   grouping internal-link-name {
244     leaf internal-link-name {
245       type string;
246       mandatory true;
247       description
248         "Internal Link identifier. Unique within the context of a device.
249          Same as leafref value in model, if applicable.";
250     }
251   }
252
253   grouping connection-name {
254     leaf connection-name {
255       type string;
256       description
257         "Connection name. Unique within the context of a device.
258          Same as leafref value in model, if applicable.";
259     }
260   }
261
262   grouping degree-number {
263     leaf degree-number {
264       type uint16;
265       description
266         "Degree identifier. Unique within the context of a device.
267          Same as leafref value in model, if applicable.";
268     }
269   }
270
271   grouping srg-number {
272     leaf srg-number {
273       type uint16;
274       description
275         "Shared Risk Group identifier. Unique within the context of a device.
276          Same as leafref value in model, if applicable.";
277     }
278   }
279
280   grouping shelf-name {
281     leaf shelf-name {
282       type string;
283       mandatory true;
284       description
285         "Shelf-id identifier. Unique within the context of a device.
286          Same as leafref value in model, if applicable.";
287     }
288   }
289
290   grouping service-name {
291     leaf service-name {
292       type string;
293       mandatory true;
294       description
295         "Service identifier. Unique within the context of a network.
296          Same as leafref value in model, if applicable.";
297     }
298   }
299
300   grouping versioned-service-name {
301     leaf versioned-service-name {
302       type string;
303       mandatory true;
304       description
305         "Service identifier. Unique within the context of a network.
306          Same as leafref value in model, if applicable.";
307     }
308     leaf version-number {
309       type uint64;
310       mandatory true;
311       description
312         "version-number of the service";
313     }
314   }
315
316   grouping temp-service-name {
317     leaf common-id {
318       type string;
319       mandatory true;
320       description
321         "Service identifier. Unique within the context of a network.
322          Same as leafref value in model, if applicable.";
323     }
324   }
325
326   grouping interface-name {
327     leaf interface-name {
328       type string;
329       mandatory true;
330       description
331         "Interface identifier.";
332     }
333   }
334
335   grouping other-resource-id {
336     leaf other-resource-id {
337       type string;
338       mandatory true;
339       description
340         "resource-id for other.";
341     }
342   }
343
344   grouping odu-sncp-pg-name {
345     leaf odu-sncp-pg-name {
346       type string;
347       mandatory true;
348       description
349         "name of the odu-snc-pg";
350     }
351   }
352
353   grouping amp-number {
354     leaf amp-number {
355       type uint8;
356       mandatory true;
357       description
358         "number of the line-amplifier";
359     }
360   }
361
362   grouping xpdr-number {
363     leaf xpdr-number {
364       type uint16;
365       mandatory true;
366       description
367         "number of the xponder";
368     }
369   }
370 }