Update Renderer Module
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network-topology@2017-09-29.yang
1 module org-openroadm-network-topology {
2   namespace "http://org/openroadm/network/topology";
3   prefix topo;
4
5   import ietf-network {
6     prefix nd;
7     revision-date 2015-06-08;
8   }
9   import ietf-network-topology {
10     prefix nwt;
11     revision-date 2015-06-08;
12   }
13   import org-openroadm-network-types {
14     prefix org-openroadm-network-types;
15     revision-date 2017-09-29;
16   }
17   import org-openroadm-srg {
18     prefix srg;
19     revision-date 2017-09-29;
20   }
21   import org-openroadm-degree {
22     prefix dgr;
23     revision-date 2017-09-29;
24   }
25   import org-openroadm-xponder {
26     prefix xpdr;
27     revision-date 2017-09-29;
28   }
29   import org-openroadm-external-pluggable {
30     prefix plg;
31     revision-date 2017-09-29;
32   }
33   import org-openroadm-link {
34     prefix link;
35     revision-date 2017-09-29;
36   }
37   import org-openroadm-common-types {
38     prefix ct;
39     revision-date 2017-09-29;
40   }
41
42   organization
43     "OPEN ROADM MSA";
44   contact
45     "OpenROADM.org.";
46   description
47     "YANG definitions for network view of a ROADM
48
49      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
50      AT&T Intellectual Property.  All other rights reserved.
51
52      Redistribution and use in source and binary forms, with or without modification,
53      are permitted provided that the following conditions are met:
54
55      * Redistributions of source code must retain the above copyright notice, this
56        list of conditions and the following disclaimer.
57      * Redistributions in binary form must reproduce the above copyright notice,
58        this list of conditions and the following disclaimer in the documentation and/or
59        other materials provided with the distribution.
60      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
61        contributors may be used to endorse or promote products derived from this software
62        without specific prior written permission.
63
64      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
65      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
66      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
67      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
68      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
69      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
70      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
71      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
72      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
73      POSSIBILITY OF SUCH DAMAGE.";
74
75   revision 2017-09-29 {
76     description
77       "Version 2.1";
78   }
79   revision 2017-07-28 {
80     description
81       "Version 2.0.1 - added revision-date to imports";
82   }
83   revision 2017-06-26 {
84     description
85       "Version 2.0";
86   }
87
88   augment "/nd:network/nd:network-types" {
89     description
90       "Introduce new network type for the Open ROADM optical
91        `     network topology";
92     container openroadm-topology {
93       presence "indicates optical network topology for Open ROADMs";
94     }
95   }
96   augment "/nd:network/nd:node" {
97     when "../nd:network-types/openroadm-topology";
98     description
99       "This augmentations adds the ROADM Node type to the generic node
100        definition and defines node-sepcific attributes for each node type
101        in the ROADM Topology.";
102     leaf node-type {
103       type org-openroadm-network-types:openroadm-node-type;
104       description
105         "The type of a node in the ROADM topology. Valid node types are 'SRG', 'DEGREE',
106          'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'";
107     }
108     container srg-attributes {
109       when "../node-type = 'SRG'";
110       uses srg:srg-node-attributes;
111       description
112         "Topology-related attributes for SRG nodes";
113     }
114     container degree-attributes {
115       when "../node-type = 'DEGREE'";
116       uses dgr:degree-node-attributes;
117       description
118         "Topology-related attributes for degree nodes";
119     }
120    container xpdr-attributes {
121       when "../node-type = 'TPDR' or ../node-type = 'MUXPDR' or ../node-type = 'REGEN' or
122          ../node-type = 'REGEN-UNI' or ../node-type = 'SWITCH'";
123       uses xpdr:xpdr-topo-node-attributes;
124       description
125         "Topology-related attributes for Xponder nodes";
126     }
127   }
128   augment "/nd:network/nd:node/nwt:termination-point" {
129     when "../../nd:network-types/openroadm-topology";
130     description
131       "Defines the type of a termination point in the ROADM topology and
132        TP-specific attributes for each termination point type.";
133     leaf tp-type {
134       type org-openroadm-network-types:openroadm-tp-type;
135       must "../../topo:node-type != 'DEGREE' or (../../topo:node-type = 'DEGREE'  and
136       (../topo:tp-type = 'DEGREE-TX-TTP' or ../topo:tp-type = 'DEGREE-RX-TTP' or  ../topo:tp-type = 'DEGREE-TXRX-TTP' or
137        ../topo:tp-type = 'DEGREE-TX-CTP' or ../topo:tp-type = 'DEGREE-RX-CTP' or ../topo:tp-type = 'DEGREE-TXRX-CTP'))" {
138         error-message "Invalid TP for node type 'DEGREE'";
139       }
140       must "../../topo:node-type != 'SRG' or (../../topo:node-type = 'SRG' and
141      (../topo:tp-type = 'SRG-TX-CP' or ../topo:tp-type = 'SRG-RX-CP' or ../topo:tp-type = 'SRG-TXRX-CP' or
142       ../topo:tp-type = 'SRG-RX-PP' or ../topo:tp-type = 'SRG-TX-PP' or ../topo:tp-type = 'SRG-TXRX-PP'))" {
143         error-message "Invalid TP for node type 'SRG'";
144       }
145       must " (../../topo:node-type != 'TPDR' and ../../topo:node-type != 'MUXPDR' and ../../topo:node-type != 'REGEN' and
146             ../../topo:node-type != 'REGEN-UNI' and ../../topo:node-type != 'SWITCH')
147      or ((../../topo:node-type = 'TPDR' or ../../topo:node-type = 'MUXPDR' or ../../topo:node-type = 'REGEN' or
148          ../../topo:node-type = 'REGEN-UNI' or ../../topo:node-type = 'SWITCH') and
149      (../topo:tp-type = 'XPONDER-NETWORK' or ../topo:tp-type = 'XPONDER-CLIENT' or ../topo:tp-type = 'XPONDER-PORT'))" {
150         error-message "Invalid TP for node type 'XPONDER'";
151       }
152       must "../../topo:node-type != 'EXT-PLUGGABLE' or (../../topo:node-type = 'EXT-PLUGGABLE' and ../topo:tp-type = 'EXT-PLUGGABLE-TP')" {
153         error-message "Invalid TP for node type 'EXT-PLUGGABLE'";
154       }
155       description
156         "The TP type; also defines which TP types can be instantiated
157          on which Node types";
158     }
159     container tx-ttp-attributes {
160       when "../tp-type = 'DEGREE-TX-TTP' or ../tp-type = 'DEGREE-TXRX-TTP'";
161       description
162         "There must be only one TP of type DEGREE-TX-TTP in any given
163          degree node";
164       uses dgr:degree-used-wavelengths;
165     }
166     container rx-ttp-attributes {
167       when "../tp-type = 'DEGREE-RX-TTP'";
168       description
169         "There must be only one TP of type DEGREE-RX-TTP in any given
170          degree node";
171       uses dgr:degree-used-wavelengths;
172     }
173     container ctp-attributes {
174       when "../tp-type = 'DEGREE-TX-CTP' or ../tp-type = 'DEGREE-RX-CTP' or ../tp-type = 'DEGREE-TXRX-CTP'";
175        uses dgr:degree-used-wavelengths;
176     }
177     container cp-attributes {
178       when "../tp-type = 'SRG-TX-CP' or ../tp-type = 'SRG-RX-CP' or ../tp-type = 'SRG-TXRX-CP'";
179       list used-wavelengths {
180         key "index";
181         uses org-openroadm-network-types:wavelengths;
182       }
183      description
184         "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
185         index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
186        will hold list of used spectrums";
187     }
188     container pp-attributes {
189       when "../tp-type = 'SRG-TXRX-PP' or ../tp-type = 'SRG-TX-PP' or ../tp-type = 'SRG-RX-PP' ";
190       list used-wavelength {
191         key "index";
192         uses org-openroadm-network-types:wavelengths;
193       }
194      description
195         "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid
196         index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this
197        will hold list of used spectrums";
198     }
199    leaf eqpt-srg-id {
200        when "../tp-type = 'XPONDER-CLIENT' or ../tp-type = 'XPONDER-NETWORK' or ../tp-type = 'EXT-PLUGGABLE-TP' or
201             ../tp-type = 'XPONDER-PORT'";
202         description
203           "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
204         type uint32;
205     }
206     container xpdr-client-attributes {
207       when "../tp-type = 'XPONDER-CLIENT'";
208       uses xpdr:xpdr-connection-attributes;
209       uses xpdr:xpdr-port-connection-attributes;
210     }
211     container xpdr-network-attributes {
212       when "../tp-type = 'XPONDER-NETWORK'";
213       uses xpdr:xpdr-connection-attributes;
214       uses xpdr:xpdr-port-connection-attributes;
215     }
216     container xpdr-port-attributes {
217       when "../tp-type = 'XPONDER-PORT'";
218       uses xpdr:xpdr-connection-attributes;
219       uses xpdr:xpdr-port-connection-attributes;
220     }
221     container ext-pluggable-attributes {
222       when "../tp-type = 'EXT-PLUGGABLE-TP'";
223       uses plg:pluggable-tp-attributes;
224     }
225   }
226   augment "/nd:network/nwt:link" {
227     when "../nd:network-types/openroadm-topology";
228     description
229       "This augmentation defines ROADM link types in the ROADM topology";
230     leaf link-type {
231       type org-openroadm-network-types:openroadm-link-type;
232     }
233     leaf link-length {
234       type decimal64 {
235         fraction-digits 2;
236       }
237     }
238     leaf administrative-group {
239       type uint32;
240       description
241         "according to RFC 3630 definition";
242     }
243     leaf operational-state {
244       type ct:state;
245       description
246         "according to RFC 3630 definition";
247     }
248     leaf administrative-state {
249       type ct:state;
250       description
251         "according to RFC 3630 definition";
252     }
253     leaf link-latency {
254       type uint32;
255       description
256         "Latency of a link";
257     }
258     leaf amplified {
259       when "../link-type = 'ROADM-TO-ROADM'";
260       type boolean;
261       description
262         "defines whether an ROADM-TO-ROADM Link includes line amplifiers or not";
263     }
264     container OMS-attributes {
265       when "../link-type = 'ROADM-TO-ROADM'";
266       description
267         "";
268       uses link:OMS-attributes;
269       leaf opposite-link {
270         type leafref {
271           path "../../../nwt:link/nwt:link-id";
272         }
273         description
274           "optional - pointer to reverse link in case of bidirectional link";
275       }
276       container span {
277         when "../../amplified = 'false'";
278         description
279           "";
280         uses link:span-attributes;
281       }
282       container amplified-link {
283         when "../../amplified = 'true'";
284         description
285           "when amplified is set to true, rather than a simple OMS section
286            we have an amplified link";
287         uses link:amplified-link-attributes;
288       }
289     }
290   }
291 }