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