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