Update docs conf.yaml version to Sulfur
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-ethernet-interfaces@2020-05-29.yang
1 module org-openroadm-ethernet-interfaces {
2   yang-version 1.1;
3   namespace "http://org/openroadm/ethernet-interfaces";
4   prefix org-openroadm-eth-interfaces;
5
6   import org-openroadm-device {
7     prefix org-openroadm-device;
8     revision-date 2020-05-29;
9   }
10   import org-openroadm-interfaces {
11     prefix openROADM-if;
12     revision-date 2019-11-29;
13   }
14   import org-openroadm-common-types {
15     prefix org-openroadm-common-types;
16     revision-date 2020-05-29;
17   }
18   import org-openroadm-maintenance-testsignal {
19     prefix org-openroadm-maint-testsignal;
20     revision-date 2020-05-29;
21   }
22   import org-openroadm-maintenance-loopback {
23     prefix org-openroadm-maint-loopback;
24     revision-date 2019-11-29;
25   }
26
27   organization
28     "Open ROADM MSA";
29   contact
30     "OpenROADM.org";
31   description
32     "YANG definitions for device facility ethernet interfaces.
33
34      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
35      All other rights reserved.
36
37      Redistribution and use in source and binary forms, with or without modification,
38      are permitted provided that the following conditions are met:
39
40      * Redistributions of source code must retain the above copyright notice, this
41        list of conditions and the following disclaimer.
42      * Redistributions in binary form must reproduce the above copyright notice,
43        this list of conditions and the following disclaimer in the documentation and/or
44        other materials provided with the distribution.
45      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
46        contributors may be used to endorse or promote products derived from this software
47        without specific prior written permission.
48
49      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
50      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
51      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
52      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
53      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
54      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
55      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
56      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
57      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
58      POSSIBILITY OF SUCH DAMAGE.
59
60      Also contains code components extracted from IETF Interfaces.  These code components
61      are copyrighted and licensed as follows:
62
63      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
64      All rights reserved.
65
66      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
67      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
68      publication of this document. Please review these documents carefully, as they
69      describe your rights and restrictions with respect to this document. Code Components
70      extracted from this document must include Simplified BSD License text as described in
71      Section 4.e of the Trust Legal Provisions and are provided without warranty as
72      described in the Simplified BSD License.";
73
74   revision 2020-05-29 {
75     description
76       "Version 7.1.0";
77   }
78   revision 2020-03-27 {
79     description
80       "Version 7.0.0";
81   }
82   revision 2019-11-29 {
83     description
84       "Version 6.1.0";
85   }
86   revision 2019-09-27 {
87     description
88       "Version 6.0.0";
89   }
90   revision 2019-05-31 {
91     description
92       "Version 5.1.0";
93   }
94   revision 2019-03-29 {
95     description
96       "Version 5.0.0";
97   }
98   revision 2018-11-30 {
99     description
100       "Version 4.1.0";
101   }
102   revision 2018-09-28 {
103     description
104       "Version 4.0.0";
105   }
106   revision 2018-05-30 {
107     description
108       "Version 3.1.0";
109   }
110   revision 2018-03-30 {
111     description
112       "Version 3.0.0";
113   }
114   revision 2017-12-15 {
115     description
116       "Version 2.2";
117   }
118   revision 2017-09-29 {
119     description
120       "Version 2.1";
121   }
122   revision 2017-07-28 {
123     description
124       "Version 2.0.1 - added revision-date to imports";
125   }
126   revision 2016-10-14 {
127     description
128       "Version 1.2";
129   }
130
131   grouping eth-attributes {
132     leaf speed {
133       type uint32;
134       description
135         "Set speed of the interface, unit mbps.
136          This is for ETH facility.
137          Applies to both management and transport Ethernet.
138          Optional, must be specified for transport Ethernet or when auto-negotiation is disabled.";
139     }
140
141     uses org-openroadm-common-types:fec-grouping {
142       description
143         "Forward Error Correction Choices.
144          Applies to transport Ethernet. Mandatory for transport Ethernet.";
145     }
146
147     leaf duplex {
148       type enumeration {
149         enum half {
150           value 0;
151           description
152             "half duplex";
153         }
154         enum full {
155           value 1;
156           description
157             "full duplex";
158         }
159       }
160       default "full";
161       description
162         "Set duplex selections.
163          Applies to both management and transport Ethernet.
164          Optional, default “full”. Transport Ethernet only supports full.";
165     }
166     leaf auto-negotiation {
167       type enumeration {
168         enum enabled {
169           value 1;
170           description
171             "Auto Negotiation enabled";
172         }
173         enum disabled {
174           value 0;
175           description
176             "Auto Negotiation disabled";
177         }
178       }
179       default "enabled";
180       description
181         "Set Auto Negotiation: Enabled/Disabled.
182          Applies to both management and transport Ethernet.
183          Optional, default “enabled”. Transport Ethernet only supports enabled.";
184     }
185     leaf curr-speed {
186       type string;
187       config false;
188       description
189         "Speed (UNKNOWN/AUTO/10/100/1000/10000) corresponding to the interface.
190          Applies to both management and transport Ethernet.";
191     }
192     leaf curr-duplex {
193       type string;
194       config false;
195       description
196         "Duplex (HALF/FULL) corresponding to the interface.
197          Applies to both management and transport Ethernet.";
198     }
199     leaf max-frame-size {
200       type uint32;
201       config false;
202       description
203         "Maximum Frame Size.  Applies to management Ethernet.";
204     }
205     container subrate-eth-sla {
206       presence "Explicit assignment of subrate ethernet allocation";
207       description
208         "SLA (Service Level Agreement) for subrate Ethernet.
209          Applies to transport Ethernet.";
210       uses org-openroadm-common-types:eth-rate-and-burst-size;
211     }
212     description
213       "Ethernet attributes grouping";
214   }
215
216   grouping ethernet-container {
217     container ethernet {
218       description
219         "Ethernet Interfaces.
220          Maintenance test signal and loopback provisioning is supported for transport Ethernet.";
221       uses eth-attributes;
222       uses org-openroadm-maint-testsignal:maint-testsignal;
223       uses org-openroadm-maint-loopback:maint-loopback;
224     }
225     description
226       "Ethernet container grouping";
227   }
228
229   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
230     when "org-openroadm-device:type = 'openROADM-if:ethernetCsmacd'";
231     uses ethernet-container;
232     description
233       "Augment for interface";
234   }
235 }