Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-optical-tributary-signal-interfaces@2020-05-29.yang
1 module org-openroadm-optical-tributary-signal-interfaces {
2   namespace "http://org/openroadm/optical-channel-tributary-signal-interfaces";
3   prefix org-openroadm-optical-tributary-signal-interfaces;
4
5   import org-openroadm-common-link-types {
6     prefix org-openroadm-common-link-types;
7     revision-date 2019-11-29;
8   }
9   import org-openroadm-common-optical-channel-types {
10     prefix org-openroadm-common-optical-channel-types;
11     revision-date 2020-05-29;
12   }
13   import org-openroadm-common-types {
14     prefix org-openroadm-common-types;
15     revision-date 2020-05-29;
16   }
17   import org-openroadm-optical-operational-interfaces {
18     prefix org-openroadm-optical-operational-interfaces;
19     revision-date 2020-05-29;
20   }
21   import org-openroadm-device {
22     prefix org-openroadm-device;
23     revision-date 2020-05-29;
24   }
25   import org-openroadm-interfaces {
26     prefix openROADM-if;
27     revision-date 2019-11-29;
28   }
29
30   organization
31     "Open ROADM MSA";
32   contact
33     "OpenROADM.org";
34   description
35     "YANG definitions for device optical tributary signal interfaces.
36
37      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2018,
38      All other rights reserved.
39
40      Redistribution and use in source and binary forms, with or without modification,
41      are permitted provided that the following conditions are met:
42
43      * Redistributions of source code must retain the above copyright notice, this
44        list of conditions and the following disclaimer.
45      * Redistributions in binary form must reproduce the above copyright notice,
46        this list of conditions and the following disclaimer in the documentation and/or
47        other materials provided with the distribution.
48      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
49        contributors may be used to endorse or promote products derived from this software
50        without specific prior written permission.
51
52      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
53      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
54      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
56      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
57      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
58      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
59      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
60      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
61      POSSIBILITY OF SUCH DAMAGE.
62
63      Also contains code components extracted from IETF Interfaces.  These code components
64      are copyrighted and licensed as follows:
65
66      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
67      All rights reserved.
68
69      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
70      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
71      publication of this document. Please review these documents carefully, as they
72      describe your rights and restrictions with respect to this document. Code Components
73      extracted from this document must include Simplified BSD License text as described in
74      Section 4.e of the Trust Legal Provisions and are provided without warranty as
75      described in the Simplified BSD License.";
76
77   revision 2020-05-29 {
78     description
79       "Version 7.1.0";
80   }
81   revision 2020-03-27 {
82     description
83       "Version 7.0.0";
84   }
85   revision 2019-11-29 {
86     description
87       "Version 6.1.0";
88   }
89   revision 2019-09-27 {
90     description
91       "Version 6.0.0";
92   }
93   revision 2019-05-31 {
94     description
95       "Version 5.1.0";
96   }
97   revision 2019-03-29 {
98     description
99       "Version 5.0.0";
100   }
101   revision 2018-11-30 {
102     description
103       "Version 4.1.0";
104   }
105   revision 2018-05-30 {
106     description
107       "Version 3.1.0";
108   }
109   revision 2018-03-30 {
110     description
111       "Version 3.0.0";
112   }
113
114   grouping otsi-attributes {
115     description
116       "OTSi attributes group";
117     leaf provision-mode {
118       type org-openroadm-common-optical-channel-types:provision-mode-type;
119       default "explicit";
120       description
121         "The provision-mode specified by the controller. Default to 'explicit' (ie, the set of optical parameter specified in MSA Optical Spec).
122          The 'profile' provision-mode is introduced in MSA 5.0 to support the bookended xponder application";
123     }
124     leaf otsi-rate {
125       when "../provision-mode = 'explicit'";
126       type identityref {
127         base org-openroadm-common-optical-channel-types:otsi-rate-identity;
128       }
129       description
130         "OTSi rate";
131     }
132     leaf otsi-member-id {
133       type uint16;
134       description
135         "The member ID to uniquely identify each member in an OTSi group and the order of each member in the group.  For each group, system shall support non-consecutive member IDs.  User shall not set up two members with the same member ID.  Similar to FlexO PHY-ID in the FlexO Group (PID in G.709.1/3)";
136     }
137     leaf frequency {
138       type org-openroadm-common-optical-channel-types:frequency-THz;
139       description
140         "Center Frequency in THz.";
141     }
142     leaf width {
143       when "../provision-mode = 'explicit'";
144       type org-openroadm-common-optical-channel-types:frequency-GHz;
145       config false;
146       description
147         "Frequency width in GHz.";
148     }
149     leaf modulation-format {
150       when "../provision-mode = 'explicit'";
151       type org-openroadm-common-optical-channel-types:modulation-format;
152       description
153         "Modulation format";
154     }
155     leaf transmit-power {
156       type org-openroadm-common-link-types:power-dBm;
157       description
158         "The target transmit power for this channel. When set, the xponder will work to ensure that port-current-power reaches this level. Applicable only to channel on top of xpdr-network port";
159     }
160
161     uses org-openroadm-common-types:fec-grouping {
162       when "provision-mode = 'explicit'";
163       description
164         "OTSi FEC / Forward Error Correction";
165     }
166     leaf optical-operational-mode {
167       when "../provision-mode = 'profile'";
168       type string;
169       description
170         "Optical-operational-mode sets the xponder settings based on one of the operational mode capabilities as published by the device.  This attribute is mandatory when the provision-mode is set to profile.";
171     }
172     container operational-mode-params {
173       when "../provision-mode = 'profile'";
174       config false;
175       description
176         "The container containing the optical parameters for the specified operational mode";
177       uses org-openroadm-optical-operational-interfaces:optical-operational-modes-grp-attr;
178     }
179     leaf supported-group-if {
180       type leafref {
181         path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
182       }
183       config false;
184       description
185         "OTSiG or FlexO-group interface name.";
186     }
187     container flexo {
188       presence "Explicit assigment for flexo container";
189       description
190         "Flexo presence container";
191       leaf foic-type {
192         type identityref {
193           base org-openroadm-common-optical-channel-types:foic-identity;
194         }
195         mandatory true;
196         description
197           "Assigned flexo instance type";
198       }
199       leaf-list iid {
200         type uint8;
201         min-elements 1;
202         ordered-by user;
203         description
204           "A list of FlexO instance identification (G.709.1 clause 9.2.3)";
205       }
206       leaf-list accepted-group-id {
207         type uint32;
208         description
209           "AcGID[1]..AcGID[n] on a per FlexO instance basis (G.798 2019-12, Figure 15-10 FlexO-n/OTUCn_A_Sk processes)";
210       }
211       leaf-list accepted-iid {
212         type uint8;
213         description
214           "AcIID[1]..AcIID[n] on a per FlexO instance basis (G.798 2019-12, Figure 15-10 FlexO-n/OTUCn_A_Sk processes)";
215       }
216     }
217   }
218
219   grouping otsi-container {
220     description
221       "OTSI container group";
222     container otsi {
223       description
224         "OTSi container";
225       uses org-openroadm-optical-tributary-signal-interfaces:otsi-attributes;
226     }
227   }
228
229   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
230     when "org-openroadm-device:type = 'openROADM-if:otsi'";
231     description
232       "augment for otsi";
233     uses org-openroadm-optical-tributary-signal-interfaces:otsi-container;
234   }
235 }