Skip to content

Commit

Permalink
Update ietf-layer0-types-ext.yang
Browse files Browse the repository at this point in the history
Fix #32 :
- added bitrate to the common-explicit-mode grouping

Support resolution of ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang#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 <sergio.belotti@nokia.com>
  • Loading branch information
italobusi and sergiobelotti committed Mar 2, 2022
1 parent caee2d8 commit 56cc03f
Showing 1 changed file with 122 additions and 31 deletions.
153 changes: 122 additions & 31 deletions ietf-layer0-types-ext.yang
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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
*/
Expand Down Expand Up @@ -576,29 +639,38 @@ 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;
mandatory true;
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;
mandatory true;
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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -700,7 +780,7 @@ module ietf-layer0-types-ext {
}
leaf available-modulation-type {
type identityref {
base modulation;
base modulation;
}
config false;
description
Expand Down Expand Up @@ -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 */
Expand All @@ -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

Expand Down

0 comments on commit 56cc03f

Please sign in to comment.