3a7036204ccea733757b05d5b57944d0a101cc8a
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-pm-types@2016-10-14.yang
1 module org-openroadm-pm-types {
2   namespace "http://org/openroadm/pm-types";
3   prefix org-openroadm-pm-types;
4
5   import org-openroadm-common-types {
6     prefix org-openroadm-common-types;
7    revision-date 2016-10-14;
8   }
9
10   organization "Open ROADM MSA";
11   contact
12     "OpenROADM.org";
13   description
14     "YANG definitions of performance management types.
15
16       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
17       AT&T Intellectual Property.  All other rights reserved.
18
19       Redistribution and use in source and binary forms, with or without modification,
20       are permitted provided that the following conditions are met:
21
22       * Redistributions of source code must retain the above copyright notice, this
23         list of conditions and the following disclaimer.
24       * Redistributions in binary form must reproduce the above copyright notice,
25         this list of conditions and the following disclaimer in the documentation and/or
26         other materials provided with the distribution.
27       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
28         contributors may be used to endorse or promote products derived from this software
29         without specific prior written permission.
30
31       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
32       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
35       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
36       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
37       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40       POSSIBILITY OF SUCH DAMAGE";
41
42   revision 2016-10-14 {
43     description
44       "Version 1.2";
45   }
46
47   typedef pm-granularity {
48     description
49       "Granularity of PM bin";
50     type enumeration {
51       enum "notApplicable" {
52         description
53           "This is for total statistic counters on devices that support
54               them.";
55         value 1;
56       }
57       enum "15min" {
58         value 2;
59       }
60       enum "24Hour" {
61         value 3;
62       }
63     }
64   }
65
66   typedef pm-data-type {
67     type union {
68       type uint64;
69       type decimal64 {
70         fraction-digits 2;
71       }
72       type decimal64 {
73         fraction-digits 17;
74       }
75     }
76   }
77
78   grouping pm-measurement {
79     description
80       "Set of parameters related to a PM Measurement";
81     container pmParameterName {
82       uses pm-names;
83     }
84     leaf pmParameterValue {
85       type pm-data-type;
86       mandatory true;
87       config false;
88     }
89     leaf pmParameterUnit {
90       description
91         "Unit PM parameter has been measured - frames, packets, u, etc";
92       type string;
93       mandatory false;
94     }
95     leaf location {
96       description
97         "Location PM parameter measurement";
98       type enumeration {
99         enum "notApplicable" {
100           value 1;
101         }
102         enum "nearEnd" {
103           value 2;
104         }
105         enum "farEnd" {
106           value 3;
107         }
108       }
109       mandatory false;
110     }
111     leaf direction {
112       description
113         "Direction PM parameter measurement";
114       type org-openroadm-common-types:pm-direction;
115       mandatory false;
116     }
117     leaf validity {
118       description
119         "Validity of data";
120       type enumeration {
121         enum "complete" {
122           value 1;
123         }
124         enum "partial" {
125           value 2;
126         }
127         enum "suspect" {
128           value 3;
129         }
130       }
131       mandatory false;
132       config false;
133     }
134   }
135
136   grouping pm-names {
137     description
138       "Name of PM parameter. Consisists of a set list of parameters,
139        plus an extension field to support addition parameters.";
140     leaf type {
141       type pm-names-enum;
142       mandatory true;
143     }
144     leaf extension {
145       description
146         "name of parameter, when enum value set to vendorExtension because
147          name not found in pm-names-enum";
148       type string;
149       mandatory false;
150     }
151   }
152
153   typedef pm-names-enum {
154     type enumeration {
155       enum "vendorExtension" {
156         value 1;
157         description
158           "vendor extension";
159       }
160       enum "bitErrorRate" {
161         value 2;
162         description
163           "Bit error rate (BER)";
164       }
165       enum "opticalPowerOutput" {
166         value 3;
167         description
168           "Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
169       }
170       enum "opticalReturnLoss" {
171         value 4;
172         description
173           "Optical Return Loss (ORL-OTS) - at MW port(s) B";
174       }
175       enum "opticalPowerInput" {
176         value 5;
177         description
178           "Optical Power Input (OPIN-OTS). Total optical power";
179       }
180       enum "opticalPower" {
181         value 6;
182         description
183           "Optical Power Receive (OPR-OTS); Optical Power Transmit (OPT-OSC)";
184       }
185       enum "opticalChannelPowerTransmit" {
186         value 7;
187         description
188           "Optical Channel Power Transmit (OPT-OCH). Individual channel power includes Variable Optical Attenuator (VOA) attenuation";
189       }
190       enum "codeViolations" {
191         value 8;
192         description
193           "Code Violations (CV-PCS). 8B/10B errors";
194         reference "IEEE 802.3ah, Section 45.2.1.44";
195       }
196       enum "erroredSecondsSection" {
197         value 9;
198         description
199           "Errored Seconds Section (ES-PCS)";
200         reference "IEEE 802.3ah, Section 45.2.1.46";
201       }
202       enum "severlyErrorSeconds" {
203         value 10;
204         description
205           "Severely Errored Seconds (SES-PCS)";
206         reference "IEEE 802.3ah, Section 45.2.1.48";
207       }
208       enum "unavailableSecondsPCS" {
209         value 11;
210         description
211           "Unavailable Seconds PCS (UAS-PCS)";
212         reference "IEEE 802.3ah, Section 45.2.1.52";
213       }
214       enum "inFrames" {
215         value 12;
216         description
217           "In frames (INFRAMES-E)";
218       }
219       enum "inFramesErrored" {
220         value 13;
221         description
222           "In frames errored (INFRAMESERR-E)";
223       }
224       enum "outFrames" {
225         value 14;
226         description
227           "Out frames (OUTFRAMES-E)";
228       }
229       enum "erroredSecondsEthernet" {
230         value 15;
231         description
232           "Errored Seconds Ethernet (ES-E)";
233         reference "IEEE 802.3ah, Section 45.2.1.46";
234       }
235       enum "severelyErroredSecondsEthernet" {
236         value 16;
237         description
238           "Severly Errored Seconds, Ethernet (SES-E)";
239         reference "IEEE 802.3ah, Section 45.2.1.48";
240       }
241       enum "unavailableSecondsEthernet" {
242         value 17;
243         description
244           "Unavailable Seconds, Ethernet (UAS-E)";
245         reference "IEEE 802.3ah, Section 45.2.1.52";
246       }
247       enum "erroredBlockCount" {
248         value 18;
249         description
250           "Errored block count";
251         reference "G.798 : 6.5.1.1";
252       }
253       enum "delay" {
254         value 19;
255         description
256           "Number of frames between a DMValue toggle event and the received DMp signal value toggle event";
257         reference "G.798";
258       }
259       enum "defectSeconds" {
260         value 20;
261         description
262           "Defect Seconds (DS)";
263         reference "";
264       }
265       enum "backwardIncomingAlignmentError" {
266         value 21;
267         description
268           "Backward Incoming Alignment Error (BIAE)";
269         reference "Ref: G.798: 14.5.1.1.2";
270       }
271       enum "incomingAlignmentError" {
272         value 22;
273         description
274           "Incoming Alignment Error (IAE)";
275         reference "Ref: G.798: 14.5.1.1.2";
276       }
277     }
278   }
279 }