Update docs conf.yaml version to Sulfur
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-otn-network-topology@2021-12-10.yang
1 module org-openroadm-otn-network-topology {
2   yang-version 1.1;
3   namespace "http://org/openroadm/otn/network/topology";
4   prefix otn-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-network-topology-types {
19     prefix org-openroadm-network-topology-types;
20     revision-date 2020-12-11;
21   }
22   import org-openroadm-xponder {
23     prefix xpdr;
24     revision-date 2021-12-10;
25   }
26   import org-openroadm-common-network {
27     prefix cnet;
28     revision-date 2021-12-10;
29   }
30
31   organization
32     "OPEN ROADM MSA";
33   contact
34     "OpenROADM.org.";
35   description
36     "YANG definitions for network view of a ROADM
37
38      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
39      All other rights reserved.
40
41      Redistribution and use in source and binary forms, with or without modification,
42      are permitted provided that the following conditions are met:
43
44      * Redistributions of source code must retain the above copyright notice, this
45        list of conditions and the following disclaimer.
46      * Redistributions in binary form must reproduce the above copyright notice,
47        this list of conditions and the following disclaimer in the documentation and/or
48        other materials provided with the distribution.
49      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
50        contributors may be used to endorse or promote products derived from this software
51        without specific prior written permission.
52
53      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
54      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
55      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
56      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
57      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
58      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
59      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
60      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
62      POSSIBILITY OF SUCH DAMAGE.";
63
64   revision 2021-12-10 {
65     description
66       "Version 10.1";
67   }
68   revision 2021-09-24 {
69     description
70       "Version 10.0";
71   }
72   revision 2021-03-26 {
73     description
74       "Version 9.0";
75   }
76   revision 2020-12-11 {
77     description
78       "Version 8.1";
79   }
80   revision 2020-05-29 {
81     description
82       "Version 7.1.0";
83   }
84   revision 2020-03-27 {
85     description
86       "Version 7.0.0";
87   }
88   revision 2019-11-29 {
89     description
90       "Version 6.1.0";
91   }
92   revision 2019-09-27 {
93     description
94       "Version 6.0.0";
95   }
96   revision 2019-05-31 {
97     description
98       "Version 5.1.0";
99   }
100   revision 2019-03-29 {
101     description
102       "Version 5.0.0";
103   }
104   revision 2018-11-30 {
105     description
106       "Version 4.1.0";
107   }
108   revision 2018-09-28 {
109     description
110       "Version 4.0.0";
111   }
112   revision 2018-05-30 {
113     description
114       "Version 3.1.0";
115   }
116   revision 2018-03-30 {
117     description
118       "Version 3.0.0";
119   }
120   revision 2017-12-15 {
121     description
122       "Version 2.2";
123   }
124   revision 2017-09-29 {
125     description
126       "Version 2.1";
127   }
128
129   deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
130     deviate add {
131       must "(not /nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology) or
132             (/nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology and
133             (../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'TPDR' or
134              ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI'))" {
135           error-message "Invalid node type for otn-topology";
136           description
137             "The type of a node in the OTN topology";
138       }
139     }
140   }
141
142   deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" {
143     description
144       "Defines which TP types can be instantiated on which Node types";
145     deviate add {
146       must "(/nd:network/nd:node/cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'SWITCH' and ../../cnet:node-type != 'TPDR'
147             and ../cnet:node-type != 'REGEN' and ../cnet:node-type != 'REGEN-UNI') or
148             ((../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'SWITCH' or ../../cnet:node-type = 'TPDR' or
149             ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI') and
150             (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" {
151           error-message "Invalid TP for node type Xponder";
152       }
153     }
154   }
155
156   deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" {
157     deviate add {
158       must "(not /nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology) or
159             (/nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology and ../cnet:link-type = 'OTN-LINK')" {
160           error-message "Invalid link type for otn-topology";
161           description
162             "The valid link type in the OTN topology is 'OTN-LINK'";
163       }
164     }
165   }
166
167   augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
168     description
169       "Introduce new network type for the Open ROADM OTN network topology";
170     container otn-topology {
171       presence "indicates OTN topology for Transponder, Muxponder, Switchponder and OTN-switch";
172     }
173   }
174
175   augment "/nd:networks/nd:network/nd:node" {
176     when '../nd:network-types/cnet:openroadm-common-network/otn-topo:otn-topology';
177     description
178       "This augmentations adds the OTN Node type to the generic node
179        definition and defines node-specific attributes for each node type
180        in the OTN Topology.";
181     container tp-bandwidth-sharing {
182       when "../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'TPDR'";
183       uses org-openroadm-network-topology-types:xpdr-tp-bandwidth-sharing;
184     }
185     container switching-pools {
186       when "../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'TPDR'";
187       description
188         "ODU Switching pool";
189       uses org-openroadm-network-topology-types:xpdr-odu-switching-pools;
190     }
191     container xpdr-attributes {
192       when "../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'TPDR' or
193             ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI'";
194       description
195         "Topology-related attributes for Xponder nodes";
196       uses xpdr:xpdr-topo-node-attributes;
197     }
198   }
199
200   augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
201     when '../../nd:network-types/cnet:openroadm-common-network/otn-topo:otn-topology';
202     description
203       "Defines the type of a termination point in the OTN topology and
204        TP-specific attributes for each termination point type.";
205     container tp-supported-interfaces {
206       when "../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'";
207       description
208         "Supported interface capability on the port.";
209       uses org-openroadm-network-types:xpdr-tp-supported-interfaces;
210     }
211     container xpdr-tp-port-connection-attributes {
212       when "../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'";
213       description
214         "Topology-related attributes for Xpdr nodes";
215       uses xpdr:xpdr-otn-tp-attributes;
216       uses xpdr:xpdr-port-connection-attributes;
217       uses org-openroadm-network-topology-types:xpdr-otn-tail-attributes;
218       uses xpdr:supported-client-services;
219     }
220   }
221
222   augment "/nd:networks/nd:network/nwt:link" {
223     when '../nd:network-types/cnet:openroadm-common-network/otn-topo:otn-topology';
224     description
225       "This augmentation defines Logical link types in the OTN topology connecting OTN elements";
226     leaf available-bandwidth {
227       type uint32;
228       description
229         "Available bandwidth between OTN elements";
230     }
231     leaf used-bandwidth {
232       type uint32;
233       description
234         "Used bandwidth between OTN elements";
235     }
236     leaf ODU-protected {
237       type boolean;
238       description
239         "ODU protection flag";
240     }
241   }
242 }