Update docs conf.yaml version to Sulfur
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network-topology@2021-12-10.yang
1 module org-openroadm-network-topology {
2   yang-version 1.1;
3   namespace "http://org/openroadm/network/topology";
4   prefix topo;
5
6   import ietf-network {
7     prefix nd;
8     revision-date 2018-02-26;
9   }
10   import ietf-network-topology {
11     prefix nwt;
12     revision-date 2018-02-26;
13   }
14   import org-openroadm-network-types {
15     prefix org-openroadm-network-types;
16     revision-date 2021-12-10;
17   }
18   import org-openroadm-srg {
19     prefix srg;
20     revision-date 2021-12-10;
21   }
22   import org-openroadm-degree {
23     prefix dgr;
24     revision-date 2021-12-10;
25   }
26   import org-openroadm-xponder {
27     prefix xpdr;
28     revision-date 2021-12-10;
29   }
30   import org-openroadm-external-pluggable {
31     prefix plg;
32     revision-date 2021-12-10;
33   }
34   import org-openroadm-link {
35     prefix link;
36     revision-date 2021-12-10;
37   }
38   import org-openroadm-common-network {
39     prefix cnet;
40     revision-date 2021-12-10;
41   }
42
43   organization
44     "OPEN ROADM MSA";
45   contact
46     "OpenROADM.org.";
47   description
48     "YANG definitions for network view of a ROADM
49
50      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
51      All other rights reserved.
52
53      Redistribution and use in source and binary forms, with or without modification,
54      are permitted provided that the following conditions are met:
55
56      * Redistributions of source code must retain the above copyright notice, this
57        list of conditions and the following disclaimer.
58      * Redistributions in binary form must reproduce the above copyright notice,
59        this list of conditions and the following disclaimer in the documentation and/or
60        other materials provided with the distribution.
61      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
62        contributors may be used to endorse or promote products derived from this software
63        without specific prior written permission.
64
65      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
66      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
67      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
68      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
69      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
70      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
71      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
72      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
73      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
74      POSSIBILITY OF SUCH DAMAGE.";
75
76   revision 2021-12-10 {
77     description
78       "Version 10.1";
79   }
80   revision 2021-09-24 {
81     description
82       "Version 10.0";
83   }
84   revision 2021-05-28 {
85     description
86       "Version 9.1";
87   }
88   revision 2021-03-26 {
89     description
90       "Version 9.0";
91   }
92   revision 2020-12-11 {
93     description
94       "Version 8.1";
95   }
96   revision 2020-05-29 {
97     description
98       "Version 7.1.0";
99   }
100   revision 2020-03-27 {
101     description
102       "Version 7.0.0";
103   }
104   revision 2019-11-29 {
105     description
106       "Version 6.1.0";
107   }
108   revision 2019-09-27 {
109     description
110       "Version 6.0.0";
111   }
112   revision 2019-05-31 {
113     description
114       "Version 5.1.0";
115   }
116   revision 2019-03-29 {
117     description
118       "Version 5.0.0";
119   }
120   revision 2018-11-30 {
121     description
122       "Version 4.1.0";
123   }
124   revision 2018-09-28 {
125     description
126       "Version 4.0.0";
127   }
128   revision 2018-05-30 {
129     description
130       "Version 3.1.0";
131   }
132   revision 2018-03-30 {
133     description
134       "Version 3.0.0";
135   }
136   revision 2017-12-15 {
137     description
138       "Version 2.2";
139   }
140   revision 2017-09-29 {
141     description
142       "Version 2.1";
143   }
144   revision 2017-07-28 {
145     description
146       "Version 2.0.1 - added revision-date to imports";
147   }
148   revision 2017-06-26 {
149     description
150       "Version 2.0";
151   }
152
153   deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
154     deviate add {
155       must "(not /nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or
156             (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and
157             (../cnet:node-type = 'DEGREE' or ../cnet:node-type = 'SRG' or ../cnet:node-type = 'TPDR' or ../cnet:node-type = 'SWITCH' or
158              ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI' or ../cnet:node-type = 'EXT-PLUGGABLE' or
159              ../cnet:node-type = 'MUXPDR'))" {
160           error-message "Invalid node type for openroadm-topology";
161           description
162             "The valid node types in the ROADM topology are 'SRG', 'DEGREE',
163              'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'";
164       }
165     }
166   }
167
168   deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" {
169     description
170       "Defines which TP types can be instantiated on which Node types";
171     deviate add {
172       must "/nd:network/nd:node/cnet:node-type != 'DEGREE' or (../../cnet:node-type = 'DEGREE'  and
173             (../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-RX-TTP' or  ../cnet:tp-type = 'DEGREE-TXRX-TTP' or
174             ../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'))" {
175           error-message "Invalid TP for node type 'DEGREE'";
176       }
177       must "/nd:network/nd:node/cnet:node-type != 'SRG' or (../../cnet:node-type = 'SRG' and
178             (../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP' or
179             ../cnet:tp-type = 'SRG-RX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-TXRX-PP'))" {
180           error-message "Invalid TP for node type 'SRG'";
181       }
182       must " (/nd:network/nd:node/cnet:node-type != 'TPDR' and ../../cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'REGEN' and
183             ../../cnet:node-type != 'REGEN-UNI' and ../../cnet:node-type != 'SWITCH')
184             or ((../../cnet:node-type = 'TPDR' or ../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'REGEN' or
185             ../../cnet:node-type = 'REGEN-UNI' or ../../cnet:node-type = 'SWITCH') and
186             (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" {
187           error-message "Invalid TP for node type 'XPONDER'";
188       }
189       must "/nd:network/nd:node/cnet:node-type != 'EXT-PLUGGABLE' or (../../cnet:node-type = 'EXT-PLUGGABLE' and ../cnet:tp-type = 'EXT-PLUGGABLE-TP')" {
190         error-message "Invalid TP for node type 'EXT-PLUGGABLE'";
191       }
192     }
193   }
194
195   deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" {
196     deviate add {
197       must "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or
198             (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and
199             (../cnet:link-type = 'ROADM-TO-ROADM' or ../cnet:link-type = 'ADD-LINK' or ../cnet:link-type = 'DROP-LINK' or
200              ../cnet:link-type = 'EXPRESS-LINK' or ../cnet:link-type = 'XPONDER-INPUT' or ../cnet:link-type = 'XPONDER-OUTPUT'))" {
201           error-message "Invalid link type for openroadm-topology";
202           description
203             "The valid link types in the ROADM topology are 'ROADM-TO-ROADM', 'ADD-LINK',
204              'DROP-LINK', 'EXPRESS-LINK', 'XPONDER-INPUT', 'XPONDER-OUTPUT'";
205       }
206     }
207   }
208
209   augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
210     description
211       "Introduce new network type for the Open ROADM optical
212        `     network topology";
213     container openroadm-topology {
214       presence "indicates optical network topology for Open ROADMs";
215     }
216   }
217
218   augment "/nd:networks/nd:network/nd:node" {
219     when '../nd:network-types/cnet:openroadm-common-network/topo:openroadm-topology';
220     description
221       "This augmentations adds the ROADM Node type to the generic node
222        definition and defines node-specific attributes for each node type
223        in the ROADM Topology.";
224     container srg-attributes {
225       when "../cnet:node-type = 'SRG'";
226       description
227         "Topology-related attributes for SRG nodes";
228       uses srg:srg-node-attributes;
229       uses org-openroadm-network-types:available-freq-map;
230       uses org-openroadm-network-types:type-variety-grp;
231     }
232     container degree-attributes {
233       when "../cnet:node-type = 'DEGREE'";
234       description
235         "Topology-related attributes for degree nodes";
236       uses dgr:degree-node-attributes;
237       uses org-openroadm-network-types:available-freq-map;
238       uses org-openroadm-network-types:type-variety-grp;
239     }
240     container xpdr-attributes {
241       when "../cnet:node-type = 'TPDR' or ../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'REGEN' or
242             ../cnet:node-type = 'REGEN-UNI' or ../cnet:node-type = 'SWITCH'";
243       description
244         "Topology-related attributes for Xponder nodes";
245       uses xpdr:xpdr-topo-node-attributes;
246     }
247   }
248
249   augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
250     when '../../nd:network-types/cnet:openroadm-common-network/topo:openroadm-topology';
251     description
252       "Defines the type of a termination point in the ROADM topology and
253        TP-specific attributes for each termination point type.";
254     container tx-ttp-attributes {
255       when "../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-TXRX-TTP'";
256       description
257         "There must be only one TP of type DEGREE-TX-TTP in any given
258          degree node";
259       uses dgr:degree-used-wavelengths;
260       uses org-openroadm-network-types:available-freq-map;
261     }
262     container rx-ttp-attributes {
263       when "../cnet:tp-type = 'DEGREE-RX-TTP'";
264       description
265         "There must be only one TP of type DEGREE-RX-TTP in any given
266          degree node";
267       uses dgr:degree-used-wavelengths;
268       uses org-openroadm-network-types:available-freq-map;
269     }
270     container ctp-attributes {
271       when "../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'";
272       uses org-openroadm-network-types:available-freq-map;
273     }
274     container cp-attributes {
275       when "../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP'";
276       description
277         "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
278          index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
279          will hold list of used spectra";
280       uses org-openroadm-network-types:available-freq-map;
281     }
282     container pp-attributes {
283       when "../cnet:tp-type = 'SRG-TXRX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-RX-PP' ";
284       description
285         "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
286          index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
287          will hold list of used spectra";
288       list used-wavelength {
289         key "index";
290         uses org-openroadm-network-types:wavelengths;
291       }
292       uses org-openroadm-network-types:available-freq-map;
293     }
294     container xpdr-client-attributes {
295       when "../../cnet:node-type = 'TPDR' and ../cnet:tp-type = 'XPONDER-CLIENT'";
296       description
297         "Topology layer will allow client TPs only for Transponder nodes";
298       uses xpdr:xpdr-connection-attributes;
299       uses xpdr:xpdr-port-connection-attributes;
300       uses xpdr:supported-client-services;
301     }
302     container xpdr-network-attributes {
303       when "../cnet:tp-type = 'XPONDER-NETWORK'";
304       uses xpdr:xpdr-connection-attributes;
305       uses xpdr:xpdr-port-connection-attributes;
306       uses xpdr:xpdr-mode-attributes;
307       uses org-openroadm-network-types:type-variety-grp;
308     }
309     container xpdr-port-attributes {
310       when "../cnet:tp-type = 'XPONDER-PORT'";
311       uses xpdr:xpdr-connection-attributes;
312       uses xpdr:xpdr-port-connection-attributes;
313       uses xpdr:xpdr-mode-attributes;
314       uses org-openroadm-network-types:type-variety-grp;
315     }
316     container ext-pluggable-attributes {
317       when "../cnet:tp-type = 'EXT-PLUGGABLE-TP'";
318       uses plg:pluggable-tp-attributes;
319       uses xpdr:xpdr-port-connection-attributes;
320       uses xpdr:xpdr-mode-attributes;
321       uses org-openroadm-network-types:type-variety-grp;
322     }
323   }
324
325   augment "/nd:networks/nd:network/nwt:link" {
326     when '../nd:network-types/cnet:openroadm-common-network/topo:openroadm-topology';
327     description
328       "This augmentation defines ROADM link types in the ROADM topology";
329     leaf amplified {
330       when "../cnet:link-type = 'ROADM-TO-ROADM'";
331       type boolean;
332       description
333         "defines whether an ROADM-TO-ROADM Link includes line amplifiers or not";
334     }
335     container OMS-attributes {
336       when "../cnet:link-type = 'ROADM-TO-ROADM'";
337       description
338         "";
339       container span {
340         when "../../amplified = 'false'";
341         description
342           "";
343         uses link:span-attributes;
344       }
345       container amplified-link {
346         when "../../amplified = 'true'";
347         description
348           "when amplified is set to true, rather than a simple OMS section
349            we have an amplified link";
350         uses link:amplified-link-attributes;
351       }
352     }
353   }
354 }