Upgrade Network model from 2.1 to 4.1
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network@2018-11-30.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 2018-11-30;
13   }
14   import org-openroadm-roadm {
15     prefix roadm;
16     revision-date 2018-11-30;
17   }
18   import org-openroadm-external-pluggable {
19     prefix plg;
20     revision-date 2018-11-30;
21   }
22   import org-openroadm-xponder {
23     prefix xpdr;
24     revision-date 2018-11-30;
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 2018-11-30;
33   }
34   import org-openroadm-common-network {
35     prefix cnet;
36     revision-date 2018-11-30;
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 2018-11-30 {
71     description
72       "Version 4.1.0";
73   }
74   revision 2018-09-28 {
75     description
76       "Version 4.0.0";
77   }
78   revision 2018-05-30 {
79     description
80       "Version 3.1.0";
81   }
82   revision 2018-03-30 {
83     description
84       "Version 3.0.0";
85   }
86   revision 2017-12-15 {
87     description
88       "Version 2.2";
89   }
90   revision 2017-09-29 {
91     description
92       "Version 2.1";
93   }
94   revision 2017-07-28 {
95     description
96       "Version 2.0.1 - added revision-date to imports";
97   }
98   revision 2017-06-26 {
99     description
100       "Version 2.0";
101   }
102   revision 2016-10-14 {
103     description
104       "Version 1.2";
105   }
106
107   deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
108     deviate add {
109       must
110         "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network) or
111          (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network and
112          (../cnet:node-type = 'ROADM' or ../cnet:node-type = 'XPONDER' or ../cnet:node-type = 'EXT-PLUGGABLE'))" {
113         error-message "Invalid node type for openroadm-network";
114         description
115           "The valid node types in the ROADM network are XPONDER, EXT-PLUGGABLE and ROADM.";
116       }
117     }
118   }
119   augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
120     description
121       "Introduce new network type for the Open ROADM optical network";
122     container openroadm-network {
123       presence "indicates optical network of Open ROADMs";
124       description
125         "The presence of the container node indicates Open ROADM
126          network";
127     }
128   }
129   augment "/nd:networks/nd:network/nd:node" {
130     when "../nd:network-types/cnet:openroadm-common-network/openroadm-network";
131     description
132       "Augment the generic network node with Open ROADM attributes.";
133     leaf node-type {
134       type nt:openroadm-node-type;
135       must "(../node-type = 'ROADM' or ../node-type = 'XPONDER' or ../node-type = 'EXT-PLUGGABLE')" {
136         error-message "Invalid node type for openroadm-network";
137       }
138       status deprecated;
139       description
140         "A component of the network topology.
141          Valid node types are XPONDER, EXT-PLUGGABLE and ROADM.
142          Once the node-type is configured, it should not be modified.";
143     }
144     leaf software-version {
145       type string;
146       description
147         "Vendor software version";
148     }
149     leaf openroadm-version {
150       type org-openroadm-common-types:openroadm-version-type;
151       description
152         "OpenROADM software version";
153     }
154     leaf vendor {
155       type string;
156       description
157         "Identifier of the supplier";
158     }
159     leaf model {
160       type string;
161       description
162         "Identifier of the supplier's equipment";
163     }
164     leaf domain-subnetwork {
165       type string;
166       description
167         "Specific Domain-Subnetwork in which the node resides";
168     }
169     leaf ip {
170       type inet:ip-address;
171       description
172         "IP address assigned to the node";
173     }
174     leaf relay-rack {
175       type string;
176       description
177         "Frame Identification Code (FIC)";
178     }
179     leaf shelf {
180       type string;
181     }
182     leaf node-status {
183       type nt:openroadm-node-status;
184       status deprecated;
185     }
186     leaf node-connection-status {
187       type nt:openroadm-node-connection-status;
188     }
189     container roadm-attributes {
190       when "../cnet:node-type = 'ROADM'";
191       description
192         "Attributes for the ROADM Node.";
193       uses roadm:roadm-node-attributes;
194     }
195     container xpdr-attributes {
196       when "../cnet:node-type = 'XPONDER'";
197       uses xpdr:xpdr-node-attributes;
198     }
199     container pluggable-attributes {
200       when "../cnet:node-type = 'EXT-PLUGGABLE'";
201       uses plg:pluggable-node-attributes;
202     }
203     container plan-due-dates {
204       uses nt:node-due-date-list;
205     }
206     container node-maintenance-schedule {
207       uses nt:node-due-date-list;
208     }
209   }
210 }