Clean up API YANG models with the help of pyang
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-link@2018-11-30.yang
1 module org-openroadm-link {
2   yang-version 1.1;
3   namespace "http://org/openroadm/link";
4   prefix link;
5
6   import org-openroadm-equipment-states-types {
7     prefix org-openroadm-equipment-states-types;
8     revision-date 2018-11-30;
9   }
10   import org-openroadm-common-link-types {
11     prefix org-openroadm-common-link-types;
12     revision-date 2018-11-30;
13   }
14   import org-openroadm-common-node-types {
15     prefix org-openroadm-common-node-types;
16     revision-date 2018-11-30;
17   }
18   import org-openroadm-amplifier {
19     prefix org-openroadm-amplifier;
20     revision-date 2018-11-30;
21   }
22
23   organization
24     "Open ROADM MSA";
25   contact
26     "OpenROADM.org.";
27   description
28     "YANG definitions for an amplifier in Network Model
29
30
31      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2017,
32      All other rights reserved.
33
34      Redistribution and use in source and binary forms, with or without modification,
35      are permitted provided that the following conditions are met:
36
37      * Redistributions of source code must retain the above copyright notice, this
38        list of conditions and the following disclaimer.
39      * Redistributions in binary form must reproduce the above copyright notice,
40        this list of conditions and the following disclaimer in the documentation and/or
41        other materials provided with the distribution.
42      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
43        contributors may be used to endorse or promote products derived from this software
44        without specific prior written permission.
45
46      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
47      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
48      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
49      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
50      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
51      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
52      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
53      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
55      POSSIBILITY OF SUCH DAMAGE.";
56
57   revision 2018-11-30 {
58     description
59       "Version 4.1.0";
60   }
61   revision 2018-09-28 {
62     description
63       "Version 4.0.0";
64   }
65   revision 2018-03-30 {
66     description
67       "Version 3.0.0";
68   }
69   revision 2017-12-15 {
70     description
71       "Version 2.2";
72   }
73   revision 2017-09-29 {
74     description
75       "Version 2.1";
76   }
77   revision 2017-07-28 {
78     description
79       "Version 2.0.1 - added revision-date to imports";
80   }
81   revision 2017-06-17 {
82     description
83       "Version 2.0";
84   }
85
86   grouping OMS-attributes {
87     leaf TE-metric {
88       type uint32;
89       status deprecated;
90     }
91   }
92
93   grouping span-attributes {
94     leaf clfi {
95       type string;
96       status deprecated;
97     }
98     leaf auto-spanloss {
99       type boolean;
100       default "true";
101       description
102         "Flag to enable/disable automatic spanloss measurement";
103     }
104     leaf spanloss-base {
105       type org-openroadm-common-link-types:ratio-dB;
106       description
107         "Baseline ROADM span loss measured and accepted during
108          degree turn-up. May be re-set to current value after a fiber repair or change.";
109     }
110     leaf spanloss-current {
111       type org-openroadm-common-link-types:ratio-dB;
112       description
113         "Current ROADM span loss measured and accepted during
114          degree turn-up. Updated periodically if auto-spanloss is enabled.";
115     }
116     leaf spanloss-last-measured {
117       type org-openroadm-common-link-types:ratio-dB;
118       description
119         "Last measured ROADM span loss, may or may not have been accepted and pushed to the NE.";
120     }
121     leaf engineered-spanloss {
122       type org-openroadm-common-link-types:ratio-dB;
123       description
124         "ROADM span loss provided by an external system";
125     }
126     list link-concatenation {
127       key "SRLG-Id";
128       leaf SRLG-Id {
129         type uint32;
130         description
131           "unique identifier for SRLG";
132       }
133       leaf fiber-type {
134         type enumeration {
135           enum "smf" {
136             value 0;
137             description
138               "Single Mode Fiber";
139           }
140           enum "eleaf" {
141             value 1;
142             description
143               "ELEAF";
144           }
145           enum "oleaf" {
146             value 2;
147             description
148               "OLEAF";
149           }
150           enum "dsf" {
151             value 3;
152             description
153               "DSF";
154           }
155           enum "truewave" {
156             value 4;
157             description
158               "TRUEWAVE Reduced Slope";
159           }
160           enum "truewavec" {
161             value 5;
162             description
163               "TRUEWAVE Classic";
164           }
165           enum "nz-dsf" {
166             value 6;
167             description
168               "NZ-DSF";
169           }
170           enum "ull" {
171             value 7;
172             description
173               "Ultra Low Loss (ULL)";
174           }
175         }
176       }
177       leaf SRLG-length {
178         type uint32;
179         description
180           "fiber length in meters";
181       }
182       leaf pmd {
183         type org-openroadm-common-link-types:fiber-pmd;
184         description
185           "Total PMD";
186       }
187     }
188   }
189
190   grouping amplified-link-attributes {
191     list amplified-link {
192       key "section-elt-number";
193       description
194         "defines the spans and the amplifier blocks of the amplified lines";
195       leaf section-elt-number {
196         type uint16;
197         description
198           "Id of the section element (whether it's a Span or an Amp)";
199       }
200       container section-element {
201         choice section-element {
202           case ila {
203             container ila {
204               uses org-openroadm-amplifier:amplifier-node-attributes;
205               leaf node-id {
206                 type org-openroadm-common-node-types:node-id-type;
207                 mandatory true;
208                 description
209                   "Node id corresponding to the amplifier ";
210               }
211               leaf administrative-state {
212                 type org-openroadm-equipment-states-types:admin-states;
213               }
214             }
215           }
216           case span {
217             container span {
218               uses link:span-attributes;
219               leaf administrative-state {
220                 type org-openroadm-equipment-states-types:admin-states;
221               }
222             }
223           }
224         }
225       }
226     }
227   }
228 }