56b50e2b7588d86423f24da2e440eb1c73508a7b
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network@2021-12-10.yang
1 module org-openroadm-network {
2   yang-version 1.1;
3   namespace "http://org/openroadm/network";
4   prefix net;
5
6   import ietf-network {
7     prefix nd;
8     revision-date 2018-02-26;
9   }
10   import org-openroadm-network-types {
11     prefix nt;
12     revision-date 2021-12-10;
13   }
14   import org-openroadm-roadm {
15     prefix roadm;
16     revision-date 2019-11-29;
17   }
18   import org-openroadm-external-pluggable {
19     prefix plg;
20     revision-date 2021-12-10;
21   }
22   import org-openroadm-xponder {
23     prefix xpdr;
24     revision-date 2021-12-10;
25   }
26   import ietf-inet-types {
27     prefix inet;
28     revision-date 2013-07-15;
29   }
30   import org-openroadm-common-types {
31     prefix org-openroadm-common-types;
32     revision-date 2021-12-10;
33   }
34   import org-openroadm-common-network {
35     prefix cnet;
36     revision-date 2021-12-10;
37   }
38
39   organization
40     "OPEN ROADM MSA";
41   contact
42     "www.OpenROADM.org.";
43   description
44     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
45      All other rights reserved.
46
47      Redistribution and use in source and binary forms, with or without modification,
48      are permitted provided that the following conditions are met:
49
50      * Redistributions of source code must retain the above copyright notice, this
51        list of conditions and the following disclaimer.
52      * Redistributions in binary form must reproduce the above copyright notice,
53        this list of conditions and the following disclaimer in the documentation and/or
54        other materials provided with the distribution.
55      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
56        contributors may be used to endorse or promote products derived from this software
57        without specific prior written permission.
58
59      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
60      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
61      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
62      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
63      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
64      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
65      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
66      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
67      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
68      POSSIBILITY OF SUCH DAMAGE.";
69
70   revision 2021-12-10 {
71     description
72       "Version 10.1";
73   }
74   revision 2021-09-24 {
75     description
76       "Version 10.0";
77   }
78   revision 2021-05-28 {
79     description
80       "Version 9.1";
81   }
82   revision 2021-03-26 {
83     description
84       "Version 9.0";
85   }
86   revision 2020-12-11 {
87     description
88       "Version 8.1";
89   }
90   revision 2020-09-25 {
91     description
92       "Version 8.0";
93   }
94   revision 2020-05-29 {
95     description
96       "Version 7.1.0";
97   }
98   revision 2020-03-27 {
99     description
100       "Version 7.0.0";
101   }
102   revision 2019-11-29 {
103     description
104       "Version 6.1.0";
105   }
106   revision 2019-09-27 {
107     description
108       "Version 6.0.0";
109   }
110   revision 2019-05-31 {
111     description
112       "Version 5.1.0";
113   }
114   revision 2019-03-29 {
115     description
116       "Version 5.0.0";
117   }
118   revision 2018-11-30 {
119     description
120       "Version 4.1.0";
121   }
122   revision 2018-09-28 {
123     description
124       "Version 4.0.0";
125   }
126   revision 2018-05-30 {
127     description
128       "Version 3.1.0";
129   }
130   revision 2018-03-30 {
131     description
132       "Version 3.0.0";
133   }
134   revision 2017-12-15 {
135     description
136       "Version 2.2";
137   }
138   revision 2017-09-29 {
139     description
140       "Version 2.1";
141   }
142   revision 2017-07-28 {
143     description
144       "Version 2.0.1 - added revision-date to imports";
145   }
146   revision 2017-06-26 {
147     description
148       "Version 2.0";
149   }
150   revision 2016-10-14 {
151     description
152       "Version 1.2";
153   }
154
155   deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
156     deviate add {
157       must "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network) or
158             (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network and
159             (../cnet:node-type = 'ROADM' or ../cnet:node-type = 'XPONDER' or ../cnet:node-type = 'EXT-PLUGGABLE'))" {
160           error-message "Invalid node type for openroadm-network";
161           description
162             "The valid node types in the ROADM network are XPONDER, EXT-PLUGGABLE and ROADM.";
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 optical network";
170     container openroadm-network {
171       presence "indicates optical network of Open ROADMs";
172       description
173         "The presence of the container node indicates Open ROADM
174          network";
175     }
176   }
177
178   augment "/nd:networks/nd:network/nd:node" {
179     when '../nd:network-types/cnet:openroadm-common-network/net:openroadm-network';
180     description
181       "Augment the generic network node with Open ROADM attributes.";
182     leaf software-version {
183       type string;
184       description
185         "Vendor software version";
186     }
187     leaf openroadm-version {
188       type org-openroadm-common-types:openroadm-version-type;
189       description
190         "OpenROADM software version";
191     }
192     leaf vendor {
193       type string;
194       description
195         "Identifier of the supplier";
196     }
197     leaf model {
198       type string;
199       description
200         "Identifier of the supplier's equipment";
201     }
202     leaf domain-subnetwork {
203       type string;
204       description
205         "Specific Domain-Subnetwork in which the node resides";
206     }
207     leaf ip {
208       type inet:ip-address;
209       description
210         "IP address assigned to the node";
211     }
212     leaf relay-rack {
213       type string;
214       description
215         "Frame Identification Code (FIC)";
216     }
217     leaf shelf {
218       type string;
219     }
220     leaf node-connection-status {
221       type nt:openroadm-node-connection-status;
222     }
223     container roadm-attributes {
224       when "../cnet:node-type = 'ROADM'";
225       description
226         "Attributes for the ROADM Node.";
227       uses roadm:roadm-node-attributes;
228     }
229     container xpdr-attributes {
230       when "../cnet:node-type = 'XPONDER'";
231       uses xpdr:xpdr-node-attributes;
232     }
233     container pluggable-attributes {
234       when "../cnet:node-type = 'EXT-PLUGGABLE'";
235       uses plg:pluggable-node-attributes;
236     }
237     container plan-due-dates {
238       uses nt:node-due-date-list;
239     }
240     container node-maintenance-schedule {
241       uses nt:node-due-date-list;
242     }
243   }
244 }