Remove openroadm and tapi models building
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-resource@2020-05-29.yang
1 module org-openroadm-resource {
2   namespace "http://org/openroadm/resource";
3   prefix org-openroadm-resource;
4
5   import org-openroadm-interfaces {
6     prefix org-openroadm-interfaces;
7     revision-date 2019-11-29;
8   }
9   import org-openroadm-otn-common-types {
10     prefix org-openroadm-otn-common-types;
11     revision-date 2020-03-27;
12   }
13   import org-openroadm-common-optical-channel-types {
14     prefix org-openroadm-common-optical-channel-types;
15     revision-date 2020-05-29;
16   }
17   import org-openroadm-resource-types {
18     prefix org-openroadm-resource-types;
19     revision-date 2019-11-29;
20   }
21
22   organization
23     "Open ROADM MSA";
24   contact
25     "OpenROADM.org";
26   description
27     "YANG definitions of resources.
28
29       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
30       All other rights reserved.
31
32       Redistribution and use in source and binary forms, with or without modification,
33       are permitted provided that the following conditions are met:
34
35       * Redistributions of source code must retain the above copyright notice, this
36         list of conditions and the following disclaimer.
37       * Redistributions in binary form must reproduce the above copyright notice,
38         this list of conditions and the following disclaimer in the documentation and/or
39         other materials provided with the distribution.
40       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
41         contributors may be used to endorse or promote products derived from this software
42         without specific prior written permission.
43
44       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
45       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
48       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
50       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
51       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
52       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
53       POSSIBILITY OF SUCH DAMAGE";
54
55   revision 2020-05-29 {
56     description
57       "Version 7.1.0";
58   }
59   revision 2020-03-27 {
60     description
61       "Version 7.0.0";
62   }
63   revision 2019-11-29 {
64     description
65       "Version 6.1.0";
66   }
67   revision 2019-09-27 {
68     description
69       "Version 6.0.0";
70   }
71   revision 2019-05-31 {
72     description
73       "Version 5.1.0";
74   }
75   revision 2019-03-29 {
76     description
77       "Version 5.0.0";
78   }
79   revision 2018-11-30 {
80     description
81       "Version 4.1.0";
82   }
83   revision 2018-09-28 {
84     description
85       "Version 4.0.0";
86   }
87   revision 2018-03-30 {
88     description
89       "Version 3.0.0";
90   }
91   revision 2017-12-15 {
92     description
93       "Version 2.2";
94   }
95   revision 2017-09-29 {
96     description
97       "Version 2.1";
98   }
99   revision 2017-07-28 {
100     description
101       "Version 2.0.1 - added revision-date to imports";
102   }
103   revision 2017-06-26 {
104     description
105       "Version 2.0";
106   }
107   revision 2016-10-14 {
108     description
109       "Version 1.2";
110   }
111
112   grouping eth-attributes {
113     leaf speed {
114       type uint32;
115       description
116         "Set speed of the interface, unit mbps.
117          This is for ETH facility. ";
118     }
119   }
120
121   grouping mc-ttp-attributes {
122     description
123       "Media channel termination point. Models bandwidth allocation in physical media. Network media channels may be provisioned in the spectrum characterized by the frequency limits.";
124     leaf min-freq {
125       type org-openroadm-common-optical-channel-types:frequency-THz;
126       config true;
127       description
128         "Minimum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
129     }
130     leaf max-freq {
131       type org-openroadm-common-optical-channel-types:frequency-THz;
132       config true;
133       description
134         "Maximum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
135     }
136   }
137
138   grouping nmc-ctp-attributes {
139     description
140       "Network Media Channel attributes";
141     leaf frequency {
142       type org-openroadm-common-optical-channel-types:frequency-THz;
143       config true;
144       description
145         "Center Frequency in THz.  This is not constrained by mc-capabilities.  It must fit (when combined with width) inside any containing media channel.";
146     }
147     leaf width {
148       type org-openroadm-common-optical-channel-types:frequency-GHz;
149       config true;
150       description
151         "Frequency width in GHz.  This is not constrained by mc-capabilities.  It must fit (when combined with frequency) inside any containing media channel.";
152     }
153   }
154
155   grouping och-attributes {
156     description
157       "Optical Channel attributes";
158     leaf rate {
159       type identityref {
160         base org-openroadm-common-optical-channel-types:och-rate-identity;
161       }
162       description
163         "rate";
164     }
165     leaf frequency {
166       type org-openroadm-common-optical-channel-types:frequency-THz;
167       description
168         "Center Frequency in THz.";
169     }
170     leaf width {
171       type org-openroadm-common-optical-channel-types:frequency-GHz;
172       config false;
173       description
174         "Frequency width in GHz.";
175     }
176     leaf modulation-format {
177       type org-openroadm-common-optical-channel-types:modulation-format;
178       description
179         "Modulation format";
180     }
181   }
182
183   grouping odu-attributes {
184     description
185       "ODU attributes";
186     leaf rate {
187       type identityref {
188         base org-openroadm-otn-common-types:odu-rate-identity;
189       }
190       description
191         "rate identity of the ODU. 'identityref' is used
192          to allow to extend for future higher rates";
193     }
194     container parent-odu-allocation {
195       description
196         "parent odu allocation";
197       leaf trib-port-number {
198         type uint16 {
199           range "1 .. 80";
200         }
201         description
202           "Assigned tributary port number in parent OPU";
203       }
204       leaf-list trib-slots {
205         type uint16 {
206           range "1 .. 80";
207         }
208         min-elements 1;
209         max-elements 80;
210         description
211           "Assigned trib slots occupied in parent OPU MSI";
212       }
213     }
214   }
215
216   grouping otu-attributes {
217     description
218       "OTU attributes";
219     leaf rate {
220       type identityref {
221         base org-openroadm-otn-common-types:otu-rate-identity;
222       }
223       description
224         "rate identity of the OTU. 'identityref' is used
225          to allow to extend for future higher rates";
226     }
227   }
228
229   grouping resource-reporting {
230     leaf type {
231       type identityref {
232         base org-openroadm-interfaces:interface-type;
233       }
234       mandatory true;
235       description
236         "The type of the interface.";
237     }
238     container ethernet {
239       when "../type = 'ethernetCsmacd'";
240       description
241         "Ethernet Interfaces";
242       uses eth-attributes;
243     }
244     container mc-ttp {
245       when "../type = 'mediaChannelTrailTerminationPoint'";
246       description
247         "Media Channel Trail Termination Point (MC-TTP)";
248       uses mc-ttp-attributes;
249     }
250     container nmc-ctp {
251       when "../type = 'networkMediaChannelConnectionTerminationPoint'";
252       description
253         "Network Media Channel Connection Termination Point (NMC-CTP)";
254       uses nmc-ctp-attributes;
255     }
256     container och {
257       when "../type = 'opticalChannel'";
258       description
259         "Optical Channel (OCh):
260          Models the optical channel interfaces for an Optical White Box.";
261       uses och-attributes;
262     }
263     container odu {
264       when "../type = 'otnOdu'";
265       presence "Attribute Nodes for Optical Data Unit (ODU)";
266       description
267         "Optical Channel Data Unit (ODU)";
268       uses odu-attributes;
269     }
270     container otu {
271       when "../type = 'otnOtu'";
272       description
273         "Optical Channel Transport Unit (OTU)";
274       uses otu-attributes;
275     }
276   }
277
278   grouping resource {
279     description
280       "This resource identifier is intended to provide a generic identifier
281        for any resource that can be used without specific knowledge of
282        the resource.";
283     container device {
284       description
285         "Device of the resource, used only when the system using this
286          model report on more than one device. ";
287       uses org-openroadm-resource-types:device-id;
288     }
289     container resource {
290       choice resource {
291         case circuit-pack {
292           uses org-openroadm-resource-types:circuit-pack-name;
293         }
294         case port {
295           container port {
296             uses org-openroadm-resource-types:port-name;
297           }
298         }
299         case connection {
300           uses org-openroadm-resource-types:connection-name {
301             refine "connection-name" {
302               mandatory true;
303             }
304           }
305         }
306         case physical-link {
307           uses org-openroadm-resource-types:physical-link-name;
308         }
309         case internal-link {
310           uses org-openroadm-resource-types:internal-link-name;
311         }
312         case shelf {
313           uses org-openroadm-resource-types:shelf-name;
314         }
315         case srg {
316           uses org-openroadm-resource-types:srg-number {
317             refine "srg-number" {
318               mandatory true;
319             }
320           }
321         }
322         case degree {
323           uses org-openroadm-resource-types:degree-number {
324             refine "degree-number" {
325               mandatory true;
326             }
327           }
328         }
329         case service {
330           uses org-openroadm-resource-types:service-name;
331         }
332         case interface {
333           uses org-openroadm-resource-types:interface-name;
334         }
335         case odu-sncp-pg {
336           uses org-openroadm-resource-types:odu-sncp-pg-name;
337         }
338         case other {
339           uses org-openroadm-resource-types:other-resource-id;
340         }
341         case device {
342           uses org-openroadm-resource-types:device-id {
343             refine "node-id" {
344               mandatory true;
345             }
346           }
347         }
348         case line-amplifier {
349           uses org-openroadm-resource-types:amp-number;
350         }
351         case xponder {
352           uses org-openroadm-resource-types:xpdr-number;
353         }
354         case versioned-service {
355           uses org-openroadm-resource-types:versioned-service-name;
356         }
357         case temp-service {
358           uses org-openroadm-resource-types:temp-service-name;
359         }
360       }
361     }
362     container resourceType {
363       uses org-openroadm-resource-types:resource-type;
364     }
365   }
366 }