Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-optical-channel-interfaces@2020-05-29.yang
1 module org-openroadm-optical-channel-interfaces {
2   namespace "http://org/openroadm/optical-channel-interfaces";
3   prefix org-openroadm-optical-channel-interfaces;
4
5   import org-openroadm-device {
6     prefix org-openroadm-device;
7     revision-date 2020-05-29;
8   }
9   import org-openroadm-interfaces {
10     prefix openROADM-if;
11     revision-date 2019-11-29;
12   }
13   import org-openroadm-common-link-types {
14     prefix org-openroadm-common-link-types;
15     revision-date 2019-11-29;
16   }
17   import org-openroadm-common-optical-channel-types {
18     prefix org-openroadm-common-optical-channel-types;
19     revision-date 2020-05-29;
20   }
21   import org-openroadm-optical-operational-interfaces {
22     prefix org-openroadm-optical-operational-interfaces;
23     revision-date 2020-05-29;
24   }
25
26   organization
27     "Open ROADM MSA";
28   contact
29     "OpenROADM.org";
30   description
31     "YANG definitions for device facility och interfaces.
32
33      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
34      All other rights reserved.
35
36      Redistribution and use in source and binary forms, with or without modification,
37      are permitted provided that the following conditions are met:
38
39      * Redistributions of source code must retain the above copyright notice, this
40        list of conditions and the following disclaimer.
41      * Redistributions in binary form must reproduce the above copyright notice,
42        this list of conditions and the following disclaimer in the documentation and/or
43        other materials provided with the distribution.
44      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
45        contributors may be used to endorse or promote products derived from this software
46        without specific prior written permission.
47
48      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
49      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
51      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
52      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
53      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
54      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
55      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57      POSSIBILITY OF SUCH DAMAGE.
58
59      Also contains code components extracted from IETF Interfaces.  These code components
60      are copyrighted and licensed as follows:
61
62      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
63      All rights reserved.
64
65      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
66      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
67      publication of this document. Please review these documents carefully, as they
68      describe your rights and restrictions with respect to this document. Code Components
69      extracted from this document must include Simplified BSD License text as described in
70      Section 4.e of the Trust Legal Provisions and are provided without warranty as
71      described in the Simplified BSD License.";
72
73   revision 2020-05-29 {
74     description
75       "Version 7.1.0";
76   }
77   revision 2020-03-27 {
78     description
79       "Version 7.0.0";
80   }
81   revision 2019-11-29 {
82     description
83       "Version 6.1.0";
84   }
85   revision 2019-09-27 {
86     description
87       "Version 6.0.0";
88   }
89   revision 2019-05-31 {
90     description
91       "Version 5.1.0";
92   }
93   revision 2019-03-29 {
94     description
95       "Version 5.0.0";
96   }
97   revision 2018-11-30 {
98     description
99       "Version 4.1.0";
100   }
101   revision 2018-05-30 {
102     description
103       "Version 3.1.0";
104   }
105   revision 2018-03-30 {
106     description
107       "Version 3.0.0";
108   }
109   revision 2017-12-15 {
110     description
111       "Version 2.2";
112   }
113   revision 2017-09-29 {
114     description
115       "Version 2.1";
116   }
117   revision 2017-07-28 {
118     description
119       "Version 2.0.1 - added revision-date to imports";
120   }
121   revision 2017-06-26 {
122     description
123       "Version 2.0";
124   }
125   revision 2016-10-14 {
126     description
127       "Version 1.2";
128   }
129
130   grouping och-attributes {
131     description
132       "Optical Channel attributes";
133     leaf provision-mode {
134       type org-openroadm-common-optical-channel-types:provision-mode-type;
135       default "explicit";
136       description
137         "The provision-mode specified by the controller. Default to 'explicit' (ie, the set of optical parameter specified in MSA Optical Spec).
138          The 'profile' provision-mode is introduced in MSA 5.0 to support the bookended xponder application";
139     }
140     leaf rate {
141       when "../provision-mode = 'explicit'";
142       type identityref {
143         base org-openroadm-common-optical-channel-types:och-rate-identity;
144       }
145       description
146         "rate";
147     }
148     leaf frequency {
149       type org-openroadm-common-optical-channel-types:frequency-THz;
150       description
151         "Center Frequency in THz.";
152     }
153     leaf width {
154       when "../provision-mode = 'explicit'";
155       type org-openroadm-common-optical-channel-types:frequency-GHz;
156       config false;
157       description
158         "Frequency width in GHz.";
159     }
160     leaf modulation-format {
161       when "../provision-mode = 'explicit'";
162       type org-openroadm-common-optical-channel-types:modulation-format;
163       description
164         "Modulation format";
165     }
166     leaf transmit-power {
167       type org-openroadm-common-link-types:power-dBm;
168       description
169         "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";
170     }
171     leaf optical-operational-mode {
172       type string;
173       description
174         "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.";
175     }
176     container operational-mode-params {
177       when "../provision-mode = 'profile'";
178       config false;
179       description
180         "The container containing the optical parameters for the specified operational mode.";
181       uses org-openroadm-optical-operational-interfaces:optical-operational-modes-grp-attr;
182     }
183   }
184
185   grouping och-container {
186     description
187       "OCH container group";
188     container och {
189       description
190         "Optical Channel (OCh):
191          Models the optical channel interfaces for an Optical White Box.";
192       uses och-attributes;
193     }
194   }
195
196   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
197     when "org-openroadm-device:type = 'openROADM-if:opticalChannel'";
198     description
199       "augment for optical channel container";
200     uses och-container;
201   }
202 }