Remove openroadm and tapi models building
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-resource-types@2021-09-24.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 2021-05-28;
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 2021-09-24 {
44     description
45       "Version 10.0";
46   }
47   revision 2021-05-28 {
48     description
49       "Version 9.1";
50   }
51   revision 2019-11-29 {
52     description
53       "Version 6.1.0";
54   }
55   revision 2018-11-30 {
56     description
57       "Version 4.1.0";
58   }
59   revision 2018-09-28 {
60     description
61       "Version 4.0.0";
62   }
63   revision 2018-03-30 {
64     description
65       "Version 3.0.0";
66   }
67   revision 2017-12-15 {
68     description
69       "Version 2.2";
70   }
71   revision 2017-09-29 {
72     description
73       "Version 2.1";
74   }
75   revision 2017-06-26 {
76     description
77       "Version 2.0";
78   }
79   revision 2016-10-14 {
80     description
81       "Version 1.2";
82   }
83
84   typedef resource-type-enum {
85     type enumeration {
86       enum other {
87         value 1;
88         description
89           "Resource of type not found in list.";
90       }
91       enum device {
92         value 2;
93         description
94           "device - ROAMD, Xponder, etc";
95       }
96       enum degree {
97         value 3;
98         description
99           "degree";
100       }
101       enum shared-risk-group {
102         value 4;
103         description
104           "shared-risk-group";
105       }
106       enum connection {
107         value 5;
108         description
109           "connection - this is used by roadm-connection and odu-connection
110            since they are mutually exclusive in the model";
111       }
112       enum connection-map {
113         value 6;
114         description
115           "connection-map";
116       }
117       enum port {
118         value 7;
119         description
120           "port";
121       }
122       enum circuit-pack {
123         value 8;
124         description
125           "circuit pack";
126       }
127       enum internal-link {
128         value 9;
129         description
130           "internal-link";
131       }
132       enum physical-link {
133         value 10;
134         description
135           "physical-link";
136       }
137       enum interface {
138         value 11;
139         description
140           "interface";
141       }
142       enum shelf {
143         value 12;
144         description
145           "shelf";
146       }
147       enum service {
148         value 13;
149         description
150           "service";
151       }
152       enum odu-sncp-pg {
153         value 14;
154         description
155           "odu-sncp-pg";
156       }
157       enum line-amplifier {
158         value 15;
159         description
160           "line-amplifier";
161       }
162       enum xponder {
163         value 16;
164         description
165           "xponder";
166       }
167       enum versioned-service {
168         value 17;
169         description
170           "versioned-service";
171       }
172       enum temp-service {
173         value 18;
174         description
175           "temp-service";
176       }
177       enum client-sncp-pg {
178         value 19;
179         description
180           "client-sncp-pg";
181       }
182     }
183   }
184
185   typedef resource-notification-type {
186     type enumeration {
187       enum resourceCreation {
188         value 1;
189         description
190           "A new instance of a resource has been created.";
191       }
192       enum resourceModification {
193         value 2;
194         description
195           "An existing instance of a resource has been modified. This shall be triggered by changes in configuration, state, status etc.
196            It shall not be triggered by changes in performance measurements, power and temperature readings or any other data that is highly volatile. ";
197       }
198       enum resourceDeletion {
199         value 3;
200         description
201           "An existing instance of a resource has been removed.";
202       }
203     }
204     description
205       "Type of notification about a resource";
206   }
207
208   grouping resource-type {
209     leaf type {
210       type resource-type-enum;
211       mandatory true;
212     }
213     leaf extension {
214       type string;
215       mandatory false;
216     }
217   }
218
219   grouping device-id {
220     description
221       "Device identifier. Unique within the Controller.";
222     leaf node-id {
223       type org-openroadm-common-node-types:node-id-type;
224       description
225         "Node Id is a globally unique identifier for a device.
226          Same as leafref value in model, if applicable.";
227     }
228   }
229
230   grouping circuit-pack-name {
231     leaf circuit-pack-name {
232       type string;
233       mandatory true;
234       description
235         "Circuit-Pack identifier. Unique within the context of a device.
236          Same as leafref value in model, if applicable.";
237     }
238   }
239
240   grouping port-name {
241     uses circuit-pack-name;
242     leaf port-name {
243       type string;
244       description
245         "Port identifier. Unique within the context of a circuit-pack.
246          Same as leafref value in model, if applicable.";
247     }
248   }
249
250   grouping physical-link-name {
251     leaf physical-link-name {
252       type string;
253       mandatory true;
254       description
255         "Physical Link identifier. Unique within the context of a device.
256          Same as leafref value in model, if applicable.";
257     }
258   }
259
260   grouping internal-link-name {
261     leaf internal-link-name {
262       type string;
263       mandatory true;
264       description
265         "Internal Link identifier. Unique within the context of a device.
266          Same as leafref value in model, if applicable.";
267     }
268   }
269
270   grouping connection-name {
271     leaf connection-name {
272       type string;
273       description
274         "Connection name. Unique within the context of a device.
275          Same as leafref value in model, if applicable.";
276     }
277   }
278
279   grouping degree-number {
280     leaf degree-number {
281       type uint16;
282       description
283         "Degree identifier. Unique within the context of a device.
284          Same as leafref value in model, if applicable.";
285     }
286   }
287
288   grouping srg-number {
289     leaf srg-number {
290       type uint16;
291       description
292         "Shared Risk Group identifier. Unique within the context of a device.
293          Same as leafref value in model, if applicable.";
294     }
295   }
296
297   grouping shelf-name {
298     leaf shelf-name {
299       type string;
300       mandatory true;
301       description
302         "Shelf-id identifier. Unique within the context of a device.
303          Same as leafref value in model, if applicable.";
304     }
305   }
306
307   grouping service-name {
308     leaf service-name {
309       type string;
310       mandatory true;
311       description
312         "Service identifier. Unique within the context of a network.
313          Same as leafref value in model, if applicable.";
314     }
315   }
316
317   grouping versioned-service-name {
318     leaf versioned-service-name {
319       type string;
320       mandatory true;
321       description
322         "Service identifier. Unique within the context of a network.
323          Same as leafref value in model, if applicable.";
324     }
325     leaf version-number {
326       type uint64;
327       mandatory true;
328       description
329         "version-number of the service";
330     }
331   }
332
333   grouping temp-service-name {
334     leaf common-id {
335       type string;
336       mandatory true;
337       description
338         "Service identifier. Unique within the context of a network.
339          Same as leafref value in model, if applicable.";
340     }
341   }
342
343   grouping interface-name {
344     leaf interface-name {
345       type string;
346       mandatory true;
347       description
348         "Interface identifier.";
349     }
350   }
351
352   grouping other-resource-id {
353     leaf other-resource-id {
354       type string;
355       mandatory true;
356       description
357         "resource-id for other.";
358     }
359   }
360
361   grouping odu-sncp-pg-name {
362     leaf odu-sncp-pg-name {
363       type string;
364       mandatory true;
365       description
366         "name of the odu-snc-pg";
367     }
368   }
369
370   grouping client-sncp-pg-name {
371     leaf client-sncp-pg-name {
372       type string;
373       mandatory true;
374       description
375         "name of the client-snc-pg";
376     }
377   }
378
379   grouping amp-number {
380     leaf amp-number {
381       type uint8;
382       mandatory true;
383       description
384         "number of the line-amplifier";
385     }
386   }
387
388   grouping xpdr-number {
389     leaf xpdr-number {
390       type uint16;
391       mandatory true;
392       description
393         "number of the xponder";
394     }
395   }
396 }