Sync Common folder
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-maintenance-testsignal@2017-12-15.yang
1 module org-openroadm-maintenance-testsignal {
2   namespace "http://org/openroadm/maintenance-testsignal";
3   prefix org-openroadm-maint-testsignal;
4
5   organization
6     "Open ROADM MSA";
7   contact
8     "OpenROADM.org";
9   description
10     "YANG definitions for maintenance testsignal.
11      
12      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
13      AT&T Intellectual Property.  All other rights reserved.
14      
15      Redistribution and use in source and binary forms, with or without modification, 
16      are permitted provided that the following conditions are met:
17      
18      * Redistributions of source code must retain the above copyright notice, this 
19        list of conditions and the following disclaimer.
20      * Redistributions in binary form must reproduce the above copyright notice, 
21        this list of conditions and the following disclaimer in the documentation and/or 
22        other materials provided with the distribution.
23      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
24        contributors may be used to endorse or promote products derived from this software 
25        without specific prior written permission.
26      
27      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
28      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
29      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
30      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
31      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
33      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
34      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
35      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
36      POSSIBILITY OF SUCH DAMAGE.";
37
38   revision 2017-12-15 {
39     description
40       "Version 2.2";
41   }
42   revision 2016-10-14 {
43     description
44       "Version 1.2";
45   }
46
47   grouping maint-testsignal {
48     container maint-testsignal {
49       leaf enabled {
50         type boolean;
51         default "false";
52         description
53           "testsignal enabled flag";
54       }
55       leaf testPattern {
56         when "../enabled = 'true'";
57         type enumeration {
58           enum "PRBS" {
59             value 0;
60             description
61               "Unframed, inverted PN-31 pattern or PRBS31 pattern per IEEE 802.3 clause 50.3.8.2 (inverted PN-31at line rate)";
62           }
63           enum "PRBS31" {
64             value 1;
65             description
66               "PRBS31 with standard mapping per G.709";
67           }
68           enum "PRBS23" {
69             value 2;
70             description
71               "SONET/SDH Framed,inverted PN-23 pattern.";
72           }
73           enum "PRZEROS" {
74             value 3;
75             description
76               "pseudo-random with zeros data pattern per IEEE 802.3 clause 49.2.8";
77           }
78           enum "IDLE" {
79             value 4;
80             description
81               "Scrambled IDLE test-pattern per IEEE 802.3ba";
82           }
83         }
84         description
85           "Set test signal pattern";
86       }
87       leaf type {
88         when "../enabled = 'true'";
89         type enumeration {
90           enum "fac" {
91             value 0;
92             description
93               "test signal in the facility direction";
94           }
95           enum "term" {
96             value 1;
97             description
98               "test signal in the terminal direction";
99           }
100         }
101         default "fac";
102         description
103           "Set test signal type (or direction).";
104       }
105       leaf bitErrors {
106         when "../enabled = 'true' and ../type = 'fac'";
107         type uint32 {
108           range "0..4294967295";
109         }
110         config false;
111         description
112           "bit errors for test signal in facility direction.";
113       }
114       leaf bitErrorsTerminal {
115         when "../enabled = 'true' and ../type = 'term'";
116         type uint32 {
117           range "0..4294967295";
118         }
119         config false;
120         description
121           "bit errors for test signal in terminal direction.";
122       }
123       leaf syncSeconds {
124         when "../enabled = 'true' and ../type = 'fac'";
125         type string;
126         config false;
127         description
128           "number of seconds the received facility test signal is in sync.";
129       }
130       leaf syncSecondsTerminal {
131         when "../enabled = 'true' and ../type = 'term'";
132         type string;
133         config false;
134         description
135           "number of seconds the received terminal test signal is in sync.";
136       }
137     }
138   }
139 }