A YANG Data Model for Flexi-Grid Tunnels
Jorge E. Lopez de Vergara Mendez
Naudit HPCN
jorge.lopez_vergara@uam.es
Daniel Perdices Burrero
Universidad Autonoma de Madrid
daniel.perdices@uam.es
Daniel King
Old Dog Consulting
daniel@olddog.co.uk
Victor Lopez
Nokia
victor.lopez@nokia.com
Italo Busi
Huawei Technologies
Italo.Busi@huawei.com
Sergio Belotti
Nokia
sergio.belotti@nokia.com
G. Galimberti
Cisco
ggalimbe@cisco.com
2022
CCAMP Working Group
Flexi-Grid
This document defines a YANG model for managing flexi-grid optical tunnels (media-channels), complementing the information provided by the flexi-grid topology model.
The YANG data model defined in this document conforms to the Network Management Datastore Architecture (NMDA).

Introduction
Transport networks are evolving from current DWDM systems towards elastic optical networks, based on flexi-grid transmission and switching technologies [RFC7698]. Such technology aims at increasing both transport network scalability and flexibility, allowing the optimization of bandwidth usage.
While [I-D.ietf-ccamp-flexigrid-yang] focuses on flexi-grid objects such as nodes, transponders and links, this document presents a YANG [RFC7950] model for the flexi-grid tunnel (media-channel). This YANG module defines the whole path from a source transponder or node to the destination through a number of intermediate nodes in the flexi-grid network.
This document identifies the flexi-grid tunne components, parameters and their values, characterizes the features and the performances of the flexi-grid elements. An application example is provided towards the end of the document to better understand their utility.

Terminology
Refer to [RFC7446] and [RFC7699] for the key terms used in this document.
The following terms are defined in [RFC7950] and are not redefined here:
- client
- server
- augment
- data model
- data node
The following terms are defined in [RFC6241] and are not redefined here:
- configuration data
- state data
The terminology for describing YANG data models is found in [RFC7950].

Flexi-Grid Tunnel Overview
The present model defines a flexi-grid tunnel mainly composed of:
- source address
- source flexi-grid port
- source flexi-grid transponder
- destination address
- destination flexi-grid port
- destination flexi-grid transponder
- list of links that defines the path
- other optical attributes
Each path can be a tunnel (only defined by source and destination node) or a network tunnel (additionally needs source and destination transponders). Therefore, all the attributes are optional to support both situations.
This is achieved by a combination of the traffic engineering tunnel attributes explained in [I-D.ietf-teas-yang-te] and augments when necessary. For instance, source address, source flexi-grid transponder, destination address and destination flexi-grid transponder attributes are directly taken from tunnel, whereas other attributes such as source flexi-grid port, destination flexi-grid port are defined, as they are specific for flexi-grid.

Example of Use
In order to explain how this model is used, the following example is provided. An optical network usually has multiple transponders, switches (nodes) and links. Figure 1 shows a simple topology, where two physical paths interconnect two optical transponders.

Topology Example

                                 Tunnel
     <==============================================================>
                         Flexi-grid Tunnel Group x
            <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>

   +------------+                                        +------------+
   |  Flexi-    |                                        |  Flexi-    |
   |   grid     |                                        |   grid     |
   |  node A    |                                        |  node E    |
   |            |        +------+        +------+        |            |
   |            | Link 1 |Flexi-| Link 2 |Flexi-| Link 3 |            |
   |            |<------>| grid |<------>| grid |<------>|            |
   |.........   |        |node B|        |node C|        |   .........|
   | Trans- :   |        +------+        +------+        |   : Trans- |
   | ponder :   |                                        |   : ponder |
   |    A   :   |              +----------+              |   :    E   |
   |........:   |     Link 4   |Flexi-grid|   Link 5     |   :........|
   |            |              |    D     |              |            |
   |            |<------------>|   node   |<------------>|            |
   |            |              +----------+              |            |
   +------------+                                        +------------+

            <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
                          Flexi-grid Tunnel Group y

To configure a network tunnel to interconnect transponders A and E, first of all we have to populate the flexi-grid topology YANG model with all elements in the network:
- We define the transponders within nodes A and E as tunnel termination points (TTPs) and provide their internal local link connectivity towards the node interfaces. We also provide nodes A and B identifiers, addresses and interfaces.
- We do the same for the nodes B, C and D, providing their identifiers, addresses and interfaces, as well as the internal connectivity matrix between interfaces.
- Then, we also define the links 1 to 5 that interconnect nodes, indicating which flexi-grid labels are available.
- Other information, such as the slot frequency and granularity are also provided.
After the nodes, links and transponders have been defined using [I-D.ietf-ccamp-flexigrid-yang] we can configure the tunnel from the information we have stored in the flexi-grid topology, by querying which elements are available, and planning the resources that have to be provided on each situation. Note that every element in the flexi-grid topology has a reference, and this is the way in which they are called in the tunnel.
- Depending on the case, it is possible to define either the source and destination node ports, or the source and destination node and transponder. In our case, we would define a network tunnel, with source transponder A and source node B, and destination transponder E and destination node C. Thus, we are going to follow path x.
- Then, for each link in the path x, we indicate which channel we are going to use, providing information about the slots, and what nodes are connected.
- Finally, the flexi-grid topology has to be updated with each element usage status each time a tunnel is created or torn down.

YANG Model for Flexi-Grid Tunnel

YANG Tree

module: ietf-flexi-grid-tunnel

  augment /te:te/te:tunnels/te:tunnel:
    +--rw fec-type?           identityref
    +--rw termination-type?   identityref
    +--rw bit-stuffing?       boolean
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-in-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-out-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-in-segment/te:label-restrictions
            /te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-in-segment/te:label-restrictions
            /te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-out-segment/te:label-restrictions
            /te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction:
    +--rw grid-type?    identityref
    +--rw priority?     uint8
    +--rw flexi-grid
       +--rw slot-width-granularity?   identityref
       +--rw min-slot-width-factor?    uint16
       +--rw max-slot-width-factor?    uint16
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint
            /te:explicit-route-objects-always
            /te:route-object-exclude-always/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint
            /te:explicit-route-objects-always
            /te:route-object-include-exclude/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-in-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-in-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-in-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-out-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:globals/te:named-path-constraints
            /te:named-path-constraint/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:optimizations/te:algorithm/te:metric
            /te:optimization-metric/te:explicit-route-exclude-objects
            /te:route-object-exclude-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:optimizations/te:algorithm/te:metric
            /te:optimization-metric/te:explicit-route-include-objects
            /te:route-object-include-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:explicit-route-objects-always
            /te:route-object-exclude-always/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:explicit-route-objects-always
            /te:route-object-include-exclude/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-in-segment/te:label-restrictions
            /te:label-restriction/te:label-start/te:te-label
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-in-segment/te:label-restrictions
            /te:label-restriction/te:label-end/te:te-label
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-in-segment/te:label-restrictions
            /te:label-restriction/te:label-step/te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:computed-paths-properties
            /te:computed-path-properties/te:path-properties
            /te:path-route-objects/te:path-route-object/te:type
            /te:label/te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--ro (single-or-super-channel)?
          +--:(single)
          |  +--ro flexi-n?              l0-types:flexi-n
          |  +--ro flexi-m?              l0-types:flexi-m
          +--:(super)
             +--ro subcarrier-flexi-n* [flexi-n]
                +--ro flexi-n    l0-types:flexi-n
                +--ro flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path/te:optimizations
            /te:algorithm/te:metric/te:optimization-metric
            /te:explicit-route-exclude-objects
            /te:route-object-exclude-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path/te:optimizations
            /te:algorithm/te:metric/te:optimization-metric
            /te:explicit-route-include-objects
            /te:route-object-include-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:explicit-route-objects-always
            /te:route-object-exclude-always/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:explicit-route-objects-always
            /te:route-object-include-exclude/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-in-segment/te:label-restrictions
            /te:label-restriction/te:label-start/te:te-label
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-in-segment/te:label-restrictions
            /te:label-restriction/te:label-end/te:te-label
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-in-segment/te:label-restrictions
            /te:label-restriction/te:label-step/te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-out-segment/te:label-restrictions
            /te:label-restriction/te:label-start/te:te-label
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-out-segment/te:label-restrictions
            /te:label-restriction/te:label-end/te:te-label
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:path-out-segment/te:label-restrictions
            /te:label-restriction/te:label-step/te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:primary-paths
            /te:primary-path/te:primary-reverse-path
            /te:computed-paths-properties/te:computed-path-properties
            /te:path-properties/te:path-route-objects
            /te:path-route-object/te:type/te:label/te:label-hop
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--ro (single-or-super-channel)?
          +--:(single)
          |  +--ro flexi-n?              l0-types:flexi-n
          |  +--ro flexi-m?              l0-types:flexi-m
          +--:(super)
             +--ro subcarrier-flexi-n* [flexi-n]
                +--ro flexi-n    l0-types:flexi-n
                +--ro flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:optimizations/te:algorithm
            /te:metric/te:optimization-metric
            /te:explicit-route-exclude-objects
            /te:route-object-exclude-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:optimizations/te:algorithm
            /te:metric/te:optimization-metric
            /te:explicit-route-include-objects
            /te:route-object-include-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:explicit-route-objects-always
            /te:route-object-exclude-always/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:explicit-route-objects-always
            /te:route-object-include-exclude/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:secondary-paths
            /te:secondary-path/te:computed-paths-properties
            /te:computed-path-properties/te:path-properties
            /te:path-route-objects/te:path-route-object/te:type
            /te:label/te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--ro (single-or-super-channel)?
          +--:(single)
          |  +--ro flexi-n?              l0-types:flexi-n
          |  +--ro flexi-m?              l0-types:flexi-m
          +--:(super)
             +--ro subcarrier-flexi-n* [flexi-n]
                +--ro flexi-n    l0-types:flexi-n
                +--ro flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:optimizations/te:algorithm
            /te:metric/te:optimization-metric
            /te:explicit-route-exclude-objects
            /te:route-object-exclude-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:optimizations/te:algorithm
            /te:metric/te:optimization-metric
            /te:explicit-route-include-objects
            /te:route-object-include-object/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path
            /te:explicit-route-objects-always
            /te:route-object-exclude-always/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path
            /te:explicit-route-objects-always
            /te:route-object-include-exclude/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw (single-or-super-channel)?
          +--:(single)
          |  +--rw flexi-n?              l0-types:flexi-n
          |  +--rw flexi-m?              l0-types:flexi-m
          +--:(super)
             +--rw subcarrier-flexi-n* [flexi-n]
                +--rw flexi-n    l0-types:flexi-n
                +--rw flexi-m?   l0-types:flexi-m
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-in-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction
            /te:label-start/te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-end
            /te:te-label/te:technology:
    +--:(flexi-grid)
       +--rw flexi-n?   l0-types:flexi-n
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:path-out-segment
            /te:label-restrictions/te:label-restriction/te:label-step
            /te:technology:
    +--:(flexi-grid)
       +--rw flexi-grid-channel-spacing?   identityref
       +--rw flexi-n-step?                 uint8
  augment /te:te/te:tunnels/te:tunnel/te:secondary-reverse-paths
            /te:secondary-reverse-path/te:computed-paths-properties
            /te:computed-path-properties/te:path-properties
            /te:path-route-objects/te:path-route-object/te:type
            /te:label/te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--ro (single-or-super-channel)?
          +--:(single)
          |  +--ro flexi-n?              l0-types:flexi-n
          |  +--ro flexi-m?              l0-types:flexi-m
          +--:(super)
             +--ro subcarrier-flexi-n* [flexi-n]
                +--ro flexi-n    l0-types:flexi-n
                +--ro flexi-m?   l0-types:flexi-m
  augment /te:te/te:lsps/te:lsp/te:lsp-record-route-information
            /te:lsp-record-route-information/te:type/te:label
            /te:label-hop/te:te-label/te:technology:
    +--:(flexi-grid)
       +--ro (single-or-super-channel)?
          +--:(single)
          |  +--ro flexi-n?              l0-types:flexi-n
          |  +--ro flexi-m?              l0-types:flexi-m
          +--:(super)
             +--ro subcarrier-flexi-n* [flexi-n]
                +--ro flexi-n    l0-types:flexi-n
                +--ro flexi-m?   l0-types:flexi-m

YANG Code

<CODE BEGINS> file "ietf-flexi-grid-tunnel@2022-07-11.yang"
module ietf-flexi-grid-tunnel {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-flexi-grid-tunnel";
  prefix "flexg-tnl";

  import ietf-te {
    prefix "te";
    revision-date "2022-07-11";
    reference
      "I-D.ietf-teas-yang-te-19: A YANG Data Model for Traffic
      Engineering Tunnels and Interfaces. ";
  }

  import ietf-layer0-types {
    prefix "l0-types";
  }

  import ietf-layer0-types-ext {
    prefix "l0-types-ext";
  }

  organization
    "IETF CCAMP Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/ccamp/>
     WG List:  <mailto:ccamp@ietf.org>
     Editor:   Jorge E. Lopez de Vergara
               <jorge.lopez_vergara@uam.es>
     Editor:   Daniel Perdices
               <daniel.perdices@naudit.es>
     Editor:   Victor Lopez
               <victor.lopez@nokia.com>
     Editor:   Young Lee
               <leeyoung@huawei.com>";

  description
    "This module defines a model for Flex-grid Tunnel
    Services.
    The model fully conforms to the Network Management
    Datastore Architecture (NMDA).

    Copyright (c) 2022 IETF Trust and the persons
    identified as authors of the code.  All rights reserved.
    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 Simplified 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.";

  revision "2022-07-11" {
    description
      "Initial Revision";
    reference
      "RFC XXXX: YANG data model for Flexi-Grid tunnels";
    // RFC Ed.: replace XXXX with actual RFC number, update date
    // information and remove this note
  }

  /*
   * Data nodes
   */

  augment "/te:te/te:tunnels/te:tunnel" {
    description
      "Augment with additional parameters required for flexi-grid
      tunnels.";
    uses l0-types-ext:l0-tunnel-attributes;
  }

  /*
   * Augment TE label range information
   */

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-in-segment/"
        + "te:label-restrictions/te:label-restriction" {
    description
      "Augment TE label range information for the ingress segment
      of the named path constraint.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-out-segment/"
        + "te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the egress segment
      of the named path constraint.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the ingress segment
      of the primay path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the egress segment
      of the primay path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the ingress segment
      of the primay reverse path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the egress segment
      of the primay reverse path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the ingress segment
      of the secondary path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the egress segment
      of the secondary path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the ingress segment
      of the secondary reverse path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction" {
    description
      "Augment TE label range information for the egress segment
      of the secondary reverse path.";
    uses l0-types:flexi-grid-label-range-info;
  }

  /*
   * Augment TE label.
   */

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-exclude-always/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects always
      excluded by the path computation with the named path
      constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-include-exclude/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects included
      or excluded by the path computation with the named path
      constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-in-segment/"
        + "te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the ingress segment
      of the named path constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-in-segment/"
        + "te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the ingress segment
      of the named path constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-in-segment/"
        + "te:label-restrictions/te:label-restriction/"
        + "te:label-step/te:technology" {
    description
      "Augment TE label range step for the ingress segment
      of the named path constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-out-segment/"
        + "te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the egress segment
      of the named path constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-out-segment/"
        + "te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the egress segment
      of the named path constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:globals/te:named-path-constraints/"
        + "te:named-path-constraint/te:path-out-segment/"
        + "te:label-restrictions/te:label-restriction/"
        + "te:label-step/te:technology" {
    description
      "Augment TE label range step for the egress segment
      of the named path constraint.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-exclude-objects/"
        + "te:route-object-exclude-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects excluded by the path computation of the primary
      path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-include-objects/"
        + "te:route-object-include-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects included by the path computation of the primary
      path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-exclude-always/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects always
      excluded by the path computation of the primary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-include-exclude/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects included
      or excluded by the path computation of the primary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the ingress segment
      of the primay path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the ingress segment
      of the primay path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the ingress segment
      of the primay path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the egress segment
      of the primay path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the egress segment
      of the primay path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range end for the egress segment
      of the primay path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:computed-paths-properties/"
        + "te:computed-path-properties/te:path-properties/"
        + "te:path-route-objects/te:path-route-object/"
        + "te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the route object of the computed
      primary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-exclude-objects/"
        + "te:route-object-exclude-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects excluded by the path computation of the primary
      reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-include-objects/"
        + "te:route-object-include-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects included by the path computation of the primary
      reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-exclude-always/"
        + "te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects always
      excluded by the path computation of the primary reverse
      path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-include-exclude/"
        + "te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects included
      or excluded by the path computation of the primary reverse
      path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the ingress segment
      of the primay reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the ingress segment
      of the primay reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the ingress segment
      of the primay reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the egress segment
      of the primay reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the egress segment
      of the primay reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the egress segment
      of the primay reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:primary-paths/te:primary-path/"
        + "te:primary-reverse-path/"
        + "te:computed-paths-properties/te:computed-path-properties/"
        + "te:path-properties/te:path-route-objects/"
        + "te:path-route-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the route object of the computed
      primary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-exclude-objects/"
        + "te:route-object-exclude-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects excluded by the path computation of the
      secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-include-objects/"
        + "te:route-object-include-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects included by the path computation of the
      secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-exclude-always/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects always
      excluded by the path computation of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-include-exclude/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects included
      or excluded by the path computation of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the ingress segment
      of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the ingress segment
      of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }
  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the ingress segment
      of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the egress segment
      of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the egress segment
      of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the egress segment
      of the secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-paths/te:secondary-path/"
        + "te:computed-paths-properties/"
        + "te:computed-path-properties/"
        + "te:path-properties/te:path-route-objects/"
        + "te:path-route-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the route object of the computed
      secondary path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-exclude-objects/"
        + "te:route-object-exclude-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects excluded by the path computation of the
      secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:optimizations/te:algorithm/te:metric/"
        + "te:optimization-metric/te:explicit-route-include-objects/"
        + "te:route-object-include-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the optimization of the explicit
      route objects included by the path computation of the
      secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-exclude-always/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects always
      excluded by the path computation of the secondary reverse
      path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:explicit-route-objects-always/"
        + "te:route-object-include-exclude/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the explicit route objects included
      or excluded by the path computation of the secondary reverse
      path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the ingress segment
      of the secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the ingress segment
      of the secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-in-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the ingress segment
      of the secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-start/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range start for the egress segment
      of the secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-end/"
        + "te:te-label/te:technology" {
    description
      "Augment TE label range end for the egress segment
      of the secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-start-end;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:path-out-segment/te:label-restrictions/"
        + "te:label-restriction/te:label-step/te:technology" {
    description
      "Augment TE label range step for the egress segment
      of the secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-step;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel/"
        + "te:secondary-reverse-paths/te:secondary-reverse-path/"
        + "te:computed-paths-properties/"
        + "te:computed-path-properties/"
        + "te:path-properties/te:path-route-objects/"
        + "te:path-route-object/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the route object of the computed
      secondary reverse path.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }

  augment "/te:te/te:lsps/"
        + "te:lsp/te:lsp-record-route-information/"
        + "te:lsp-record-route-information/te:type/te:label/"
        + "te:label-hop/te:te-label/te:technology" {
    description
      "Augment TE label hop for the record route of the LSP.";
    case flexi-grid {
      uses l0-types:flexi-grid-label-hop;
    }
  }
}
<CODE ENDS>

Security Considerations
The configuration, state, and action data defined in this document are designed to be accessed via a management protocol with a secure transport layer, such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The NETCONF access control model [RFC8341] provides the means to restrict access for particular NETCONF users to a preconfigured subset of all available NETCONF protocol operations and content.
There are a number of data nodes defined in this YANG module that are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability:
- /te:te/te:tunnels/te:tunnel
- /te:te/.../te:te-bandwidth/te:technology
- /te:te/.../te:type/te:label/te:label-hop/te:te-label/te:technology
- /te:te/.../te:label-restrictions/te:label-restriction/te:label-start/te:te-label/te:technology
- /te:te/.../te:label-restrictions/te:label-restriction/te:label-end/te:te-label/te:technology
- /te:te/.../te:label-restrictions/te:label-restriction/
Editors note: we are using simplified description by folding similar branches to avoid repetition.

IANA Considerations
To be discussed.

Contributors
This work was developed by several additional people, who due to frontpage author restrictions, are listed below:
Zafar Ali
Cisco
Email: zali@cisco.com
Daniel Michaud Vallinoto
Universidad Autonoma de Madrid
Email: daniel.michaud@estudiante.uam.es
Young Lee
Samsung
Email: younglee.tx@gmail.com
Oscar Gonzalez de Dios
Telefonica I+D/GCTO
Email: oscar.gonzalezdedios@telefonica.com

Acknowledgments
This work is also partially funded by the Spanish State Research Agency under the project AgileMon (AEI PID2019-104451RB-C21) and by the Spanish Ministry of Science, Innovation and Universities under the program for the training of university lecturers (Grant number: FPU19/05678).

Normative References

Informative References
[RFC7698]
[I-D.ietf-ccamp-flexigrid-yang]
[RFC7950]
[RFC7446]
[RFC7699]
[RFC6241]
[I-D.ietf-teas-yang-te]
[RFC8040]
[RFC8341]