Sync Common folder
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-otn-otu-interfaces@2016-10-14.yang
1 module org-openroadm-otn-otu-interfaces {
2   namespace "http://org/openroadm/otn-otu-interfaces";
3   prefix org-openroadm-otn-otu-interfaces;
4
5   import org-openroadm-device {
6     prefix org-openroadm-device;
7     revision-date 2017-02-06;
8   }
9   import org-openroadm-interfaces {
10     prefix openROADM-if;
11     revision-date 2016-10-14;
12   }
13   import org-openroadm-maintenance-loopback {
14     prefix org-openroadm-maint-loopback;
15     revision-date 2016-10-14;
16   }
17
18   organization "Open ROADM MSA";
19   contact
20     "OpenROADM.org";
21   description
22     "YANG definitions for device facility otnotu interfaces.
23      
24      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
25      AT&T Intellectual Property.  All other rights reserved.
26      
27      Redistribution and use in source and binary forms, with or without modification, 
28      are permitted provided that the following conditions are met:
29      
30      * Redistributions of source code must retain the above copyright notice, this 
31        list of conditions and the following disclaimer.
32      * Redistributions in binary form must reproduce the above copyright notice, 
33        this list of conditions and the following disclaimer in the documentation and/or 
34        other materials provided with the distribution.
35      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
36        contributors may be used to endorse or promote products derived from this software 
37        without specific prior written permission.
38      
39      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
40      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
41      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
42      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
43      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
44      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
45      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
46      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
47      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
48      POSSIBILITY OF SUCH DAMAGE.
49      
50      Also contains code components extracted from IETF Interfaces.  These code components
51      are copyrighted and licensed as follows:
52      
53      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
54      All rights reserved.
55      
56      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
57      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
58      publication of this document. Please review these documents carefully, as they
59      describe your rights and restrictions with respect to this document. Code Components
60      extracted from this document must include Simplified BSD License text as described in
61      Section 4.e of the Trust Legal Provisions and are provided without warranty as
62      described in the Simplified BSD License.";
63
64   revision 2016-10-14 {
65     description
66       "Version 1.2";
67   }
68
69   identity otu-rate-identity {
70     description
71       "A unique rate identification of the OTU.";
72   }
73
74   identity OTU4 {
75     base otu-rate-identity;
76     description
77       "Identity for an OTU4";
78   }
79
80   identity OTU3 {
81     base otu-rate-identity;
82     description
83       "Identity for an OTU3";
84   }
85
86   identity OTU2 {
87     base otu-rate-identity;
88     description
89       "Identity for an OTU2";
90   }
91
92   identity OTU2e {
93     base otu-rate-identity;
94     description
95       "Identity for an OTU2e";
96   }
97
98   identity OTU1 {
99     base otu-rate-identity;
100     description
101       "Identity for an OTU1";
102   }
103
104   identity OTU0 {
105     base otu-rate-identity;
106     description
107       "Identity for an OTU0";
108   }
109
110   identity OTUflex {
111     base otu-rate-identity;
112     description
113       "Identity for an OTUflex";
114   }
115
116   grouping otu-attributes {
117     description
118       "OTU attributes";
119     leaf rate {
120       type identityref {
121         base otu-rate-identity;
122       }
123       description
124         "rate identity of the OTU. 'identityref' is used
125          to allow to extend for future higher rates";
126     }
127     leaf fec {
128       type enumeration {
129         enum "off" {
130           value 0;
131           description
132             "fec off";
133         }
134         enum "rsfec" {
135           value 1;
136           description
137             "rsfec";
138         }
139         enum "sdfeca1" {
140           value 2;
141           description
142             "Clariphy SDFEC";
143         }
144         enum "efec" {
145           value 3;
146           description
147             "G.975.1 I.4";
148         }
149         enum "ufec" {
150           value 4;
151           description
152             "G.975.1 I.7";
153         }
154         enum "sdfec" {
155           value 5;
156           description
157             "Soft decision FEC";
158         }
159         enum "sdfecb1" {
160           value 6;
161           description
162             "SDFEC with SCFEC";
163         }
164         enum "scfec" {
165           value 7;
166           description
167             "Stair case FEC";
168         }
169       }
170       description
171         "Forward Error Correction";
172     }
173   }
174
175   grouping otu-container {
176     container otu {
177       description
178         "Optical Channel Transport Unit (OTU)";
179       uses otu-attributes;
180       uses org-openroadm-maint-loopback:maint-loopback;
181     }
182   }
183
184   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
185     when "org-openroadm-device:type = 'openROADM-if:otnOtu'";
186     uses otu-container;
187   }
188 }