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