Skip to main content

A YANG Data Model for Layer 0 Types
draft-ietf-ccamp-rfc9093-bis-04

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Active".
Authors Sergio Belotti , Italo Busi , Dieter Beller , Haomian Zheng , Esther Le Rouzic , Aihua Guo , Daniel King
Last updated 2023-03-12
Replaces draft-ietf-ccamp-layer0-types-ext
RFC stream Internet Engineering Task Force (IETF)
Formats
Reviews
Additional resources Mailing list discussion
Stream WG state WG Document
Document shepherd (None)
IESG IESG state I-D Exists
Consensus boilerplate Unknown
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-ietf-ccamp-rfc9093-bis-04
CCAMP Working Group                                      S. Belotti, Ed.
Internet-Draft                                                     Nokia
Obsoletes: 9093 (if approved)                               I. Busi, Ed.
Intended status: Standards Track                                  Huawei
Expires: 13 September 2023                                D. Beller, Ed.
                                                                   Nokia
                                                                H. Zheng
                                                                  Huawei
                                                            E. Le Rouzic
                                                                  Orange
                                                                  A. Guo
                                                  Futurewei Technologies
                                                                 D. King
                                                 University of Lancaster
                                                           12 March 2023

                  A YANG Data Model for Layer 0 Types
                    draft-ietf-ccamp-rfc9093-bis-04

Abstract

   This document defines a collection of common data types and groupings
   in the YANG data modeling language.  These derived common types and
   groupings are intended to be imported by modules that model Layer 0
   optical Traffic Engineering (TE) configuration and state capabilities
   such as Wavelength Switched Optical Networks (WSONs) and flexi-grid
   Dense Wavelength Division Multiplexing (DWDM) networks.

   This document obsoletes RFC 9093.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 13 September 2023.

Belotti, et al.         Expires 13 September 2023               [Page 1]
Internet-Draft           Yang for Layer 0 Types               March 2023

Copyright Notice

   Copyright (c) 2023 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology and Notations . . . . . . . . . . . . . . . .   3
     1.2.  Prefix in Data Node Names . . . . . . . . . . . . . . . .   3
   2.  Layer 0 Types Module Contents . . . . . . . . . . . . . . . .   4
   3.  YANG Module for Layer 0 Types . . . . . . . . . . . . . . . .   6
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  41
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  42
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  42
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  42
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  44
   Appendix A.  Changes from RFC 9093  . . . . . . . . . . . . . . .  45
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  45
   Contributors  . . . . . . . . . . . . . . . . . . . . . . . . . .  46
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  46

1.  Introduction

   YANG [RFC7950] is a data modeling language used to model
   configuration data, state data, Remote Procedure Calls, and
   notifications for network management protocols such as the Network
   Configuration Protocol (NETCONF) [RFC6241].  The YANG language
   supports a small set of built-in data types and provides mechanisms
   to derive other types from the built-in types.

Belotti, et al.         Expires 13 September 2023               [Page 2]
Internet-Draft           Yang for Layer 0 Types               March 2023

   This document introduces a collection of common data types derived
   from the built-in YANG data types.  The derived types and groupings
   are designed to be the common types applicable for modeling Traffic
   Engineering (TE) features as well as non-TE features (e.g., physical
   network configuration aspects) for Layer 0 optical networks in
   model(s) defined outside of this document.  The applicability of
   Layer 0 types specified in this document includes Wavelength Switched
   Optical Networks (WSONs) [RFC6163] [ITU-T_G.698.2] and flexi-grid
   Dense Wavelength Division Multiplexing (DWDM) networks [RFC7698]
   [ITU-T_G.694.1].

   This document adds new type definitions to the YANG modules and
   obsoletes [RFC9093].  For further details, see the revision
   statements of the YANG module in Section 3 or the summary in
   Appendix A.

   The YANG data model in this document conforms to the Network
   Management Datastore Architecture defined in [RFC8342].

1.1.  Terminology and Notations

   Refer to [RFC7446] and [RFC7581] for the key terms used in this
   document, and the terminology for describing YANG data models can be
   found in [RFC7950].

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

1.2.  Prefix in Data Node Names

   In this document, names of data nodes and other data model objects
   are prefixed using the standard prefix associated with the
   corresponding YANG imported modules.

               +==========+===================+===========+
               | Prefix   | YANG module       | Reference |
               +==========+===================+===========+
               | l0-types | ietf-layer0-types | RFC XXXX  |
               +----------+-------------------+-----------+

                 Table 1: Prefixes and corresponding YANG
                                 modules

   RFC Editor Note: Please replace XXXX with the RFC number assigned to
   this document.

Belotti, et al.         Expires 13 September 2023               [Page 3]
Internet-Draft           Yang for Layer 0 Types               March 2023

   The YANG module "ietf-layer0-types" (defined in Section 3) references
   [RFC4203], [RFC6163], [RFC6205], [RFC7698], [RFC7699], [RFC8363],
   [ITU-T_G.694.1], and [ITU-T_G.694.2].

2.  Layer 0 Types Module Contents

   This document defines a YANG module for common Layer 0 types, ietf-
   layer0-types.  This module is used for WSON and flexi-grid DWDM
   networks.  The "ietf-layer0-types" module contains the following YANG
   reusable types and groupings:

   l0-grid-type:

      A base YANG identity for the grid type as defined in [RFC6163] and
      [RFC7698].

   dwdm-ch-spc-type:

      A base YANG identity for the DWDM channel-spacing type as defined
      in [RFC6205].

   cwdm-ch-spc-type:

      A base YANG identity for the Coarse Wavelength Division
      Multiplexing (CWDM) channel-spacing type as defined in [RFC6205].

   wson-label-start-end:

      The WSON label range was defined in [RFC6205], and the generic
      topology model defines the label-start/label-end in [RFC8795].
      This grouping shows the WSON-specific label-start and label-end
      information.

   wson-label-hop:

      The WSON label range was defined in [RFC6205], and the generic
      topology model defines the label-hop in [RFC8795].  This grouping
      shows the WSON-specific label-hop information.

   l0-label-range-info:

      A YANG grouping that defines the Layer 0 label range information
      applicable for WSON as defined in [RFC6205].  This grouping is
      used in the flexi-grid DWDM by adding more flexi-grid-specific
      parameters.

   wson-label-step:

Belotti, et al.         Expires 13 September 2023               [Page 4]
Internet-Draft           Yang for Layer 0 Types               March 2023

      A YANG grouping that defines label steps for WSON as defined in
      [RFC8776].

   flexi-grid-label-start-end:

      The flexi-grid label range was defined in [RFC7698], and the
      generic topology model defines the label-start/label-end in
      [RFC8795].  This grouping shows the flexi-grid-specific label-
      start and label-end information.

   flexi-grid-label-hop:

      The flexi-grid label range was defined in [RFC7698], and the
      generic topology model defines the label-hop in [RFC8795].  This
      grouping shows the WSON-specific label-hop information.

   flexi-grid-label-range-info:

      A YANG grouping that defines flexi-grid label range information as
      defined in [RFC7698] and [RFC8363].

   flexi-grid-label-step:

      A YANG grouping that defines flexi-grid label steps as defined in
      [RFC8776].

   transceiver-capabilities:

      a YANG grouping to define the transceiver capabilities (also
      called "modes") needed to determine optical signal compatibility.

   standard-mode:

      a YANG grouping for ITU-T G.698.2 standard mode that guarantees
      interoperability.

   organizational-mode:

      a YANG grouping to define transponder operational mode supported
      by organizations or vendors.

   common-explicit-mode:

      a YANG grouping to define the list of attributes related to
      optical impairments limits in case of transceiver explicit mode.
      This grouping should be the same used in
      [I-D.ietf-ccamp-dwdm-if-param-yang].

Belotti, et al.         Expires 13 September 2023               [Page 5]
Internet-Draft           Yang for Layer 0 Types               March 2023

   common-organizational-explicit-mode:

      a YANG grouping to define the common capabilities attributes limit
      range in case of operational mode and explicit mode.  Also this
      grouping should be used in [I-D.ietf-ccamp-dwdm-if-param-yang].

   cd-pmd-penalty:

      a YANG grouping to define the triplet used as entries in the list
      optional penalty associated with a given accumulated CD and PMD.
      This list of triplet cd, pmd, penalty can be used to sample the
      function penalty = f(CD, PMD).

3.  YANG Module for Layer 0 Types

   <CODE BEGINS> file "ietf-layer0-types@2023-03-07.yang"
   module ietf-layer0-types {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-layer0-types";
     prefix l0-types;

     organization
       "IETF CCAMP Working Group";
     contact
       "WG Web:  <https://datatracker.ietf.org/wg/ccamp/>
        WG List: <mailto:ccamp@ietf.org>

        Editor:  Dieter Beller
                 <mailto:Dieter.Beller@nokia.com>

        Editor:  Sergio Belotti
                 <mailto:Sergio.Belotti@nokia.com>

        Editor:  Italo Busi
                 <mailto:Italo.Busi@huawei.com>

        Editor:  Haomian Zheng
                 <mailto:zhenghaomian@huawei.com>";
     description
       "This module defines Optical Layer 0 types.  This module
        provides groupings that can be applicable to Layer 0
        Fixed Optical Networks (e.g., CWDM (Coarse Wavelength
        Division Multiplexing) and DWDM (Dense Wavelength Division
        Multiplexing)) and flexi-grid optical networks.

        Copyright (c) 2023 IETF Trust and the persons identified
        as authors of the code.  All rights reserved.

Belotti, et al.         Expires 13 September 2023               [Page 6]
Internet-Draft           Yang for Layer 0 Types               March 2023

        Redistribution and use in source and binary forms, with
        or without modification, is permitted pursuant to, and
        subject to the license terms contained in, the Revised
        BSD License set forth in Section 4.c of the IETF Trust's
        Legal Provisions Relating to IETF Documents
        (https://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX; see
        the RFC itself for full legal notices.

        The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
        NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
        'MAY', and 'OPTIONAL' in this document are to be interpreted as
        described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
        they appear in all capitals, as shown here.";

   // RFC Ed.: replace XXXX with actual RFC number and remove
   // this note

   // replace the revision date with the module publication date
   // the format is (year-month-day)
     revision 2023-03-07 {
       description
         "To be updated";
       reference
         "RFC XXXX: A YANG Data Model for Layer 0 Types";
     }
     revision 2021-08-13 {
       description
         "Initial version";
       reference
         "RFC 9093: A YANG Data Model for Layer 0 Types";
     }

   /*
    * Identities
    */

     identity l0-grid-type {
       description
         "Layer 0 grid type";
       reference
         "RFC 6163: Framework for GMPLS and Path Computation Element
          (PCE) Control of Wavelength Switched Optical Networks (WSONs),
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid,
          ITU-T G.694.2 (12/2003): Spectral grids for WDM applications:
          CWDM wavelength grid";

Belotti, et al.         Expires 13 September 2023               [Page 7]
Internet-Draft           Yang for Layer 0 Types               March 2023

     }

     identity flexi-grid-dwdm {
       base l0-grid-type;
       description
         "Flexi-grid";
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks,
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     identity wson-grid-dwdm {
       base l0-grid-type;
       description
         "DWDM grid";
       reference
         "RFC 6163:Framework for GMPLS and Path Computation Element
          (PCE) Control of Wavelength Switched Optical Networks (WSONs),
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     identity wson-grid-cwdm {
       base l0-grid-type;
       description
         "CWDM grid";
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers,
          ITU-T G.694.2 (12/2003): Spectral grids for WDM applications:
          CWDM wavelength grid";
     }

     identity dwdm-ch-spc-type {
       description
         "DWDM channel-spacing type";
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers,
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     identity dwdm-100ghz {
       base dwdm-ch-spc-type;

Belotti, et al.         Expires 13 September 2023               [Page 8]
Internet-Draft           Yang for Layer 0 Types               March 2023

       description
         "100 GHz channel spacing";
     }

     identity dwdm-50ghz {
       base dwdm-ch-spc-type;
       description
         "50 GHz channel spacing";
     }

     identity dwdm-25ghz {
       base dwdm-ch-spc-type;
       description
         "25 GHz channel spacing";
     }

     identity dwdm-12p5ghz {
       base dwdm-ch-spc-type;
       description
         "12.5 GHz channel spacing";
     }

     identity flexi-ch-spc-type {
       description
         "Flexi-grid channel-spacing type";
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks,
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     identity flexi-ch-spc-6p25ghz {
       base flexi-ch-spc-type;
       description
         "6.25 GHz channel spacing";
     }

     identity flexi-slot-width-granularity {
       description
         "Flexi-grid slot width granularity";
     }

     identity flexi-swg-12p5ghz {
       base flexi-slot-width-granularity;
       description
         "12.5 GHz slot width granularity";

Belotti, et al.         Expires 13 September 2023               [Page 9]
Internet-Draft           Yang for Layer 0 Types               March 2023

     }

     identity cwdm-ch-spc-type {
       description
         "CWDM channel-spacing type";
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers,
          ITU-T G.694.2 (12/2003): Spectral grids for WDM applications:
          CWDM wavelength grid";
     }

     identity cwdm-20nm {
       base cwdm-ch-spc-type;
       description
         "20nm channel spacing";
     }

     identity modulation {
       description "base identity for modulation type";
     }

     identity DPSK {
       base modulation;
       description
         "DPSK (Differential Phase Shift Keying) modulation";
     }

     identity QPSK {
       base modulation;
       description
         "QPSK (Quadrature Phase Shift Keying) modulation";
     }

     identity DP-QPSK {
       base modulation;
       description
         "DP-QPSK (Dual Polarization Quadrature
          Phase Shift Keying) modulation";
     }

     identity QAM8 {
       base modulation;
       description
         "8QAM (8 symbols Quadrature Amplitude Modulation)";
     }

     identity DP-QAM8 {

Belotti, et al.         Expires 13 September 2023              [Page 10]
Internet-Draft           Yang for Layer 0 Types               March 2023

       base modulation;
       description
         "DP-QAM8 (8 symbols Dual Polarization Quadrature Amplitude
         Modulation)";
     }

     identity DC-DP-QAM8 {
       base modulation;
       description
         "DC DP-QAM8 (8 symbols Dual Carrier Dual Polarization
         Quadrature Amplitude Modulation)";
     }

     identity QAM16 {
       base modulation;
       description
         "QAM16 (16 symbols Quadrature Amplitude Modulation)";
     }

     identity DP-QAM16 {
       base modulation;
       description
         "DP-QAM16 (16 symbols Dual Polarization Quadrature Amplitude
          Modulation)";
     }

     identity DC-DP-QAM16 {
       base modulation;
       description
         "DC DP-QAM16 (16 symbols Dual Carrier Dual Polarization
         Quadrature Amplitude Modulation)";
     }

     identity QAM32 {
       base modulation;
       description
         "QAM32 (32 symbols Quadrature Amplitude Modulation)";
     }

     identity DP-QAM32 {
       base modulation;
       description
         "DP-QAM32 (32 symbols Dual Polarization Quadrature Amplitude
         Modulation)";
     }

     identity QAM64 {
       base modulation;

Belotti, et al.         Expires 13 September 2023              [Page 11]
Internet-Draft           Yang for Layer 0 Types               March 2023

       description
         "QAM64 (64 symbols Quadrature Amplitude Modulation)";
     }

     identity DP-QAM64 {
       base modulation;
       description
         "DP-QAM64 (64 symbols Dual Polarization Quadrature Amplitude
         Modulation)";
     }

     identity fec-type {
       description
         "Base identity from which specific FEC
         (Forward Error Correction) type identities are derived.";
     }

     identity g-fec {
       base fec-type;
       description
         "G-FEC (Generic-FEC)";
     }
     identity e-fec {
       base fec-type;
       description
         "E-FEC (Enhanced-FEC)";
     }
     identity no-fec {
       base fec-type;
       description
         "No FEC";
     }

     identity reed-solomon {
       base fec-type;
       description
         "Reed-Solomon error correction";
     }

     identity hamming-code {
       base fec-type;
       description
         "Hamming Code error correction";
     }

     identity golay {
       base fec-type;
         description "Golay error correction";

Belotti, et al.         Expires 13 September 2023              [Page 12]
Internet-Draft           Yang for Layer 0 Types               March 2023

     }

     identity line-coding {
       description
         "base line-coding class";
       reference
         "ITU-T G.698.2-201811 section 7";
     }

     identity line-coding-NRZ-2p5G {
       base line-coding;
       description
         "ITU-T G.698.2-201811 section 7 table 8-1";
     }

     identity line-coding-NRZ-OTU1 {
       base line-coding;
       description
         "ITU-T G.698.2-201811 section 7 table 8-2";
     }

     identity line-coding-NRZ-10G {
       base line-coding;
       description
         "ITU-T G.698.2-201811 section 7 table 8-3/8-5";
     }

     identity line-coding-NRZ-OTU2 {
       base line-coding;
       description
         "ITU-T G.698.2-201811 section 7 table 8-4/8-6";
     }

     identity wavelength-assignment {
       description
         "Wavelength selection base";
       reference
         "RFC6163:Framework for GMPLS and Path Computation Element
         (PCE) Control of Wavelength Switched Optical Networks (WSONs)";
     }

     identity first-fit-wavelength-assignment {
       base wavelength-assignment;
       description
         "All the available wavelengths are numbered,
          and this WA (Wavelength Assignment) method chooses
          the available wavelength with the lowest index";
     }

Belotti, et al.         Expires 13 September 2023              [Page 13]
Internet-Draft           Yang for Layer 0 Types               March 2023

     identity random-wavelength-assignment {
       base wavelength-assignment;
       description
         "This WA method chooses an available
          wavelength randomly";
     }

     identity least-loaded-wavelength-assignment {
       base wavelength-assignment;
       description
         "This WA method selects the wavelength that
          has the largest residual capacity on the most loaded
          link along the route (in multi-fiber networks)";
     }

     identity term-type {
       description
         "Termination type";
       reference
         "ITU-T G.709: Interfaces for the Optical Transport Network";
     }

     identity term-phys {
       base term-type;
       description
         "Physical layer termination";
     }

     identity term-otu {
       base term-type;
       description
         "OTU (Optical Transport Unit) termination";
     }

     identity term-odu {
       base term-type;
       description
         "ODU (Optical Data Unit) termination";
     }

     identity term-opu {
       base term-type;
       description
         "OPU (Optical Payload Unit) termination";
     }

     identity otu-type {
       description

Belotti, et al.         Expires 13 September 2023              [Page 14]
Internet-Draft           Yang for Layer 0 Types               March 2023

         "Base identity from which specific OTU identities are derived";
       reference
         "ITU-T G.709: Interfaces for the Optical Transport Network";
     }

     identity OTU1 {
       base otu-type;
       description
         "OTU1 (2.66 Gb/s)";
     }

     identity OTU1e {
       base otu-type;
       description
         "OTU1e (11.04 Gb/s)";
     }

     identity OTU1f {
       base otu-type;
       description
         "OTU1f (11.27 Gb/s)";
     }

     identity OTU2 {
       base otu-type;
       description
         "OTU2 (10.70 Gb/s)";
     }

     identity OTU2e {
       base otu-type;
       description
         "OTU2e (11.09 Gb/s)";
     }

     identity OTU2f {
       base otu-type;
       description
         "OTU2f (11.31G)";
     }

     identity OTU3 {
       base otu-type;
       description
         "OTU3 (43.01 Gb/s)";
     }

     identity OTU3e1 {

Belotti, et al.         Expires 13 September 2023              [Page 15]
Internet-Draft           Yang for Layer 0 Types               March 2023

       base otu-type;
       description
         "OTU3e1 (44.57 Gb/s)";
     }

     identity OTU3e2 {
       base otu-type;
       description
         "OTU3e2 (44.58 Gb/s)";
     }

     identity OTU4 {
       base otu-type;
       description
         "OTU4 (111.80 Gb/s)";
     }

     identity OTUCn {
       base otu-type;
       description
         "OTUCn (n x 105.25 Gb/s)";
     }

     identity type-power-mode {
       description
         "power equalization mode used within the
          OMS and its elements";
     }

     identity power-spectral-density {
       base type-power-mode;
       description
         "all elements must use power spectral density (W/Hz)";
     }

     identity carrier-power {
       base type-power-mode;
       description
         "all elements must use power (dBm)";
     }

   /*
    * Typedefs
    */

     typedef dwdm-n {
       type int16;
       description

Belotti, et al.         Expires 13 September 2023              [Page 16]
Internet-Draft           Yang for Layer 0 Types               March 2023

         "The given value 'N' is used to determine the nominal central
          frequency.

          The nominal central frequency, 'f', is defined by:
            f = 193100.000 GHz + N x channel spacing (measured in GHz),

          where 193100.000 GHz (193.100000 THz) is the ITU-T 'anchor
          frequency' for transmission over the DWDM grid, and where
          'channel spacing' is defined by the dwdm-ch-spc-type.";
       reference
         "RFC6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers,
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     typedef cwdm-n {
       type int16;
       description
         "The given value 'N' is used to determine the nominal central
          wavelength.

          The nominal central wavelength is defined by:
            Wavelength = 1471 nm + N x channel spacing (measured in nm)

          where 1471 nm is the conventional 'anchor wavelength' for
          transmission over the CWDM grid, and where 'channel spacing'
          is defined by the cwdm-ch-spc-type.";
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers,
          ITU-T G.694.2 (12/2003): Spectral grids for WDM applications:
          CWDM wavelength grid";
     }

     typedef flexi-n {
       type int16;
       description
         "The given value 'N' is used to determine the nominal central
          frequency.

          The nominal central frequency, 'f', is defined by:
            f = 193100.000 GHz + N x channel spacing (measured in GHz),

          where 193100.000 GHz (193.100000 THz) is the ITU-T 'anchor
          frequency' for transmission over the DWDM grid, and where
          'channel spacing' is defined by the flexi-ch-spc-type.

Belotti, et al.         Expires 13 September 2023              [Page 17]
Internet-Draft           Yang for Layer 0 Types               March 2023

          Note that the term 'channel spacing' can be substituted by the
          term 'nominal central frequency granularity' defined in
          clause 8 of ITU-T G.694.1.";
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks,
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     typedef flexi-m {
       type uint16;
       description
         "The given value 'M' is used to determine the slot width.

          A slot width is defined by:
            slot width = M x SWG (measured in GHz),

          where SWG is defined by the flexi-slot-width-granularity.";
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks.
          ITU-T G.694.1 (10/2020): Spectral grids for WDM applications:
          DWDM frequency grid";
     }

     typedef operational-mode {
       type string;
       description
         "Organization/vendor specific mode that guarantees
         interoperability.";
   // RFC Ed.: replace YYYY with actual RFC number and remove
   // this note after draft-ietf-ccamp-optical-impairment-topology-yang
   // is published as an RFC
       reference
         "Section 2.5.2 of RFC YYYY: A YANG Data Model for Optical
         Impairment-aware Topology.";
     }

     typedef standard-mode {
       type string;
       description
         "ITU-T G.698.2 standard mode that guarantees
          interoperability.
          It must be an string with the following format:
          B-DScW-ytz(v) where all these attributes

Belotti, et al.         Expires 13 September 2023              [Page 18]
Internet-Draft           Yang for Layer 0 Types               March 2023

          are conformant
          to the ITU-T recomendation";
       reference "ITU-T G.698.2 (11/2018)";
     }

     typedef organization-identifier {
       type string;
       description
         "vendor/organization identifier that uses a private mode
         out of already defined in G.698.2 ITU-T application-code";
       reference
         "RFC7581: Routing and Wavelength Assignment Information
          Encoding for Wavelength Switched Optical Networks";
     }

     typedef frequency-thz {
       type decimal64 {
         fraction-digits 9;
       }
       units THz;
       description
         "The DWDM frequency in THz, e.g., 193.112500000";
     }
     typedef frequency-ghz {
       type decimal64 {
         fraction-digits 6;
       }
       units GHz;
       description
         "The DWDM frequency in GHz, e.g., 193112.500000";
     }

     typedef dbm-t {
       type int32;
       units ".01dbm";
       description
         "Amplifiers and Transceivers Power in dBm.";
     }

     typedef snr {
       type decimal64 {
         fraction-digits 2;
       }
       units "dB@0.1nm";
       description
         "(Optical) Signal to Noise Ratio measured over 0.1 nm
         resolution bandwidth";
     }

Belotti, et al.         Expires 13 September 2023              [Page 19]
Internet-Draft           Yang for Layer 0 Types               March 2023

     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 {
         description "G.652 Standard Singlemode Fiber";
         }
         enum G.654 {
           description "G.654 Cutoff Shifted Fiber";
         }
         enum G.653 {
           description "G.653 Dispersion Shifted Fiber";
         }
         enum G.655 {
           description "G.655 Non-Zero Dispersion Shifted Fiber";
         }
         enum G.656 {
           description "G.656 Non-Zero Dispersion for Wideband
                  Optical Transport";
         }
         enum G.657 {
           description "G.657 Bend-Insensitive Fiber";
         }
       }
       description
         "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;

Belotti, et al.         Expires 13 September 2023              [Page 20]
Internet-Draft           Yang for Layer 0 Types               March 2023

         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
    */

     grouping wson-label-start-end {
       description
         "The WSON label-start or label-end used to specify WSON label

Belotti, et al.         Expires 13 September 2023              [Page 21]
Internet-Draft           Yang for Layer 0 Types               March 2023

          range.";
       choice grid-type {
         description
           "Label for DWDM or CWDM grid";
         case dwdm {
           leaf dwdm-n {
             when "derived-from-or-self(../../../grid-type,
                   \"wson-grid-dwdm\")" {
               description
                 "Valid only when grid type is DWDM.";
             }
             type l0-types:dwdm-n;
             description
               "The central frequency of DWDM.";
             reference
               "RFC 6205: Generalized Labels for Lambda-Switch-Capable
                (LSC) Label Switching Routers";
           }
         }
         case cwdm {
           leaf cwdm-n {
             when "derived-from-or-self(../../../grid-type,
                   \"wson-grid-cwdm\")" {
               description
                 "Valid only when grid type is CWDM.";
             }
             type l0-types:cwdm-n;
             description
               "Channel wavelength computing input.";
             reference
               "RFC 6205: Generalized Labels for Lambda-Switch-Capable
                (LSC) Label Switching Routers";
           }
         }
       }
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers";
     }

     grouping wson-label-hop {
       description
         "Generic label-hop information for WSON";
       choice grid-type {
         description
           "Label for DWDM or CWDM grid";
         case dwdm {
           choice single-or-super-channel {

Belotti, et al.         Expires 13 September 2023              [Page 22]
Internet-Draft           Yang for Layer 0 Types               March 2023

             description
               "single or super channel";
             case single {
               leaf dwdm-n {
                 type l0-types:dwdm-n;
                 description
                   "The given value 'N' is used to determine the
                    nominal central frequency.";
               }
             }
             case super {
               leaf-list subcarrier-dwdm-n {
                 type l0-types:dwdm-n;
                 description
                   "The given values 'N' are used to determine the
                    nominal central frequency for each subcarrier
                    channel.";
                 reference
                   "ITU-T Recommendation G.694.1: Spectral grids for
                    WDM applications: DWDM frequency grid";
               }
             }
           }
         }
         case cwdm {
           leaf cwdm-n {
             type l0-types:cwdm-n;
             description
               "The given value 'N' is used to determine the nominal
                central wavelength.";
             reference
               "RFC 6205: Generalized Labels for Lambda-Switch-Capable
                (LSC) Label Switching Routers";
           }
         }
       }
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers";
     }

     grouping l0-label-range-info {
       description
         "Information about Layer 0 label range.";
       leaf grid-type {
         type identityref {
           base l0-grid-type;
         }

Belotti, et al.         Expires 13 September 2023              [Page 23]
Internet-Draft           Yang for Layer 0 Types               March 2023

         description
           "Grid type";
       }
       leaf priority {
         type uint8;
         description
           "Priority in Interface Switching Capability Descriptor
            (ISCD).";
         reference
           "RFC 4203: OSPF Extensions in Support of Generalized
            Multi-Protocol Label Switching (GMPLS)";
       }
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers";
     }

     grouping wson-label-step {
       description
         "Label step information for WSON";
       choice l0-grid-type {
         description
           "Grid type: DWDM, CWDM, etc.";
         case dwdm {
           leaf wson-dwdm-channel-spacing {
             when "derived-from-or-self(../../grid-type,
                   \"wson-grid-dwdm\")" {
               description
                 "Valid only when grid type is DWDM.";
             }
             type identityref {
               base dwdm-ch-spc-type;
             }
             description
               "Label-step is the channel spacing (GHz), e.g., 100.000,
                50.000, 25.000, or 12.500 GHz for DWDM.";
             reference
               "RFC 6205: Generalized Labels for Lambda-Switch-Capable
                (LSC) Label Switching Routers";
           }
         }
         case cwdm {
           leaf wson-cwdm-channel-spacing {
             when "derived-from-or-self(../../grid-type,
                   \"wson-grid-cwdm\")" {
               description
                 "Valid only when grid type is CWDM.";
             }

Belotti, et al.         Expires 13 September 2023              [Page 24]
Internet-Draft           Yang for Layer 0 Types               March 2023

             type identityref {
               base cwdm-ch-spc-type;
             }
             description
               "Label-step is the channel spacing (nm), i.e., 20 nm
                for CWDM, which is the only value defined for CWDM.";
             reference
               "RFC 6205: Generalized Labels for Lambda-Switch-Capable
                (LSC) Label Switching Routers";
           }
         }
       }
       reference
         "RFC 6205: Generalized Labels for Lambda-Switch-Capable (LSC)
          Label Switching Routers,
          ITU-T G.694.2 (12/2003): Spectral grids for WDM applications:
          CWDM wavelength grid";
     }

     grouping flexi-grid-label-start-end {
       description
         "The flexi-grid label-start or label-end used to specify
          flexi-grid label range.";
       leaf flexi-n {
         type l0-types:flexi-n;
         description
           "The given value 'N' is used to determine the nominal
            central frequency.";
       }
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks";
     }

     grouping flexi-grid-frequency-slot {
       description
         "Flexi-grid frequency slot grouping.";
       uses flexi-grid-label-start-end;
       leaf flexi-m {
         type l0-types:flexi-m;
         description
           "The given value 'M' is used to determine the slot width.";
       }
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks";

Belotti, et al.         Expires 13 September 2023              [Page 25]
Internet-Draft           Yang for Layer 0 Types               March 2023

     }

     grouping flexi-grid-label-hop {
       description
         "Generic label-hop information for flexi-grid";
       choice single-or-super-channel {
         description
           "single or super channel";
         case single {
           uses flexi-grid-frequency-slot;
         }
         case super {
           list subcarrier-flexi-n {
             key "flexi-n";
             uses flexi-grid-frequency-slot;
             description
               "List of subcarrier channels for flexi-grid super
                channel.";
           }
         }
       }
       reference
         "RFC 7698: Framework and Requirements for GMPLS-Based Control
          of Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
          Networks";
     }

     grouping flexi-grid-label-range-info {
       description
         "Flexi-grid-specific label range related information";
       uses l0-label-range-info;
       container flexi-grid {
         description
           "flexi-grid definition";
         leaf slot-width-granularity {
           type identityref {
             base flexi-slot-width-granularity;
           }
           default "flexi-swg-12p5ghz";
           description
             "Minimum space between slot widths. Default is 12.500
              GHz.";
           reference
             "RFC 7698: Framework and Requirements for GMPLS-Based
              Control of Flexi-Grid Dense Wavelength Division
              Multiplexing (DWDM) Networks";
         }
         leaf min-slot-width-factor {

Belotti, et al.         Expires 13 September 2023              [Page 26]
Internet-Draft           Yang for Layer 0 Types               March 2023

           type uint16 {
             range "1..max";
           }
           default "1";
           description
             "A multiplier of the slot width granularity, indicating
              the minimum slot width supported by an optical port.

              Minimum slot width is calculated by:
                Minimum slot width (GHz) =
                  min-slot-width-factor * slot-width-granularity.";
           reference
             "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi-
              Grid Dense Wavelength Division Multiplexing (DWDM)
              Networks";
         }

         leaf max-slot-width-factor {
           type uint16 {
             range "1..max";
           }
           must '. >= ../min-slot-width-factor' {
             error-message
               "Maximum slot width must be greater than or equal to
                minimum slot width.";
           }
           description
             "A multiplier of the slot width granularity, indicating
              the maximum slot width supported by an optical port.

              Maximum slot width is calculated by:
                Maximum slot width (GHz) =
                  max-slot-width-factor * slot-width-granularity

              If specified, maximum slot width must be greater than or
              equal to minimum slot width.  If not specified, maximum
              slot width is equal to minimum slot width.";
           reference
             "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi-
              Grid Dense Wavelength Division Multiplexing (DWDM)
              Networks";
         }
       }
     }

     grouping flexi-grid-label-step {
       description
         "Label step information for flexi-grid";

Belotti, et al.         Expires 13 September 2023              [Page 27]
Internet-Draft           Yang for Layer 0 Types               March 2023

       leaf flexi-grid-channel-spacing {
         type identityref {
           base flexi-ch-spc-type;
         }
         default "flexi-ch-spc-6p25ghz";
         description
           "Label-step is the nominal central frequency granularity
            (GHz), e.g., 6.25 GHz.";
         reference
           "RFC 7699: Generalized Labels for the Flexi-Grid in Lambda
            Switch Capable (LSC) Label Switching Routers";
       }
       leaf flexi-n-step {
         type uint8;
         description
           "This attribute defines the multiplier for the supported
            values of 'N'.

            For example, given a grid with a nominal central frequency
            granularity of 6.25 GHz, the granularity of the supported
            values of the nominal central frequency could be 12.5 GHz.
            In this case, the values of flexi-n should be even and this
            constraint is reported by setting the flexi-n-step to 2.

            This attribute is also known as central frequency
            granularity in RFC 8363.";
         reference
           "RFC 8363: GMPLS OSPF-TE Extensions in Support of Flexi-Grid
            Dense Wavelength Division Multiplexing (DWDM) Networks";
       }
     }

    /* supported inverse multiplexing capabilities such as
       max. OTSiG:OTSi cardinality
       It is a transponder attribute not transceiver
     */

    /*    leaf multiplexing-cap {
         type uint32;
       config false;
         description "supported inverse multiplexing capabilities
          such as max. OTSiG:OTSi cardinality";
       }
     */

     grouping transceiver-mode {
       description
         "This grouping is intended to be used for reporting the

Belotti, et al.         Expires 13 September 2023              [Page 28]
Internet-Draft           Yang for Layer 0 Types               March 2023

          information of a transceiver's mode.";
       choice mode {
         mandatory true;
         description
           "Indicates whether the transceiver's mode is a standard
             mode, an organizational mode or an explicit mode.";
         case G.698.2 {
           uses standard-mode;
         }
         case organizational-mode {
           container organizational-mode {
             description
               "The set of attributes for an organizational mode";
             uses organizational-mode;
             uses common-organizational-explicit-mode;
           }  // container organizational-mode
         }
         case explicit-mode {
           container explicit-mode {
               description
                 "The set of attributes for an explicit mode";
             container supported-modes {
               description
                 "Container for all the standard and organizational
                   modes supported by the transceiver's explicit
                   mode.";
               leaf-list supported-application-codes {
                 type leafref {
                   path "../../../mode-id";
                 }
                 must "../../../../"
                     + "supported-mode[mode-id=current()]/"
                     + "standard-mode" {
                   description
                     "The pointer is only for application codes
                       supported by transceiver.";
                 }
                 description
                   "List of pointers to the application codes
                     supported by the transceiver's explicit mode.";
               }
               leaf-list supported-organizational-modes {
                 type leafref {
                   path "../../../mode-id";
                 }
                 must "../../../../"
                     + "supported-mode[mode-id=current()]/"
                     + "organizational-mode" {

Belotti, et al.         Expires 13 September 2023              [Page 29]
Internet-Draft           Yang for Layer 0 Types               March 2023

                   description
                     "The pointer is only for organizational modes
                       supported by transceiver.";
                 }
                 description
                   "List of pointers to the organizational modes
                     supported by the transceiver's explicit mode.";
               }
             }  // container supported-modes
             uses common-explicit-mode;
             uses common-organizational-explicit-mode;
           }  // container explicit-mode
         } // end of case explicit-mode
       } // end of choice
     }
     grouping transceiver-capabilities {
       description
         "This grouping is intended to be used for reporting the
          capabilities of a transceiver.";

       container supported-modes {
         presence
           "When present, it indicates that the modes supported by a
           transceiver are reported.";
         description
           "The top level container for the list supported
           transceiver's modes.";
         list supported-mode {
           key "mode-id";
           config false;
           min-elements 1;
           description "The list of supported transceiver's modes.";
           leaf mode-id {
             type string {
               length "1..255";
             }
             description "ID for the supported transceiver's mode.";
           }
           uses transceiver-mode;
         }  // list supported-modes
       }  // container supported-modes
     }  // grouping transceiver-capabilities

     grouping standard-mode {
       description
         "ITU-T G.698.2 standard mode that guarantees interoperability.
          It must be an string with the following format:
          B-DScW-ytz(v) where all these attributes are conformant

Belotti, et al.         Expires 13 September 2023              [Page 30]
Internet-Draft           Yang for Layer 0 Types               March 2023

          to the ITU-T recomendation";

       leaf standard-mode {
         type standard-mode;
         config false;
         description
           "G.698.2 standard mode";
       }
     }

     grouping organizational-mode {
       description
         "Transponder operational mode supported by organizations or
          vendor";

       leaf operational-mode {
         type operational-mode;
         config false;
         description
           "configured organization- or vendor-specific
            application identifiers (AI) supported by the transponder";
       }
       leaf organization-identifier {
         type organization-identifier;
         config false;
         description
         "organization identifier that uses organizational
            mode";
       }
     }

     grouping penalty-value {
       description
         "A common definition of the penalty value used for describing
         multiple penalty types (.e.g, CD, PMD, PDL).";

       leaf penalty-value {
         type union {
           type decimal64 {
             fraction-digits 2;
             range "0..max";
           }
           type empty;
         }
         units "dB";
         config false;
         mandatory true;
         description

Belotti, et al.         Expires 13 September 2023              [Page 31]
Internet-Draft           Yang for Layer 0 Types               March 2023

           "OSNR penalty associated with the related optical
           impairment at the receiver.";
       }
     }

   /*
    * This grouping represent the list of attributes related to
    * optical impairment limits for explicit mode
    * (min OSNR, max PMD, max CD, max PDL, Q-factor limit, etc.)
    * In case of standard and operational mode the attributes are
    * implicit
    */

     grouping common-explicit-mode {
       description "Attributes capabilities related to
       explicit mode of an optical transceiver";
       leaf line-coding-bitrate {
         type identityref {
           base line-coding;
         }
         config false;
         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
           "The gross bitrate (e.g., 100, 200) of the optical tributary
           signal.";
       }
       leaf max-polarization-mode-dispersion {
         type decimal64 {
           fraction-digits 2;
           range "0..max";
         }
         units "ps";
         config false;
         description
           "Maximum acceptable accumulated polarization mode
            dispersion on the receiver";
       }
       leaf max-chromatic-dispersion {
         type decimal64 {
           fraction-digits 2;

Belotti, et al.         Expires 13 September 2023              [Page 32]
Internet-Draft           Yang for Layer 0 Types               March 2023

           range "0..max";
         }
         units "ps/nm";
         config false;
         description
           "Maximum acceptable accumulated chromatic dispersion
            on the receiver";
       }
       list chromatic-dispersion-penalty {
         config false;
         description
           "Optional penalty associated with a given accumulated
            chromatic dispersion (CD) value.
            This list of pair cd and penalty can be used to
            sample the function penalty = f(CD).";
         leaf chromatic-dispersion {
           type union {
             type decimal64 {
               fraction-digits 2;
               range "0..max";
             }
             type empty;
           }
           units "ps/nm";
           config false;
           mandatory true;
           description "Chromatic dispersion";
         }
         uses penalty-value;
       }
       list polarization-dispersion-penalty {
         config false;
         description
           "Optional penalty associated with a given accumulated
            polarization mode dispersion(PMD) value.
            This list of pair pmd and penalty can be used to
            sample the function penalty = f(PMD).";
         leaf polarization-mode-dispersion {
           type union {
             type decimal64 {
               fraction-digits 2;
               range "0..max";
             }
             type empty;
           }
           units "ps";
           config false;
           mandatory true;

Belotti, et al.         Expires 13 September 2023              [Page 33]
Internet-Draft           Yang for Layer 0 Types               March 2023

           description "Polarization mode dispersion";
         }
         uses penalty-value;
       }
       leaf max-diff-group-delay  {
         type uint32;
         units "ps";
         config false;
         description "Maximum Differential group delay of this mode
                     for this lane";
       }
       list max-pol-dependent-loss-penalty {
         config false;
         description
           "Optional penalty associated with the maximum acceptable
           accumulated polarization dependent loss.
            This list of pair pdl and penalty can be used to
            sample the function pdl = f(penalty).";
         leaf max-polarization-dependent-loss {
           type power-in-db-or-null;
           config false;
           mandatory true;
           description
             "Maximum acceptable accumulated polarization dependent
             loss.";
         }
         uses penalty-value;
       }
       leaf available-modulation-type {
         type identityref {
           base modulation;
         }
         config false;
         description
           "Modulation type the specific transceiver in the list
            can support";
       }
       leaf min-OSNR {
         type snr;
         units "dBm";
         config false;
         description
           "min OSNR measured over 0.1 nm resolution bandwidth:
           if received OSNR at Rx-power reference point
           (rx-ref-channel-power) is lower than MIN-OSNR, an increased
           level of bit-errors post-FEC needs to be expected";
       }
       leaf rx-ref-channel-power {

Belotti, et al.         Expires 13 September 2023              [Page 34]
Internet-Draft           Yang for Layer 0 Types               March 2023

         type dbm-t;
         config false;
         description
           "The channel power used as reference for defining penalties
           and min-OSNR";
       }
       list rx-channel-power-penalty {
         config false;
         description
           "Optional penalty associated with a received power
             lower than rx-ref-channel-power.
             This list of pair power and penalty can be used to
             sample the function penalty = f(rx-channel-power).";
         leaf rx-channel-power {
           type union {
             type dbm-t;
             type empty;
           }
           units "dBm";
           config false;
           mandatory true;
           description "Received Power";
         }
         uses penalty-value;
       }
       leaf min-Q-factor {
         type int32;
         units "dB";
         config false;
         description "min Qfactor at FEC threshold";
       }
       leaf available-baud-rate {
         type uint32;
         units Bd;
         config false;
         description
           "Baud-rate the specific transceiver in
           the list can support.
            Baud-rate is the unit for
            symbol rate or modulation rate
            in symbols per second or
            pulses per second.
            It is the number of distinct symbol
            changes (signal events) made to the
            transmission medium
            per second in a digitally
            modulated signal or a line code";
       }

Belotti, et al.         Expires 13 September 2023              [Page 35]
Internet-Draft           Yang for Layer 0 Types               March 2023

       leaf roll-off {
         type decimal64 {
           fraction-digits 4;
           range "0..1";
         }
         config false;
         description
           "the roll-off factor (beta with values from 0 to 1)
           identifies how the real signal shape exceed
           the baud rate. If=0 it is exactly matching
           the baud rate.If=1 the signal exceeds the
           50% of the baud rate at each side.";
       }
       leaf min-carrier-spacing {
         type frequency-ghz;
         config false;
         description
           "This attribute specifies the minimum nominal difference
           between the carrier frequencies of two homogeneous OTSis
           (which have the same optical characteristics but the central
           frequencies) such that if they are placed next to each other
           the interference due to spectrum overlap between them can be
           considered negligible.

           In case of heterogeneous OTSi it is up to path computation
           engine to determine the minimum distance between the carrier
           frequency of the two adjacent OTSi.";
       }
       leaf available-fec-type {
         type identityref {
           base fec-type;
         }
         config false;
         description "Available FEC";
       }
       leaf fec-code-rate {
         type decimal64 {
           fraction-digits 8;
           range "0..max";
         }
         config false;
         description "FEC-code-rate";
       }
       leaf fec-threshold {
         type decimal64 {
           fraction-digits 8;
           range "0..max";
         }

Belotti, et al.         Expires 13 September 2023              [Page 36]
Internet-Draft           Yang for Layer 0 Types               March 2023

         config false;
         description
           "Threshold on the BER, for which FEC
            is able to correct errors";
       }
       leaf in-band-osnr {
         type snr;
         config false;
         description
           "The OSNR defined within the bandwidth of the transmit
           spectral excursion (i.e.,  between the nominal central
           frequency of the channel and the -3.0dB points of the
           transmitter spectrum furthest from the nominal central
           frequency) measured at reference point Ss.

           The in-band OSNR is referenced to an optical bandwidth of
           0.1nm @ 193.7 THz or 12.5 GHz.";
         reference
           "OIF-400ZR-01.0: Implementation Agreement 400ZR";
       }
       leaf out-of-band-osnr {
         type snr;
         config false;
         description
           "The ratio of the peak transmitter power to the integrated
           power outside the transmitter spectral excursion.

           The spectral resolution of the measurement shall be better
           than the maximum spectral width of the peak.

           The out-of-band OSNR is referenced to an optical bandwidth
           of 0.1nm @ 193.7 THz or 12.5 GHz";
         reference
           "OIF-400ZR-01.0: Implementation Agreement 400ZR";
       }
       leaf tx-polarization-power-difference {
         type power-in-db;
         config false;
         description
           "The transmitter polarization dependent power difference
           defined as the power difference between X and Y
           polarizations";
         reference
           "OIF-400ZR-01.0: Implementation Agreement 400ZR";
       }
       leaf polarization-skew {
         type decimal64 {
           fraction-digits 2;

Belotti, et al.         Expires 13 September 2023              [Page 37]
Internet-Draft           Yang for Layer 0 Types               March 2023

         }
         units "ps";
         config false;
         description
           "The X-Y skew, included as a fixed value in the receiver
           polarization mode dispersion (PMD) tolerance limits.";
         reference
           "OIF-400ZR-01.0: Implementation Agreement 400ZR";
       }
     } // grouping common-explicit-mode

     grouping common-organizational-explicit-mode {
       description "Common capability attributes limit range
       in case of operational mode and explicit mode.
       These attributes are supported separately in
       case of application codes";

   /* transmitter tuning range (f_tx-min, f_tx-max) */

       leaf min-central-frequency {
         type frequency-thz;
         config false;
         description
           "This parameter indicates the minimum frequency for the
           transmitter tuning range.";
       }
       leaf max-central-frequency {
         type frequency-thz;
         config false;
         description
           "This parameter indicates the maximum frequency for the
           transmitter tuning range.";
       }

       leaf transceiver-tunability {
         type frequency-ghz;
         config false;
         description
           "This parameter indicates the transmitter frequency fine
           tuning steps e.g 3.125GHz or 0.001GHz.";
       }

   /* supported transmitter power range [p_tx-min, p_tx_max] */

       leaf tx-channel-power-min {
         type dbm-t;
         config false;
         description "The minimum output power of this interface";

Belotti, et al.         Expires 13 September 2023              [Page 38]
Internet-Draft           Yang for Layer 0 Types               March 2023

       }
       leaf tx-channel-power-max {
         type dbm-t;
         config false;
         description "The maximum output power of this interface";
       }

   /* supported receiver power range [p_rx-min, p_rx_max] */

        leaf rx-channel-power-min {
         type dbm-t;
         config false;
         description "The minimum input power of this interface";
       }
       leaf rx-channel-power-max {
         type dbm-t;
         config false;
         description "The maximum input power of this interface";
       }

       leaf rx-total-power-max {
         type dbm-t;
         config false;
         description "Maximum rx optical power for
         all the channels";
       }
     } // grouping common-organizational-explicit-mode

   /* This grouping represent the list of configured parameters */
   /* values independent of operational mode */

     grouping common-transceiver-configured-param {
       description "Capability of an optical transceiver";

       leaf tx-channel-power {
         type union {
           type dbm-t;
           type empty;
         }
         description "The current channel transmit power";
       }
       leaf rx-channel-power {
         type union {
           type dbm-t;
           type empty;
         }
         config false;
         description "The current channel received power ";

Belotti, et al.         Expires 13 September 2023              [Page 39]
Internet-Draft           Yang for Layer 0 Types               March 2023

       }
       leaf rx-total-power {
         type union {
           type dbm-t;
           type empty;
         }
         config false;
         description "Current total received power";
       }
     } // grouping for configured attributes out of mode

     grouping l0-tunnel-attributes {
       description
         "Parameters for Layer0 (WSON or Flexi-Grid) Tunnels.";
       leaf bit-stuffing {
         type boolean;
         description
           "Bit stuffing enabled/disabled.";
       }
       leaf wavelength-assignment {
         type identityref {
           base wavelength-assignment;
         }
         description "Wavelength Allocation Method";
       }
     }

     grouping frequency-range {
       description
         "This grouping defines the lower and upper bounds of a
         frequency range (e.g., a band).

         This grouping SHOULD NOT be used to define a frequency slot,
         which SHOULD be defined using the n and m values instead.";
       leaf lower-frequency {
         type frequency-thz;
         mandatory true;
         description
           "The lower frequency boundary of the
           frequency range.";
       }
       leaf upper-frequency {
         type frequency-thz;
         must '. > ../lower-frequency' {
           error-message
             "The upper frequency must be greater than the lower
             frequency.";
         }

Belotti, et al.         Expires 13 September 2023              [Page 40]
Internet-Draft           Yang for Layer 0 Types               March 2023

         mandatory true;
         description
           "The upper frequency boundary of the
           frequency range.";
       }
     }

     grouping l0-path-constraints {
       description
         "Common attribute for Layer 0 path constraints to be used by
         Layer 0 computation.";
       leaf gsnr-margin {
         type snr {
           range 0..max;
         }
         default 0;
         description
           "An additional margin to be added to the OSNR-min of the
           transceiver when checking the estimated received Generalized
           SNR (GSNR).";
       }
     }

     grouping l0-path-properties {
       description
         "Common attribute for reporting the Layer 0 computed path
         properties.";
       leaf estimated-gsnr {
         type snr;
         config false;
         description
           "The estimate received GSNR for the computed path.";
       }
     }
   }
   <CODE ENDS>

                    Figure 1: Layer 0 Types YANG module

4.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

Belotti, et al.         Expires 13 September 2023              [Page 41]
Internet-Draft           Yang for Layer 0 Types               March 2023

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.  The NETCONF protocol over
   Secure Shell (SSH) specification [RFC6242] describes a method for
   invoking and running NETCONF within a Secure Shell (SSH) session as
   an SSH subsystem.

   The objects in this YANG module are common data types and groupings.
   No object in this module can be read or written to.  These
   definitions can be imported and used by other Layer 0 specific
   modules.  It is critical to consider how imported definitions will be
   utilized and accessible via RPC operations, as the resultant schema
   will have data nodes that can be writable, or readable, and will have
   a significant effect on the network operations if used incorrectly or
   maliciously.  All of these considerations belong in the document that
   defines the modules that import from this YANG module.  Therefore, it
   is important to manage access to resultant data nodes that are
   considered sensitive or vulnerable in some network environments.

   The security considerations spelled out in the YANG 1.1 specification
   [RFC7950] apply for this document as well.

5.  IANA Considerations

   For the following URI in the "IETF XML Registry" [RFC3688], IANA has
   updated the reference field to refer to this document:

      URI:  urn:ietf:params:xml:ns:yang:ietf-layer0-types
      Registrant Contact:  The IESG
      XML:  N/A; the requested URI is an XML namespace.

   This document also adds an updated YANG module to the "YANG Module
   Names" registry [RFC7950]:

      Name:  ietf-layer0-types
      Namespace:  urn:ietf:params:xml:ns:yang:ietf-layer0-types
      Prefix:  l0-types
      Reference:  RFC XXXX

   RFC Editor Note: Please replace XXXX with the RFC number assigned to
   this document.

6.  References

6.1.  Normative References

Belotti, et al.         Expires 13 September 2023              [Page 42]
Internet-Draft           Yang for Layer 0 Types               March 2023

   [ITU-T_G.698.2]
              ITU-T Recommendation G.698.2, "Amplified multichannel
              dense wavelength division multiplexing applications with
              single channel optical interfaces", ITU-T G.698.2 ,
              November 2018.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC4203]  Kompella, K., Ed. and Y. Rekhter, Ed., "OSPF Extensions in
              Support of Generalized Multi-Protocol Label Switching
              (GMPLS)", RFC 4203, DOI 10.17487/RFC4203, October 2005,
              <https://www.rfc-editor.org/info/rfc4203>.

   [RFC6163]  Lee, Y., Ed., Bernstein, G., Ed., and W. Imajuku,
              "Framework for GMPLS and Path Computation Element (PCE)
              Control of Wavelength Switched Optical Networks (WSONs)",
              RFC 6163, DOI 10.17487/RFC6163, April 2011,
              <https://www.rfc-editor.org/info/rfc6163>.

   [RFC6205]  Otani, T., Ed. and D. Li, Ed., "Generalized Labels for
              Lambda-Switch-Capable (LSC) Label Switching Routers",
              RFC 6205, DOI 10.17487/RFC6205, March 2011,
              <https://www.rfc-editor.org/info/rfc6205>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC7698]  Gonzalez de Dios, O., Ed., Casellas, R., Ed., Zhang, F.,
              Fu, X., Ceccarelli, D., and I. Hussain, "Framework and
              Requirements for GMPLS-Based Control of Flexi-Grid Dense
              Wavelength Division Multiplexing (DWDM) Networks",
              RFC 7698, DOI 10.17487/RFC7698, November 2015,
              <https://www.rfc-editor.org/info/rfc7698>.

   [RFC7699]  Farrel, A., King, D., Li, Y., and F. Zhang, "Generalized
              Labels for the Flexi-Grid in Lambda Switch Capable (LSC)
              Label Switching Routers", RFC 7699, DOI 10.17487/RFC7699,
              November 2015, <https://www.rfc-editor.org/info/rfc7699>.

Belotti, et al.         Expires 13 September 2023              [Page 43]
Internet-Draft           Yang for Layer 0 Types               March 2023

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

   [RFC8363]  Zhang, X., Zheng, H., Casellas, R., Gonzalez de Dios, O.,
              and D. Ceccarelli, "GMPLS OSPF-TE Extensions in Support of
              Flexi-Grid Dense Wavelength Division Multiplexing (DWDM)
              Networks", RFC 8363, DOI 10.17487/RFC8363, May 2018,
              <https://www.rfc-editor.org/info/rfc8363>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8776]  Saad, T., Gandhi, R., Liu, X., Beeram, V., and I. Bryskin,
              "Common YANG Data Types for Traffic Engineering",
              RFC 8776, DOI 10.17487/RFC8776, June 2020,
              <https://www.rfc-editor.org/info/rfc8776>.

   [RFC8795]  Liu, X., Bryskin, I., Beeram, V., Saad, T., Shah, H., and
              O. Gonzalez de Dios, "YANG Data Model for Traffic
              Engineering (TE) Topologies", RFC 8795,
              DOI 10.17487/RFC8795, August 2020,
              <https://www.rfc-editor.org/info/rfc8795>.

6.2.  Informative References

   [I-D.ietf-ccamp-dwdm-if-param-yang]
              Galimberti, G., Kunze, R., Hiremagalur, D., and G.
              Grammel, "A YANG model to manage the optical interface

Belotti, et al.         Expires 13 September 2023              [Page 44]
Internet-Draft           Yang for Layer 0 Types               March 2023

              parameters for an external transponder in a WDM network",
              Work in Progress, Internet-Draft, draft-ietf-ccamp-dwdm-
              if-param-yang-08, 24 October 2022,
              <https://datatracker.ietf.org/doc/html/draft-ietf-ccamp-
              dwdm-if-param-yang-08>.

   [ITU-T_G.694.1]
              ITU-T Recommendation G.694.1, "Spectral grids for WDM
              applications: DWDM frequency grid", ITU-T G.694.1 ,
              October 2020.

   [ITU-T_G.694.2]
              ITU-T Recommendation G.694.2, "Spectral grids for WDM
              applications: CWDM wavelength grid", ITU-T G.694.2 ,
              December 2003.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC7446]  Lee, Y., Ed., Bernstein, G., Ed., Li, D., and W. Imajuku,
              "Routing and Wavelength Assignment Information Model for
              Wavelength Switched Optical Networks", RFC 7446,
              DOI 10.17487/RFC7446, February 2015,
              <https://www.rfc-editor.org/info/rfc7446>.

   [RFC7581]  Bernstein, G., Ed., Lee, Y., Ed., Li, D., Imajuku, W., and
              J. Han, "Routing and Wavelength Assignment Information
              Encoding for Wavelength Switched Optical Networks",
              RFC 7581, DOI 10.17487/RFC7581, June 2015,
              <https://www.rfc-editor.org/info/rfc7581>.

   [RFC9093]  Zheng, H., Lee, Y., Guo, A., Lopez, V., and D. King, "A
              YANG Data Model for Layer 0 Types", RFC 9093,
              DOI 10.17487/RFC9093, August 2021,
              <https://www.rfc-editor.org/info/rfc9093>.

Appendix A.  Changes from RFC 9093

   To be added in a future revision of this draft.

Acknowledgments

   The authors and the working group give their sincere thanks to Robert
   Wilton for the YANG doctor review and Tom Petch for his comments
   during the model and document development.

   This document was prepared using kramdown.

Belotti, et al.         Expires 13 September 2023              [Page 45]
Internet-Draft           Yang for Layer 0 Types               March 2023

Contributors

   Gabriele Galimberti
   Cisco
   Email: ggalimbe@cisco.com

   Enrico Griseri
   Nokia
   Email: Enrico.Griseri@nokia.com

   Dhruv Dhody
   Huawei
   Email: dhruv.ietf@gmail.com

   Bin Yeong Yoon
   ETRI
   Email: byyun@etri.re.kr

   Ricard Vilalta
   CTTC
   Email: ricard.vilalta@cttc.es

   Young Lee
   Samsung
   Email: younglee.tx@gmail.com

   Victor Lopez
   Nokia
   Email: victor.lopez@nokia.com

Authors' Addresses

   Sergio Belotti (editor)
   Nokia
   Email: sergio.belotti@nokia.com

   Italo Busi (editor)
   Huawei
   Email: italo.busi@huawei.com

Belotti, et al.         Expires 13 September 2023              [Page 46]
Internet-Draft           Yang for Layer 0 Types               March 2023

   Dieter Beller (editor)
   Nokia
   Email: dieter.beller@nokia.com

   Haomian Zheng
   Huawei
   Email: zhenghaomian@huawei.com

   Esther Le Rouzic
   Orange
   Email: esther.lerouzic@orange.com

   Aihua Guo
   Futurewei Technologies
   Email: aihuaguo.ietf@gmail.com

   Daniel King
   University of Lancaster
   Email: d.king@lancaster.ac.uk

Belotti, et al.         Expires 13 September 2023              [Page 47]