Upgrade to OpenROADM 7.1.0 network models
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network-types@2020-05-29.yang
1 module org-openroadm-network-types {
2   yang-version 1.1;
3   namespace "http://org/openroadm/network/types";
4   prefix nt;
5
6   import ietf-yang-types {
7     prefix yang;
8     revision-date 2013-07-15;
9   }
10   import org-openroadm-common-optical-channel-types {
11     prefix org-openroadm-common-optical-channel-types;
12     revision-date 2020-05-29;
13   }
14   import org-openroadm-port-types {
15     prefix org-openroadm-port-types;
16     revision-date 2020-03-27;
17   }
18
19   organization
20     "OPEN ROADM MSA";
21   contact
22     "www.OpenROADM.org.";
23   description
24     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
25      All other rights reserved.
26
27      Redistribution and use in source and binary forms, with or without modification,
28      are permitted provided that the following conditions are met:
29
30      * Redistributions of source code must retain the above copyright notice, this
31        list of conditions and the following disclaimer.
32      * Redistributions in binary form must reproduce the above copyright notice,
33        this list of conditions and the following disclaimer in the documentation and/or
34        other materials provided with the distribution.
35      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
36        contributors may be used to endorse or promote products derived from this software
37        without specific prior written permission.
38
39      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
40      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
41      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
42      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
43      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
45      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
46      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48      POSSIBILITY OF SUCH DAMAGE.";
49
50   revision 2020-05-29 {
51     description
52       "Version 7.1.0";
53   }
54   revision 2020-03-27 {
55     description
56       "Version 7.0.0";
57   }
58   revision 2019-11-29 {
59     description
60       "Version 6.1.0";
61   }
62   revision 2019-09-27 {
63     description
64       "Version 6.0.0";
65   }
66   revision 2019-05-31 {
67     description
68       "Version 5.1.0";
69   }
70   revision 2019-03-29 {
71     description
72       "Version 5.0.0";
73   }
74   revision 2018-11-30 {
75     description
76       "Version 4.1.0";
77   }
78   revision 2018-09-28 {
79     description
80       "Version 4.0.0";
81   }
82   revision 2018-05-30 {
83     description
84       "Version 3.1.0";
85   }
86   revision 2018-03-30 {
87     description
88       "Version 3.0.0";
89   }
90   revision 2017-12-15 {
91     description
92       "Version 2.2";
93   }
94   revision 2017-09-29 {
95     description
96       "Version 2.1";
97   }
98   revision 2017-07-28 {
99     description
100       "Version 2.0.1 - added revision-date to imports";
101   }
102   revision 2017-06-26 {
103     description
104       "Version 2.0";
105   }
106
107   typedef openroadm-node-type {
108     type enumeration {
109       enum ROADM {
110         value 1;
111       }
112       enum DEGREE {
113         value 11;
114       }
115       enum SRG {
116         value 12;
117       }
118       enum XPONDER {
119         value 3;
120       }
121       enum EXT-PLUGGABLE {
122         value 4;
123       }
124       enum TPDR {
125         value 13;
126       }
127       enum MUXPDR {
128         value 14;
129       }
130       enum REGEN {
131         value 15;
132       }
133       enum REGEN-UNI {
134         value 16;
135       }
136       enum SWITCH {
137         value 17;
138       }
139     }
140   }
141
142   typedef openroadm-tp-type {
143     type enumeration {
144       enum DEGREE-TX-TTP {
145         value 1;
146       }
147       enum DEGREE-RX-TTP {
148         value 2;
149       }
150       enum DEGREE-TX-CTP {
151         value 3;
152       }
153       enum DEGREE-RX-CTP {
154         value 4;
155       }
156       enum SRG-TX-CP {
157         value 5;
158       }
159       enum SRG-RX-CP {
160         value 6;
161       }
162       enum SRG-TXRX-PP {
163         value 7;
164       }
165       enum SRG-RX-PP {
166         value 8;
167       }
168       enum SRG-TX-PP {
169         value 9;
170       }
171       enum XPONDER-NETWORK {
172         value 10;
173       }
174       enum XPONDER-CLIENT {
175         value 11;
176       }
177       enum EXT-PLUGGABLE-TP {
178         value 12;
179       }
180       enum DEGREE-TXRX-TTP {
181         value 13;
182       }
183       enum SRG-TXRX-CP {
184         value 14;
185       }
186       enum XPONDER-PORT {
187         value 15;
188       }
189       enum DEGREE-TXRX-CTP {
190         value 16;
191       }
192     }
193   }
194
195   typedef openroadm-link-type {
196     type enumeration {
197       enum EXPRESS-LINK {
198         value 1;
199       }
200       enum ADD-LINK {
201         value 2;
202       }
203       enum DROP-LINK {
204         value 3;
205       }
206       enum ROADM-TO-ROADM {
207         value 4;
208       }
209       enum XPONDER-INPUT {
210         value 5;
211       }
212       enum XPONDER-OUTPUT {
213         value 6;
214       }
215       enum OTN-LINK {
216         value 7;
217       }
218     }
219   }
220
221   typedef openroadm-node-connection-status {
222     type enumeration {
223       enum CONNECTED {
224         value 1;
225       }
226       enum CONNECTING {
227         value 2;
228       }
229       enum UNABLE-TO-CONNECT {
230         value 3;
231       }
232     }
233   }
234
235   grouping available-freq-map {
236     list avail-freq-maps {
237       key "map-name";
238       description
239         "Available spectrum information";
240       leaf map-name {
241         type string;
242         description
243           "Identifier of the map. For C-band, recommend map-name = 'cband'";
244       }
245       leaf start-edge-freq {
246         type org-openroadm-common-optical-channel-types:frequency-THz;
247         description
248           "Starting edge frequency (min frequency) for the frequency map. For C-band, the recommendation is start-edge-freq = 191.325 THz";
249       }
250       leaf freq-map-granularity {
251         type org-openroadm-common-optical-channel-types:frequency-GHz;
252         description
253           "frequency granularity of each bit in the bitmap.  For C-band, the recommendation is freq-map-granularity = 6.25 GHz";
254       }
255       leaf effective-bits {
256         type uint16;
257         description
258           "Number of effective bits in the frequency bitmap.  Note the freq-map bitmap will be padded with 0 for byte alignment.";
259       }
260       leaf freq-map {
261         type binary;
262         description
263           "Frequency bitmap.  Setting the value of the binary bit to 1 indicates that the corresponding spectrum is available and
264            setting to 0 indicates the corresponding spectrum is unavailable (used or unsupported).";
265       }
266     }
267   }
268
269   grouping wavelengths {
270     leaf index {
271       type int32;
272       description
273         "Index should be related to the frequency based on the formula 193.1 + index * .00625 THz";
274     }
275     uses flex-wave;
276   }
277
278   grouping flex-wave {
279     leaf frequency {
280       type org-openroadm-common-optical-channel-types:frequency-THz;
281       config true;
282       description
283         "Center Frequency in THz";
284     }
285     leaf width {
286       type org-openroadm-common-optical-channel-types:frequency-GHz;
287       config true;
288       description
289         "Frequency width in GHz.";
290     }
291   }
292
293   grouping type-variety-grp {
294     leaf type-variety {
295       type string;
296       config true;
297       description
298         "Equipment type variety defined by the Open ROADM MSA or by the vendor for bookending applications.
299          This field is used by external path computation tools as a reference in a catalog to get additional
300          information about the equipment’s optical capabilities.";
301     }
302   }
303
304   grouping xpdr-tp-supported-interfaces {
305     list supported-interface-capability {
306       key "if-cap-type";
307       description
308         "Supported interface capability on the port.";
309       leaf if-cap-type {
310         type identityref {
311           base org-openroadm-port-types:supported-if-capability;
312         }
313         description
314           "Interface type/hierarchy/rate supported on this port";
315       }
316     }
317   }
318
319   grouping node-due-date-list {
320     list due-dates {
321       key "id";
322       leaf id {
323         type uint16;
324       }
325       leaf start-date {
326         type yang:date-and-time;
327         description
328           "date and time node will begin maintenance status or date when node is planned";
329       }
330       leaf end-date {
331         type yang:date-and-time;
332         description
333           "date and time node will end maintenance or date when node is deployed";
334       }
335     }
336   }
337 }