Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran / yang / o-ran-transceiver.yang
1 module o-ran-transceiver {
2   yang-version 1.1;
3   namespace "urn:o-ran:transceiver:1.0";
4   prefix "o-ran-transceiver";
5
6   import o-ran-interfaces {
7     prefix "o-ran-int";
8   }
9
10   import ietf-interfaces {
11     prefix "if";
12   }
13
14   organization "O-RAN Alliance";
15
16   contact
17     "www.o-ran.org";
18
19   description
20     "This module defines the operational state data for SFP transceivers used in
21     an O-RAN Radio Unit.
22
23     Copyright 2019 the O-RAN Alliance.
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 O-RAN Alliance 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 "2019-07-03" {
50     description
51       "version 2.0.0
52
53       1) introduction of reporting for QSFP.
54       2) backward compatible changes to introduce groupings.";
55
56     reference "ORAN-WG4.M.0-v02.00";
57   }
58
59   revision "2019-02-04" {
60     description
61       "version 1.0.0
62
63       1) imported model from xRAN
64       2) changed namespace and reference from xran to o-ran";
65
66     reference "ORAN-WG4.M.0-v01.00";
67   }
68
69
70   // Groupings
71
72   grouping transceiver-group {
73     list port-transceiver-data {
74       key "interface-name port-number";
75       description "data recovered from port transceivers";
76       leaf interface-name {
77         type leafref {
78           path "/if:interfaces/if:interface/if:name";
79         }
80         description "Name of interface";
81       }
82       leaf port-number {
83         type leafref {
84           //checkAL added o-ran-transceiver:  before interface-name
85           path "/if:interfaces/if:interface[if:name = current()/../o-ran-transceiver:interface-name]" + "/o-ran-int:port-reference/o-ran-int:port-number";
86         }
87         description
88         "A number which identifies a port. In case of SFP/SFP+
89         port, port number value is 0 to N-1 where N is number of ports
90         in the device. Numbers 0 to N-1 are assigned to ports in order
91         following order of labels on the device (labels for ports are
92         not necessarily numbers starting from zero)";
93       }
94
95       leaf name {
96         type string {
97           length "1..255";
98         }
99         description
100           "A name that is unique across the O-RU that identifies a transceiver instance.
101           This name may be used in fault management to refer to a fault source
102           or affected object";
103       }
104
105       leaf present {
106         type boolean;
107         config false;
108         mandatory true;
109         description
110           "Indicates if pluggable transceiver module is present.";
111       }
112
113       leaf vendor-id {
114         type string {
115           length 1..16;
116         }
117         config false;
118         description
119           "Name of the transciever vendor Full name of transceiver vendor,
120           that contains ASCII characters, left-aligned with
121           any padding on the right with ASCII spaces (20h), or ASCII nul
122           (00h) removed, and ASCII less-than (3Ch) replaced with ASCII
123           open-brace (7Bh) and ASCII more-than (3Eh) replaced with ASCII
124           close-brace (7Dh).
125
126           Optional node included when the NETCONF Server has determined
127           the vendor ID.";
128       }
129
130       leaf vendor-part {
131         type string {
132           length 1..16;
133         }
134         config false;
135         description
136           "Transceiver vendors part number, that contains ASCII characters,
137           left-aligned with any padding on the right with ASCII spaces
138           (20h), or ASCII nul (00h) removed, and ASCII less-than (3Ch)
139           replaced with ASCII open-brace (7Bh) and ASCII more-than (3Eh)
140           replaced with ASCII close-brace (7Dh).
141
142           Optional node included when the NETCONF Server has determined
143           the vendor part number.";
144       }
145
146       leaf vendor-rev {
147         type string {
148           length 1..2;
149         }
150         config false;
151         description
152           "Transceiver vendors revision number. 2-octet field that
153           contains ASCII characters.
154
155           Optional node included when the NETCONF Server has determined
156           the vendor revision number";
157       }
158
159       leaf serial-no {
160         type string {
161           length 1..16;
162         }
163         config false;
164         description
165           "Transceiver serial number encoded using ASCII characters,
166           left-aligned with any padding on the right with ASCII spaces
167           (20h), or ASCII nul (00h) removed, and ASCII less-than (3Ch)
168           replaced with ASCII open-brace (7Bh) and ASCII more-than (3Eh)
169           replaced with ASCII close-brace (7Dh).
170
171           Optional node included when the NETCONF Server has determined
172           the serial number.";
173       }
174
175       leaf SFF8472-compliance-code {
176         type enumeration {
177           enum diagnostics-undefined {
178             description "undefined compliance code";
179           }
180           enum rev9.3-diagnostics {
181             description "diagnostics published 08-01-02";
182           }
183           enum rev9.5-diagnostics{
184             description "diagnostics published 06-01-04";
185           }
186           enum rev10.2-diagnostics{
187             description "diagnostics published 06-01-07";
188           }
189           enum rev11.0-diagnostics{
190             description "diagnostics published 05-21-10";
191           }
192           enum rev11.3-diagnostics{
193             description "diagnostics published 06-11-13";
194           }
195           enum rev11.4-diagnostics{
196             description "diagnostics published 07-24-14";
197           }
198           enum rev12.0-diagnostics{
199             description "diagnostics published 08-28-14";
200           }
201         }
202         config false;
203         description
204           "Indication of which feature set(s) are
205           implemented in the transceiver from Byte 94 of address A0h
206           https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF
207
208           Optional node included when the NETCONF Server has determined
209           the compliance code.";
210
211         reference "https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF";
212       }
213
214        leaf connector-type {
215         type enumeration {
216           enum unknown {
217             description "encoded as 00h in Table 4-3 of SFF-8024";
218           }
219           enum subscrber-connector {
220             description "encoded as 01h in Table 4-3 of SFF-8024";
221           }
222           enum fiber-jack {
223             description "encoded as 06h in Table 4-3 of SFF-8024";
224           }
225           enum lucent-connector {
226             description "encoded as 07h in Table 4-3 of SFF-8024";
227           }
228           enum mt-rj {
229             description "encoded as 08h in Table 4-3 of SFF-8024";
230           }
231           enum multiple-optical {
232             description "encoded as 09h in Table 4-3 of SFF-8024";
233           }
234           enum sg {
235             description "encoded as 0Ah in Table 4-3 of SFF-8024";
236           }
237           enum optical-pigtail {
238             description "encoded as 0Bh in Table 4-3 of SFF-8024";
239           }
240           enum multi-fiber-parralel-optic-1x12 {
241             description "encoded as 0Ch in Table 4-3 of SFF-8024";
242           }
243           enum multi-fiber-parralel-optic-2x16 {
244             description "encoded as 0Dh in Table 4-3 of SFF-8024";
245           }
246           enum hssdc_2{
247             description "encoded as 20h in Table 4-3 of SFF-8024";
248           }
249           enum copper-pigtail{
250             description "encoded as 21h in Table 4-3 of SFF-8024";
251           }
252           enum rj45{
253             description "encoded as 22h in Table 4-3 of SFF-8024";
254           }
255           enum no-separable-connector{
256             description "encoded as 23h in Table 4-3 of SFF-8024";
257           }
258           enum mxc-2x16{
259             description "encoded as 24h in Table 4-3 of SFF-8024";
260           }
261         }
262         config false;
263         // TOCHECK: Remove any enumerations which are not applicable
264         description
265           "Connector-type indicates the external optical or electrical cable
266           connector provided as the media interface as defined in the connector
267           types derived from table 4-3 in SFF-8024.
268
269           Optional node included when the NETCONF Server has determined
270           the connector type.";
271         reference "https://ta.snia.org/higherlogic/ws/public/document?document_id=944";
272       }
273
274       leaf identifier {
275         type enumeration {
276           enum unknown {
277             description "encoded as 00h in Table 4-1 of SFF-8024";
278           }
279           enum gbic {
280             description "encoded as 01h in Table 4-1 of SFF-8024";
281           }
282           enum soldered {
283             description "encoded as 02h in Table 4-1 of SFF-8024";
284           }
285           enum sfp {
286             description "encoded as 03h in Table 4-1 of SFF-8024";
287           }
288           enum xbi {
289             description "encoded as 04h in Table 4-1 of SFF-8024";
290           }
291           enum xenpack {
292             description "encoded as 05h in Table 4-1 of SFF-8024";
293           }
294           enum xfp {
295             description "encoded as 06h in Table 4-1 of SFF-8024";
296           }
297           enum xff {
298             description "encoded as 07h in Table 4-1 of SFF-8024";
299           }
300           enum xfp-e {
301             description "encoded as 08h in Table 4-1 of SFF-8024";
302           }
303           enum xpak {
304             description "encoded as 09h in Table 4-1 of SFF-8024";
305           }
306           enum x2 {
307             description "encoded as 0Ah in Table 4-1 of SFF-8024";
308           }
309           enum dwdm-sfp {
310             description "encoded as 0Bh in Table 4-1 of SFF-8024";
311           }
312           enum qsfp {
313             description "encoded as 0Ch in Table 4-1 of SFF-8024";
314           }
315           enum qsfp+ {
316             description "encoded as 0Dh in Table 4-1 of SFF-8024";
317           }
318         }
319         config false;
320         description
321           "Connector identifier as defined in the identifer
322           types derived from table 4-1 in SFF-8024.
323
324           Optional node included when the NETCONF Server has determined
325           the identifier type.";
326         reference "https://members.snia.org/document/dl/26423";
327       }
328
329       leaf nominal-bitrate {
330         type uint32;
331         config false;
332         description
333           "Nominal bitrate in Mb/s (10^6 bits per second).
334           If needed actual value is rounded to nearest integer.
335
336           Optional node included when the NETCONF Server has determined
337           the nominal bit rate.";
338       }
339
340       leaf low-bitrate-margin {
341         type uint8;
342         config false;
343         description
344           "Minimum supported bitrate as percentage of nominal bitrate
345           below nominal bitrate.
346
347           Optional node included when the NETCONF Server has determined
348           the low bit rate margin";
349       }
350
351       leaf high-bitrate-margin {
352         type uint8;
353         config false;
354         description
355           "Maximum supported bitrate as percentage of nominal bitrate
356           above nominal bitrate.
357
358           Optional node included when the NETCONF Server has determined
359           the high bitrate margin.";
360       }
361
362       leaf rx-power-type {
363         type enumeration {
364           enum oma {
365             description "oma = optical modulation amplitude";
366           }
367           enum avp{
368             description "avp = average power";
369           }
370         }
371         config false;
372         description
373           "Receieved power measurement type
374           oma = optical modulation amplitude
375           avp = average power
376
377           Optional node included when the NETCONF Server has determined
378           the rx power type.";
379       }
380
381       leaf rx-power {
382         type decimal64{
383           fraction-digits 4;
384         }
385         config false;
386         description
387           "Measured RX input power in mW.
388
389           Optional node included when the NETCONF Server has determined
390           the measured RX power.
391
392           If operating with QSFP, this power corresponds to that of
393           Lane/Channel 1.";
394       }
395
396       leaf tx-power {
397         type decimal64{
398           fraction-digits 4;
399         }
400         config false;
401         description
402           "Measured coupled TX output power in mW.
403
404           Optional node included when the NETCONF Server has determined
405           the measured coupled TX power.";
406       }
407
408       leaf tx-bias-current {
409         type decimal64{
410           fraction-digits 4;
411         }
412         config false;
413         description
414           "Measured transmitter laser bias current in mA.
415
416           Optional node included when the NETCONF Server has determined
417           the tx bias current.
418
419           If operating with QSFP, this bias current corresponds to that of
420           Lane/Channel 1.";
421       }
422
423       leaf voltage {
424         type decimal64{
425           fraction-digits 4;
426         }
427         config false;
428         description
429           "Internally measured supply voltage in mV.
430
431           Optional node included when the NETCONF Server has determined
432           the internally measured voltage.";
433       }
434
435       leaf temperature {
436         type decimal64 {
437           fraction-digits 4;
438         }
439         config false;
440         description
441           "Internally measured module temperature in degrees Celcius.
442
443           Optional node included when the NETCONF Server has determined
444           the temperature.";
445       }
446
447       list additional-multi-lane-reporting {
448         when "(../identifier ='qsfp')or(../identifier ='qsfp+')";
449         config false;
450         description
451           "Additional reporting according to SFF8436 which specifies real time
452           channel monitoring for each transmit and receive channel and includes
453           optical input power and Tx bias current. ";
454         key lane;
455         leaf lane {
456           type uint8 {
457             range "2..4";
458           }
459           description
460             "the specific lane/channel associated with the report parameters";
461         }
462         leaf rx-power {
463           type decimal64{
464             fraction-digits 4;
465           }
466           config false;
467           description
468             "Measured RX input power in mW.
469
470             Optional node included when the NETCONF Server has determined
471             the measured RX power for a particular lane/channel
472             - see tabel 7-10 of SFF-8636.";
473         }
474         leaf tx-bias-current {
475           type decimal64{
476             fraction-digits 4;
477           }
478           config false;
479           description
480             "Measured transmitter laser bias current in mA.
481
482             Optional node included when the NETCONF Server has determined
483             the tx bias current for a particular lane/channel
484             - see tabel 7-10 of SFF-8636.";
485         }
486         leaf tx-power {
487           type decimal64{
488             fraction-digits 4;
489           }
490           config false;
491           description
492             "Measured coupled TX output power in mW.
493
494             Optional node included when the NETCONF Server has determined
495             the measured coupled TX power or a particular lane/channel
496             - see tabel 7010 of SFF-8636.";
497         }
498       }
499     }
500
501   }
502
503   // Top Level Container
504
505   container port-transceivers {
506     description
507       "Container for Port transceiver information.
508       Leaf nodes providing  parameters status and diagnostic
509       information for pluggable transceiver module (like SFP,
510       SFP+, SFP28)";
511
512     uses transceiver-group;
513   }
514 }