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