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