Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-maintenance-testsignal@2020-05-29.yang
1 module org-openroadm-maintenance-testsignal {
2   yang-version 1.1;
3   namespace "http://org/openroadm/maintenance-testsignal";
4   prefix org-openroadm-maint-testsignal;
5
6   import org-openroadm-common-types {
7     prefix org-openroadm-common-types;
8     revision-date 2020-05-29;
9   }
10
11   organization
12     "Open ROADM MSA";
13   contact
14     "OpenROADM.org";
15   description
16     "YANG definitions for maintenance testsignal.
17
18      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
19      All other rights reserved.
20
21      Redistribution and use in source and binary forms, with or without modification,
22      are permitted provided that the following conditions are met:
23
24      * Redistributions of source code must retain the above copyright notice, this
25        list of conditions and the following disclaimer.
26      * Redistributions in binary form must reproduce the above copyright notice,
27        this list of conditions and the following disclaimer in the documentation and/or
28        other materials provided with the distribution.
29      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
30        contributors may be used to endorse or promote products derived from this software
31        without specific prior written permission.
32
33      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
34      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
36      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
37      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
38      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
39      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42      POSSIBILITY OF SUCH DAMAGE.";
43
44   revision 2020-05-29 {
45     description
46       "Version 7.1.0";
47   }
48   revision 2020-03-27 {
49     description
50       "Version 7.0.0";
51   }
52   revision 2019-11-29 {
53     description
54       "Version 6.1.0";
55   }
56   revision 2019-09-27 {
57     description
58       "Version 6.0.0";
59   }
60   revision 2019-05-31 {
61     description
62       "Version 5.1.0";
63   }
64   revision 2019-03-29 {
65     description
66       "Version 5.0.0";
67   }
68   revision 2018-11-30 {
69     description
70       "Version 4.1.0";
71   }
72   revision 2017-12-15 {
73     description
74       "Version 2.2";
75   }
76   revision 2016-10-14 {
77     description
78       "Version 1.2";
79   }
80
81   grouping maint-testsignal {
82     description
83       "Maintenance testsignal grouping";
84     container maint-testsignal {
85       description
86         "Maintenance testsignal container";
87       typedef testsig-type {
88         type enumeration {
89           enum fac {
90             value 0;
91             description
92               "test signal in the facility direction";
93           }
94           enum term {
95             value 1;
96             description
97               "test signal in the terminal direction";
98           }
99         }
100         description
101           "Testsignal enum typedef";
102       }
103
104       action clear-diagnostics {
105         description
106           "Perform maintenance and diagnostic counter clear.";
107         input {
108           leaf type {
109             type testsig-type;
110             description
111               "Maintenance and Diagnostic counter to be cleared.  If the type is not specified then it will reset the counter for the enabled type(s)";
112           }
113         }
114         output {
115           leaf status {
116             type org-openroadm-common-types:rpc-status;
117             mandatory true;
118             description
119               "RPC status";
120           }
121           leaf status-message {
122             type string;
123             description
124               "status message";
125           }
126         }
127       }
128       leaf enabled {
129         type boolean;
130         default "false";
131         description
132           "testsignal enabled flag";
133       }
134       leaf testPattern {
135         when "../enabled = 'true'";
136         type enumeration {
137           enum PRBS {
138             value 0;
139             description
140               "Unframed, inverted PN-31 pattern or PRBS31 pattern per IEEE 802.3 clause 50.3.8.2 (inverted PN-31 at line rate)";
141           }
142           enum PRBS31 {
143             value 1;
144             description
145               "PRBS31 with standard mapping per G.709";
146           }
147           enum PRBS23 {
148             value 2;
149             description
150               "SONET/SDH Framed,inverted PN-23 pattern.";
151           }
152           enum PRZEROS {
153             value 3;
154             description
155               "pseudo-random with zeros data pattern per IEEE 802.3 clause 49.2.8";
156           }
157           enum IDLE {
158             value 4;
159             description
160               "Scrambled IDLE test-pattern per IEEE 802.3ba";
161           }
162         }
163         mandatory true;
164         description
165           "Set test signal pattern";
166       }
167       leaf type {
168         when "../enabled = 'true'";
169         type testsig-type;
170         default "fac";
171         description
172           "Set test signal type (or direction).";
173       }
174       leaf inSync {
175         type boolean;
176         config false;
177         description
178           "sync status of the received test signal";
179       }
180       leaf seconds {
181         when "../enabled = 'true' and ../inSync = 'true'";
182         type uint32;
183         config false;
184         mandatory true;
185         description
186           "number of seconds the received test signal is in sync.";
187       }
188       leaf bitErrors {
189         when "../enabled = 'true'";
190         type uint32 {
191           range "0..4294967295";
192         }
193         config false;
194         description
195           "bit errors for test signal.";
196       }
197       leaf bitErrorRate {
198         type decimal64 {
199           fraction-digits 17;
200         }
201         config false;
202         description
203           "bit error rate of the received test signal";
204       }
205     }
206   }
207 }