upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-resource@2019-05-31.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-05-31;
8   }
9   import org-openroadm-otn-common-types {
10     prefix org-openroadm-otn-common-types;
11     revision-date 2018-11-30;
12   }
13   import org-openroadm-common-optical-channel-types {
14     prefix org-openroadm-common-optical-channel-types;
15     revision-date 2019-03-29;
16   }
17   import org-openroadm-resource-types {
18     prefix org-openroadm-resource-types;
19     revision-date 2018-11-30;
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 2019-05-31 {
56     description
57       "Version 5.1.0";
58   }
59   revision 2019-03-29 {
60     description
61       "Version 5.0.0";
62   }
63   revision 2018-11-30 {
64     description
65       "Version 4.1.0";
66   }
67   revision 2018-09-28 {
68     description
69       "Version 4.0.0";
70   }
71   revision 2018-03-30 {
72     description
73       "Version 3.0.0";
74   }
75   revision 2017-12-15 {
76     description
77       "Version 2.2";
78   }
79   revision 2017-09-29 {
80     description
81       "Version 2.1";
82   }
83   revision 2017-07-28 {
84     description
85       "Version 2.0.1 - added revision-date to imports";
86   }
87   revision 2017-06-26 {
88     description
89       "Version 2.0";
90   }
91   revision 2016-10-14 {
92     description
93       "Version 1.2";
94   }
95
96   grouping eth-attributes {
97     leaf speed {
98       type uint32;
99       description
100         "Set speed of the interface, unit mbps.
101          This is for ETH facility. ";
102     }
103   }
104
105   grouping mc-ttp-attributes {
106     description
107       "Media channel termination point. Models bandwidth allocation in physical media. Network media channels may be provisioned in the spectrum characterized by the frequency limits.";
108     leaf min-freq {
109       type org-openroadm-common-optical-channel-types:frequency-THz;
110       config true;
111       description
112         "Minimum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
113     }
114     leaf max-freq {
115       type org-openroadm-common-optical-channel-types:frequency-THz;
116       config true;
117       description
118         "Maximum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
119     }
120   }
121
122   grouping nmc-ctp-attributes {
123     description
124       "Network Media Channel attributes";
125     leaf frequency {
126       type org-openroadm-common-optical-channel-types:frequency-THz;
127       config true;
128       description
129         "Center Frequency in THz.  This is not constrained by mc-capabilities.  It must fit (when combined with width) inside any containing media channel.";
130     }
131     leaf width {
132       type org-openroadm-common-optical-channel-types:frequency-GHz;
133       config true;
134       description
135         "Frequency width in GHz.  This is not constrained by mc-capabilities.  It must fit (when combined with frequency) inside any containing media channel.";
136     }
137   }
138
139   grouping och-attributes {
140     description
141       "Optical Channel attributes";
142     leaf rate {
143       type identityref {
144         base org-openroadm-common-optical-channel-types:och-rate-identity;
145       }
146       description
147         "rate";
148     }
149     leaf frequency {
150       type org-openroadm-common-optical-channel-types:frequency-THz;
151       description
152         "Center Frequency in THz.";
153     }
154     leaf width {
155       type org-openroadm-common-optical-channel-types:frequency-GHz;
156       config false;
157       description
158         "Frequency width in GHz.";
159     }
160     leaf modulation-format {
161       type org-openroadm-common-optical-channel-types:modulation-format;
162       description
163         "Modulation format";
164     }
165   }
166
167   grouping odu-attributes {
168     description
169       "ODU attributes";
170     leaf rate {
171       type identityref {
172         base org-openroadm-otn-common-types:odu-rate-identity;
173       }
174       description
175         "rate identity of the ODU. 'identityref' is used
176          to allow to extend for future higher rates";
177     }
178     container parent-odu-allocation {
179       description
180         "parent odu allocation";
181       leaf trib-port-number {
182         type uint16 {
183           range "1 .. 80";
184         }
185         description
186           "Assigned tributary port number in parent OPU";
187       }
188       leaf-list trib-slots {
189         type uint16 {
190           range "1 .. 80";
191         }
192         min-elements 1;
193         max-elements "80";
194         description
195           "Assigned trib slots occupied in parent OPU MSI";
196       }
197     }
198   }
199
200   grouping otu-attributes {
201     description
202       "OTU attributes";
203     leaf rate {
204       type identityref {
205         base org-openroadm-otn-common-types:otu-rate-identity;
206       }
207       description
208         "rate identity of the OTU. 'identityref' is used
209          to allow to extend for future higher rates";
210     }
211   }
212
213   grouping resource-reporting {
214     leaf type {
215       type identityref {
216         base org-openroadm-interfaces:interface-type;
217       }
218       mandatory true;
219       description
220         "The type of the interface.";
221     }
222     container ethernet {
223       when "type = 'ethernetCsmacd'";
224       description
225         "Ethernet Interfaces";
226       uses eth-attributes;
227     }
228     container mc-ttp {
229       when "type = 'mediaChannelTrailTerminationPoint'";
230       description
231         "Media Channel Trail Termination Point (MC-TTP)";
232       uses mc-ttp-attributes;
233     }
234     container nmc-ctp {
235       when "type = 'networkMediaChannelConnectionTerminationPoint'";
236       description
237         "Network Media Channel Connection Termination Point (NMC-CTP)";
238       uses nmc-ctp-attributes;
239     }
240     container och {
241       when "type = 'opticalChannel'";
242       description
243         "Optical Channel (OCh):
244          Models the optical channel interfaces for an Optical White Box.";
245       uses och-attributes;
246     }
247     container odu {
248       when "type = 'otnOdu'";
249       presence "Attribute Nodes for Optical Data Unit (ODU)";
250       description
251         "Optical Channel Data Unit (ODU)";
252       uses odu-attributes;
253     }
254     container otu {
255       when "type = 'otnOtu'";
256       description
257         "Optical Channel Transport Unit (OTU)";
258       uses otu-attributes;
259     }
260   }
261
262   grouping resource {
263     description
264       "This resource identifier is intended to provide a generic identifier
265        for any resource that can be used without specific knowledge of
266        the resource.";
267     container device {
268       description
269         "Device of the resource, used only when the system using this
270          model report on more than one device. ";
271       uses org-openroadm-resource-types:device-id;
272     }
273     container resource {
274       choice resource {
275         case circuit-pack {
276           uses org-openroadm-resource-types:circuit-pack-name;
277         }
278         case port {
279           container port {
280             uses org-openroadm-resource-types:port-name;
281           }
282         }
283         case connection {
284           uses org-openroadm-resource-types:connection-name {
285             refine "connection-name" {
286               mandatory true;
287             }
288           }
289         }
290         case physical-link {
291           uses org-openroadm-resource-types:physical-link-name;
292         }
293         case internal-link {
294           uses org-openroadm-resource-types:internal-link-name;
295         }
296         case shelf {
297           uses org-openroadm-resource-types:shelf-name;
298         }
299         case srg {
300           uses org-openroadm-resource-types:srg-number {
301             refine "srg-number" {
302               mandatory true;
303             }
304           }
305         }
306         case degree {
307           uses org-openroadm-resource-types:degree-number {
308             refine "degree-number" {
309               mandatory true;
310             }
311           }
312         }
313         case service {
314           uses org-openroadm-resource-types:service-name;
315         }
316         case interface {
317           uses org-openroadm-resource-types:interface-name;
318         }
319         case odu-sncp-pg {
320           uses org-openroadm-resource-types:odu-sncp-pg-name;
321         }
322         case other {
323           uses org-openroadm-resource-types:other-resource-id;
324         }
325         case device {
326           uses org-openroadm-resource-types:device-id {
327             refine "node-id" {
328               mandatory true;
329             }
330           }
331         }
332         case line-amplifier {
333           uses org-openroadm-resource-types:amp-number;
334         }
335         case xponder {
336           uses org-openroadm-resource-types:xpdr-number;
337         }
338         case versioned-service {
339           uses org-openroadm-resource-types:versioned-service-name;
340         }
341         case temp-service {
342           uses org-openroadm-resource-types:temp-service-name;
343         }
344       }
345     }
346     container resourceType {
347       uses org-openroadm-resource-types:resource-type;
348     }
349   }
350 }