Upgrade Network model from 2.1 to 4.1
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network-types@2018-11-30.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 2018-11-30;
13   }
14   import org-openroadm-port-types {
15     prefix org-openroadm-port-types;
16     revision-date 2018-11-30;
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 2018-11-30 {
51     description
52       "Version 4.1.0";
53   }
54   revision 2018-09-28 {
55     description
56       "Version 4.0.0";
57   }
58   revision 2018-05-30 {
59     description
60       "Version 3.1.0";
61   }
62   revision 2018-03-30 {
63     description
64       "Version 3.0.0";
65   }
66   revision 2017-12-15 {
67     description
68       "Version 2.2";
69   }
70   revision 2017-09-29 {
71     description
72       "Version 2.1";
73   }
74   revision 2017-07-28 {
75     description
76       "Version 2.0.1 - added revision-date to imports";
77   }
78   revision 2017-06-26 {
79     description
80       "Version 2.0";
81   }
82
83   typedef openroadm-node-type {
84     type enumeration {
85       enum "ROADM" {
86         value 1;
87       }
88       enum "DEGREE" {
89         value 11;
90       }
91       enum "SRG" {
92         value 12;
93       }
94       enum "XPONDER" {
95         value 3;
96       }
97       enum "EXT-PLUGGABLE" {
98         value 4;
99       }
100       enum "TPDR" {
101         value 13;
102       }
103       enum "MUXPDR" {
104         value 14;
105       }
106       enum "REGEN" {
107         value 15;
108       }
109       enum "REGEN-UNI" {
110         value 16;
111       }
112       enum "SWITCH" {
113         value 17;
114       }
115     }
116   }
117
118   typedef openroadm-tp-type {
119     type enumeration {
120       enum "DEGREE-TX-TTP" {
121         value 1;
122       }
123       enum "DEGREE-RX-TTP" {
124         value 2;
125       }
126       enum "DEGREE-TX-CTP" {
127         value 3;
128       }
129       enum "DEGREE-RX-CTP" {
130         value 4;
131       }
132       enum "SRG-TX-CP" {
133         value 5;
134       }
135       enum "SRG-RX-CP" {
136         value 6;
137       }
138       enum "SRG-TXRX-PP" {
139         value 7;
140       }
141       enum "SRG-RX-PP" {
142         value 8;
143       }
144       enum "SRG-TX-PP" {
145         value 9;
146       }
147       enum "XPONDER-NETWORK" {
148         value 10;
149       }
150       enum "XPONDER-CLIENT" {
151         value 11;
152       }
153       enum "EXT-PLUGGABLE-TP" {
154         value 12;
155       }
156       enum "DEGREE-TXRX-TTP" {
157         value 13;
158       }
159       enum "SRG-TXRX-CP" {
160         value 14;
161       }
162       enum "XPONDER-PORT" {
163         value 15;
164       }
165       enum "DEGREE-TXRX-CTP" {
166         value 16;
167       }
168     }
169   }
170
171   typedef openroadm-link-type {
172     type enumeration {
173       enum "EXPRESS-LINK" {
174         value 1;
175       }
176       enum "ADD-LINK" {
177         value 2;
178       }
179       enum "DROP-LINK" {
180         value 3;
181       }
182       enum "ROADM-TO-ROADM" {
183         value 4;
184       }
185       enum "XPONDER-INPUT" {
186         value 5;
187       }
188       enum "XPONDER-OUTPUT" {
189         value 6;
190       }
191       enum "OTN-LINK" {
192         value 7;
193       }
194     }
195   }
196
197   typedef openroadm-node-status {
198     type enumeration {
199       enum "PLANNED" {
200         value 1;
201       }
202       enum "DEPLOYED" {
203         value 2;
204       }
205       enum "MAINTENANCE" {
206         value 3;
207       }
208     }
209   }
210
211   typedef openroadm-node-connection-status {
212     type enumeration {
213       enum "CONNECTED" {
214         value 1;
215       }
216       enum "CONNECTING" {
217         value 2;
218       }
219       enum "UNABLE-TO-CONNECT" {
220         value 3;
221       }
222     }
223   }
224
225   grouping wavelengths {
226     leaf index {
227       type uint32;
228     }
229     uses flex-wave;
230   }
231
232   grouping flex-wave {
233     leaf frequency {
234       type org-openroadm-common-optical-channel-types:frequency-THz;
235       config true;
236       description
237         "Center Frequency in THz";
238     }
239     leaf width {
240       type org-openroadm-common-optical-channel-types:frequency-GHz;
241       config true;
242       description
243         "Frequency width in GHz.";
244     }
245   }
246
247   grouping xpdr-tp-supported-interfaces {
248     list supported-interface-capability {
249       key "if-cap-type";
250       description
251         "Supported interface capability on the port.";
252       leaf if-cap-type {
253         type identityref {
254           base org-openroadm-port-types:supported-if-capability;
255         }
256         description
257           "Interface type/hierarchy/rate supported on this port";
258       }
259     }
260   }
261
262   grouping node-due-date-list {
263     list due-dates {
264       key "id";
265       leaf id {
266         type uint16;
267       }
268       leaf start-date {
269         type yang:date-and-time;
270         description
271           "date and time node will begin maintenance status or date when node is planned";
272       }
273       leaf end-date {
274         type yang:date-and-time;
275         description
276           "date and time node will end maintenance or date when node is deployed";
277       }
278     }
279   }
280 }