Upgrade openroadm network models to 10.1
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-common-network@2021-12-10.yang
1 module org-openroadm-common-network {
2   yang-version 1.1;
3   namespace "http://org/openroadm/common/network";
4   prefix cnet;
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-common-state-types {
19     prefix org-openroadm-common-state-types;
20     revision-date 2019-11-29;
21   }
22   import org-openroadm-equipment-states-types {
23     prefix org-openroadm-equipment-states-types;
24     revision-date 2019-11-29;
25   }
26   import org-openroadm-common-node-types {
27     prefix org-openroadm-common-node-types;
28     revision-date 2021-05-28;
29   }
30
31   organization
32     "OPEN ROADM MSA";
33   contact
34     "www.OpenROADM.org.";
35   description
36     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
37      All other rights reserved.
38
39      Redistribution and use in source and binary forms, with or without modification,
40      are permitted provided that the following conditions are met:
41
42      * Redistributions of source code must retain the above copyright notice, this
43        list of conditions and the following disclaimer.
44      * Redistributions in binary form must reproduce the above copyright notice,
45        this list of conditions and the following disclaimer in the documentation and/or
46        other materials provided with the distribution.
47      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
48        contributors may be used to endorse or promote products derived from this software
49        without specific prior written permission.
50
51      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
52      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
55      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
56      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
57      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
59      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
60      POSSIBILITY OF SUCH DAMAGE.";
61
62   revision 2021-12-10 {
63     description
64       "Version 10.1";
65   }
66   revision 2021-09-24 {
67     description
68       "Version 10.0";
69   }
70   revision 2021-03-26 {
71     description
72       "Version 9.0";
73   }
74   revision 2020-12-11 {
75     description
76       "Version 8.1";
77   }
78   revision 2020-05-29 {
79     description
80       "Version 7.1.0";
81   }
82   revision 2020-03-27 {
83     description
84       "Version 7.0.0";
85   }
86   revision 2019-11-29 {
87     description
88       "Version 6.1.0";
89   }
90   revision 2019-09-27 {
91     description
92       "Version 6.0.0";
93   }
94   revision 2019-05-31 {
95     description
96       "Version 5.1.0";
97   }
98   revision 2019-03-29 {
99     description
100       "Version 5.0.0";
101   }
102   revision 2018-11-30 {
103     description
104       "Version 4.1.0";
105   }
106   revision 2018-09-28 {
107     description
108       "Version 4.0.0";
109   }
110   revision 2018-05-30 {
111     description
112       "Version 3.1.0";
113   }
114   revision 2018-03-30 {
115     description
116       "Version 3.0.0";
117   }
118
119   augment "/nd:networks/nd:network/nd:network-types" {
120     description
121       "Introduce new network type for the Open ROADM common network";
122     container openroadm-common-network {
123       presence "indicates common network of Open ROADMs";
124       description
125         "The presence of the container node indicates Open ROADM common network";
126     }
127   }
128
129   augment "/nd:networks/nd:network" {
130     description
131       "Introduce new network type for the Open ROADM common network";
132     uses org-openroadm-network-types:SRLG-list;
133   }  
134
135   augment "/nd:networks/nd:network/nd:node" {
136     when '../nd:network-types/cnet:openroadm-common-network';
137     description
138       "Augment the generic network node with Open ROADM common attributes.";
139     leaf node-type {
140       type org-openroadm-network-types:openroadm-node-type;
141       description
142         "A component of the network topology. Once the node-type is configured, it should not be modified.";
143     }
144     leaf node-subtype {
145       type org-openroadm-common-node-types:node-subtypes;
146       description
147         "An optional refinement of the node-type. Once the node-subtype is configured, it
148          should not be modified.";
149     }
150     leaf lifecycle-state {
151       type org-openroadm-common-state-types:lifecycle-state;
152       description
153         "Lifecycle State of a node. Whether it is planned, deployed, in maintenance, etc.";
154     }
155     leaf operational-state {
156       type org-openroadm-common-state-types:state;
157     }
158     leaf administrative-state {
159       type org-openroadm-equipment-states-types:admin-states;
160     }
161   }
162
163   augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
164     when '../../nd:network-types/cnet:openroadm-common-network';
165     leaf tp-type {
166       type org-openroadm-network-types:openroadm-tp-type;
167       description
168         "The type of a termination point in the ROADM topology.";
169     }
170     leaf physical-tp {
171       type boolean;
172       mandatory false;
173       description
174         "Applies to Termination Points that map to physical ports or slots on circuit packs.
175           Set to True when the termination point maps to ports of an existing circuit-pack,
176           False, when mapped to a slot (pluggable optics Holder) --> virtual tp.
177           This attribute is not present for other Termination Points.";
178     }
179     leaf-list associated-connection-map-tp {
180       type leafref {
181         path "/nd:networks/nd:network/nd:node/nwt:termination-point/nwt:tp-id";
182       }
183       description
184         "Used to identify relationships between client and network ports in transponders and
185           uni-directional regens. Provides the list of tps the tp is connected to, as defined
186           in the device connection map.";
187     }
188     leaf eqpt-srg-id {
189       type uint32;
190       description
191         "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
192     }
193     leaf lifecycle-state {
194       type org-openroadm-common-state-types:lifecycle-state;
195       description
196         "Lifecycle State of a termination point. Whether it is planned, deployed, in maintenance, etc.";
197     }
198     leaf operational-state {
199       type org-openroadm-common-state-types:state;
200     }
201     leaf administrative-state {
202       type org-openroadm-equipment-states-types:admin-states;
203     }
204   }
205
206   augment "/nd:networks/nd:network/nwt:link" {
207     when '../nd:network-types/cnet:openroadm-common-network';
208     description
209       "This augmentation defines common link attributes in the Open ROADM common network";
210     leaf link-type {
211       type org-openroadm-network-types:openroadm-link-type;
212     }
213     leaf clfi {
214       type string;
215     }
216     leaf opposite-link {
217       type leafref {
218         path "../../nwt:link/nwt:link-id";
219       }
220       description
221         "optional - pointer to reverse link in case of bidirectional link. Supersedes opposite-link
222          originally defined in OMS-attributes container, to apply to any kind of link in the topology";
223     }
224     leaf link-length {
225       type decimal64 {
226         fraction-digits 2;
227       }
228       units "km";
229     }
230     leaf link-latency {
231       type uint32;
232       units "microseconds";
233       description
234         "Latency of a link (microseconds)";
235     }
236     leaf TE-metric {
237       type uint32;
238       description
239         "defines a Traffic Engineering metric which could be used for any type of link.
240          Supersedes TE-metric originally defined in OMS-attributes grouping";
241     }
242     uses org-openroadm-network-types:link-concatenation;
243     uses org-openroadm-network-types:future-SRLGs {
244       augment "future-SRLGs" {
245         leaf-list SRLG-Id {
246           type leafref {
247             path "/nd:networks/nd:network/SRLG-list/SRLG-Id";
248           }
249         }  
250       }
251     }
252     leaf administrative-group {
253       type uint32;
254       description
255         "according to RFC 3630 definition";
256     }
257     leaf operational-state {
258       type org-openroadm-common-state-types:state;
259     }
260     leaf administrative-state {
261       type org-openroadm-equipment-states-types:admin-states;
262     }
263     leaf lifecycle-state {
264       type org-openroadm-common-state-types:lifecycle-state;
265       description
266         "Lifecycle State of a link. Whether it is planned, deployed, in maintenance, etc.";
267     }
268   }
269 }