1 module openconfig-platform-transceiver {
6 namespace "http://openconfig.net/yang/platform/transceiver";
8 prefix "oc-transceiver";
10 // import some basic types
11 import openconfig-platform { prefix oc-platform; }
12 import openconfig-platform-port { prefix oc-port; }
13 import openconfig-interfaces { prefix oc-if; }
14 import openconfig-transport-types { prefix oc-opt-types; }
15 import openconfig-types { prefix oc-types; }
16 import openconfig-extensions { prefix oc-ext; }
17 import openconfig-yang-types { prefix oc-yang; }
21 organization "OpenConfig working group";
24 "OpenConfig working group
28 "This module defines configuration and operational state data
29 for transceivers (i.e., pluggable optics). The module should be
30 used in conjunction with the platform model where other
31 physical entity data are represented.
33 In the platform model, a component of type=TRANSCEIVER is
34 expected to be a subcomponent of a PORT component. This
35 module defines a concrete schema for the associated data for
36 components with type=TRANSCEIVER.";
38 oc-ext:openconfig-version "0.4.1";
40 revision "2018-01-22" {
42 "Fixed physical-channel path reference";
46 revision "2017-09-18" {
48 "Use openconfig-yang-types module";
52 revision "2017-07-08" {
54 "Adds clarification on aggregate power measurement data";
58 revision "2016-12-22" {
60 "Adds preconfiguration data and clarified units";
64 // identity statements
68 // grouping statements
70 grouping optical-power-state {
72 "Reusable leaves related to optical power state -- these
73 are read-only state values. If avg/min/max statistics are
74 not supported, the target is expected to just supply the
77 container output-power {
79 "The output optical power of a physical channel in units
80 of 0.01dBm, which may be associated with individual
81 physical channels, or an aggregate of multiple physical
82 channels (i.e., for the overall transceiver). For an
83 aggregate, this may be a measurement from a photodetector
84 or a a calculation performed on the device by summing up
85 all of the related individual physical channels.
86 Values include the instantaneous, average, minimum, and
87 maximum statistics. If avg/min/max statistics are not
88 supported, the target is expected to just supply the
91 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
94 container input-power {
96 "The input optical power of a physical channel in units
97 of 0.01dBm, which may be associated with individual
98 physical channels, or an aggregate of multiple physical
99 channels (i.e., for the overall transceiver). For an
100 aggregate, this may be a measurement from a photodetector
101 or a a calculation performed on the device by summing up
102 all of the related individual physical channels.
103 Values include the instantaneous, average, minimum, and
104 maximum statistics. If avg/min/max statistics are not
105 supported, the target is expected to just supply the
108 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
111 container laser-bias-current {
113 "The current applied by the system to the transmit laser to
114 achieve the output power. The current is expressed in mA
115 with up to two decimal precision. Values include the
116 instantaneous, average, minimum, and maximum statistics.
117 If avg/min/max statistics are not supported, the target is
118 expected to just supply the instant value";
120 uses oc-types:avg-min-max-instant-stats-precision2-mA;
124 grouping output-optical-frequency {
126 "Reusable leaves related to optical output power -- this is
127 typically configurable on line side and read-only on the
130 leaf output-frequency {
131 type oc-opt-types:frequency-type;
133 "The frequency in MHz of the individual physical channel
134 (e.g. ITU C50 - 195.0THz and would be reported as
135 195,000,000 MHz in this model). This attribute is not
136 configurable on most client ports.";
141 grouping physical-channel-config {
143 "Configuration data for physical client channels";
150 "Index of the physical channnel or lane within a physical
157 "Text description for the client physical channel";
163 "Enable (true) or disable (false) the transmit label for the
167 leaf target-output-power {
173 "Target output optical power level of the optical channel,
174 expressed in increments of 0.01 dBm (decibel-milliwats)";
178 grouping physical-channel-state {
180 "Operational state data for client channels.";
182 uses output-optical-frequency;
183 uses optical-power-state;
186 grouping physical-channel-top {
188 "Top-level grouping for physical client channels";
190 container physical-channels {
192 "Enclosing container for client channels";
197 "List of client channels, keyed by index within a physical
198 client port. A physical port with a single channel would
199 have a single zero-indexed element";
203 path "../config/index";
206 "Reference to the index number of the channel";
211 "Configuration data for physical channels";
213 uses physical-channel-config;
221 "Operational state data for channels";
223 uses physical-channel-config;
224 uses physical-channel-state;
231 grouping port-transceiver-config {
233 "Configuration data for client port transceivers";
238 "Turns power on / off to the transceiver -- provides a means
239 to power on/off the transceiver (in the case of SFP, SFP+,
240 QSFP,...) or enable high-power mode (in the case of CFP,
241 CFP2, CFP4) and is optionally supported (device can choose to
242 always enable). True = power on / high power, False =
246 leaf form-factor-preconf {
248 base oc-opt-types:TRANSCEIVER_FORM_FACTOR_TYPE;
251 "Indicates the type of optical transceiver used on this
252 port. If the client port is built into the device and not
253 pluggable, then non-pluggable is the corresponding state. If
254 a device port supports multiple form factors (e.g. QSFP28
255 and QSFP+, then the value of the transceiver installed shall
256 be reported. If no transceiver is present, then the value of
257 the highest rate form factor shall be reported
258 (QSFP28, for example).
260 The form factor is included in configuration data to allow
261 pre-configuring a device with the expected type of
262 transceiver ahead of deployment. The corresponding state
263 leaf should reflect the actual transceiver type plugged into
267 leaf ethernet-pmd-preconf {
269 base oc-opt-types:ETHERNET_PMD_TYPE;
272 "The Ethernet PMD is a property of the optical transceiver
273 used on the port, indicating the type of physical connection.
274 It is included in configuration data to allow pre-configuring
275 a port/transceiver with the expected PMD. The actual PMD is
276 indicated by the ethernet-pmd state leaf.";
280 grouping port-transceiver-state {
282 "Operational state data for client port transceivers";
288 "Transceiver is present on the port";
292 "Transceiver is not present on the port";
296 "Indicates whether a transceiver is present in
297 the specified client port.";
302 base oc-opt-types:TRANSCEIVER_FORM_FACTOR_TYPE;
305 "Indicates the type of optical transceiver used on this
306 port. If the client port is built into the device and not
307 pluggable, then non-pluggable is the corresponding state. If
308 a device port supports multiple form factors (e.g. QSFP28
309 and QSFP+, then the value of the transceiver installed shall
310 be reported. If no transceiver is present, then the value of
311 the highest rate form factor shall be reported
312 (QSFP28, for example).";
315 leaf connector-type {
317 base oc-opt-types:FIBER_CONNECTOR_TYPE;
320 "Connector type used on this port";
324 // TODO: this should probably be removed if we add temperature
325 // as a top-level component property, i.e., transceiver temp
326 // should be reported there.
331 "Internally measured temperature in degrees Celsius. MSA
332 valid range is between -40 and +125C. Accuracy shall be
333 better than +/- 3 degC over the whole temperature range.";
341 "Full name of transceiver vendor. 16-octet field that
342 contains ASCII characters, left-aligned and padded on the
343 right with ASCII spaces (20h)";
351 "Transceiver vendor's part number. 16-octet field that
352 contains ASCII characters, left-aligned and padded on the
353 right with ASCII spaces (20h). If part number is undefined,
362 "Transceiver vendor's revision number. 2-octet field that
363 contains ASCII characters, left-aligned and padded on the
364 right with ASCII spaces (20h)";
367 //TODO: these compliance code leaves should be active based on
371 base oc-opt-types:ETHERNET_PMD_TYPE;
374 "Ethernet PMD (physical medium dependent sublayer) that the
375 transceiver supports. The SFF/QSFP MSAs have registers for
376 this and CFP MSA has similar.";
379 leaf sonet-sdh-compliance-code {
381 base oc-opt-types:SONET_APPLICATION_CODE;
384 "SONET/SDH application code supported by the port";
387 leaf otn-compliance-code {
389 base oc-opt-types:OTN_APPLICATION_CODE;
392 "OTN application code supported by the port";
400 "Transceiver serial number. 16-octet field that contains
401 ASCII characters, left-aligned and padded on the right with
402 ASCII spaces (20h). If part serial number is undefined, all
407 type oc-yang:date-and-time;
409 "Representation of the transceiver date code, typically
410 stored as YYMMDD. The time portion of the value is
411 undefined and not intended to be read.";
414 leaf fault-condition {
417 "Indicates if a fault condition exists in the transceiver";
420 uses optical-power-state;
424 grouping port-transceiver-top {
426 "Top-level grouping for client port transceiver data";
428 container transceiver {
430 "Top-level container for client port transceiver data";
434 "Configuration data for client port transceivers";
436 uses port-transceiver-config;
444 "Operational state data for client port transceivers";
446 uses port-transceiver-config;
447 uses port-transceiver-state;
449 // physical channels are associated with a transceiver
451 uses physical-channel-top;
455 // data definition statements
457 // augment statements
459 augment "/oc-platform:components/oc-platform:component" {
461 "Adding transceiver data to physical inventory";
463 uses port-transceiver-top {
464 when "current()/oc-platform:state/" +
465 "oc-platform:type = 'TRANSCEIVER'" {
467 "Augment is active when component is of type TRANSCEIVER";
472 augment "/oc-if:interfaces/oc-if:interface/oc-if:state" {
473 //TODO: add 'when' or other condition to make sure this
474 //leafref points to a component of type TRANSCEIVER.
476 "Adds a reference from the base interface to its corresponding
479 leaf-list physical-channel {
481 path "/oc-platform:components/" +
482 "oc-platform:component[oc-platform:name=current()/../oc-port:hardware-port]/" +
483 "oc-transceiver:transceiver/" +
484 "oc-transceiver:physical-channels/oc-transceiver:channel/" +
485 "oc-transceiver:index";
488 "For a channelized interface, list of references to the
489 physical channels (lanes) corresponding to the interface.";
495 // notification statements