From 56cc03f7bc43162a41b161c419270142c9eac5c4 Mon Sep 17 00:00:00 2001 From: italobusi Date: Wed, 2 Mar 2022 18:22:13 +0100 Subject: [PATCH] Update ietf-layer0-types-ext.yang Fix #32 : - added bitrate to the common-explicit-mode grouping Support resolution of https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/99: - added the following typedef - snr-or-null - decimal-2-digits - decimal-2-digits-or-null - power-in-db - power-in-db-or-null - power-in-dbm - power-in-dbm-or-null - Updated types with union with type empty when applicable Co-Authored-By: sergio belotti --- ietf-layer0-types-ext.yang | 153 +++++++++++++++++++++++++++++-------- 1 file changed, 122 insertions(+), 31 deletions(-) diff --git a/ietf-layer0-types-ext.yang b/ietf-layer0-types-ext.yang index c3bddf2..6cc1096 100644 --- a/ietf-layer0-types-ext.yang +++ b/ietf-layer0-types-ext.yang @@ -38,7 +38,7 @@ module ietf-layer0-types-ext { This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; - revision "2022-01-21" { + revision "2022-03-02" { description "Initial Version"; reference @@ -402,6 +402,17 @@ module ietf-layer0-types-ext { resolution bandwidth"; } + typedef snr-or-null { + type union { + type snr; + type empty; + } + description + "(Optical) Signal to Noise Ratio measured over 0.1 nm + resolution bandwidth, when known, or an empty value when + unknown."; + } + typedef fiber-type { type enumeration { enum G.652 { @@ -428,6 +439,58 @@ module ietf-layer0-types-ext { "ITU-T based fiber-types"; } + typedef decimal-2-digits { + type decimal64 { + fraction-digits 2; + } + description + "A decimal64 value with two digits." + } + + typedef decimal-2-digits-or-null { + type union { + type decimal-2-digits; + type empty; + } + description + "A decimal64 value with two digits, when the value is know or + an empty value when the value is not known." + } + + typedef power-in-db { + type decimal-2-digits; + units dB; + description + "The power in dB."; + } + + typedef power-in-db-or-null { + type union { + type power-in-db; + type empty; + } + description + "The power in dB, when it is known or an empty value when the + power is not known."; + } + + typedef power-in-dbm { + type decimal-2-digits; + units dBm; + description + "The power in dBm."; + } + + typedef power-in-dbm-or-null { + type union { + type power-in-dbm; + type empty; + } + description + "The power in dBm, when it is known or an empty value when the + power is not known."; + } + /* * Groupings */ @@ -576,9 +639,12 @@ module ietf-layer0-types-ext { associated penalty"; leaf chromatic-dispersion { - type decimal64 { - fraction-digits 2; - range "0..max"; + type union { + type decimal64 { + fraction-digits 2; + range "0..max"; + } + type empty; } units "ps/nm"; config false; @@ -586,9 +652,12 @@ module ietf-layer0-types-ext { description "chromatic dispersion"; } leaf polarization-mode-dispersion { - type decimal64 { - fraction-digits 2; - range "0..max"; + type union { + type decimal64 { + fraction-digits 2; + range "0..max"; + } + type empty; } units "ps"; config false; @@ -596,9 +665,12 @@ module ietf-layer0-types-ext { description "Polarization mode dispersion"; } leaf penalty { - type decimal64 { - fraction-digits 2; - range "0..max"; + type union { + type empty; + type decimal64 { + fraction-digits 2; + range "0..max"; + } } units "dB"; config false; @@ -613,17 +685,17 @@ module ietf-layer0-types-ext { and associated penalty"; leaf max-polarization-dependent-loss { - type decimal64 { - fraction-digits 2; - } - units "dB"; + type power-in-db-or-null; config false; mandatory true; description "Maximum acceptable accumulate polarization dependent loss"; } leaf penalty { - type uint8; + type union { + type uint8; + type empty; + } units "dB"; config false; mandatory true; @@ -648,10 +720,18 @@ module ietf-layer0-types-ext { base line-coding; } config false; - description "Bit rate/line coding of optical tributary signal"; + description + "Bit rate/line coding of the optical tributary signal."; reference "ITU-T G.698.2 section 7.1.2"; } + leaf bitrate { + type uint16; + units "Gbit/sec"; + config false; + description + "Bit rate of the optical tributary signal."; + } leaf max-polarization-mode-dispersion { type decimal64 { fraction-digits 2; @@ -684,10 +764,10 @@ module ietf-layer0-types-ext { uses cd-pmd-penalty ; } leaf max-diff-group-delay { - type int32; - config false; - description "Maximum Differential group delay of this mode - for this lane"; + type int32; + config false; + description "Maximum Differential group delay of this mode + for this lane"; } list max-polarization-dependent-loss-penalty { config false; @@ -700,7 +780,7 @@ module ietf-layer0-types-ext { } leaf available-modulation-type { type identityref { - base modulation; + base modulation; } config false; description @@ -861,7 +941,6 @@ module ietf-layer0-types-ext { description "Maximum rx optical power for all the channels"; } - } // grouping common-organizational-explicit-mode /* This grouping represent the list of configured parameters */ @@ -870,25 +949,37 @@ module ietf-layer0-types-ext { grouping common-transceiver-configured-param { description "Capability of an optical transceiver"; - leaf otsi-carrier-frequency { + leaf otsi-carrier-frequency { + type union { type frequency-thz; - description - "OTSi carrier frequency, equivalent to the - actual configured transmitter frequency"; + type empty; + } + description + "OTSi carrier frequency, equivalent to the + actual configured transmitter frequency"; } leaf tx-channel-power { + type union { type dbm-t; - description "The current channel transmit power"; + type empty; + } + description "The current channel transmit power"; } leaf rx-channel-power { + type union { type dbm-t; - config false; - description "The current channel received power "; + type empty; + } + config false; + description "The current channel received power "; } leaf rx-total-power { + type union { type dbm-t; - config false; - description "Current total received power"; + type empty; + } + config false; + description "Current total received power"; } } // grouping for configured attributes out of mode