Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / x-ran / xran-transceiver.yang
1 module xran-transceiver {
2   yang-version 1.1;
3   namespace "urn:xran:transceiver:1.0";
4   prefix "xran-transceiver";
5
6   import xran-interfaces {
7     prefix "xran-int";
8   }
9
10   import ietf-interfaces {
11     prefix "if";
12   }
13
14   organization "xRAN Forum";
15
16   contact
17     "www.xran.org";
18
19   description
20     "This module defines the operational state data for SFP transceivers used in
21     an xRAN Radio Unit.
22
23     Copyright 2018 the xRAN Forum.
24
25     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
26     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35     POSSIBILITY OF SUCH DAMAGE.
36
37     Redistribution and use in source and binary forms, with or without
38     modification, are permitted provided that the following conditions are met:
39
40     * Redistributions of source code must retain the above copyright notice,
41     this list of conditions and the above disclaimer.
42     * Redistributions in binary form must reproduce the above copyright notice,
43     this list of conditions and the above disclaimer in the documentation
44     and/or other materials provided with the distribution.
45     * Neither the Members of the xRAN Forum nor the names of its
46     contributors may be used to endorse or promote products derived from
47     this software without specific prior written permission.";
48
49   revision "2018-07-20" {
50     description
51       "version 1.0.0 - First release of the xRAN YANG M-Plane models.
52
53       This version of the model supports v01.00 of the corrsponding xRAN
54       M-Plane Specification.";
55     reference "XRAN-FH.MP.0-v01.00";
56   }
57
58   container port-transceivers {
59     description
60       "Container for Port transceiver information.
61       Leaf nodes providing  parameters status and diagnostic
62       information for pluggable transceiver module (like SFP,
63       SFP+, SFP28)";
64     list port-transceiver-data {
65       key "interface-name port-number";
66       description "data recovered from port transceivers";
67       leaf interface-name {
68         type leafref {
69           path "/if:interfaces/if:interface/if:name";
70         }
71         description "Name of interface";
72       }
73       leaf port-number {
74         type leafref {
75           path "/if:interfaces/if:interface[if:name = current()/../interface-name]/xran-int:port-reference/xran-int:xran-port-number";
76         }
77         description
78         "A number which identifies a port. In case of SFP/SFP+
79         port, port number value is 0 to N-1 where N is number of ports
80         in the device. Numbers 0 to N-1 are assigned to ports in order
81         following order of labels on the device (labels for ports are
82         not necessarily numbers starting from zero)";
83       }
84
85       leaf name {
86         type string {
87           length "1..255";
88         }
89         description
90           "A name that is unique across the RU that identifies a transceiver instance.
91           This name may be used in fault management to refer to a fault source
92           or affected object";
93       }
94
95       leaf present {
96         type boolean;
97         config false;
98         mandatory true;
99         description
100           "Indicates if pluggable transceiver module is present.";
101       }
102
103       leaf vendor-id {
104         type string {
105           length 1..16;
106         }
107         config false;
108         description
109           "Name of the transciever vendor Full name of transceiver vendor,
110           that contains ASCII characters, left-aligned with
111           any padding on the right with ASCII spaces (20h), or ASCII nul
112           (00h) removed, and ASCII less-than (3Ch) replaced with ASCII
113           open-brace (7Bh) and ASCII more-than (3Eh) replaced with ASCII
114           close-brace (7Dh).
115
116           Optional node included when the NETCONF Server has determined
117           the vendor ID.";
118       }
119
120       leaf vendor-part {
121         type string {
122           length 1..16;
123         }
124         config false;
125         description
126           "Transceiver vendors part number, that contains ASCII characters,
127           left-aligned with any padding on the right with ASCII spaces
128           (20h), or ASCII nul (00h) removed, and ASCII less-than (3Ch)
129           replaced with ASCII open-brace (7Bh) and ASCII more-than (3Eh)
130           replaced with ASCII close-brace (7Dh).
131
132           Optional node included when the NETCONF Server has determined
133           the vendor part number.";
134       }
135
136       leaf vendor-rev {
137         type string {
138           length 1..2;
139         }
140         config false;
141         description
142           "Transceiver vendors revision number. 2-octet field that
143           contains ASCII characters.
144
145           Optional node included when the NETCONF Server has determined
146           the vendor revision number";
147       }
148
149       leaf serial-no {
150         type string {
151           length 1..16;
152         }
153         config false;
154         description
155           "Transceiver serial number encoded using ASCII characters,
156           left-aligned with any padding on the right with ASCII spaces
157           (20h), or ASCII nul (00h) removed, and ASCII less-than (3Ch)
158           replaced with ASCII open-brace (7Bh) and ASCII more-than (3Eh)
159           replaced with ASCII close-brace (7Dh).
160
161           Optional node included when the NETCONF Server has determined
162           the serial number.";
163       }
164
165       leaf SFF8472-compliance-code {
166         type enumeration {
167           enum diagnostics-undefined {
168             description "undefined compliance code";
169           }
170           enum rev9.3-diagnostics {
171             description "diagnostics published 08-01-02";
172           }
173           enum rev9.5-diagnostics{
174             description "diagnostics published 06-01-04";
175           }
176           enum rev10.2-diagnostics{
177             description "diagnostics published 06-01-07";
178           }
179           enum rev11.0-diagnostics{
180             description "diagnostics published 05-21-10";
181           }
182           enum rev11.3-diagnostics{
183             description "diagnostics published 06-11-13";
184           }
185           enum rev11.4-diagnostics{
186             description "diagnostics published 07-24-14";
187           }
188           enum rev12.0-diagnostics{
189             description "diagnostics published 08-28-14";
190           }
191         }
192         config false;
193         description
194           "Indication of which feature set(s) are
195           implemented in the transceiver from Byte 94 of address A0h
196           https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF";
197
198           // FIXME is this optional or mandatory?
199         reference "https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF";
200       }
201
202        leaf connector-type {
203         type enumeration {
204           enum unknown {
205             description "encoded as 00h in Table 4-3 of SFF-8024";
206           }
207           enum subscrber-connector {
208             description "encoded as 01h in Table 4-3 of SFF-8024";
209           }
210           enum fiber-jack {
211             description "encoded as 06h in Table 4-3 of SFF-8024";
212           }
213           enum lucent-connector {
214             description "encoded as 07h in Table 4-3 of SFF-8024";
215           }
216           enum mt-rj {
217             description "encoded as 08h in Table 4-3 of SFF-8024";
218           }
219           enum multiple-optical {
220             description "encoded as 09h in Table 4-3 of SFF-8024";
221           }
222           enum sg {
223             description "encoded as 0Ah in Table 4-3 of SFF-8024";
224           }
225           enum optical-pigtail {
226             description "encoded as 0Bh in Table 4-3 of SFF-8024";
227           }
228           enum multi-fiber-parralel-optic-1x12 {
229             description "encoded as 0Ch in Table 4-3 of SFF-8024";
230           }
231           enum multi-fiber-parralel-optic-2x16 {
232             description "encoded as 0Dh in Table 4-3 of SFF-8024";
233           }
234           enum hssdc_2{
235             description "encoded as 20h in Table 4-3 of SFF-8024";
236           }
237           enum copper-pigtail{
238             description "encoded as 21h in Table 4-3 of SFF-8024";
239           }
240           enum rj45{
241             description "encoded as 22h in Table 4-3 of SFF-8024";
242           }
243           enum no-separable-connector{
244             description "encoded as 23h in Table 4-3 of SFF-8024";
245           }
246           enum mxc-2x16{
247             description "encoded as 24h in Table 4-3 of SFF-8024";
248           }
249         }
250         config false;
251         // TOCHECK: Remove any enumerations which are not applicable
252         description
253           "Connector-type indicates the external optical or electrical cable
254           connector provided as the media interface as defined in the connector
255           types derived from table 4-3 in SFF-8024.";
256           // FIXME is this optional or mandatory?
257         reference "https://ta.snia.org/higherlogic/ws/public/document?document_id=944";
258       }
259
260       leaf nominal-bitrate {
261         type uint32;
262         config false;
263         description
264           "Nominal bitrate in Mb/s (10^6 bits per second).
265           If needed actual value is rounded to nearest integer.
266
267           Optional node included when the NETCONF Server has determined
268           the nominal bit rate.";
269       }
270
271       leaf low-bitrate-margin {
272         type uint8;
273         config false;
274         description
275           "Minimum supported bitrate as percentage of nominal bitrate
276           below nominal bitrate.
277
278           Optional node included when the NETCONF Server has determined
279           the low bit rate margin";
280       }
281
282       leaf high-bitrate-margin {
283         type uint8;
284         config false;
285         description
286           "Maximum supported bitrate as percentage of nominal bitrate
287           above nominal bitrate.
288
289           Optional node included when the NETCONF Server has determined
290           the high bitrate margin.";
291       }
292
293       leaf rx-power-type {
294         type enumeration {
295           enum oma {
296             description "oma = optical modulation amplitude";
297           }
298           enum avp{
299             description "avp = average power";
300           }
301         }
302         config false;
303         description
304           "Receieved power measurement type
305           oma = optical modulation amplitude
306           avp = average power";
307           // FIXME is this optional or mandatory?
308       }
309
310       leaf rx-power {
311         type decimal64{
312           fraction-digits 4;
313         }
314         config false;
315         description
316           "Measured RX input power in mW.
317
318           Optional node included when the NETCONF Server has determined
319           the measured RX power.";
320       }
321
322       leaf tx-power {
323         type decimal64{
324           fraction-digits 4;
325         }
326         config false;
327         description
328           "Measured coupled TX output power in mW.
329
330           Optional node included when the NETCONF Server has determined
331           the measured coupled TX power.";
332       }
333
334       leaf tx-bias-current {
335         type decimal64{
336           fraction-digits 4;
337         }
338         config false;
339         description
340           "Measured transmitter laser bias current in mA.
341
342           Optional node included when the NETCONF Server has determined
343           the tx bias current.";
344       }
345
346       leaf voltage {
347         type decimal64{
348           fraction-digits 4;
349         }
350         config false;
351         description
352           "Internally measured supply voltage in mV.
353
354           Optional node included when the NETCONF Server has determined
355           the internally measured voltage.";
356       }
357
358       leaf temperature {
359         type decimal64 {
360           fraction-digits 4;
361         }
362         config false;
363         description
364           "Internally measured module temperature in degrees Celcius.";
365           // FIXME is this optional or mandatory?
366       }
367     }
368   }
369 }