Merge "Fix bug when creating SRG termination points"
[transportpce.git] / ordmodels / device / src / main / yang / org-openroadm-otn-common@2020-03-27.yang
1 module org-openroadm-otn-common {
2   namespace "http://org/openroadm/otn-common";
3   prefix org-openroadm-otn-common;
4
5   import org-openroadm-resource-types {
6     prefix org-openroadm-resource-types;
7     revision-date 2019-11-29;
8   }
9   import org-openroadm-otn-common-types {
10     prefix org-openroadm-otn-common-types;
11     revision-date 2020-03-27;
12   }
13   import org-openroadm-common-attributes {
14     prefix org-openroadm-common-attributes;
15     revision-date 2020-03-27;
16   }
17
18   organization
19     "Open ROADM MSA";
20   contact
21     "OpenROADM.org";
22   description
23     "YANG definitions for common OTN interface attributes and types.
24
25      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
26      All other rights reserved.
27
28      Redistribution and use in source and binary forms, with or without modification,
29      are permitted provided that the following conditions are met:
30
31      * Redistributions of source code must retain the above copyright notice, this
32        list of conditions and the following disclaimer.
33      * Redistributions in binary form must reproduce the above copyright notice,
34        this list of conditions and the following disclaimer in the documentation and/or
35        other materials provided with the distribution.
36      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
37        contributors may be used to endorse or promote products derived from this software
38        without specific prior written permission.
39
40      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
41      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
43      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
44      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
46      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
47      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49      POSSIBILITY OF SUCH DAMAGE.
50
51      Also contains code components extracted from IETF Interfaces.  These code components
52      are copyrighted and licensed as follows:
53
54      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
55      All rights reserved.
56
57      This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
58      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
59      publication of this document. Please review these documents carefully, as they
60      describe your rights and restrictions with respect to this document. Code Components
61      extracted from this document must include Simplified BSD License text as described in
62      Section 4.e of the Trust Legal Provisions and are provided without warranty as
63      described in the Simplified BSD License.";
64
65   revision 2020-03-27 {
66     description
67       "Version 7.0.0";
68   }
69   revision 2019-11-29 {
70     description
71       "Version 6.1.0";
72   }
73   revision 2019-09-27 {
74     description
75       "Version 6.0.0";
76   }
77   revision 2018-11-30 {
78     description
79       "Version 4.1.0";
80   }
81   revision 2018-09-28 {
82     description
83       "Version 4.0";
84   }
85   revision 2017-06-26 {
86     description
87       "Version 2.0";
88   }
89
90   typedef otn-interface-enum {
91     type enumeration {
92       enum otu {
93         value 1;
94         description
95           "OTU enumeration";
96       }
97       enum odu-path {
98         value 2;
99         description
100           "ODU Path enumeration";
101       }
102       enum odu-tcm {
103         value 3;
104         description
105           "ODU TCM enumeration";
106       }
107     }
108     description
109       "Enumeration type for otn interface";
110   }
111
112   grouping trail-trace-state {
113     description
114       "Trail trace state grouping";
115     leaf accepted-sapi {
116       type string;
117       config false;
118       description
119         "The accepted SAPI recovered from the received multi-frame TTI field.
120          Received SAPI contains the receive data, minus the sapi[0] and any 0x00 padding at the end";
121     }
122     leaf accepted-dapi {
123       type string;
124       config false;
125       description
126         "The accepted DAPI recovered from the received multi-frame TTI field
127          Received DAPI contains the receive data, minus the dapi[0] and any 0x00 padding at the end";
128     }
129     leaf accepted-operator {
130       type string;
131       config false;
132       description
133         "The accepted Operator Specific field recovered from the received multi-frame TTI field";
134     }
135   }
136
137   grouping trail-trace {
138     description
139       "Trail trace grouping";
140     uses org-openroadm-common-attributes:trail-trace-tx;
141     uses trail-trace-state;
142     uses org-openroadm-common-attributes:trail-trace-other;
143   }
144
145   notification otn-tti-info-change {
146     description
147       "Notification for OTN TTI";
148     leaf resource-type {
149       type org-openroadm-resource-types:resource-type-enum;
150       mandatory true;
151       description
152         "Resource type for OTN TTI";
153     }
154     leaf resource {
155       type string;
156       mandatory true;
157       description
158         "Resource for OTN TTI";
159     }
160     leaf otn-interface-type {
161       type otn-interface-enum;
162       mandatory true;
163       description
164         "OTN interface type for TTI";
165     }
166     leaf otn-interface-tcm-layer {
167       when "../otn-interface-type='odu-tcm'";
168       type uint8;
169       description
170         "TCM layer for OTN TTI";
171     }
172     leaf otn-interface-tcm-direction {
173       when "../otn-interface-type='odu-tcm'";
174       type org-openroadm-otn-common-types:tcm-direction-enum;
175       description
176         "TCM direction for OTN TTI";
177     }
178     container tti-info {
179       description
180         "Container for TTI info";
181       leaf accepted-sapi {
182         type string;
183         description
184           "Accepted SAPI for TTI";
185       }
186       leaf accepted-dapi {
187         type string;
188         description
189           "Accepted DAPI for TTI";
190       }
191       leaf accepted-operator {
192         type string;
193         description
194           "Accepted operator for TTI";
195       }
196     }
197   }
198 }