Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / deploy / x-ran / yang / 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           //checkAL added prefix to interface-name
76           path "/if:interfaces/if:interface[if:name = current()/../xran-transceiver:interface-name]/xran-int:port-reference/xran-int:xran-port-number";
77         }
78         description
79         "A number which identifies a port. In case of SFP/SFP+
80         port, port number value is 0 to N-1 where N is number of ports
81         in the device. Numbers 0 to N-1 are assigned to ports in order
82         following order of labels on the device (labels for ports are
83         not necessarily numbers starting from zero)";
84       }
85
86       leaf name {
87         type string {
88           length "1..255";
89         }
90         description
91           "A name that is unique across the RU that identifies a transceiver instance.
92           This name may be used in fault management to refer to a fault source
93           or affected object";
94       }
95
96       leaf present {
97         type boolean;
98         config false;
99         mandatory true;
100         description
101           "Indicates if pluggable transceiver module is present.";
102       }
103
104       leaf vendor-id {
105         type string {
106           length 1..16;
107         }
108         config false;
109         description
110           "Name of the transciever vendor Full name of transceiver vendor,
111           that contains ASCII characters, left-aligned with
112           any padding on the right with ASCII spaces (20h), or ASCII nul
113           (00h) removed, and ASCII less-than (3Ch) replaced with ASCII
114           open-brace (7Bh) and ASCII more-than (3Eh) replaced with ASCII
115           close-brace (7Dh).
116
117           Optional node included when the NETCONF Server has determined
118           the vendor ID.";
119       }
120
121       leaf vendor-part {
122         type string {
123           length 1..16;
124         }
125         config false;
126         description
127           "Transceiver vendors part number, that contains ASCII characters,
128           left-aligned with any padding on the right with ASCII spaces
129           (20h), or ASCII nul (00h) removed, and ASCII less-than (3Ch)
130           replaced with ASCII open-brace (7Bh) and ASCII more-than (3Eh)
131           replaced with ASCII close-brace (7Dh).
132
133           Optional node included when the NETCONF Server has determined
134           the vendor part number.";
135       }
136
137       leaf vendor-rev {
138         type string {
139           length 1..2;
140         }
141         config false;
142         description
143           "Transceiver vendors revision number. 2-octet field that
144           contains ASCII characters.
145
146           Optional node included when the NETCONF Server has determined
147           the vendor revision number";
148       }
149
150       leaf serial-no {
151         type string {
152           length 1..16;
153         }
154         config false;
155         description
156           "Transceiver serial number encoded using ASCII characters,
157           left-aligned with any padding on the right with ASCII spaces
158           (20h), or ASCII nul (00h) removed, and ASCII less-than (3Ch)
159           replaced with ASCII open-brace (7Bh) and ASCII more-than (3Eh)
160           replaced with ASCII close-brace (7Dh).
161
162           Optional node included when the NETCONF Server has determined
163           the serial number.";
164       }
165
166       leaf SFF8472-compliance-code {
167         type enumeration {
168           enum diagnostics-undefined {
169             description "undefined compliance code";
170           }
171           enum rev9.3-diagnostics {
172             description "diagnostics published 08-01-02";
173           }
174           enum rev9.5-diagnostics{
175             description "diagnostics published 06-01-04";
176           }
177           enum rev10.2-diagnostics{
178             description "diagnostics published 06-01-07";
179           }
180           enum rev11.0-diagnostics{
181             description "diagnostics published 05-21-10";
182           }
183           enum rev11.3-diagnostics{
184             description "diagnostics published 06-11-13";
185           }
186           enum rev11.4-diagnostics{
187             description "diagnostics published 07-24-14";
188           }
189           enum rev12.0-diagnostics{
190             description "diagnostics published 08-28-14";
191           }
192         }
193         config false;
194         description
195           "Indication of which feature set(s) are
196           implemented in the transceiver from Byte 94 of address A0h
197           https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF";
198
199           // FIXME is this optional or mandatory?
200         reference "https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF";
201       }
202
203        leaf connector-type {
204         type enumeration {
205           enum unknown {
206             description "encoded as 00h in Table 4-3 of SFF-8024";
207           }
208           enum subscrber-connector {
209             description "encoded as 01h in Table 4-3 of SFF-8024";
210           }
211           enum fiber-jack {
212             description "encoded as 06h in Table 4-3 of SFF-8024";
213           }
214           enum lucent-connector {
215             description "encoded as 07h in Table 4-3 of SFF-8024";
216           }
217           enum mt-rj {
218             description "encoded as 08h in Table 4-3 of SFF-8024";
219           }
220           enum multiple-optical {
221             description "encoded as 09h in Table 4-3 of SFF-8024";
222           }
223           enum sg {
224             description "encoded as 0Ah in Table 4-3 of SFF-8024";
225           }
226           enum optical-pigtail {
227             description "encoded as 0Bh in Table 4-3 of SFF-8024";
228           }
229           enum multi-fiber-parralel-optic-1x12 {
230             description "encoded as 0Ch in Table 4-3 of SFF-8024";
231           }
232           enum multi-fiber-parralel-optic-2x16 {
233             description "encoded as 0Dh in Table 4-3 of SFF-8024";
234           }
235           enum hssdc_2{
236             description "encoded as 20h in Table 4-3 of SFF-8024";
237           }
238           enum copper-pigtail{
239             description "encoded as 21h in Table 4-3 of SFF-8024";
240           }
241           enum rj45{
242             description "encoded as 22h in Table 4-3 of SFF-8024";
243           }
244           enum no-separable-connector{
245             description "encoded as 23h in Table 4-3 of SFF-8024";
246           }
247           enum mxc-2x16{
248             description "encoded as 24h in Table 4-3 of SFF-8024";
249           }
250         }
251         config false;
252         // TOCHECK: Remove any enumerations which are not applicable
253         description
254           "Connector-type indicates the external optical or electrical cable
255           connector provided as the media interface as defined in the connector
256           types derived from table 4-3 in SFF-8024.";
257           // FIXME is this optional or mandatory?
258         reference "https://ta.snia.org/higherlogic/ws/public/document?document_id=944";
259       }
260
261       leaf nominal-bitrate {
262         type uint32;
263         config false;
264         description
265           "Nominal bitrate in Mb/s (10^6 bits per second).
266           If needed actual value is rounded to nearest integer.
267
268           Optional node included when the NETCONF Server has determined
269           the nominal bit rate.";
270       }
271
272       leaf low-bitrate-margin {
273         type uint8;
274         config false;
275         description
276           "Minimum supported bitrate as percentage of nominal bitrate
277           below nominal bitrate.
278
279           Optional node included when the NETCONF Server has determined
280           the low bit rate margin";
281       }
282
283       leaf high-bitrate-margin {
284         type uint8;
285         config false;
286         description
287           "Maximum supported bitrate as percentage of nominal bitrate
288           above nominal bitrate.
289
290           Optional node included when the NETCONF Server has determined
291           the high bitrate margin.";
292       }
293
294       leaf rx-power-type {
295         type enumeration {
296           enum oma {
297             description "oma = optical modulation amplitude";
298           }
299           enum avp{
300             description "avp = average power";
301           }
302         }
303         config false;
304         description
305           "Receieved power measurement type
306           oma = optical modulation amplitude
307           avp = average power";
308           // FIXME is this optional or mandatory?
309       }
310
311       leaf rx-power {
312         type decimal64{
313           fraction-digits 4;
314         }
315         config false;
316         description
317           "Measured RX input power in mW.
318
319           Optional node included when the NETCONF Server has determined
320           the measured RX power.";
321       }
322
323       leaf tx-power {
324         type decimal64{
325           fraction-digits 4;
326         }
327         config false;
328         description
329           "Measured coupled TX output power in mW.
330
331           Optional node included when the NETCONF Server has determined
332           the measured coupled TX power.";
333       }
334
335       leaf tx-bias-current {
336         type decimal64{
337           fraction-digits 4;
338         }
339         config false;
340         description
341           "Measured transmitter laser bias current in mA.
342
343           Optional node included when the NETCONF Server has determined
344           the tx bias current.";
345       }
346
347       leaf voltage {
348         type decimal64{
349           fraction-digits 4;
350         }
351         config false;
352         description
353           "Internally measured supply voltage in mV.
354
355           Optional node included when the NETCONF Server has determined
356           the internally measured voltage.";
357       }
358
359       leaf temperature {
360         type decimal64 {
361           fraction-digits 4;
362         }
363         config false;
364         description
365           "Internally measured module temperature in degrees Celcius.";
366           // FIXME is this optional or mandatory?
367       }
368     }
369   }
370 }