TEAS Working Group                                          T. Saad, Ed.
Internet-Draft                                                 R. Gandhi
Intended status: Standards Track                       Cisco Systems Inc
Expires: September 11, 2017                                       X. Liu
                                                                   Jabil
                                                               V. Beeram
                                                        Juniper Networks
                                                                 H. Shah
                                                                   Ciena
                                                              I. Bryskin
                                                     Huawei Technologies
                                                          March 10, 2017


    A YANG Data Model for Traffic Engineering Tunnels and Interfaces
                       draft-ietf-teas-yang-te-06

Abstract

   This document defines a YANG data model for the configuration and
   management of Traffic Engineering (TE) interfaces, tunnels and Label
   Switched Paths (LSPs).  The model is divided into YANG modules that
   classify data into generic, device-specific, technology agnostic, and
   technology-specific elements.  The model also includes module(s) that
   contain reusable TE data types and data groupings.

   This model covers data for configuration, operational state, remote
   procedural calls, and event notifications.

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 http://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 September 11, 2017.






Saad, et al.           Expires September 11, 2017               [Page 1]


Internet-Draft             TE YANG Data Model                 March 2017


Copyright Notice

   Copyright (c) 2017 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
   (http://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 Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Tree Diagram  . . . . . . . . . . . . . . . . . . . . . .   3
     1.3.  Prefixes in Data Node Names . . . . . . . . . . . . . . .   4
     1.4.  Open Issues and Next Steps  . . . . . . . . . . . . . . .   5
       1.4.1.  TE Technology Models  . . . . . . . . . . . . . . . .   5
       1.4.2.  State Data Organization . . . . . . . . . . . . . . .   6
   2.  Model Overview  . . . . . . . . . . . . . . . . . . . . . . .   7
     2.1.  Module(s) Relationship  . . . . . . . . . . . . . . . . .   7
     2.2.  Design Considerations . . . . . . . . . . . . . . . . . .   9
     2.3.  Optional Features . . . . . . . . . . . . . . . . . . . .  10
     2.4.  Configuration Inheritance . . . . . . . . . . . . . . . .  10
   3.  TE Generic Model Organization . . . . . . . . . . . . . . . .  10
     3.1.  Global Configuration and State Data . . . . . . . . . . .  11
     3.2.  Interfaces Configuration and State Data . . . . . . . . .  12
     3.3.  Tunnels Configuration and State Data  . . . . . . . . . .  13
       3.3.1.  Tunnel Compute-Only Mode  . . . . . . . . . . . . . .  14
       3.3.2.  Tunnel Hierarchical Link Endpoint . . . . . . . . . .  15
     3.4.  TE LSPs State Data  . . . . . . . . . . . . . . . . . . .  15
     3.5.  Global RPC Data . . . . . . . . . . . . . . . . . . . . .  15
     3.6.  Interface RPC Data  . . . . . . . . . . . . . . . . . . .  15
     3.7.  Tunnel RPC Data . . . . . . . . . . . . . . . . . . . . .  15
     3.8.  Global Notifications Data . . . . . . . . . . . . . . . .  16
     3.9.  Interfaces Notifications Data . . . . . . . . . . . . . .  16
     3.10. Tunnel Notification Data  . . . . . . . . . . . . . . . .  16
   4.  TE Generic and Helper YANG Modules  . . . . . . . . . . . . .  33
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . 125
   6.  Security Considerations . . . . . . . . . . . . . . . . . . . 126
   7.  Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 127
   8.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . . 127
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . . 128



Saad, et al.           Expires September 11, 2017               [Page 2]


Internet-Draft             TE YANG Data Model                 March 2017


     9.1.  Normative References  . . . . . . . . . . . . . . . . . . 128
     9.2.  Informative References  . . . . . . . . . . . . . . . . . 129
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . 130

1.  Introduction

   YANG [RFC6020] is a data definition language that was introduced to
   define the contents of a conceptual data store that allows networked
   devices to be managed using NETCONF [RFC6241].  YANG is proving
   relevant beyond its initial confines, as bindings to other interfaces
   (e.g.  RESTCONF [RFC8040]) and encoding other than XML (e.g.  JSON)
   are being defined.  Furthermore, YANG data models can be used as the
   basis of implementation for other interfaces, such as CLI and
   programmatic APIs.

   This document describes the YANG data models for TE Tunnels, Label
   Switched Paths (LSPs) and TE interfaces that cover data applicable to
   generic or device-independent, device-specific, Multiprotocol Label
   Switching (MPLS) technology specific, and Segment Routing (SR) TE
   technology.  It also describes helper modules that define TE
   grouping(s) and data types that can be imported by other modules.

   The document defines the high-level relationship between the modules
   defined in this document, as well as other external protocol modules.
   It is expected other data plane technology model(s) will augment the
   TE generic model.  Also, the TE generic model does not include any
   data specific to a signaling protocol.  It is expected YANG models
   for TE signaling protocols, such as RSVP-TE ([RFC3209], [RFC3473]),
   or Segment-Routing TE (SR-TE) will augment the TE generic module.

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in BCP 14, RFC 2119
   [RFC2119].

1.2.  Tree Diagram

   A simplified graphical representation of the data model is presented
   in each section of the model.  The following notations are used for
   the YANG model data tree representation.









Saad, et al.           Expires September 11, 2017               [Page 3]


Internet-Draft             TE YANG Data Model                 March 2017


   <status> <flags> <name> <opts> <type>

    <status> is one of:
      +  for current
      x  for deprecated
      o  for obsolete

    <flags> is one of:
      rw  for read-write configuration data
      ro  for read-only non-configuration data
      -x  for execution rpcs
      -n  for notifications

    <name> is the name of the node

   If the node is augmented into the tree from another module, its name
   is printed as <prefix>:<name>

    <opts> is one of:
      ? for an optional leaf or node
      ! for a presence container
      * for a leaf-list or list
      Brackets [<keys>] for a list's keys
      Curly braces {<condition>} for optional feature that make node
   conditional
      Colon : for marking case nodes
      Ellipses ("...") subtree contents not shown

      Parentheses enclose choice and case nodes, and case nodes are also
      marked with a colon (":").

    <type> is the name of the type for leafs and leaf-lists.

1.3.  Prefixes 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, as shown in Table 1.













Saad, et al.           Expires September 11, 2017               [Page 4]


Internet-Draft             TE YANG Data Model                 March 2017


           +---------------+--------------------+---------------+
           | Prefix        | YANG module        | Reference     |
           +---------------+--------------------+---------------+
           | yang          | ietf-yang-types    | [RFC6991]     |
           | inet          | ietf-inet-types    | [RFC6991]     |
           | te            | ietf-te            | this document |
           | te-types      | ietf-te-types      | this document |
           | te-mpls-types | ietf-te-mpls-types | this document |
           | te-dev        | ietf-te-device     | this document |
           | te-mpls       | ietf-te-mpls       | this document |
           | te-sr-mpls    | ietf-te-sr-mpls    | this document |
           +---------------+--------------------+---------------+

               Table 1: Prefixes and corresponding YANG modules

1.4.  Open Issues and Next Steps

   This section describes the number of open issues that are under
   consideration.  As issues are resolved, this section will be updated
   to reflect this and be left there for reference.  It is expected that
   all the issues in this section will be addressed before the document
   will be ready for final publication.

1.4.1.  TE Technology Models

   This document describes the generic TE YANG data model that is
   independent of any dataplane technology.  One of the design
   objectives is to allow specific data plane technologies models to
   reuse the generic TE data model and possibly augment it with
   technology specific data model(s).  There are multiple options being
   considered to achieve this:

   o  The generic TE model, including the lists of TE tunnels, LSPs, and
      interfaces can be defined and rooted at the top of the YANG tree.
      Specific leaf(s) under the TE tunnel, LSP, or interface, in this
      case, can identify the specific technology layer that it belongs
      to.  This approach implies a single list for each of TE tunnel(s),
      LSP(s), and interface(s) in the model carries elements of
      different technology layers.

   o  An instance of the generic TE YANG model can be mounted in the
      YANG tree once for each TE technology layer(s).  This approach
      provides separation of elements belonging to different technology
      layers into separate lists per layer in the data model.  For
      example, the proposal in [I-D.clemm-netmod-mount] allows for this
      capability by "mounting" the YANG data model at a specific target.





Saad, et al.           Expires September 11, 2017               [Page 5]


Internet-Draft             TE YANG Data Model                 March 2017


   o  The generic TE data node(s) and TE list(s) for tunnels, LSPs, and
      interfaces are defined as grouping(s) in a separate module.  The
      specific technology layer imports the generic TE groupings and
      uses them their respective technology specific module.

   This revision of the model leverages the LSP encoding type of a
   tunnel (and interfaces) to identify the specific technology
   associated with the a TE interfaces, tunnel(s) and the LSP(s).  For
   example, for an MPLS TE LSP, the LSP encoding type is assumed to be
   "lsp-encoding-packet".

   Finally, the TE generic model does not include any signaling protocol
   data.  It is expected that TE signaling protocol module(s) will be
   defined in other document(s) that will cover the RSVP-TE ([RFC3209],
   [RFC3473]), and Segment-Routing TE (SR-TE) model and that augment the
   TE generic model.

1.4.2.  State Data Organization

   Pure state data (for example, ephemeral or protocol derived state
   objects) can be modeled using one of the options below:

   o  Contained inside a read-write container, in a "state" sub-
      container, as shown in Figure 3

   o  Contained inside a separate read-only container, for example a
      lsps-state container

   The first option allows for placing configuration data in the read-
   write "config" sub-container, and by placing state data under the
   read-only "state" sub-container of the parent container.  However,
   when using approach for ephemeral or purely derived state (e.g. auto
   tunnels), and since in this case the state sub-container hangs off a
   read-write parent container, it will be possible to delete or modify
   the parent container and subsequently the ephemeral read-only state
   contained within (see Figure 3).

   The second option entails defining a new read-only parent container
   in the model (e.g. neighbors-state) that holds the data.

   This revision of the draft adopts the first option for ephemeral or
   state derived tunnels.  Further discussions on this topic are
   expected to close on the best choice to adopt.








Saad, et al.           Expires September 11, 2017               [Page 6]


Internet-Draft             TE YANG Data Model                 March 2017


2.  Model Overview

   The data model defined in this document covers the core TE features
   that are commonly supported across different vendor implementations.
   The support of extended or vendor specific TE feature(s) are expected
   to be in augmentations to the data models defined in this document.

   Throughout the model, the approach described in
   [I-D.openconfig-netmod-opstate] is adopted to represent data
   pertaining to configuration intended state, applied state and derived
   state data elements.  Each container in the model hold a "config" and
   "state" sub-container.  The "config" sub-container is used to
   represent the intended configurable parameters, and the state sub-
   container is used to represent both the applied configurable
   parameters and any derived state, such as counters or statistics
   information.

   The decision to use this approach was made to better align with the
   MPLS consolidated model in [I-D.openconfig-mpls-consolidated-model]
   and maximize reusability of groupings defined in this document and
   allow for possible convergence between the two models.

2.1.  Module(s) Relationship

   The TE generic model defined in "ietf-te.yang" covers the building
   blocks that are device independent and agnostic of any specific
   technology or control plane instances.  The TE device model defined
   in "ietf-te-device.yang" augments the TE generic model and covers
   data that is specific to a device - for example, attributes of TE
   interfaces, or TE timers that are local to a TE node.

   The TE data relevant to a specific instantiations of data plane
   technology exists in a separate YANG module(s) that augment the TE
   generic model.  For example, the MPLS-TE module "ietf-te-mpls.yang"
   is defined in Figure 10 and augments the TE generic model as shown in
   Figure 1.  Similarly, the module "ietf-te-sr-mpls.yang" models the
   Segment Routing (SR) TE specific data and augments the TE generic and
   MPLS-TE model(s).

   The TE data relevant to a TE specific signaling protocol
   instantiation is outside the scope and is covered in other documents.
   For example, the RSVP-TE [RFC3209] YANG model augmentation of the TE
   model is covered in [I-D.ietf-teas-yang-rsvp], and other signaling
   protocol model(s) (e.g. for Segment-Routing TE) are expected to also
   augment the TE generic model.






Saad, et al.           Expires September 11, 2017               [Page 7]


Internet-Draft             TE YANG Data Model                 March 2017


                                        ^: import
     TE generic     +---------+         o: augment
     module         | ietf-te |o-------------+
                    +---------+               \
                       |   o  \                \
                       |   |\  \                \
                       |   | \  V                \
                       |   |  +----------------+  \
                       |   |  | ietf-te-device | TE device module
                       |   |  +----------------+    \
                       |   |       o        o        \
                       |   |     /           \        \
                       v   |   /              V        V
                    +--------------+           +---------------+
     RSVP-TE module | ietf-rsvp-te |o .        | ietf-te-mpls  |
                    +--------------+   \       +---------------+
                       ^                \       o
                       |                 \      +-----------------+
                       |                  \     | ietf-te-sr-mpls |
                       |                   \    +-----------------+
                       |                    \
                       o                 +-------------------+
                    +-----------+        | ietf-rsvp-otn-te  |
     RSVP module    | ietf-rsvp |        +-------------------+
                    +-----------+           RSVP-TE with OTN
                                            extensions
                                           (shown for illustration
                                            not in this document)


   Figure 1: Relationship of TE module(s) with other signaling protocol
                                  modules



















Saad, et al.           Expires September 11, 2017               [Page 8]


Internet-Draft             TE YANG Data Model                 March 2017


             +---------+
             | ietf-te |       ^: import
             +---------+       o: augment
           import ^
                  |
                  |
            +---------------+
            | ietf-te-types |
            +---------------+
               o          o
               |            \
               |             \
       +-------------------+  +-------------------+
       | ietf-te-mpls-types |  | ietf-te-otn-types |
       +-------------------+  +-------------------+
                               (shown for illustration
                                not in this document)

     Figure 2: Relationship between generic and technology specific TE
                               types modules

2.2.  Design Considerations

   The following considerations with respect data organization are taken
   into account:

   o  reusable data elements are grouped into separate TE types
      module(s) that can be readily imported by other modules whenever
      needed

   o  reusable TE data types that are data plane independent are grouped
      in the TE generic types module "ietf-te-types.yang"

   o  reusable TE data elements that are data plane specific (e.g.
      packet MPLS or switching technologies as defined in [RFC3473]) are
      expected to be grouped in a technology- specific types module,
      e.g. "ietf-te-mpls-types.yang".  It is expected that technology
      specific types will augment TE generic types as shown in Figure 2

   o  The TE generic model contains device independent data and can be
      used to model data off a device (e.g. on a controller).  The TE
      data that is device-specific are grouped in a separate module as
      shown in Figure 1.

   o  In general, little information in the model is designated as
      "mandatory", to allow freedom to vendors to adapt the data model
      to their specific product implementation.




Saad, et al.           Expires September 11, 2017               [Page 9]


Internet-Draft             TE YANG Data Model                 March 2017


2.3.  Optional Features

   Optional features that are beyond the base TE model are left to the
   specific vendor to decide support using vendor model augmentation
   and/or using feature checks.

   This model declares a number of TE functions as features (such as
   P2MP-TE, soft-preemption etc.).

2.4.  Configuration Inheritance

   The defined data model supports configuration inheritance for
   tunnels, paths, and interfaces.  Data elements defined in the main
   container (e.g. that encompasses the list of tunnels, interfaces, or
   paths) are assumed to apply equally to all elements of the list,
   unless overridden explicitly for a certain element of a list (e.g. a
   tunnel, interface or path).

3.  TE Generic Model Organization

   The TE generic model covers configuration, state, RPCs, and
   notifications data pertaining to TE global parameters, interfaces,
   tunnels and LSPs parameters that are device independent.

   The container "te" is the top level container in this data model.
   The presence of this container is expected to enable TE function
   system wide.

   The approach described in [I-D.openconfig-netmod-opstate] allows for
   modeling the intended and respective applied and derived state.  The
   TE state data in this model falls into one of the following
   categories:

   o  State corresponding to applied configuration

   o  State corresponding to derived state, counters, stats, etc.

   o  State corresponding to ephemeral data (e.g.  LSPs, etc.)

   Data for the first two categories are contained under the respective
   "state" sub-container of the intended (e.g. tunnel).  The last
   category falls under a separate - e.g.  lsps-state- container that
   contains the attributes of a purely derived state data (e.g.
   ephemeral objects) that are not associated with any configuration as
   shown in Figure 3.






Saad, et al.           Expires September 11, 2017              [Page 10]


Internet-Draft             TE YANG Data Model                 March 2017


   module: ietf-te
      +--rw te!
         +--rw globals
               +-- rw config
                  <<intended configuration>>
               .
               +-- ro state
                  <<applied configuration>>
                  <<derived state associated with the tunnel>>
            .
            .

         +--rw tunnels
               +-- rw config
                  <<intended configuration>>
               .
               +-- ro state
                  <<applied configuration>>
                  <<derived state associated with the tunnel>>
            .
            .
   rpcs:
      +---x globals-rpc
      +---x tunnels-rpc
   notifications:
      +---n globals-notif
      +---n tunnels-notif

                 Figure 3: TE generic highlevel model view

3.1.  Global Configuration and State Data

   This branch of the data model covers configurations that control TE
   features behavior system-wide, and its respective state.  Examples of
   such configuration data are:

   o  Table of named SRLG mappings

   o  Table of named (extended) administrative groups mappings

   o  Table of named explicit paths to be referenced by TE tunnels

   o  Table of named path-constraints sets

   o  Auto-bandwidth global parameters

   o  TE diff-serve TE-class maps




Saad, et al.           Expires September 11, 2017              [Page 11]


Internet-Draft             TE YANG Data Model                 March 2017


   o  System-wide capabilities for LSP reoptimization (included in the
      TE device model)

      *  Reoptimization timers (periodic interval, LSP installation and
         cleanup)

   o  System-wide capabilities for TE state flooding (included in the TE
      device model)

      *  Periodic flooding interval

   o  Global capabilities that affect the originating, traversing and
      terminating LSPs.  For example:

      *  Path selection parameters (e.g. metric to optimize, etc.)

      *  Path or segment protection parameters

   The approach described in [I-D.openconfig-netmod-opstate] is utilized
   to include the global state data under the global "state" sub-
   container as shown in Figure 3.

   Examples of such states are:

   o  Global statistics (signaling, admission, preemption, flooding)

   o  Global counters (number of tunnels/LSPs/interfaces)

3.2.  Interfaces Configuration and State Data

   This branch of the model covers configuration and state data items
   corresponding to TE interfaces that are present on a specific device.
   A new module is introduced that holds the TE device specific
   properties.

   Examples of TE interface properties are:

   o  Maximum reservable bandwidth, bandwidth constraints (BC)

   o  Flooding parameters

      *  Flooding intervals and threshold values

   o  Fast reroute backup tunnel properties (such as static, auto-
      tunnel)

   o  interface attributes




Saad, et al.           Expires September 11, 2017              [Page 12]


Internet-Draft             TE YANG Data Model                 March 2017


      *  (Extended) administrative groups

      *  SRLG values

      *  TE metric value

   The state corresponding to the TE interfaces applied configuration,
   protocol derived state, and stats and counters all fall under the
   interface "state" sub-container as shown in Figure 4 below:

   module: ietf-te
      +--rw te!
         +--rw interfaces
            .
            +-- rw te-attributes
                +-- rw config
                   <<intended configuration>>
                .
                +-- ro state
                   <<applied configuration>>
                   <<derived state associated with the TE interface>>

                       Figure 4: TE interface state

   This covers state data for TE interfaces such as:

   o  Bandwidth information: maximum bandwidth, available bandwidth at
      different priorities and for each class-type (CT)

   o  List of admitted LSPs

      *  Name, bandwidth value and pool, time, priority

   o  Statistics: state counters, flooding counters, admission counters
      (accepted/rejected), preemption counters

   o  Adjacency information

      *  Neighbor address

      *  Metric value

3.3.  Tunnels Configuration and State Data

   This branch of the model covers intended, and corresponding applied
   configuration for tunnels.  As well, it holds possible derived state
   pertaining to TE tunnels.




Saad, et al.           Expires September 11, 2017              [Page 13]


Internet-Draft             TE YANG Data Model                 March 2017


   The approach described in [I-D.openconfig-netmod-opstate] is utilized
   for the inclusion of operational and statistical data as shown in
   Figure 5.

   module: ietf-te
      +--rw te!
         +--rw tunnels
            .
            +-- rw config
               <<intended configuration>>
            .
            +-- ro state
               <<applied configuration>>
               <<derived state associated with the tunnel>>

                     Figure 5: TE interface state tree

   Examples of tunnel configuration date for TE tunnels:

   o  Name and type (e.g.  P2P, P2MP) of the TE tunnel

   o  Admin-state

   o  Set of primary and corresponding secondary paths

   o  Routing usage (auto-route announce, forwarding adjacency)

   o  Policy based routing (PBR) parameters

3.3.1.  Tunnel Compute-Only Mode

   By default, a configured TE tunnel is provisioned so it can carry
   traffic as soon as a valid path is computed and an LSP instantiated
   in the network.  In other cases, a TE tunnel may be provisioned for
   computed path reporting purposes without the need to instantiate an
   LSP or commit resources in the network.  In such a case, a tunnel
   configuration in "compute-only" mode to distinguish it from default
   tunnel behavior.

   A "compute-only" TE tunnel is configured as a usual TE tunnel with
   associated path constraint(s) and properties on a device or
   controller.  The device or controller is expected to compute the
   feasible path(s) subject to configured constraints for of "compute-
   only" tunnel and reflect the computed path(s) in the LSP(s) Record-
   Route Object (RRO) list.  A client may query "on-demand" the
   "compute-only" TE tunnel computed path(s) properties by querying the
   state of the tunnel.  Alternatively, the client can subscribe on the




Saad, et al.           Expires September 11, 2017              [Page 14]


Internet-Draft             TE YANG Data Model                 March 2017


   "compute-only" TE tunnel to be notified of computed path(s) and
   whenever it changes.

3.3.2.  Tunnel Hierarchical Link Endpoint

   TE LSPs can be set up in MPLS or Generalized MPLS (GMPLS) networks to
   be used to form links to carry traffic in in other (client) networks
   [RFC6107].  In this case, the model introduces the TE tunnel
   hierarchical link endpoint parameters to identify the specific link
   in the client layer that the TE tunnel is associated with.

3.4.  TE LSPs State Data

   TE LSPs are derived state data that is usually instantiated via
   signaling protocols.  TE LSPs exists on routers as ingress (starting
   point of LSP), transit (mid-point of LSP ), or egress (termination
   point of the LSP).  TE LSPs are distinguished by the 5 tuple, and LSP
   type (P2P or P2MP).  In the model, the nodes holding LSPs data exist
   in the read-only lsps-state list as show in Figure 6.

3.5.  Global RPC Data

   This branch of the model covers system-wide RPC execution data to
   trigger actions and optionally expect responses.  Examples of such TE
   commands are to:

   o  Clear global TE statistics of various features

3.6.  Interface RPC Data

   This collection of data in the model defines TE interface RPC
   execution commands.  Examples of these are to:

   o  Clear TE statistics for all or for individual TE interfaces

   o  Trigger immediate flooding for one or all TE interfaces

3.7.  Tunnel RPC Data

   This branch of the model covers TE tunnel RPC execution data to
   trigger actions and optionally expect responses.  Examples of such TE
   commands are:

   o  Clear statistics for all or for individual tunnels

   o  Trigger the tear and setup of existing tunnels or LSPs.





Saad, et al.           Expires September 11, 2017              [Page 15]


Internet-Draft             TE YANG Data Model                 March 2017


3.8.  Global Notifications Data

   This branch of the model covers system-wide notifications data.  The
   node notifies the registered events to the server using the defined
   notification messages.

3.9.  Interfaces Notifications Data

   This branch of the model covers TE interfaces related notifications
   data.  The TE interface configuration is used for specific events
   registration.  Notifications are sent for registered events to the
   server.  Example events for TE interfaces are:

   o  Interface creation and deletion

   o  Interface state transitions

   o  (Soft) preemption triggers

   o  Fast reroute activation

3.10.  Tunnel Notification Data

   This branch of the model covers TE tunnels related notifications
   data.  The TE tunnels configuration is used for specific events
   registration.  Notifications are sent for registered events to the
   server.  Example events for TE tunnels are:

   o  Tunnel creation and deletion events

   o  Tunnel state up/down changes

   o  Tunnel state reoptimization changes

   Figure Figure 6 below shows the tree diagram of the YANG model
   defined in modules: ietf-te.yang, ietf-te-device.yang, ietf-te-
   mpls.yang, and ietf-te-sr.yang.

module: ietf-te
    +--rw te!
       +--rw globals
       |  +--rw named-admin-groups
       |  |  +--rw named-admin-group* [name]
       {te-types:extended-admin-groups,
       te-types:named-extended-admin-groups}?
       |  |     +--rw name      -> ../config/name
       |  |     +--rw config
       |  |     |  +--rw name?           string



Saad, et al.           Expires September 11, 2017              [Page 16]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |     |  +--rw bit-position?   uint32
       |  |     +--ro state
       |  |        +--ro name?           string
       |  |        +--ro bit-position?   uint32
       |  +--rw named-srlgs
       |  |  +--rw named-srlg* [name] {te-types:named-srlg-groups}?
       |  |     +--rw name      -> ../config/name
       |  |     +--rw config
       |  |     |  +--rw name?    string
       |  |     |  +--rw group?   te-types:srlg
       |  |     |  +--rw cost?    uint32
       |  |     +--ro state
       |  |        +--ro name?    string
       |  |        +--ro group?   te-types:srlg
       |  |        +--ro cost?    uint32
       |  +--rw named-explicit-paths
       |  |  +--rw named-explicit-path* [name]
       |  |     +--rw name      -> ../config/name
       |  |     +--rw config
       |  |     |  +--rw name?                     string
       |  |     |  +--rw explicit-route-objects
       |  |     |     +--rw explicit-route-object* [index]
       |  |     |        +--rw index                 -> ../config/index
       |  |     |        +--rw explicit-route-usage?   identityref
       |  |     |        +--rw config
       |  |     |        |  +--rw index?            uint32
       |  |     |        |  +--rw (type)?
       |  |     |        |     +--:(ip-address)
       |  |     |        |     |  +--rw ip-address-hop
       |  |     |        |     |     +--rw address?    inet:ip-address
       |  |     |        |     |     +--rw hop-type?   te-hop-type
       |  |     |        |     +--:(as-number)
       |  |     |        |     |  +--rw as-number-hop
       |  |     |        |     |     +--rw as-number?   binary
       |  |     |        |     |     +--rw hop-type?    te-hop-type
       |  |     |        |     +--:(unnumbered-link)
       |  |     |        |     |  +--rw unnumbered-hop
       |  |     |        |     |     +--rw router-id?    inet:ip-address
       |  |     |        |     |     +--rw interface-id?   uint32
       |  |     |        |     |     +--rw hop-type?       te-hop-type
       |  |     |        |     +--:(label)
       |  |     |        |     |  +--rw label-hop
       |  |     |        |     |     +--rw value?
                                           rt-types:generalized-label
       |  |     |        |     +--:(sid)
       |  |     |        |        +--rw sid-hop
       |  |     |        |           +--rw sid?
                                           rt-types:generalized-label



Saad, et al.           Expires September 11, 2017              [Page 17]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |     |        +--ro state
       |  |     |           +--ro index?            uint32
       |  |     |           +--ro (type)?
       |  |     |              +--:(ip-address)
       |  |     |              |  +--ro ip-address-hop
       |  |     |              |     +--ro address?    inet:ip-address
       |  |     |              |     +--ro hop-type?   te-hop-type
       |  |     |              +--:(as-number)
       |  |     |              |  +--ro as-number-hop
       |  |     |              |     +--ro as-number?   binary
       |  |     |              |     +--ro hop-type?    te-hop-type
       |  |     |              +--:(unnumbered-link)
       |  |     |              |  +--ro unnumbered-hop
       |  |     |              |     +--ro router-id? inet:ip-address
       |  |     |              |     +--ro interface-id?   uint32
       |  |     |              |     +--ro hop-type?       te-hop-type
       |  |     |              +--:(label)
       |  |     |              |  +--ro label-hop
       |  |     |              |     +--ro value?
                                           rt-types:generalized-label
       |  |     |              +--:(sid)
       |  |     |                 +--ro sid-hop
       |  |     |                    +--ro sid?
                                           rt-types:generalized-label
       |  |     +--ro state
       |  |        +--ro name?                     string
       |  |        +--ro explicit-route-objects
       |  |           +--ro explicit-route-object* [index]
       |  |              +--ro index               -> ../config/index
       |  |              +--ro explicit-route-usage?   identityref
       |  |              +--ro config
       |  |              |  +--ro index?            uint32
       |  |              |  +--ro (type)?
       |  |              |     +--:(ip-address)
       |  |              |     |  +--ro ip-address-hop
       |  |              |     |     +--ro address?    inet:ip-address
       |  |              |     |     +--ro hop-type?   te-hop-type
       |  |              |     +--:(as-number)
       |  |              |     |  +--ro as-number-hop
       |  |              |     |     +--ro as-number?   binary
       |  |              |     |     +--ro hop-type?    te-hop-type
       |  |              |     +--:(unnumbered-link)
       |  |              |     |  +--ro unnumbered-hop
       |  |              |     |     +--ro router-id?   inet:ip-address
       |  |              |     |     +--ro interface-id?   uint32
       |  |              |     |     +--ro hop-type?       te-hop-type
       |  |              |     +--:(label)
       |  |              |     |  +--ro label-hop



Saad, et al.           Expires September 11, 2017              [Page 18]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |              |     |     +--ro value?
                                           rt-types:generalized-label
       |  |              |     +--:(sid)
       |  |              |        +--ro sid-hop
       |  |              |           +--ro sid?
                                           rt-types:generalized-label
       |  |              +--ro state
       |  |                 +--ro index?            uint32
       |  |                 +--ro (type)?
       |  |                    +--:(ip-address)
       |  |                    |  +--ro ip-address-hop
       |  |                    |     +--ro address?    inet:ip-address
       |  |                    |     +--ro hop-type?   te-hop-type
       |  |                    +--:(as-number)
       |  |                    |  +--ro as-number-hop
       |  |                    |     +--ro as-number?   binary
       |  |                    |     +--ro hop-type?    te-hop-type
       |  |                    +--:(unnumbered-link)
       |  |                    |  +--ro unnumbered-hop
       |  |                    |     +--ro router-id?    inet:ip-address
       |  |                    |     +--ro interface-id?   uint32
       |  |                    |     +--ro hop-type?       te-hop-type
       |  |                    +--:(label)
       |  |                    |  +--ro label-hop
       |  |                    |     +--ro value?
                                           rt-types:generalized-label
       |  |                    +--:(sid)
       |  |                       +--ro sid-hop
       |  |                          +--ro sid?
                                           rt-types:generalized-label
       |  +--rw named-path-constraints
       |  |  +--rw named-path-constraint* [name]
       |  |     +--rw name                 -> ../config/name
       |  |     +--rw config
       |  |     |  +--rw name?                     string
       |  |     |  +--rw topology-id?            te-types:te-topology-id
       |  |     |  +--rw cost-limit?               uint32
       |  |     |  +--rw hop-limit?                uint8
       |  |     |  +--rw metric-type?              identityref
       |  |     |  +--rw tiebreaker-type?          identityref
       |  |     |  +--rw ignore-overload?          boolean
       |  |     |  +--rw setup-priority?           uint8
       |  |     |  +--rw hold-priority?            uint8
       |  |     |  +--rw path-affinities
       |  |     |  |  +--rw (style)?
       |  |     |  |     +--:(values)
       |  |     |  |     |  +--rw value?         uint32
       |  |     |  |     |  +--rw mask?          uint32



Saad, et al.           Expires September 11, 2017              [Page 19]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |     |  |     +--:(named)
       |  |     |  |        +--rw constraints* [usage]
       |  |     |  |           +--rw usage         identityref
       |  |     |  |           +--rw constraint
       |  |     |  |              +--rw affinity-names* [name]
       |  |     |  |                 +--rw name    string
       |  |     |  +--rw path-srlgs
       |  |     |  |  +--rw (style)?
       |  |     |  |     +--:(values)
       |  |     |  |     |  +--rw usage?         identityref
       |  |     |  |     |  +--rw values*        te-types:srlg
       |  |     |  |     +--:(named)
       |  |     |  |        +--rw constraints* [usage]
       |  |     |  |           +--rw usage         identityref
       |  |     |  |           +--rw constraint
       |  |     |  |              +--rw srlg-names* [name]
       |  |     |  |                 +--rw name    string
       |  |     |  +--rw explicit-route-objects
       |  |     |  |  +--rw explicit-route-object* [index]
       |  |     |  |     +--rw index                 -> ../config/index
       |  |     |  |     +--rw explicit-route-usage?   identityref
       |  |     |  |     +--rw config
       |  |     |  |     |  +--rw index?            uint32
       |  |     |  |     |  +--rw (type)?
       |  |     |  |     |     +--:(ip-address)
       |  |     |  |     |     |  +--rw ip-address-hop
       |  |     |  |     |     |     +--rw address?    inet:ip-address
       |  |     |  |     |     |     +--rw hop-type?   te-hop-type
       |  |     |  |     |     +--:(as-number)
       |  |     |  |     |     |  +--rw as-number-hop
       |  |     |  |     |     |     +--rw as-number?   binary
       |  |     |  |     |     |     +--rw hop-type?    te-hop-type
       |  |     |  |     |     +--:(unnumbered-link)
       |  |     |  |     |     |  +--rw unnumbered-hop
       |  |     |  |     |     |     +--rw router-id?    inet:ip-address
       |  |     |  |     |     |     +--rw interface-id?   uint32
       |  |     |  |     |     |     +--rw hop-type?       te-hop-type
       |  |     |  |     |     +--:(label)
       |  |     |  |     |     |  +--rw label-hop
       |  |     |  |     |     |     +--rw value?
                                           rt-types:generalized-label
       |  |     |  |     |     +--:(sid)
       |  |     |  |     |        +--rw sid-hop
       |  |     |  |     |           +--rw sid?
                                           rt-types:generalized-label
       |  |     |  |     +--ro state
       |  |     |  |        +--ro index?            uint32
       |  |     |  |        +--ro (type)?



Saad, et al.           Expires September 11, 2017              [Page 20]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |     |  |           +--:(ip-address)
       |  |     |  |           |  +--ro ip-address-hop
       |  |     |  |           |     +--ro address?    inet:ip-address
       |  |     |  |           |     +--ro hop-type?   te-hop-type
       |  |     |  |           +--:(as-number)
       |  |     |  |           |  +--ro as-number-hop
       |  |     |  |           |     +--ro as-number?   binary
       |  |     |  |           |     +--ro hop-type?    te-hop-type
       |  |     |  |           +--:(unnumbered-link)
       |  |     |  |           |  +--ro unnumbered-hop
       |  |     |  |           |     +--ro router-id?    inet:ip-address
       |  |     |  |           |     +--ro interface-id?   uint32
       |  |     |  |           |     +--ro hop-type?       te-hop-type
       |  |     |  |           +--:(label)
       |  |     |  |           |  +--ro label-hop
       |  |     |  |           |     +--ro value?
                                           rt-types:generalized-label
       |  |     |  |           +--:(sid)
       |  |     |  |              +--ro sid-hop
       |  |     |  |                 +--ro sid?
                                           rt-types:generalized-label
       |  |     |  +--rw bandwidth
       |  |     |     +--rw config
       |  |     |     |  +--rw specification-type?
                                te-mpls-types:te-bandwidth-type
       |  |     |     |  +--rw set-bandwidth?
                                te-mpls-types:bandwidth-kbps
       |  |     |     |  +--rw class-type?
                                te-types:te-ds-class
       |  |     |     +--ro state
       |  |     |        +--ro specification-type?
                                te-mpls-types:te-bandwidth-type
       |  |     |        +--ro set-bandwidth?
                                te-mpls-types:bandwidth-kbps
       |  |     |        +--ro class-type?
                                te-types:te-ds-class
       |  |     |        +--ro signaled-bandwidth?
                                te-mpls-types:bandwidth-kbps
       |  |     +--ro state
       |  |     |  +--ro name?                     string
       |  |     |  +--ro topology-id?            te-types:te-topology-id
       |  |     |  +--ro cost-limit?               uint32
       |  |     |  +--ro hop-limit?                uint8
       |  |     |  +--ro metric-type?              identityref
       |  |     |  +--ro tiebreaker-type?          identityref
       |  |     |  +--ro ignore-overload?          boolean
       |  |     |  +--ro setup-priority?           uint8
       |  |     |  +--ro hold-priority?            uint8



Saad, et al.           Expires September 11, 2017              [Page 21]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |     |  +--ro path-affinities
       |  |     |  |  +--ro (style)?
       |  |     |  |     +--:(values)
       |  |     |  |     |  +--ro value?         uint32
       |  |     |  |     |  +--ro mask?          uint32
       |  |     |  |     +--:(named)
       |  |     |  |        +--ro constraints* [usage]
       |  |     |  |           +--ro usage         identityref
       |  |     |  |           +--ro constraint
       |  |     |  |              +--ro affinity-names* [name]
       |  |     |  |                 +--ro name    string
       |  |     |  +--ro path-srlgs
       |  |     |  |  +--ro (style)?
       |  |     |  |     +--:(values)
       |  |     |  |     |  +--ro usage?         identityref
       |  |     |  |     |  +--ro values*        te-types:srlg
       |  |     |  |     +--:(named)
       |  |     |  |        +--ro constraints* [usage]
       |  |     |  |           +--ro usage         identityref
       |  |     |  |           +--ro constraint
       |  |     |  |              +--ro srlg-names* [name]
       |  |     |  |                 +--ro name    string
       |  |     |  +--ro explicit-route-objects
       |  |     |  |  +--ro explicit-route-object* [index]
       |  |     |  |     +--ro index               -> ../config/index
       |  |     |  |     +--ro explicit-route-usage?   identityref
       |  |     |  |     +--ro config
       |  |     |  |     |  +--ro index?            uint32
       |  |     |  |     |  +--ro (type)?
       |  |     |  |     |     +--:(ip-address)
       |  |     |  |     |     |  +--ro ip-address-hop
       |  |     |  |     |     |     +--ro address?    inet:ip-address
       |  |     |  |     |     |     +--ro hop-type?   te-hop-type
       |  |     |  |     |     +--:(as-number)
       |  |     |  |     |     |  +--ro as-number-hop
       |  |     |  |     |     |     +--ro as-number?   binary
       |  |     |  |     |     |     +--ro hop-type?    te-hop-type
       |  |     |  |     |     +--:(unnumbered-link)
       |  |     |  |     |     |  +--ro unnumbered-hop
       |  |     |  |     |     |     +--ro router-id?    inet:ip-address
       |  |     |  |     |     |     +--ro interface-id?   uint32
       |  |     |  |     |     |     +--ro hop-type?       te-hop-type
       |  |     |  |     |     +--:(label)
       |  |     |  |     |     |  +--ro label-hop
       |  |     |  |     |     |     +--ro value?
                                           rt-types:generalized-label
       |  |     |  |     |     +--:(sid)
       |  |     |  |     |        +--ro sid-hop



Saad, et al.           Expires September 11, 2017              [Page 22]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |     |  |     |           +--ro sid?
                                           rt-types:generalized-label
       |  |     |  |     +--ro state
       |  |     |  |        +--ro index?            uint32
       |  |     |  |        +--ro (type)?
       |  |     |  |           +--:(ip-address)
       |  |     |  |           |  +--ro ip-address-hop
       |  |     |  |           |     +--ro address?    inet:ip-address
       |  |     |  |           |     +--ro hop-type?   te-hop-type
       |  |     |  |           +--:(as-number)
       |  |     |  |           |  +--ro as-number-hop
       |  |     |  |           |     +--ro as-number?   binary
       |  |     |  |           |     +--ro hop-type?    te-hop-type
       |  |     |  |           +--:(unnumbered-link)
       |  |     |  |           |  +--ro unnumbered-hop
       |  |     |  |           |     +--ro router-id?   inet:ip-address
       |  |     |  |           |     +--ro interface-id?   uint32
       |  |     |  |           |     +--ro hop-type?       te-hop-type
       |  |     |  |           +--:(label)
       |  |     |  |           |  +--ro label-hop
       |  |     |  |           |     +--ro value?
                                           rt-types:generalized-label
       |  |     |  |           +--:(sid)
       |  |     |  |              +--ro sid-hop
       |  |     |  |                 +--ro sid?
                                           rt-types:generalized-label
       |  |     |  +--ro bandwidth
       |  |     |     +--ro config
       |  |     |     |  +--ro specification-type?
                                te-mpls-types:te-bandwidth-type
       |  |     |     |  +--ro set-bandwidth?
                                te-mpls-types:bandwidth-kbps
       |  |     |     |  +--ro class-type?
                                te-types:te-ds-class
       |  |     |     +--ro state
       |  |     |        +--ro specification-type?
                                te-mpls-types:te-bandwidth-type
       |  |     |        +--ro set-bandwidth?
                                te-mpls-types:bandwidth-kbps
       |  |     |        +--ro class-type?
                                te-types:te-ds-class
       |  |     |        +--ro signaled-bandwidth?
                                te-mpls-types:bandwidth-kbps
       |  |     +--rw te-sr-mpls:config
       |  |     |  +--rw te-sr-mpls:sid-selection-mode?
                                te-sid-selection-mode
       |  |     |  +--rw te-sr-mpls:sid-protection?       identityref
       |  |     +--ro te-sr-mpls:state



Saad, et al.           Expires September 11, 2017              [Page 23]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |        +--ro te-sr-mpls:sid-selection-mode?
                                te-sid-selection-mode
       |  |        +--ro te-sr-mpls:sid-protection?       identityref
       |  +--rw te-dev:config
       |  |  +--rw te-dev:lsp-install-interval?        uint32
       |  |  +--rw te-dev:lsp-cleanup-interval?        uint32
       |  |  +--rw te-dev:lsp-invalidation-interval?   uint32
       |  +--ro te-dev:state
       |     +--ro te-dev:lsp-install-interval?        uint32
       |     +--ro te-dev:lsp-cleanup-interval?        uint32
       |     +--ro te-dev:lsp-invalidation-interval?   uint32
       +--rw tunnels
       |  +--rw tunnel* [name]
       |  |  +--rw name                         -> ../config/name
       |  |  +--rw identifier?                  -> ../config/identifier
       |  |  +--rw config
       |  |  |  +--rw name?                               string
       |  |  |  +--rw type?                               identityref
       |  |  |  +--rw identifier?                         uint16
       |  |  |  +--rw description?                        string
       |  |  |  +--rw encoding?                           identityref
       |  |  |  +--rw protection-type?                    identityref
       |  |  |  +--rw admin-status?                       identityref
       |  |  |  +--rw preference?                         uint8
       |  |  |  +--rw reoptimize-timer?                   uint16
       |  |  |  +--rw source?                          inet:ip-address
       |  |  |  +--rw destination?                     inet:ip-address
       |  |  |  +--rw src-tp-id?                          binary
       |  |  |  +--rw dst-tp-id?                          binary
       |  |  |  +--rw setup-priority?                     uint8
       |  |  |  +--rw hold-priority?                      uint8
       |  |  |  +--rw signaling-type?                     identityref
       |  |  |  +--rw hierarchical-link-id
       |  |  |  |  +--rw local-te-node-id?      te-types:te-node-id
       |  |  |  |  +--rw local-te-link-tp-id?   te-types:te-tp-id
       |  |  |  |  +--rw remote-te-node-id?     te-types:te-node-id
       |  |  |  |  +--rw te-topology-id?        te-types:te-topology-id
       |  |  |  +--rw bidirectional
       |  |  |  |  +--rw association
       |  |  |  |     +--rw id?              uint16
       |  |  |  |     +--rw source?          inet:ip-address
       |  |  |  |     +--rw global-source?   inet:ip-address
       |  |  |  |     +--rw type?            identityref
       |  |  |  |     +--rw provisioing?     identityref
       |  |  |  +--rw te-dev:lsp-install-interval?        uint32
       |  |  |  +--rw te-dev:lsp-cleanup-interval?        uint32
       |  |  |  +--rw te-dev:lsp-invalidation-interval?   uint32
       |  |  +--ro state



Saad, et al.           Expires September 11, 2017              [Page 24]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |  |  +--ro name?                               string
       |  |  |  +--ro type?                               identityref
       |  |  |  +--ro identifier?                         uint16
       |  |  |  +--ro description?                        string
       |  |  |  +--ro encoding?                           identityref
       |  |  |  +--ro protection-type?                    identityref
       |  |  |  +--ro admin-status?                       identityref
       |  |  |  +--ro preference?                         uint8
       |  |  |  +--ro reoptimize-timer?                   uint16
       |  |  |  +--ro source?                          inet:ip-address
       |  |  |  +--ro destination?                     inet:ip-address
       |  |  |  +--ro src-tp-id?                          binary
       |  |  |  +--ro dst-tp-id?                          binary
       |  |  |  +--ro setup-priority?                     uint8
       |  |  |  +--ro hold-priority?                      uint8
       |  |  |  +--ro signaling-type?                     identityref
       |  |  |  +--ro hierarchical-link-id
       |  |  |  |  +--ro local-te-node-id?      te-types:te-node-id
       |  |  |  |  +--ro local-te-link-tp-id?   te-types:te-tp-id
       |  |  |  |  +--ro remote-te-node-id?     te-types:te-node-id
       |  |  |  |  +--ro te-topology-id?        te-types:te-topology-id
       |  |  |  +--ro bidirectional
       |  |  |  |  +--ro association
       |  |  |  |     +--ro id?              uint16
       |  |  |  |     +--ro source?          inet:ip-address
       |  |  |  |     +--ro global-source?   inet:ip-address
       |  |  |  |     +--ro type?            identityref
       |  |  |  |     +--ro provisioing?     identityref
       |  |  |  +--ro oper-status?                        identityref
       |  |  |  +--ro te-dev:lsp-install-interval?        uint32
       |  |  |  +--ro te-dev:lsp-cleanup-interval?        uint32
       |  |  |  +--ro te-dev:lsp-invalidation-interval?   uint32
       |  |  +--rw bandwidth
       |  |  |  +--rw config
       |  |  |  |  +--rw specification-type?
                            te-mpls-types:te-bandwidth-type
       |  |  |  |  +--rw set-bandwidth?
                            te-mpls-types:bandwidth-kbps
       |  |  |  |  +--rw class-type?           te-types:te-ds-class
       |  |  |  +--ro state
       |  |  |  |  +--ro specification-type?
                            te-mpls-types:te-bandwidth-type
       |  |  |  |  +--ro set-bandwidth?
                            te-mpls-types:bandwidth-kbps
       |  |  |  |  +--ro class-type?           te-types:te-ds-class
       |  |  |  |  +--ro signaled-bandwidth?
                            te-mpls-types:bandwidth-kbps
       |  |  |  +--rw auto-bandwidth



Saad, et al.           Expires September 11, 2017              [Page 25]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |  |     +--rw config
       |  |  |     |  +--rw enabled?            boolean
       |  |  |     |  +--rw min-bw?
                            te-mpls-types:bandwidth-kbps
       |  |  |     |  +--rw max-bw?
                            te-mpls-types:bandwidth-kbps
       |  |  |     |  +--rw adjust-interval?    uint32
       |  |  |     |  +--rw adjust-threshold?   te-types:percentage
       |  |  |     +--ro state
       |  |  |     |  +--ro enabled?            boolean
       |  |  |     |  +--ro min-bw?
                            te-mpls-types:bandwidth-kbps
       |  |  |     |  +--ro max-bw?
                            te-mpls-types:bandwidth-kbps
       |  |  |     |  +--ro adjust-interval?    uint32
       |  |  |     |  +--ro adjust-threshold?   te-types:percentage
       |  |  |     +--rw overflow
       |  |  |     |  +--rw config
       |  |  |     |  |  +--rw enabled?               boolean
       |  |  |     |  |  +--rw overflow-threshold?  te-types:percentage
       |  |  |     |  |  +--rw trigger-event-count?   uint16
       |  |  |     |  +--ro state
       |  |  |     |     +--ro enabled?               boolean
       |  |  |     |     +--ro overflow-threshold?  te-types:percentage
       |  |  |     |     +--ro trigger-event-count?   uint16
       |  |  |     +--rw underflow
       |  |  |        +--rw config
       |  |  |        |  +--rw enabled?               boolean
       |  |  |        |  +--rw underflow-threshold? te-types:percentage
       |  |  |        |  +--rw trigger-event-count?   uint16
       |  |  |        +--ro state
       |  |  |           +--ro enabled?               boolean
       |  |  |           +--ro underflow-threshold? te-types:percentage
       |  |  |           +--ro trigger-event-count?   uint16
       |  |  +--rw p2p-primary-paths
       |  |  |  +--rw p2p-primary-path* [name]
       |  |  |     +--rw name                       -> ../config/name
       |  |  |     +--rw config
       |  |  |     |  +--rw name?                      string
       |  |  |     |  +--rw preference?                uint8
       |  |  |     |  +--rw path-setup-protocol?       identityref
       |  |  |     |  +--rw path-computation-method?   identityref
       |  |  |     |  +--rw path-computation-server?   inet:ip-address
       |  |  |     |  +--rw compute-only?              empty
       |  |  |     |  +--rw use-cspf?                  boolean
       |  |  |     |  +--rw verbatim?                  empty
       |  |  |     |  +--rw lockdown?                  empty
       |  |  |     |  +--rw named-explicit-path?



Saad, et al.           Expires September 11, 2017              [Page 26]


Internet-Draft             TE YANG Data Model                 March 2017


       -> ../../../../../../globals/named-explicit-paths/
       named-explicit-path/config/name
       |  |  |     |  +--rw named-path-constraint?
       -> ../../../../../../globals/named-path-constraints/
       named-path-constraint/config/name
       {te-types:named-path-constraints}?
       |  |  |     |  +--rw te-mpls:static-lsp-name?
                            mpls-static:static-lsp-ref
       |  |  |     +--ro state
       |  |  |     |  +--ro name?                      string
       |  |  |     |  +--ro preference?                uint8
       |  |  |     |  +--ro path-setup-protocol?       identityref
       |  |  |     |  +--ro path-computation-method?   identityref
       |  |  |     |  +--ro path-computation-server?   inet:ip-address
       |  |  |     |  +--ro compute-only?              empty
       |  |  |     |  +--ro use-cspf?                  boolean
       |  |  |     |  +--ro verbatim?                  empty
       |  |  |     |  +--ro lockdown?                  empty
       |  |  |     |  +--ro named-explicit-path?
       -> ../../../../../../globals/named-explicit-paths/
       named-explicit-path/config/name
       |  |  |     |  +--ro named-path-constraint?
       -> ../../../../../../globals/named-path-constraints/
       named-path-constraint/config/name
       {te-types:named-path-constraints}?
       |  |  |     |  +--ro lsps
       |  |  |     |  |  +--ro lsp*
       [source destination tunnel-id lsp-id extended-tunnel-id type]
       |  |  |     |  |     +--ro source
       -> ../../../../../../../../lsps-state/lsp/source
       |  |  |     |  |     +--ro destination
       -> ../../../../../../../../lsps-state/lsp/destination
       |  |  |     |  |     +--ro tunnel-id
       -> ../../../../../../../../lsps-state/lsp/tunnel-id
       |  |  |     |  |     +--ro lsp-id
       -> ../../../../../../../../lsps-state/lsp/lsp-id
       |  |  |     |  |     +--ro extended-tunnel-id
       -> ../../../../../../../../lsps-state/lsp/extended-tunnel-id
       |  |  |     |  |     +--ro type
       -> ../../../../../../../../lsps-state/lsp/type
       |  |  |     |  |     +--ro signaling-type?       identityref
       |  |  |     |  +--ro te-mpls:static-lsp-name?
       mpls-static:static-lsp-ref
       |  |  |     +--rw candidate-p2p-secondary-paths
       |  |  |        +--rw candidate-p2p-secondary-path*
       [secondary-path]
       |  |  |           +--rw secondary-path
       -> ../config/secondary-path



Saad, et al.           Expires September 11, 2017              [Page 27]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |  |           +--rw config
       |  |  |           |  +--rw secondary-path?
       -> ../../../../../../p2p-secondary-paths/p2p-secondary-path/
       config/name
       |  |  |           |  +--rw priority?              uint16
       |  |  |           |  +--rw path-setup-protocol?   identityref
       |  |  |           +--ro state
       |  |  |              +--ro secondary-path?
       -> ../../../../../../p2p-secondary-paths/p2p-secondary-path/
       config/name
       |  |  |              +--ro priority?              uint16
       |  |  |              +--ro path-setup-protocol?   identityref
       |  |  |              +--ro active?                boolean
       |  |  +--rw p2p-secondary-paths
       |  |  |  +--rw p2p-secondary-path* [name]
       |  |  |     +--rw name      -> ../config/name
       |  |  |     +--rw config
       |  |  |     |  +--rw name?                      string
       |  |  |     |  +--rw preference?                uint8
       |  |  |     |  +--rw path-setup-protocol?       identityref
       |  |  |     |  +--rw path-computation-method?   identityref
       |  |  |     |  +--rw path-computation-server?   inet:ip-address
       |  |  |     |  +--rw compute-only?              empty
       |  |  |     |  +--rw use-cspf?                  boolean
       |  |  |     |  +--rw verbatim?                  empty
       |  |  |     |  +--rw lockdown?                  empty
       |  |  |     |  +--rw named-explicit-path?
       -> ../../../../../../globals/named-explicit-paths/
       named-explicit-path/config/name
       |  |  |     |  +--rw named-path-constraint?
       -> ../../../../../../globals/named-path-constraints/
       named-path-constraint/config/name
       {te-types:named-path-constraints}?
       |  |  |     |  +--rw te-mpls:static-lsp-name?
       mpls-static:static-lsp-ref
       |  |  |     +--ro state
       |  |  |        +--ro name?                      string
       |  |  |        +--ro preference?                uint8
       |  |  |        +--ro path-setup-protocol?       identityref
       |  |  |        +--ro path-computation-method?   identityref
       |  |  |        +--ro path-computation-server?   inet:ip-address
       |  |  |        +--ro compute-only?              empty
       |  |  |        +--ro use-cspf?                  boolean
       |  |  |        +--ro verbatim?                  empty
       |  |  |        +--ro lockdown?                  empty
       |  |  |        +--ro named-explicit-path?
       -> ../../../../../../globals/named-explicit-paths/
       named-explicit-path/config/name



Saad, et al.           Expires September 11, 2017              [Page 28]


Internet-Draft             TE YANG Data Model                 March 2017


       |  |  |        +--ro named-path-constraint?
       -> ../../../../../../globals/named-path-constraints/
       named-path-constraint/config/name
       {te-types:named-path-constraints}?
       |  |  |        +--ro lsps
       |  |  |        |  +--ro lsp*
       [source destination tunnel-id lsp-id extended-tunnel-id type]
       |  |  |        |     +--ro source
       -> ../../../../../../../../lsps-state/lsp/source
       |  |  |        |     +--ro destination
       -> ../../../../../../../../lsps-state/lsp/destination
       |  |  |        |     +--ro tunnel-id
       -> ../../../../../../../../lsps-state/lsp/tunnel-id
       |  |  |        |     +--ro lsp-id
       -> ../../../../../../../../lsps-state/lsp/lsp-id
       |  |  |        |     +--ro extended-tunnel-id
       -> ../../../../../../../../lsps-state/lsp/extended-tunnel-id
       |  |  |        |     +--ro type
       -> ../../../../../../../../lsps-state/lsp/type
       |  |  |        |     +--ro signaling-type?       identityref
       |  |  |        +--ro te-mpls:static-lsp-name?
       mpls-static:static-lsp-ref
       |  |  +---x tunnel-action
       |  |  |  +---w input
       |  |  |  |  +---w action-type?   identityref
       |  |  |  +--ro output
       |  |  |     +--ro action-result?   identityref
       |  |  +--rw te-mpls:tunnel-igp-shortcut
       |  |  |  +--rw te-mpls:config
       |  |  |  |  +--rw te-mpls:shortcut-eligible?   boolean
       |  |  |  |  +--rw te-mpls:metric-type?         identityref
       |  |  |  |  +--rw te-mpls:metric?              int32
       |  |  |  |  +--rw te-mpls:routing-afs*         inet:ip-version
       |  |  |  +--rw te-mpls:state
       |  |  |     +--rw te-mpls:shortcut-eligible?   boolean
       |  |  |     +--rw te-mpls:metric-type?         identityref
       |  |  |     +--rw te-mpls:metric?              int32
       |  |  |     +--rw te-mpls:routing-afs*         inet:ip-version
       |  |  +--rw te-mpls:forwarding
       |  |     +--rw te-mpls:config
       |  |     |  +--rw te-mpls:binding-label?   rt-types:mpls-label
       |  |     |  +--rw te-mpls:load-share?      uint32
       |  |     |  +--rw te-mpls:policy-class?    uint8
       |  |     +--rw te-mpls:state
       |  |        +--rw te-mpls:binding-label?   rt-types:mpls-label
       |  |        +--rw te-mpls:load-share?      uint32
       |  |        +--rw te-mpls:policy-class?    uint8
       |  +--rw tunnel-p2mp* [name]



Saad, et al.           Expires September 11, 2017              [Page 29]


Internet-Draft             TE YANG Data Model                 March 2017


       |     +--rw name          -> ../config/name
       |     +--rw identifier?   -> ../config/identifier
       |     +--rw config
       |     |  +--rw name?                  string
       |     |  +--rw type?                  identityref
       |     |  +--rw identifier?            uint16
       |     |  +--rw description?           string
       |     |  +--rw setup-priority?        uint8
       |     |  +--rw hold-priority?         uint8
       |     |  +--rw lsp-protection-type?   identityref
       |     |  +--rw admin-status?          identityref
       |     |  +--rw reoptimize-timer?      uint16
       |     +--ro state
       |        +--ro name?                  string
       |        +--ro type?                  identityref
       |        +--ro identifier?            uint16
       |        +--ro description?           string
       |        +--ro setup-priority?        uint8
       |        +--ro hold-priority?         uint8
       |        +--ro lsp-protection-type?   identityref
       |        +--ro admin-status?          identityref
       |        +--ro reoptimize-timer?      uint16
       +--ro lsps-state
       |  +--ro lsp*
       [source destination tunnel-id lsp-id extended-tunnel-id type]
       |     +--ro source                         inet:ip-address
       |     +--ro destination                    inet:ip-address
       |     +--ro tunnel-id                      uint16
       |     +--ro lsp-id                         uint16
       |     +--ro extended-tunnel-id             inet:ip-address
       |     +--ro type                           identityref
       |     +--ro oper-status?                   identityref
       |     +--ro path-setup-protocol?           identityref
       |     +--ro origin-type?                   enumeration
       |     +--ro lsp-resource-status?           enumeration
       |     +--ro lsp-protection-role?           enumeration
       |     +--ro lsp-carry-normal-traffic?      empty
       |     +--ro lsp-record-route-subobjects
       |     |  +--ro record-route-subobject* [index]
       |     |     +--ro index           uint32
       |     |     +--ro (type)?
       |     |        +--:(ip-address)
       |     |        |  +--ro ip-address?     inet:ip-address
       |     |        |  +--ro ip-flags?       binary
       |     |        +--:(unnumbered-link)
       |     |        |  +--ro router-id?      inet:ip-address
       |     |        |  +--ro interface-id?   uint32
       |     |        +--:(label)



Saad, et al.           Expires September 11, 2017              [Page 30]


Internet-Draft             TE YANG Data Model                 March 2017


       |     |           +--ro value?        rt-types:generalized-label
       |     |           +--ro label-flags?    binary
       |     +--ro te-dev:lsp-timers
       |     |  +--ro te-dev:life-time?         uint32
       |     |  +--ro te-dev:time-to-install?   uint32
       |     |  +--ro te-dev:time-to-destroy?   uint32
       |     +--ro te-dev:downstream-info
       |     |  +--ro te-dev:nhop?                 inet:ip-address
       |     |  +--ro te-dev:outgoing-interface?   if:interface-ref
       |     |  +--ro te-dev:neighbor?             inet:ip-address
       |     |  +--ro te-dev:label?         rt-types:generalized-label
       |     +--ro te-dev:upstream-info
       |        +--ro te-dev:phop?       inet:ip-address
       |        +--ro te-dev:neighbor?   inet:ip-address
       |        +--ro te-dev:label?      rt-types:generalized-label
       +--rw te-dev:interfaces
          +--rw te-dev:config
          |  +--rw te-dev:threshold-type?            enumeration
          |  +--rw te-dev:delta-percentage?          te-types:percentage
          |  +--rw te-dev:threshold-specification?   enumeration
          |  +--rw te-dev:up-thresholds*             te-types:percentage
          |  +--rw te-dev:down-thresholds*           te-types:percentage
          |  +--rw te-dev:up-down-thresholds*        te-types:percentage
          +--ro te-dev:state
          |  +--ro te-dev:threshold-type?            enumeration
          |  +--ro te-dev:delta-percentage?          te-types:percentage
          |  +--ro te-dev:threshold-specification?   enumeration
          |  +--ro te-dev:up-thresholds*             te-types:percentage
          |  +--ro te-dev:down-thresholds*           te-types:percentage
          |  +--ro te-dev:up-down-thresholds*        te-types:percentage
          +--rw te-dev:interface* [interface]
             +--rw te-dev:interface    if:interface-ref
             +--rw te-dev:config
             |  +--rw te-dev:te-metric?              te-types:te-metric
             |  +--rw (te-dev:admin-group-type)?
             |  |  +--:(te-dev:value-admin-groups)
             |  |  |  +--rw (te-dev:value-admin-group-type)?
             |  |  |     +--:(te-dev:admin-groups)
             |  |  |     | +--rw te-dev:admin-group?te-types:admin-group
             |  |  |     +--:(te-dev:extended-admin-groups)
                                    {te-types:extended-admin-groups}?
             |  |  |       +--rw te-dev:extended-admin-group?
                                    te-types:extended-admin-group
             |  |  +--:(te-dev:named-admin-groups)
             |  |     +--rw te-dev:named-admin-groups[named-admin-group]
             {te-types:extended-admin-groups,
             te-types:named-extended-admin-groups}?
             |  |        +--rw te-dev:named-admin-group



Saad, et al.           Expires September 11, 2017              [Page 31]


Internet-Draft             TE YANG Data Model                 March 2017


             -> ../../../../../te:globals/named-admin-groups/
             named-admin-group/config/name
             |  +--rw (te-dev:srlg-type)?
             |  |  +--:(te-dev:value-srlgs)
             |  |  |  +--rw te-dev:values* [value]
             |  |  |     +--rw te-dev:value    uint32
             |  |  +--:(te-dev:named-srlgs)
             |  |     +--rw te-dev:named-srlgs* [named-srlg]
             {te-types:named-srlg-groups}?
             |  |        +--rw te-dev:named-srlg
             -> ../../../../../te:globals/named-srlgs/
             named-srlg/config/name
             |  +--rw te-dev:threshold-type?            enumeration
             |  +--rw te-dev:delta-percentage?       te-types:percentage
             |  +--rw te-dev:threshold-specification?   enumeration
             |  +--rw te-dev:up-thresholds*          te-types:percentage
             |  +--rw te-dev:down-thresholds*        te-types:percentage
             |  +--rw te-dev:up-down-thresholds*     te-types:percentage
             |  +--rw te-dev:switching-capabilities*
             |     +--rw te-dev:switching-capability    identityref
             |     +--rw te-dev:encoding?               identityref
             +--ro te-dev:state
                +--ro te-dev:te-metric?           te-types:te-metric
                +--ro (te-dev:admin-group-type)?
                |  +--:(te-dev:value-admin-groups)
                |  |  +--ro (te-dev:value-admin-group-type)?
                |  |     +--:(te-dev:admin-groups)
                |  |     |  +--ro te-dev:admin-group?
                te-types:admin-group
                |  |     +--:(te-dev:extended-admin-groups)
                {te-types:extended-admin-groups}?
                |  |        +--ro te-dev:extended-admin-group?
                |  +--:(te-dev:named-admin-groups)
                |    +--ro te-dev:named-admin-groups*[named-admin-group]
                |        +--ro te-dev:named-admin-group
                -> ../../../../../te:globals/named-admin-groups/
                named-admin-group/config/name
                +--ro (te-dev:srlg-type)?
                |  +--:(te-dev:value-srlgs)
                |  |  +--ro te-dev:values* [value]
                |  |     +--ro te-dev:value    uint32
                |  +--:(te-dev:named-srlgs)
                |     +--ro te-dev:named-srlgs* [named-srlg]
                |        +--ro te-dev:named-srlg
                -> ../../../../../te:globals/named-srlgs/
                named-srlg/config/name
                +--ro te-dev:switching-capabilities*
                |  +--ro te-dev:switching-capability    identityref



Saad, et al.           Expires September 11, 2017              [Page 32]


Internet-Draft             TE YANG Data Model                 March 2017


                |  +--ro te-dev:encoding?               identityref
                +--ro te-dev:threshold-type?            enumeration
                +--ro te-dev:delta-percentage?       te-types:percentage
                +--ro te-dev:threshold-specification?   enumeration
                +--ro te-dev:up-thresholds*          te-types:percentage
                +--ro te-dev:down-thresholds*        te-types:percentage
                +--ro te-dev:up-down-thresholds*     te-types:percentage
                +--ro te-dev:te-advertisements_state
                   +--ro te-dev:flood-interval?           uint32
                   +--ro te-dev:last-flooded-time?        uint32
                   +--ro te-dev:next-flooded-time?        uint32
                   +--ro te-dev:last-flooded-trigger?     enumeration
                   +--ro te-dev:advertized-level-areas* [level-area]
                      +--ro te-dev:level-area    uint32

  rpcs:
    +---x globals-rpc
    +---x interfaces-rpc
    +---x tunnels-rpc
       +---w input
       |  +---w tunnel-info
       |     +---w (type)?
       |        +--:(tunnel-p2p)
       |        |  +---w p2p-id?    te:tunnel-ref
       |        +--:(tunnel-p2mp)
       |           +---w p2mp-id?   te:tunnel-p2mp-ref
       +--ro output
          +--ro result
             +--ro result?   enumeration

  notifications:
    +---n globals-notif
    +---n tunnels-notif
module: ietf-te-device

  rpcs:
    +---x interfaces-rpc

  notifications:
    +---n interfaces-notif

          Figure 6: TE generic model configuration and state tree

4.  TE Generic and Helper YANG Modules

 <CODE BEGINS>file "ietf-te-types@2017-03-10.yang"
 module ietf-te-types {




Saad, et al.           Expires September 11, 2017              [Page 33]


Internet-Draft             TE YANG Data Model                 March 2017


   namespace "urn:ietf:params:xml:ns:yang:ietf-te-types";

   /* Replace with IANA when assigned */
   prefix "te-types";

   import ietf-inet-types {
     prefix inet;
   }

   import ietf-yang-types {
     prefix "yang";
   }

   import ietf-routing-types {
     prefix "rt-types";
   }

   organization
     "IETF Traffic Engineering Architecture and Signaling (TEAS)
      Working Group";

   contact
     "WG Web:   <http://tools.ietf.org/wg/teas/>
      WG List:  <mailto:teas@ietf.org>

      WG Chair: Lou Berger
                <mailto:lberger@labn.net>

      WG Chair: Vishnu Pavan Beeram
                <mailto:vbeeram@juniper.net>

      Editor:   Tarek Saad
                <mailto:tsaad@cisco.com>

      Editor:   Rakesh Gandhi
                <mailto:rgandhi@cisco.com>

      Editor:   Vishnu Pavan Beeram
                <mailto:vbeeram@juniper.net>

      Editor:   Himanshu Shah
                <mailto:hshah@ciena.com>

      Editor:   Xufeng Liu
                <mailto:xufeng.liu@ericsson.com>

      Editor:   Xia Chen
                <mailto:jescia.chenxia@huawei.com>



Saad, et al.           Expires September 11, 2017              [Page 34]


Internet-Draft             TE YANG Data Model                 March 2017


      Editor:   Raqib Jones
                <mailto:raqib@Brocade.com>

      Editor:   Bin Wen
                <mailto:Bin_Wen@cable.comcast.com>";

   description
     "This module contains a collection of generally
     useful TE specific YANG data type defintions.";

   revision "2017-03-10" {
     description "Latest revision of TE types";
     reference "RFC3209";
   }

   /*
    * Identities
    */

   identity path-computation-method {
     description
      "base identity for supported path computation
       mechanisms";
   }

   identity path-locally-computed {
     base path-computation-method;
     description
       "indicates a constrained-path LSP in which the
       path is computed by the local LER";
   }

   identity path-externally-queried {
     base path-computation-method;
     description
      "Constrained-path LSP in which the path is
       obtained by querying an external source, such as a PCE server.
       In the case that an LSP is defined to be externally queried, it
       may also have associated explicit definitions (which are provided
       to the external source to aid computation); and the path that is
       returned by the external source is not required to provide a
       wholly resolved path back to the originating system - that is to
       say, some local computation may also be required";
   }

   identity path-explicitly-defined {
     base path-computation-method;
     description



Saad, et al.           Expires September 11, 2017              [Page 35]


Internet-Draft             TE YANG Data Model                 March 2017


      "constrained-path LSP in which the path is
       explicitly specified as a collection of strict or/and loose
       hops";
   }

   typedef te-ds-class {
     type uint8 {
       range "0..7";
     }
     description
       "The Differentiatied Class-Type of traffic.";
     reference "RFC4124: section-4.3.1";
   }

   typedef te-hop-type {
     type enumeration {
       enum LOOSE {
         description
           "loose hop in an explicit path";
       }
       enum STRICT {
         description
           "strict hop in an explicit path";
       }
     }
     description
      "enumerated type for specifying loose or strict
       paths";
   }

   identity LSP_METRIC_TYPE {
     description
       "Base identity for types of LSP metric specification";
   }

   identity LSP_METRIC_RELATIVE {
     base LSP_METRIC_TYPE;
     description
       "The metric specified for the LSPs to which this identity refers
       is specified as a relative value to the IGP metric cost to the
       LSP's tail-end.";
   }

   identity LSP_METRIC_ABSOLUTE {
     base LSP_METRIC_TYPE;
     description
       "The metric specified for the LSPs to which this identity refers
       is specified as an absolute value";



Saad, et al.           Expires September 11, 2017              [Page 36]


Internet-Draft             TE YANG Data Model                 March 2017


   }

   identity LSP_METRIC_INHERITED {
     base LSP_METRIC_TYPE;
     description
       "The metric for for the LSPs to which this identity refers is
       not specified explicitly - but rather inherited from the IGP
       cost directly";
   }

   identity tunnel-type {
     description
       "Base identity from which specific tunnel types are
       derived.";
   }

   identity tunnel-p2p {
     base tunnel-type;
     description
       "TE point-to-point tunnel type.";
   }

   identity tunnel-p2mp {
     base tunnel-type;
     description
       "TE point-to-multipoint tunnel type.";
   }

   identity tunnel-action-type {
     description
       "Base identity from which specific tunnel action types
        are derived.";
   }

   identity tunnel-action-resetup {
     base tunnel-action-type;
     description
       "TE tunnel action resetup. Tears the
       tunnel's current LSP (if any) and
       attempts to re-establish a new LSP";
   }

   identity tunnel-action-reoptimize {
     base tunnel-action-type;
     description
       "TE tunnel action reoptimize.
        Reoptimizes placement of the tunnel LSP(s)";
   }



Saad, et al.           Expires September 11, 2017              [Page 37]


Internet-Draft             TE YANG Data Model                 March 2017


   identity tunnel-action-switchpath {
     base tunnel-action-type;
     description
       "TE tunnel action reoptimize
        Switches the tunnel's LSP to use the specified path";
   }

   identity te-action-result {
     description
       "Base identity from which specific TE action results
        are derived.";
   }

   identity te-action-success {
     base te-action-result;
     description "TE action successul.";
   }

   identity te-action-fail {
     base te-action-result;
     description "TE action failed.";
   }

   identity tunnel-action-inprogress {
     base te-action-result;
     description "TE action inprogress.";
   }

   identity state-type {
     description
       "Base identity for TE states";
   }

   identity state-up {
     base state-type;
     description
       "State up";
   }

   identity state-down {
     base state-type;
     description
       "State down";
   }

   identity path-invalidation-action-type {
     description
       "Base identity for TE path invalidation action types";



Saad, et al.           Expires September 11, 2017              [Page 38]


Internet-Draft             TE YANG Data Model                 March 2017


   }

   identity path-invalidation-action-drop-type {
     base path-invalidation-action-type;
     description
       "TE path invalidation action drop";
   }

   identity path-invalidation-action-drop-tear {
     base path-invalidation-action-type;
     description
       "TE path invalidation action tear";
   }

   identity lsp-prot-type {
     description
       "Base identity from which LSP protection types are
       derived.";
   }

   identity lsp-prot-unprotected {
     base lsp-prot-type;
     description
       "LSP protection 'Unprotected'";
     reference "RFC4872";
   }

   identity lsp-prot-reroute-extra {
     base lsp-prot-type;
     description
       "LSP protection '(Full) Rerouting'";
     reference "RFC4872";
   }

   identity lsp-prot-reroute {
     base lsp-prot-type;
     description
       "LSP protection 'Rerouting without Extra-Traffic'";
     reference "RFC4872";
   }

   identity lsp-prot-1-for-n {
     base lsp-prot-type;
     description
       "LSP protection '1:N Protection with Extra-Traffic'";
     reference "RFC4872";
   }




Saad, et al.           Expires September 11, 2017              [Page 39]


Internet-Draft             TE YANG Data Model                 March 2017


   identity lsp-prot-unidir-1-to-1 {
     base lsp-prot-type;
     description
       "LSP protection '1+1 Unidirectional Protection'";
     reference "RFC4872";
   }

   identity lsp-prot-bidir-1-to-1 {
     base lsp-prot-type;
     description
       "LSP protection '1+1 Bidirectional Protection'";
     reference "RFC4872";
   }

   identity switching-capabilities {
     description
       "Base identity for interface switching capabilities";
   }

   identity switching-psc1 {
     base switching-capabilities;
     description
       "Packet-Switch Capable-1 (PSC-1)";
   }

   identity switching-evpl {
     base switching-capabilities;
     description
       "Ethernet Virtual Private Line (EVPL)";
   }

   identity switching-l2sc {
     base switching-capabilities;
     description
       "Layer-2 Switch Capable (L2SC)";
   }

   identity switching-tdm {
     base switching-capabilities;
     description
       "Time-Division-Multiplex Capable (TDM)";
   }

   identity switching-otn {
     base switching-capabilities;
     description
       "OTN-TDM capable";
   }



Saad, et al.           Expires September 11, 2017              [Page 40]


Internet-Draft             TE YANG Data Model                 March 2017


   identity switching-dcsc {
     base switching-capabilities;
     description
       "Data Channel Switching Capable (DCSC)";
   }

   identity switching-lsc {
     base switching-capabilities;
     description
       "Lambda-Switch Capable (LSC)";
   }

   identity switching-fsc {
     base switching-capabilities;
     description
       "Fiber-Switch Capable (FSC)";
   }

   identity lsp-encoding-types {
     description
       "Base identity for encoding types";
   }

   identity lsp-encoding-packet {
     base lsp-encoding-types;
     description
       "Packet LSP encoding";
   }

   identity lsp-encoding-ethernet {
     base lsp-encoding-types;
     description
       "Ethernet LSP encoding";
   }

   identity lsp-encoding-pdh {
     base lsp-encoding-types;
     description
       "ANSI/ETSI LSP encoding";
   }

   identity lsp-encoding-sdh {
     base lsp-encoding-types;
     description
       "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding";
   }

   identity lsp-encoding-digital-wrapper {



Saad, et al.           Expires September 11, 2017              [Page 41]


Internet-Draft             TE YANG Data Model                 March 2017


     base lsp-encoding-types;
     description
       "Digital Wrapper LSP encoding";
   }

   identity lsp-encoding-lambda {
     base lsp-encoding-types;
     description
       "Lambda (photonic) LSP encoding";
   }

   identity lsp-encoding-fiber {
     base lsp-encoding-types;
     description
       "Fiber LSP encoding";
   }

   identity lsp-encoding-fiber-channel {
     base lsp-encoding-types;
     description
       "FiberChannel LSP encoding";
   }

   identity lsp-encoding-oduk {
     base lsp-encoding-types;
     description
       "G.709 ODUk (Digital Path)LSP encoding";
   }

   identity lsp-encoding-optical-channel {
     base lsp-encoding-types;
     description
       "Line (e.g., 8B/10B) LSP encoding";
   }

   identity lsp-encoding-line {
     base lsp-encoding-types;
     description
       "Line (e.g., 8B/10B) LSP encoding";
   }

   identity path-signaling-type {
     description
       "Base identity from which specific path signaling
        types are derived.";
   }

   identity path-signaling-rsvpte {



Saad, et al.           Expires September 11, 2017              [Page 42]


Internet-Draft             TE YANG Data Model                 March 2017


     base tunnel-type;
     description
       "RSVP-TE path signaling type";
   }

   identity path-signaling-sr {
     base tunnel-type;
     description
       "Segment-routing path signaling type";
   }

   identity te-path-setup-protocol {
     description
       "base identity for supported TE LSPs signaling
        protocols";
   }

   identity te-path-setup-static {
     base te-path-setup-protocol;
     description
       "Static LSP provisioning";
   }

   identity te-path-setup-rsvp {
     base te-path-setup-protocol;
     description
       "RSVP-TE signaling protocol";
   }

   identity te-path-setup-sr {
     base te-path-setup-protocol;
     description
       "Segment routing";
   }

   /* TE basic features */
   feature p2mp-te {
     description
       "Indicates support for P2MP-TE";
   }

   feature frr-te {
     description
       "Indicates support for TE FastReroute (FRR)";
   }

   feature extended-admin-groups {
     description



Saad, et al.           Expires September 11, 2017              [Page 43]


Internet-Draft             TE YANG Data Model                 March 2017


       "Indicates support for TE link extended admin
       groups.";
   }

   feature named-path-affinities {
     description
       "Indicates support for named path affinities";
   }

   feature named-extended-admin-groups {
     description
       "Indicates support for named extended admin groups";
   }

   feature named-srlg-groups {
     description
       "Indicates support for named SRLG groups";
   }

   feature named-path-constraints {
     description
       "Indicates support for named path constraints";
   }

   grouping explicit-route-hop_config {
     description
       "The explicit route subobject grouping";
     leaf index {
       type uint32;
       description "ERO subobject index";
     }
     choice type {
       description
         "The explicit route subobject type";
       case ip-address {
         description
           "IP address explicit route subobject";
         container ip-address-hop {
           description "IP address hop type";
           leaf address {
             type inet:ip-address;
             description
               "ERO IP address.";
           }
           leaf hop-type {
             type te-hop-type;
               description
                 "strict or loose hop";



Saad, et al.           Expires September 11, 2017              [Page 44]


Internet-Draft             TE YANG Data Model                 March 2017


           }
         }
       }
       case as-number {
         container as-number-hop {
           leaf as-number {
             type binary {
               length 16;
             }
             description "AS number";
           }
           leaf hop-type {
             type te-hop-type;
               description
                 "strict or loose hop";
           }
           description
             "Autonomous System explicit route subobject";
         }
       }
       case unnumbered-link {
         container unnumbered-hop {
           leaf router-id {
             type inet:ip-address;
             description
               "A router-id address";
           }
           leaf interface-id {
             type uint32;
             description "The interface identifier";
           }
           leaf hop-type {
             type te-hop-type;
               description
                 "strict or loose hop";
           }
           description
             "Unnumbered link explicit route subobject";
           reference
             "RFC3477: Signalling Unnumbered Links in
             RSVP-TE";
         }
       }
       case label {
         container label-hop {
           description "Label hop type";
           leaf value {
             type rt-types:generalized-label;



Saad, et al.           Expires September 11, 2017              [Page 45]


Internet-Draft             TE YANG Data Model                 March 2017


             description "the label value";
           }
         }
         description
           "The Label ERO subobject";
       }
       case sid {
         container sid-hop {
           description "foo";
           leaf sid {
             type rt-types:generalized-label;
             description "Segment-routing identifier";
           }
         }
         description "Segment-routing identifier";
       }
     }
   }

   grouping explicit-route-hop {
     description "Explicit route hop grouping";
     container config {
       description
         "Configuration parameters for the explicit route hop";
       uses explicit-route-hop_config;
     }
     container state {
       config false;
       description
         "State parameters for the explicit route hop";
       uses explicit-route-hop_config;
     }
   }

   grouping record-route-subobject {
     description
       "The record route subobject grouping";
     choice type {
       description
         "The record route subobject type";
       case ip-address {
         leaf ip-address {
           type inet:ip-address;
           description
             "RRO IP address subobject.";
         }
         leaf ip-flags {
           type binary {



Saad, et al.           Expires September 11, 2017              [Page 46]


Internet-Draft             TE YANG Data Model                 March 2017


             length 8;
           }
           description
             "RRO IP address sub-object flags";
           reference "RFC3209";
         }
       }
       case unnumbered-link {
         leaf router-id {
           type inet:ip-address;
           description
             "A router-id address";
         }
         leaf interface-id {
           type uint32;
           description "The interface identifier";
         }
         description
           "Unnumbered link record route subobject";
         reference
           "RFC3477: Signalling Unnumbered Links in
            RSVP-TE";
       }
       case label {
         leaf value {
           type rt-types:generalized-label;
           description "the label value";
         }
         leaf label-flags {
           type binary {
             length 8;
           }
           description
             "Label sub-object flags";
           reference "RFC3209";
         }
         description
           "The Label ERO subobject";
       }
     }
   }

   identity route-usage-type {
     description
       "Base identity for route usage";
   }

   identity route-include-ero {



Saad, et al.           Expires September 11, 2017              [Page 47]


Internet-Draft             TE YANG Data Model                 March 2017


     base route-usage-type;
     description
       "Include ERO from route";
   }

   identity route-exclude-ero {
     base route-usage-type;
     description
       "Exclude ERO from route";
   }

   identity route-exclude-srlg {
     base route-usage-type;
     description
       "Exclude SRLG from route";
   }

   identity path-metric-type {
     description
       "Base identity for path metric type";
   }

   identity path-metric-te {
     base path-metric-type;
     description
       "TE path metric";
   }

   identity path-metric-igp {
     base path-metric-type;
     description
       "IGP path metric";
   }

   identity path-metric-hop {
     base path-metric-type;
     description
       "Hop path metric";
   }

   identity path-tiebreaker-type {
     description
       "Base identity for path tie-breaker type";
   }

   identity path-tiebreaker-minfill {
     base path-tiebreaker-type;
     description



Saad, et al.           Expires September 11, 2017              [Page 48]


Internet-Draft             TE YANG Data Model                 March 2017


       "Min-Fill LSP path placement";
   }

   identity path-tiebreaker-maxfill {
     base path-tiebreaker-type;
     description
       "Max-Fill LSP path placement";
   }

   identity path-tiebreaker-randoom {
     base path-tiebreaker-type;
     description
       "Random LSP path placement";
   }

   identity bidir-provisioning-mode {
     description
       "Base identity for bidirectional provisioning
       mode.";
   }

   identity bidir-provisioning-single-sided {
     base bidir-provisioning-mode;
     description
       "Single-sided bidirectional provioning mode";
   }

   identity bidir-provisioning-double-sided {
     base bidir-provisioning-mode;
     description
       "Double-sided bidirectional provioning mode";
   }

   identity bidir-association-type {
     description
       "Base identity for bidirectional association type";
   }

   identity bidir-assoc-corouted {
     base bidir-association-type;
     description
       "Co-routed bidirectional association type";
   }

   identity bidir-assoc-non-corouted {
     base bidir-association-type;
     description
       "Non co-routed bidirectional association type";



Saad, et al.           Expires September 11, 2017              [Page 49]


Internet-Draft             TE YANG Data Model                 March 2017


   }

   identity resource-affinities-type {
     description
       "Base identity for resource affinities";
   }

   identity resource-aff-include-all {
     base resource-affinities-type;
     description
       "The set of attribute filters associated with a
       tunnel all of which must be present for a link
       to be acceptable";
   }

   identity resource-aff-include-any {
     base resource-affinities-type;
     description
       "The set of attribute filters associated with a
       tunnel any of which must be present for a link
       to be acceptable";
   }

   identity resource-aff-exclude-any {
     base resource-affinities-type;
     description
       "The set of attribute filters associated with a
       tunnel any of which renders a link unacceptable";
   }

   identity te-optimization-criterion {
     description
       "Base identity for TE optimization criterion.";
     reference
       "RFC3272: Overview and Principles of Internet Traffic
        Engineering.";
   }

   identity not-optimized {
     base te-optimization-criterion;
     description "Optimization is not applied.";
   }

   identity cost {
     base te-optimization-criterion;
     description "Optimized on cost.";
   }




Saad, et al.           Expires September 11, 2017              [Page 50]


Internet-Draft             TE YANG Data Model                 March 2017


   identity delay {
     base te-optimization-criterion;
     description "Optimized on delay.";
   }

   /*
    * Typedefs
    */

   typedef percentage {
     type uint8 {
       range "0..100";
     }
     description
       "Integer indicating a percentage value";
   }

   typedef performance-metric-normality {
     type enumeration {
       enum "unknown" {
         value 0;
         description
           "Unknown.";
       }
       enum "normal" {
         value 1;
         description
           "Normal.";
       }
       enum "abnormal" {
         value 2;
         description
           "Abnormal. The anomalous bit is set.";
       }
     }
     description
       "Indicates whether a performance metric is normal, abnormal, or
        unknown.";
     reference
       "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions.
        RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.
        RFC7823: Performance-Based Path Selection for Explicitly
        Routed Label Switched Paths (LSPs) Using TE Metric
        Extensions";
   }

   typedef te-admin-status {
     type enumeration {



Saad, et al.           Expires September 11, 2017              [Page 51]


Internet-Draft             TE YANG Data Model                 March 2017


       enum up {
         description
           "Enabled.";
       }
       enum down {
         description
           "Disabled.";
       }
       enum testing {
         description
           "In some test mode.";
       }
       enum preparing-maintenance {
         description
           "Resource is disabled in the control plane to prepare for
            graceful shutdown for maintenance purposes.";
         reference
           "RFC5817: Graceful Shutdown in MPLS and Generalized MPLS
            Traffic Engineering Networks";
       }
       enum maintenance {
         description
           "Resource is disabled in the data plane for maintenance
            purposes.";
       }
     }
     description
       "Defines a type representing the administrative status of
        a TE resource.";
   }

   typedef te-global-id {
     type uint32;
     description
       "An identifier to uniquely identify an operator, which can be
        either a provider or a client.
        The definition of this type is taken from RFC6370 and RFC5003.
        This attribute type is used solely to provide a globally
        unique context for TE topologies.";
   }

   typedef te-link-access-type {
     type enumeration {
       enum point-to-point {
         description
           "The link is point-to-point.";
       }
       enum multi-access {



Saad, et al.           Expires September 11, 2017              [Page 52]


Internet-Draft             TE YANG Data Model                 March 2017


         description
           "The link is multi-access, including broacast and NBMA.";
       }
     }
     description
       "Defines a type representing the access type of a TE link.";
     reference
       "RFC3630: Traffic Engineering (TE) Extensions to OSPF
        Version 2.";
   }

   typedef te-node-id {
     type yang:dotted-quad;
     description
       "An identifier for a node in a topology.
        The identifier is represented as 32-bit unsigned integer in
        the dotted-quad notation.
        This attribute is mapped to Router ID in
        RFC3630, RFC5329, RFC5305, and RFC6119.";
   }

   typedef te-oper-status {
     type enumeration {
       enum up {
         description
         "Operational up.";
       }
       enum down {
         description
         "Operational down.";
       }
       enum testing {
         description
         "In some test mode.";
       }
       enum unknown {
         description
         "Status cannot be determined for some reason.";
       }
       enum preparing-maintenance {
         description
           "Resource is disabled in the control plane to prepare for
            graceful shutdown for maintenance purposes.";
         reference
           "RFC5817: Graceful Shutdown in MPLS and Generalized MPLS
            Traffic Engineering Networks";
       }
       enum maintenance {



Saad, et al.           Expires September 11, 2017              [Page 53]


Internet-Draft             TE YANG Data Model                 March 2017


         description
           "Resource is disabled in the data plane for maintenance
            purposes.";
       }
     }
     description
       "Defines a type representing the operational status of
        a TE resource.";
   }

   typedef te-recovery-status {
     type enumeration {
       enum normal {
         description
           "Both the recovery and working spans are fully
            allocated and active, data traffic is being
            transported over (or selected from) the working
            span, and no trigger events are reported.";
       }
       enum recovery-started {
         description
           "The recovery action has been started, but not completed.";
       }
       enum recovery-succeeded {
         description
           "The recovery action has succeeded. The working span has
            reported a failure/degrade condition and the user traffic
            is being transported (or selected) on the recovery span.";
       }
       enum recovery-failed {
         description
           "The recovery action has failed.";
       }
       enum reversion-started {
         description
           "The reversion has started.";
       }
       enum reversion-failed {
         description
           "The reversion has failed.";
       }
       enum recovery-unavailable {
         description
           "The recovery is unavailable -- either as a result of an
            operator Lockout command or a failure condition detected
            on the recovery span.";
       }
       enum recovery-admin {



Saad, et al.           Expires September 11, 2017              [Page 54]


Internet-Draft             TE YANG Data Model                 March 2017


         description
           "The operator has issued a command switching the user
            traffic to the recovery span.";
       }
       enum wait-to-restore {
         description
           "The recovery domain is recovering from a failuer/degrade
            condition on the working span that is being controlled by
            the Wait-to-Restore (WTR) timer.";
       }
     }
     description
       "Defines the status of a recovery action.";
     reference
       "RFC4427: Recovery (Protection and Restoration) Terminology
        for Generalized Multi-Protocol Label Switching (GMPLS).
        RFC6378: MPLS Transport Profile (MPLS-TP) Linear Protection";
   }

   typedef te-template-name {
     type string {
       pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*';
     }
     description
       "A type for the name of a TE node template or TE link
        template.";
   }

   typedef te-topology-event-type {
     type enumeration {
       enum "add" {
         value 0;
         description
           "A TE node or te-link has been added.";
       }
       enum "remove" {
         value 1;
         description
           "A TE node or te-link has been removed.";
       }
       enum "update" {
         value 2;
         description
           "A TE node or te-link has been updated.";
       }
     }
     description "TE  Event type for notifications";
   } // te-topology-event-type



Saad, et al.           Expires September 11, 2017              [Page 55]


Internet-Draft             TE YANG Data Model                 March 2017


   typedef te-topology-id {
     type string {
       pattern
         '([a-zA-Z0-9\-_.]+:)*'
       + '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*';
     }
     description
       "An identifier for a topology.
        It is optional to have one or more prefixes at the begining,
        separated by colons. The prefixes can be the network-types,
        defined in ietf-network.yang, to help user to understand the
        topology better before further inquiry.";
   }

   typedef te-tp-id {
     type union {
       type uint32;          // Unnumbered
       type inet:ip-address; // IPv4 or IPv6 address
     }
     description
       "An identifier for a TE link endpoint on a node.
        This attribute is mapped to local or remote link identifier in
        RFC3630 and RFC5305.";
   }

   typedef admin-group {
     type binary {
       length 4;
     }
     description
       "Administrative group/Resource class/Color.";
   }

   typedef extended-admin-group {
     type binary;
     description
       "Extended administrative group/Resource class/Color.";
   }

   typedef admin-groups {
     type union {
       type admin-group;
       type extended-admin-group;
     }
     description "TE administrative group derived type";
   }

   typedef srlg {



Saad, et al.           Expires September 11, 2017              [Page 56]


Internet-Draft             TE YANG Data Model                 March 2017


     type uint32;
     description "SRLG type";
   }

   identity path-computation-srlg-type {
     description
       "Base identity for SRLG path computation";
   }

   identity srlg-ignore {
     base path-computation-srlg-type;
     description
       "Ignores SRLGs in path computation";
   }

   identity srlg-strict {
     base path-computation-srlg-type;
     description
       "Include strict SRLG check in path computation";
   }

   identity srlg-preferred {
     base path-computation-srlg-type;
     description
       "Include preferred SRLG check in path computation";
   }

   identity srlg-weighted {
     base path-computation-srlg-type;
     description
       "Include weighted SRLG check in path computation";
   }

   typedef te-metric {
     type uint32;
     description
       "TE link metric";
   }

   /**
    * TE performance metric groupings
    **/
   grouping performance-metric-container {
     description
       "A container containing performance metric attributes.";
     container performance-metric {
       description
         "Link performance information in real time.";



Saad, et al.           Expires September 11, 2017              [Page 57]


Internet-Draft             TE YANG Data Model                 March 2017


       reference
         "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions.
          RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.
          RFC7823: Performance-Based Path Selection for Explicitly
          Routed Label Switched Paths (LSPs) Using TE Metric
          Extensions";
       container measurement {
         description
           "Measured performance metric values. Static configuration
            and manual overrides of these measurements are also
            allowed.";
         uses performance-metric-attributes;
       }
       container normality
       {
         description
           "Performance metric normality values.";
         uses performance-metric-normality-attributes;
       }
       uses performance-metric-throttle-container;
     }
   } // performance-metric-container

   grouping performance-metric-attributes {
     description
       "Link performance information in real time.";
     reference
       "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions.
        RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.
        RFC7823: Performance-Based Path Selection for Explicitly
        Routed Label Switched Paths (LSPs) Using TE Metric
        Extensions";
     leaf unidirectional-delay {
       type uint32 {
         range 0..16777215;
       }
       description "Delay or latency in micro seconds.";
     }
     leaf unidirectional-min-delay {
       type uint32 {
         range 0..16777215;
       }
       description "Minimum delay or latency in micro seconds.";
     }
     leaf unidirectional-max-delay {
       type uint32 {
         range 0..16777215;
       }



Saad, et al.           Expires September 11, 2017              [Page 58]


Internet-Draft             TE YANG Data Model                 March 2017


       description "Maximum delay or latency in micro seconds.";
     }
     leaf unidirectional-delay-variation {
       type uint32 {
         range 0..16777215;
       }
       description "Delay variation in micro seconds.";
     }
     leaf unidirectional-packet-loss {
       type decimal64 {
         fraction-digits 6;
         range "0 .. 50.331642";
       }
       description
         "Packet loss as a percentage of the total traffic sent
          over a configurable interval. The finest precision is
          0.000003%.";
     }
     leaf unidirectional-residual-bandwidth {
       type rt-types:bandwidth-ieee-float32;
       description
         "Residual bandwidth that subtracts tunnel
          reservations from Maximum Bandwidth (or link capacity)
          [RFC3630] and provides an aggregated remainder across QoS
          classes.";
     }
     leaf unidirectional-available-bandwidth {
       type rt-types:bandwidth-ieee-float32;
       description
         "Available bandwidth that is defined to be residual
          bandwidth minus the measured bandwidth used for the
          actual forwarding of non-RSVP-TE LSP packets.  For a
          bundled link, available bandwidth is defined to be the
          sum of the component link available bandwidths.";
     }
     leaf unidirectional-utilized-bandwidth {
       type rt-types:bandwidth-ieee-float32;
       description
         "Bandwidth utilization that represents the actual
          utilization of the link (i.e. as measured in the router).
          For a bundled link, bandwidth utilization is defined to
          be the sum of the component link bandwidth
          utilizations.";
     }
   } // performance-metric-attributes

   grouping performance-metric-normality-attributes {
     description



Saad, et al.           Expires September 11, 2017              [Page 59]


Internet-Draft             TE YANG Data Model                 March 2017


       "Link performance metric normality attributes.";
     reference
       "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions.
        RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.
        RFC7823: Performance-Based Path Selection for Explicitly
        Routed Label Switched Paths (LSPs) Using TE Metric
        Extensions";
     leaf unidirectional-delay {
       type te-types:performance-metric-normality;
       description "Delay normality.";
     }
     leaf unidirectional-min-delay {
       type te-types:performance-metric-normality;
       description "Minimum delay or latency normality.";
     }
     leaf unidirectional-max-delay {
       type te-types:performance-metric-normality;
       description "Maximum delay or latency normality.";
     }
     leaf unidirectional-delay-variation {
       type te-types:performance-metric-normality;
       description "Delay variation normality.";
     }
     leaf unidirectional-packet-loss {
       type te-types:performance-metric-normality;
       description "Packet loss normality.";
     }
     leaf unidirectional-residual-bandwidth {
       type te-types:performance-metric-normality;
       description "Residual bandwidth normality.";
     }
     leaf unidirectional-available-bandwidth {
       type te-types:performance-metric-normality;
       description "Available bandwidth normality.";
     }
     leaf unidirectional-utilized-bandwidth {
       type te-types:performance-metric-normality;
       description "Bandwidth utilization normality.";
     }
   } // performance-metric-normality-attributes

   grouping performance-metric-throttle-container {
     description
       "A container controlling performance metric throttle.";
     container throttle {
       must "suppression-interval >= measure-interval" {
         error-message
           "suppression-interval cannot be less then



Saad, et al.           Expires September 11, 2017              [Page 60]


Internet-Draft             TE YANG Data Model                 March 2017


            measure-interval.";
         description
           "Constraint on suppression-interval and
            measure-interval.";
       }
       description
         "Link performance information in real time.";
       reference
         "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions.
          RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.
          RFC7823: Performance-Based Path Selection for Explicitly
          Routed Label Switched Paths (LSPs) Using TE Metric
          Extensions";
       leaf unidirectional-delay-offset {
         type uint32 {
           range 0..16777215;
         }
         description
           "Offset value to be added to the measured delay value.";
       }
       leaf measure-interval {
         type uint32;
         default 30;
         description
           "Interval in seconds to measure the extended metric
            values.";
       }
       leaf advertisement-interval {
         type uint32;
         description
           "Interval in seconds to advertise the extended metric
            values.";
       }
       leaf suppression-interval {
         type uint32 {
           range "1 .. max";
         }
         default 120;
         description
           "Interval in seconds to suppress advertising the extended
            metric values.";
       }
       container threshold-out {
         uses performance-metric-attributes;
         description
           "If the measured parameter falls outside an upper bound
            for all but the min delay metric (or lower bound for
            min-delay metric only) and the advertised value is not



Saad, et al.           Expires September 11, 2017              [Page 61]


Internet-Draft             TE YANG Data Model                 March 2017


            already outside that bound, anomalous announcement will be
            triggered.";
       }
       container threshold-in {
         uses performance-metric-attributes;
         description
           "If the measured parameter falls inside an upper bound
            for all but the min delay metric (or lower bound for
            min-delay metric only) and the advertised value is not
            already inside that bound, normal (anomalous-flag cleared)
            announcement will be triggered.";
       }
       container threshold-accelerated-advertisement {
         description
           "When the difference between the last advertised value and
            current measured value exceed this threshold, anomalous
            announcement will be triggered.";
         uses performance-metric-attributes;
       }
     }
   } // performance-metric-throttle-container

   /**
    * TE tunnel generic groupings
    **/

   /* Tunnel path selection parameters */
   /*** End of TE tunnel groupings ***/

   /**
    * TE interface generic groupings
    **/
 }
 <CODE ENDS>

                   Figure 7: TE basic types YANG module

<CODE BEGINS> file "ietf-te@2017-03-10.yang"
module ietf-te {
  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-te";

  /* Replace with IANA when assigned */
  prefix "te";

  /* Import TE generic types */
  import ietf-te-types {



Saad, et al.           Expires September 11, 2017              [Page 62]


Internet-Draft             TE YANG Data Model                 March 2017


    prefix te-types;
  }

  import ietf-te-mpls-types {
    prefix "te-mpls-types";
  }

  import ietf-inet-types {
    prefix inet;
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>

     WG Chair: Lou Berger
               <mailto:lberger@labn.net>

     WG Chair: Vishnu Pavan Beeram
               <mailto:vbeeram@juniper.net>

     Editor:   Tarek Saad
               <mailto:tsaad@cisco.com>

     Editor:   Rakesh Gandhi
               <mailto:rgandhi@cisco.com>

     Editor:   Vishnu Pavan Beeram
               <mailto:vbeeram@juniper.net>

     Editor:   Himanshu Shah
               <mailto:hshah@ciena.com>

     Editor:   Xufeng Liu
               <mailto:Xufeng_Liu@jabil.com>

     Editor:   Xia Chen
               <mailto:jescia.chenxia@huawei.com>

     Editor:   Raqib Jones
               <mailto:raqib@Brocade.com>

     Editor:   Bin Wen
               <mailto:Bin_Wen@cable.comcast.com>";



Saad, et al.           Expires September 11, 2017              [Page 63]


Internet-Draft             TE YANG Data Model                 March 2017


  description
    "YANG data module for TE configuration,
    state, RPC and notifications.";

  revision "2017-03-10" {
    description "Latest update to TE generic YANG module.";
    reference "TBD";
  }

  typedef tunnel-ref {
    type leafref {
      path "/te:te/te:tunnels/te:tunnel/te:name";
    }
    description
      "This type is used by data models that need to reference
       configured TE tunnel.";
  }

  typedef tunnel-p2mp-ref {
    type leafref {
      path "/te:te/te:tunnels/te:tunnel-p2mp/te:name";
    }
    description
      "This type is used by data models that need to reference
       configured P2MP TE tunnel.";
  }

  /**
   * TE tunnel generic groupings
   */
  grouping path-route-objects {
    description
      "List of EROs to be included or excluded when performing
       the path computation.";
    container explicit-route-objects {
      description
        "Container for the include or exclude route object list";
      list explicit-route-object {
        key index;
        description
          "List of explicit route objects to include or
           exclude in path computation";
        leaf index {
          type leafref {
            path "../config/index";
          }
          description
            "Index of this explicit route object";



Saad, et al.           Expires September 11, 2017              [Page 64]


Internet-Draft             TE YANG Data Model                 March 2017


        }
        leaf explicit-route-usage {
          type identityref {
            base te-types:route-usage-type;
          }
          description "An explicit-route hop action.";
        }
        uses te-types:explicit-route-hop;
      }
    }
  }

  grouping path-affinities {
    description
      "Path affinities grouping";
    container path-affinities {
      description
        "Path affinities container";
      choice style {
        description
          "Path affinities representation style";
        case values {
          leaf value {
            type uint32 {
              range "0..4294967295";
            }
            description
              "Affinity value";
          }
          leaf mask {
            type uint32 {
              range "0..4294967295";
            }
            description
              "Affinity mask";
          }
        }
        case named {
          list constraints {
            key "usage";
            leaf usage {
              type identityref {
                base te-types:resource-affinities-type;
              }
              description "Affinities usage";
            }
            container constraint {
              description



Saad, et al.           Expires September 11, 2017              [Page 65]


Internet-Draft             TE YANG Data Model                 March 2017


                "Container for named affinities";
              list affinity-names {
                key "name";
                leaf name {
                  type string;
                  description
                    "Affinity name";
                }
                description
                  "List of named affinities";
              }
            }
            description
              "List of named affinity constraints";
          }
        }
      }
    }
  }

  grouping path-srlgs {
    description
      "Path SRLG properties grouping";
    container path-srlgs {
      description
        "Path SRLG properties container";
      choice style {
        description
          "Type of SRLG representation";
        case values {
          leaf usage {
            type identityref {
              base te-types:route-exclude-srlg;
            }
            description "SRLG usage";
          }
          leaf-list values {
            type te-types:srlg;
            description "SRLG value";
          }
        }
        case named {
          list constraints {
            key "usage";
            leaf usage {
              type identityref {
                base te-types:route-exclude-srlg;
              }



Saad, et al.           Expires September 11, 2017              [Page 66]


Internet-Draft             TE YANG Data Model                 March 2017


              description "SRLG usage";
            }
            container constraint {
              description
                "Container for named SRLG list";
              list srlg-names {
                key "name";
                leaf name {
                  type string;
                  description
                    "The SRLG name";
                }
                description
                  "List named SRLGs";
              }
            }
            description
              "List of named SRLG constraints";
          }
        }
      }
    }
  }

  grouping bidir-assoc-properties {
    description
      "TE tunnel associated bidirectional properties
      grouping";
    container bidirectional {
      description
        "TE tunnel associated bidirectional attributes.";
      container association {
        description
          "Tunnel bidirectional association properties";
        leaf id {
          type uint16;
          description
            "The TE tunnel association identifier.";
        }
        leaf source {
          type inet:ip-address;
          description
            "The TE tunnel association source.";
        }
        leaf global-source {
          type inet:ip-address;
          description
            "The TE tunnel association global



Saad, et al.           Expires September 11, 2017              [Page 67]


Internet-Draft             TE YANG Data Model                 March 2017


            source.";
        }
        leaf type {
          type identityref {
            base te-types:bidir-association-type;
          }
          default te-types:bidir-assoc-non-corouted;
          description
            "The TE tunnel association type.";
        }
        leaf provisioing {
          type identityref {
            base te-types:bidir-provisioning-mode;
          }
          description
            "Describes the provisioning model of the
            associated bidirectional LSP";
          reference
            "draft-ietf-teas-mpls-tp-rsvpte-ext-
            associated-lsp, section-3.2";
        }
      }
    }
  }

  grouping p2p-secondary-path-properties {
    description
      "tunnel path properties.";
    container config {
      description
        "Configuration parameters relating to
        tunnel properties";
      uses p2p-path-properties_config;
    }
    container state {
      config false;
      description
        "State information associated with tunnel
        properties";
      uses p2p-path-properties_config;
      uses p2p-secondary-path-properties_state;
    }
  }

  grouping p2p-primary-path-properties {
    description
      "TE tunnel primary path properties grouping";
    container config {



Saad, et al.           Expires September 11, 2017              [Page 68]


Internet-Draft             TE YANG Data Model                 March 2017


      description
        "Configuration parameters relating to
        tunnel properties";
      uses p2p-path-properties_config;
    }
    container state {
      config false;
      description
        "State information associated with tunnel
        properties";
      uses p2p-path-properties_config;
      uses p2p-primary-path-properties_state;
    }
  }

  grouping p2p-primary-path-properties_state {
    description "TE path state parameters";
    container lsps {
      description "TE LSPs container";
      list lsp {
        key
          "source destination tunnel-id lsp-id "+
          "extended-tunnel-id type";
        description "List of LSPs associated with the tunnel.";

        leaf source {
          type leafref {
            path "../../../../../../../../lsps-state/lsp/source";
          }
          description
            "Tunnel sender address extracted from
            SENDER_TEMPLATE  object";
          reference "RFC3209";
        }
        leaf destination {
          type leafref {
            path "../../../../../../../../lsps-state/lsp/destination";
          }
          description
            "Tunnel endpoint address extracted from
            SESSION object";
          reference "RFC3209";
        }
        leaf tunnel-id {
          type leafref {
            path "../../../../../../../../lsps-state/lsp/tunnel-id";
          }
          description



Saad, et al.           Expires September 11, 2017              [Page 69]


Internet-Draft             TE YANG Data Model                 March 2017


            "Tunnel identifier used in the SESSION
            that remains constant over the life
            of the tunnel.";
          reference "RFC3209";
        }
        leaf lsp-id {
          type leafref {
            path "../../../../../../../../lsps-state/lsp/lsp-id";
          }
          description
            "Identifier used in the SENDER_TEMPLATE
            and the FILTER_SPEC that can be changed
            to allow a sender to share resources with
            itself.";
          reference "RFC3209";
        }
        leaf extended-tunnel-id {
          type leafref {
            path "../../../../../../../../lsps-state/lsp/" +
                 "extended-tunnel-id";
          }
          description
            "Extended Tunnel ID of the LSP.";
          reference "RFC3209";
        }
        leaf type {
          type leafref {
            path "../../../../../../../../lsps-state/lsp/type";
          }
          description "LSP type P2P or P2MP";
        }
        leaf signaling-type {
          type identityref {
            base te-types:path-signaling-type;
          }
          description "TE tunnel path signaling type";
        }
      }
    }
  }

  grouping p2p-secondary-path-properties_state {
    description "TE secondary path state parameters";
    list lsp {
      key "source";
      description "List of LSPs associated with the tunnel.";

      leaf source {



Saad, et al.           Expires September 11, 2017              [Page 70]


Internet-Draft             TE YANG Data Model                 March 2017


        type leafref {
          path "../../../../../../../../lsps-state/lsp/source";
        }
        description
          "Tunnel sender address extracted from
          SENDER_TEMPLATE  object";
        reference "RFC3209";
      }
      leaf destination {
        type leafref {
          path "../../../../../../../../lsps-state/lsp/destination";
        }
        description
          "Tunnel endpoint address extracted from
          SESSION object";
        reference "RFC3209";
      }
      leaf tunnel-id {
        type leafref {
          path "../../../../../../../../lsps-state/lsp/tunnel-id";
        }
        description
          "Tunnel identifier used in the SESSION
          that remains constant over the life
          of the tunnel.";
        reference "RFC3209";
      }
      leaf lsp-id {
        type leafref {
          path "../../../../../../../../lsps-state/lsp/lsp-id";
        }
        description
          "Identifier used in the SENDER_TEMPLATE
          and the FILTER_SPEC that can be changed
          to allow a sender to share resources with
          itself.";
        reference "RFC3209";
      }
      leaf extended-tunnel-id {
        type leafref {
          path "../../../../../../../../lsps-state/lsp" +
               "/extended-tunnel-id";
        }
        description
          "Extended Tunnel ID of the LSP.";
        reference "RFC3209";
      }
      leaf type {



Saad, et al.           Expires September 11, 2017              [Page 71]


Internet-Draft             TE YANG Data Model                 March 2017


        type leafref {
          path "../../../../../../../../lsps-state/lsp/type";
        }
        description "LSP type P2P or P2MP";
      }
      leaf active {
        type boolean;
        description
          "Indicates the current active path option that has
          been selected of the candidate secondary paths";
      }
    }
  }

  grouping p2p-path-properties_config {
    description
      "TE tunnel path properties configuration grouping";
    leaf name {
      type string;
      description "TE path name";
    }
    leaf preference {
      type uint8 {
        range "1..255";
      }
      description
        "Specifies a preference for this path. The lower the
        number higher the preference";
    }
    leaf path-setup-protocol {
      type identityref {
        base te-types:te-path-setup-protocol;
      }
      description
        "Signaling protocol used to set up this tunnel";
    }
    leaf path-computation-method {
      type identityref {
        base te-types:path-computation-method;
      }
      default te-types:path-locally-computed;
      description
        "The method used for computing the path, either
        locally computed, queried from a server or not
        computed at all (explicitly configured).";
    }
    leaf path-computation-server {
      when "../path-computation-method = 'path-externally-queried'" {



Saad, et al.           Expires September 11, 2017              [Page 72]


Internet-Draft             TE YANG Data Model                 March 2017


        description
          "The path-computation server when the path is
           externally queried";
      }
      type inet:ip-address;
      description
        "Address of the external path computation
         server";
    }
    leaf compute-only {
      type empty;
      description
        "When set, the path is computed and updated whenever
         the topology is updated. No resources are committed
         or reserved in the network.";
    }
    leaf use-cspf {
      when "../path-computation-method = 'path-locally-computed'";
      type boolean;
      description "A CSPF dynamically computed path";
    }
    leaf verbatim {
      type empty;
      description
        "Indicates no topology or CSPF is attempted on the
         specified path.";
    }
    leaf lockdown {
      type empty;
      description
        "Indicates no reoptimization to be attempted for
         this path.";
    }
    leaf named-explicit-path {
      when "../path-computation-method = 'path-explicitly-defined'";
      type leafref {
        path "../../../../../../globals/named-explicit-paths/"
        + "named-explicit-path/config/name";
      }
      description "The explicit-path name";
    }
    leaf named-path-constraint {
      if-feature te-types:named-path-constraints;
      type leafref {
        path "../../../../../../globals/"
        + "named-path-constraints/named-path-constraint/"
        + "config/name";
      }



Saad, et al.           Expires September 11, 2017              [Page 73]


Internet-Draft             TE YANG Data Model                 March 2017


      description
        "Reference to a globally defined named path
        constraint set";
    }
  }

  /* TE tunnel configuration data */
  grouping tunnel-p2mp-params_config {
    description
      "Configuration parameters relating to TE tunnel";
    leaf name {
      type string;
      description "TE tunnel name.";
    }
    leaf type {
      type identityref {
        base te-types:tunnel-type;
      }
      description "TE tunnel type.";
    }
    leaf identifier {
      type uint16;
      description
        "TE tunnel Identifier.";
    }
    leaf description {
      type string;
      description
        "Textual description for this TE tunnel";
    }
    leaf setup-priority {
      type uint8 {
        range "0..7";
      }
      description
        "TE LSP setup priority";
    }
    leaf hold-priority {
      type uint8 {
        range "0..7";
      }
      description
        "TE LSP hold priority";
    }
    leaf lsp-protection-type {
      type identityref {
        base te-types:lsp-prot-type;
      }



Saad, et al.           Expires September 11, 2017              [Page 74]


Internet-Draft             TE YANG Data Model                 March 2017


      description "LSP protection type.";
    }
    leaf admin-status {
      type identityref {
        base te-types:state-type;
      }
      default te-types:state-up;
      description "TE tunnel administrative state.";
    }
    leaf reoptimize-timer {
      type uint16;
      units seconds;
      description
       "frequency of reoptimization of
        a traffic engineered LSP";
    }
  }

  grouping te-tunnel-bandwidth_config {
    description
      "Configuration parameters related to bandwidth for a tunnel";

    leaf specification-type {
      type te-mpls-types:te-bandwidth-type;
      default SPECIFIED;
      description
        "The method used for settign the bandwidth, either explicitly
        specified or configured";
    }

    leaf set-bandwidth {
      when "../specification-type = 'te-mpls-types:SPECIFIED'" {
       description
         "The bandwidth value when bandwidth is explicitly
          specified";
      }
      type te-mpls-types:bandwidth-kbps;
      description
       "set bandwidth explicitly, e.g., using
        offline calculation";
    }
    leaf class-type {
      type te-types:te-ds-class;
      description
        "The Class-Type of traffic transported by the LSP.";
      reference "RFC4124: section-4.3.1";
    }
  }



Saad, et al.           Expires September 11, 2017              [Page 75]


Internet-Draft             TE YANG Data Model                 March 2017


  grouping te-tunnel-bandwidth_state {
    description
      "Operational state parameters relating to bandwidth for a tunnel";

    leaf signaled-bandwidth {
      type te-mpls-types:bandwidth-kbps;
      description
        "The currently signaled bandwidth of the LSP. In the case where
        the bandwidth is specified explicitly, then this will match the
        value of the set-bandwidth leaf; in cases where the bandwidth is
        dynamically computed by the system, the current value of the
        bandwidth should be reflected.";
    }
  }

  grouping te-lsp-auto-bandwidth_config {
    description
      "Configuration parameters related to autobandwidth";

    leaf enabled {
      type boolean;
      default false;
      description
        "enables mpls auto-bandwidth on the
         lsp";
    }

    leaf min-bw {
      type te-mpls-types:bandwidth-kbps;
      description
        "set the minimum bandwidth in Kbps for an
         auto-bandwidth LSP";
    }

    leaf max-bw {
      type te-mpls-types:bandwidth-kbps;
      description
        "set the maximum bandwidth in Kbps for an
         auto-bandwidth LSP";
    }

    leaf adjust-interval {
      type uint32;
      description
        "time in seconds between adjustments to
         LSP bandwidth";
    }




Saad, et al.           Expires September 11, 2017              [Page 76]


Internet-Draft             TE YANG Data Model                 March 2017


    leaf adjust-threshold {
      type te-types:percentage;
      description
        "percentage difference between the LSP's
         specified bandwidth and its current bandwidth
         allocation -- if the difference is greater than the
         specified percentage, auto-bandwidth adjustment is
         triggered";
    }
  }

  grouping te-lsp-overflow_config {
    description
     "configuration for mpls lsp bandwidth
      overflow adjustment";

    leaf enabled {
      type boolean;
      default false;
      description
       "enables mpls lsp bandwidth overflow
        adjustment on the lsp";
    }

    leaf overflow-threshold {
      type te-types:percentage;
      description
       "bandwidth percentage change to trigger
        an overflow event";

    }

    leaf trigger-event-count {
      type uint16;
      description
       "number of consecutive overflow sample
        events needed to trigger an overflow adjustment";
    }
  }

  grouping te-lsp-underflow_config {
    description
      "configuration for mpls lsp bandwidth
      underflow adjustment";

    leaf enabled {
      type boolean;
      default false;



Saad, et al.           Expires September 11, 2017              [Page 77]


Internet-Draft             TE YANG Data Model                 March 2017


      description
       "enables bandwidth underflow
        adjustment on the lsp";
    }

    leaf underflow-threshold {
      type te-types:percentage;
      description
       "bandwidth percentage change to trigger
        and underflow event";
    }

    leaf trigger-event-count {
      type uint16;
      description
       "number of consecutive underflow sample
        events needed to trigger an underflow adjustment";
    }
  }

  grouping te-path-bandwidth_top {
    description
      "Top level grouping for specifying bandwidth for a TE path";

    container bandwidth {
      description
        "Bandwidth configuration for TE LSPs";

      container config {
        description
          "Configuration parameters related to bandwidth on TE
          tunnels:";
        uses te-tunnel-bandwidth_config;
      }

      container state {
        config false;
        description
          "State parameters related to bandwidth
          configuration of TE tunnels";
        uses te-tunnel-bandwidth_config;
        uses te-tunnel-bandwidth_state;
      }
    }
  }

  grouping te-tunnel-bandwidth_top {
    description



Saad, et al.           Expires September 11, 2017              [Page 78]


Internet-Draft             TE YANG Data Model                 March 2017


      "Top level grouping for specifying bandwidth for a tunnel";

    container bandwidth {
      description
        "Bandwidth configuration for TE LSPs";

      container config {
        description
          "Configuration parameters related to bandwidth on TE
          tunnels:";
        uses te-tunnel-bandwidth_config;
      }

      container state {
        config false;
        description
          "State parameters related to bandwidth
          configuration of TE tunnels";
        uses te-tunnel-bandwidth_config;
        uses te-tunnel-bandwidth_state;
      }

      container auto-bandwidth {
        when "../config/specification-type = 'AUTO'" {
          description
            "Include this container for auto bandwidth
            specific configuration";
        }
        description
          "Parameters related to auto-bandwidth";

        container config {
          description
            "Configuration parameters relating to MPLS
            auto-bandwidth on the tunnel.";
          uses te-lsp-auto-bandwidth_config;
        }
        container state {
          config false;
          description
            "State parameters relating to MPLS
            auto-bandwidth on the tunnel.";
          uses te-lsp-auto-bandwidth_config;
        }

        container overflow {
          description
            "configuration of MPLS overflow bandwidth



Saad, et al.           Expires September 11, 2017              [Page 79]


Internet-Draft             TE YANG Data Model                 March 2017


            adjustement for the LSP";

          container config {
            description
              "Config information for MPLS overflow bandwidth
              adjustment";
            uses te-lsp-overflow_config;
          }

          container state {
            config false;
            description
              "Config information for MPLS overflow bandwidth
              adjustment";
            uses te-lsp-overflow_config;
          }
        }

        container underflow {
          description
            "configuration of MPLS underflow bandwidth
            adjustement for the LSP";

          container config {
            description
              "Config information for MPLS underflow bandwidth
              adjustment";
            uses te-lsp-underflow_config;
          }

          container state {
            config false;
            description
              "State information for MPLS underflo
              adjustment";
            uses te-lsp-underflow_config;
          }
        }
      }
    }
  }

  grouping tunnel-p2p-params_config {
    description
      "Configuration parameters relating to TE tunnel";
    leaf name {
      type string;
      description "TE tunnel name.";



Saad, et al.           Expires September 11, 2017              [Page 80]


Internet-Draft             TE YANG Data Model                 March 2017


    }
    leaf type {
      type identityref {
        base te-types:tunnel-type;
      }
      description "TE tunnel type.";
    }
    leaf identifier {
      type uint16;
      description
        "TE tunnel Identifier.";
    }
    leaf description {
      type string;
      description
        "Textual description for this TE tunnel";
    }
    leaf encoding {
      type identityref {
        base te-types:lsp-encoding-types;
      }
      description "LSP encoding type";
    }
    leaf protection-type {
      type identityref {
        base te-types:lsp-prot-type;
      }
      description "LSP protection type.";
    }
    leaf admin-status {
      type identityref {
        base te-types:state-type;
      }
      default te-types:state-up;
      description "TE tunnel administrative state.";
    }
    leaf preference {
      type uint8 {
        range "1..255";
      }
      description
        "Specifies a preference for this tunnel.
        A lower number signifies a better preference";
    }
    leaf reoptimize-timer {
      type uint16;
      units seconds;
      description



Saad, et al.           Expires September 11, 2017              [Page 81]


Internet-Draft             TE YANG Data Model                 March 2017


       "frequency of reoptimization of
        a traffic engineered LSP";
    }
    leaf source {
      type inet:ip-address;
      description
        "TE tunnel source address.";
    }
    leaf destination {
      /* Add when check */
      type inet:ip-address;
      description
        "P2P tunnel destination address";
    }
    leaf src-tp-id {
      type binary;
      description
        "TE tunnel source termination point identifier.";
    }
    leaf dst-tp-id {
      /* Add when check */
      type binary;
      description
        "TE tunnel destination termination point identifier.";
    }
    leaf setup-priority {
      type uint8 {
        range "0..7";
      }
      description
        "TE LSP setup priority";
    }
    leaf hold-priority {
      type uint8 {
        range "0..7";
      }
      description
        "TE LSP hold priority";
    }
    leaf signaling-type {
      type identityref {
        base te-types:path-signaling-type;
      }
      description "TE tunnel path signaling type";
    }
    container hierarchical-link-id {
        description
          "Identifies a hierarchical link (in server layer)



Saad, et al.           Expires September 11, 2017              [Page 82]


Internet-Draft             TE YANG Data Model                 March 2017


           that this tunnel is associated with.";
        leaf local-te-node-id {
          type te-types:te-node-id;
          description
            "Local TE node identifier";
        }
        leaf local-te-link-tp-id {
          type te-types:te-tp-id;
          description
            "Local TE link termination point identifier";
        }
        leaf remote-te-node-id {
          type te-types:te-node-id;
          description
            "Remote TE node identifier";
        }
        leaf te-topology-id {
          type te-types:te-topology-id;
          description
            "It is presumed that a datastore will contain many
             topologies. To distinguish between topologies it is
             vital to have UNIQUE topology identifiers.";
        }
    }
    uses bidir-assoc-properties;
  }

  grouping tunnel-p2p-params_state {
    description
      "State parameters relating to TE tunnel";
    leaf oper-status {
      type identityref {
        base te-types:state-type;
      }
      description "TE tunnel operational state.";
    }
  }

  /* TE tunnel configuration/state grouping */
  grouping tunnel-p2mp-properties {
    description
      "Top level grouping for P2MP tunnel properties.";
    container config {
      description
        "Configuration parameters relating to
         tunnel P2MP properties";
      uses tunnel-p2mp-params_config;
    }



Saad, et al.           Expires September 11, 2017              [Page 83]


Internet-Draft             TE YANG Data Model                 March 2017


    container state {
      config false;
      description
        "State information associated with tunnel
         properties";
      uses tunnel-p2mp-params_config;
    }
  }

  grouping p2p-path-candidate-secondary-path-config {
    description
      "Configuration parameters relating to a secondary path which
      is a candidate for a particular primary path";

    leaf secondary-path {
      type leafref {
        path "../../../../../../p2p-secondary-paths/" +
             "p2p-secondary-path/config/name";
      }
      description
        "A reference to the secondary path that should be utilised
        when the containing primary path option is in use";
    }

    leaf priority {
      type uint16;
      description
        "The priority of the specified secondary path option. Higher
        priority options are less preferable - such that a secondary
        path reference with a priority of 0 is the most preferred";
    }
    leaf path-setup-protocol {
      type identityref {
        base te-types:te-path-setup-protocol;
      }
      description
        "Signaling protocol used to set up this tunnel";
    }
  }

  grouping p2p-path-candidate-secondary-path-state {
    description
      "Operational state parameters relating to a secondary path
      which is a candidate for a particular primary path";

    leaf active {
      type boolean;
      description



Saad, et al.           Expires September 11, 2017              [Page 84]


Internet-Draft             TE YANG Data Model                 March 2017


        "Indicates the current active path option that has
        been selected of the candidate secondary paths";
    }
  }

  grouping tunnel-p2p-properties {
    description
      "Top level grouping for tunnel properties.";
    container config {
      description
        "Configuration parameters relating to
         tunnel properties";
      uses tunnel-p2p-params_config;
    }
    container state {
      config false;
      description
        "State information associated with tunnel
         properties";
      uses tunnel-p2p-params_config;
      uses tunnel-p2p-params_state;
    }
                uses te-tunnel-bandwidth_top;

    container p2p-primary-paths {
      description "Set of P2P primary aths container";
      list p2p-primary-path {
        key "name";
        description
          "List of primary paths for this tunnel.";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "TE path name";
        }
        uses p2p-primary-path-properties;
        container candidate-p2p-secondary-paths {
          description
            "The set of candidate secondary paths which may be used
            for this primary path. When secondary paths are specified
            in the list the path of the secondary LSP in use must be
            restricted to those path options referenced. The
            priority of the secondary paths is specified within the
            list. Higher priority values are less preferred - that is
            to say that a path with priority 0 is the most preferred
            path. In the case that the list is empty, any secondary
            path option may be utilised when the current primary path



Saad, et al.           Expires September 11, 2017              [Page 85]


Internet-Draft             TE YANG Data Model                 March 2017


            is in use.";
          list candidate-p2p-secondary-path {
            key "secondary-path";
            description
              "List of secondary paths for this tunnel.";
            leaf secondary-path {
              type leafref {
                path "../config/secondary-path";
              }
              description "TE path name";
            }
            container config {
              description
                "Configuration parameters relating to the candidate
                secondary path";

              uses p2p-path-candidate-secondary-path-config;
            }

            container state {
              config false;
              description
                "Operational state parameters relating to the candidate
                secondary path";

              uses p2p-path-candidate-secondary-path-config;
              uses p2p-path-candidate-secondary-path-state;
            }
          }
        }
      }
    }
    container p2p-secondary-paths {
      description "Set of P2P secondary paths container";
      list p2p-secondary-path {
        key "name";
        description
          "List of secondary paths for this tunnel.";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "TE path name";
        }
        uses p2p-primary-path-properties;
      }
    }
  }



Saad, et al.           Expires September 11, 2017              [Page 86]


Internet-Draft             TE YANG Data Model                 March 2017


  grouping tunnel-actions {
    description "Tunnel actions";
    action tunnel-action {
      description "Tunnel action";
      input {
        leaf action-type {
          type identityref {
            base te-types:tunnel-action-type;
          }
          description "Tunnel action type";
        }
      }
      output {
        leaf action-result {
          type identityref {
            base te-types:te-action-result;
          }
          description "The result of the RPC operation";
        }
      }
    }
  }
  /*** End of TE tunnel groupings ***/

  /**
   * LSP related generic groupings
   */
  grouping lsp-record-route-information_state {
    description "recorded route information grouping";
    container lsp-record-route-subobjects {
      description "RSVP recorded route object information";
      list record-route-subobject {
        when "../../origin-type = 'ingress'" {
          description "Applicable on non-ingress LSPs only";
        }
        key "index";
        description "Record route sub-object list";
        leaf index {
          type uint32;
          description "RRO subobject index";
        }
        uses te-types:record-route-subobject;
      }
    }
  }

  grouping lsp-properties_state {
    description



Saad, et al.           Expires September 11, 2017              [Page 87]


Internet-Draft             TE YANG Data Model                 March 2017


      "State parameters relating to LSP";
    leaf oper-status {
      type identityref {
        base te-types:state-type;
      }
      description "LSP operational state.";
    }
    leaf path-setup-protocol {
      type identityref {
        base te-types:te-path-setup-protocol;
      }
      description
        "Signaling protocol used to set up this tunnel";
    }
    leaf origin-type {
      type enumeration {
        enum ingress {
          description
            "Origin ingress";
        }
        enum egress {
          description
            "Origin egress";
        }
        enum transit {
          description
            "transit";
        }
      }
      description
        "Origin type of LSP relative to the location
        of the local switch in the path.";
    }

    leaf lsp-resource-status {
      type enumeration {
        enum primary {
          description
            "A primary LSP is a fully established LSP for
             which the resource allocation has been committed
             at the data plane";
        }
        enum secondary {
          description
            "A secondary LSP is an LSP that has been provisioned
             in the control plane only; e.g. resource allocation
             has not been committed at the data plane";
        }



Saad, et al.           Expires September 11, 2017              [Page 88]


Internet-Draft             TE YANG Data Model                 March 2017


      }
      description "LSP resource allocation type";
      reference "rfc4872, section 4.2.1";
    }

    leaf lsp-protection-role {
      type enumeration {
        enum working {
          description
            "A working LSP must be a primary LSP whilst a protecting
             LSP can be either a primary or a secondary LSP. Also,
             known as protected LSPs when working LSPs are associated
             with protecting LSPs.";
        }
        enum protecting {
          description
            "A secondary LSP is an LSP that has been provisioned
             in the control plane only; e.g. resource allocation
             has not been committed at the data plane";
        }
      }
      description "LSP role type";
      reference "rfc4872, section 4.2.1";
    }

    leaf lsp-carry-normal-traffic {
      type empty;
      description
        "This bit is set when a protecting LSP is carrying the normal
         traffic after protection switching";
    }
  }
  /*** End of TE LSP groupings ***/

  /**
   * TE global generic groupings
   */

  /* Global named admin-groups configuration data */
  grouping named-admin-groups_config {
    description
      "Global named administrative groups configuration
      grouping";
    leaf name {
      type string;
      description
        "A string name that uniquely identifies a TE
        interface named admin-group";



Saad, et al.           Expires September 11, 2017              [Page 89]


Internet-Draft             TE YANG Data Model                 March 2017


    }
    leaf bit-position {
      type uint32;
      description
        "Bit position representing the administrative group";
    }
  }
  grouping named-admin-groups {
    description
      "Global named administrative groups configuration
      grouping";
    container named-admin-groups {
      description "TE named admin groups container";
      list named-admin-group {
        if-feature te-types:extended-admin-groups;
        if-feature te-types:named-extended-admin-groups;
        key "name";
        description
          "List of named TE admin-groups";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "Admin-group name";
        }
        container config {
          description
            "Configuration parameters related to admin-groups";
          uses named-admin-groups_config;
        }
        container state {
          config false;
          description
            "State parameters related to admin-groups";
          uses named-admin-groups_config;
        }
      }
    }
  }

  /* Global named admin-srlgs configuration data */
  grouping named-srlgs_config {
    description
      "Global named SRLGs configuration grouping";
    leaf name {
      type string;
      description
        "A string name that uniquely identifies a TE



Saad, et al.           Expires September 11, 2017              [Page 90]


Internet-Draft             TE YANG Data Model                 March 2017


        interface named srlg";
    }
    leaf group {
      type te-types:srlg;
      description "An SRLG value";
    }
    leaf cost {
      type uint32;
      description
        "SRLG associated cost. Used during path to append
         the path cost when traversing a link with this SRLG";
    }
  }

  grouping named-srlgs {
    description
      "Global named SRLGs configuration grouping";
    container named-srlgs {
      description "TE named SRLGs container";
      list named-srlg {
        if-feature te-types:named-srlg-groups;
        key "name";
        description
          "A list of named SRLG groups";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "SRLG name";
        }
        container config {
          description
            "Configuration parameters related to named SRLGs";
          uses named-srlgs_config;
        }
        container state {
          config false;
          description
            "State parameters related to named SRLGs";
          uses named-srlgs_config;
        }
      }
    }
  }

  /* Global named explicit-paths configuration data */
  grouping named-explicit-paths_config {
    description



Saad, et al.           Expires September 11, 2017              [Page 91]


Internet-Draft             TE YANG Data Model                 March 2017


      "Global explicit path configuration
      grouping";
    leaf name {
      type string;
      description
        "A string name that uniquely identifies an
        explicit path";
    }
    container explicit-route-objects {
      description "Explicit route objects container";
      list explicit-route-object {
        key "index";
        description
          "List of explicit route objects";
        leaf index {
          type leafref {
            path "../config/index";
          }
          description
            "Index of this explicit route object";
        }
        leaf explicit-route-usage {
          type identityref {
            base te-types:route-usage-type;
          }
          description "An explicit-route hop action.";
        }
        uses te-types:explicit-route-hop;
      }
    }
  }

  grouping named-explicit-paths {
    description
      "Global explicit path configuration
      grouping";
    container named-explicit-paths {
      description "TE named explicit path container";
      list named-explicit-path {
        key "name";
        description
          "A list of explicit paths";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "Explicit-path name";
        }



Saad, et al.           Expires September 11, 2017              [Page 92]


Internet-Draft             TE YANG Data Model                 March 2017


        container config {
          description
            "Configuration parameters related to named paths";
          uses named-explicit-paths_config;
        }
        container state {
          config false;
          description
            "State parameters related to named paths";
          uses named-explicit-paths_config;
        }
      }
    }
  }

  /* Global named paths constraints configuration data */
  grouping named-path-constraints_config {
    description
      "Global named path constraints configuration
      grouping";
    leaf name {
      type string;
      description
        "A string name that uniquely identifies a
        path constraint set";
    }
    leaf topology-id {
      type te-types:te-topology-id;
      description
        "The tunnel path is computed using the specific
        topology identified by this identifier";
    }
    leaf cost-limit {
      type uint32 {
        range "1..4294967295";
      }
      description
        "The tunnel path cost limit.";
    }
    leaf hop-limit {
      type uint8 {
        range "1..255";
      }
      description
        "The tunnel path hop limit.";
    }
    leaf metric-type {
      type identityref {



Saad, et al.           Expires September 11, 2017              [Page 93]


Internet-Draft             TE YANG Data Model                 March 2017


        base te-types:path-metric-type;
      }
      default te-types:path-metric-te;
      description
        "The tunnel path metric type.";
    }
    leaf tiebreaker-type {
      type identityref {
        base te-types:path-tiebreaker-type;
      }
      default te-types:path-tiebreaker-maxfill;
      description
        "The tunnel path computation tie breakers.";
    }
    leaf ignore-overload {
      type boolean;
      description
        "The tunnel path can traverse overloaded node.";
    }
    leaf setup-priority {
      type uint8 {
        range "0..7";
      }
      description
        "TE LSP setup priority";
    }
    leaf hold-priority {
      type uint8 {
        range "0..7";
      }
      description
        "TE LSP hold priority";
    }
    uses path-affinities;
    uses path-srlgs;
    uses path-route-objects;
    uses te-path-bandwidth_top;
  }

  grouping named-path-constraints {
    description
      "Global named path constraints configuration
      grouping";
    container named-path-constraints {
      description "TE named path constraints container";
      list named-path-constraint {
        if-feature te-types:named-path-constraints;
        key "name";



Saad, et al.           Expires September 11, 2017              [Page 94]


Internet-Draft             TE YANG Data Model                 March 2017


        description
          "A list of named path constraints";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "Path constraint name";
        }
        container config {
          description
            "Configuration parameters related to admin-groups";
          uses named-path-constraints_config;
        }
        container state {
          config false;
          description
            "State parameters related to admin-groups";
          uses named-path-constraints_config;
        }
      }
    }
  }

  /* TE globals container data */
  grouping globals-grouping {
    description
      "Globals TE system-wide configuration data grouping";
    container globals {
      description
        "Globals TE system-wide configuration data container";
      uses named-admin-groups;
      uses named-srlgs;
      uses named-explicit-paths;
      uses named-path-constraints;
    }
  }

  /* TE tunnels container data */
  grouping tunnels-grouping {
    description
      "Tunnels TE configuration data grouping";
    container tunnels {
      description
        "Tunnels TE configuration data container";

      list tunnel {
        key "name";
        unique "identifier";



Saad, et al.           Expires September 11, 2017              [Page 95]


Internet-Draft             TE YANG Data Model                 March 2017


        description "P2P TE tunnels list.";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "TE tunnel name.";
        }
        leaf identifier {
          type leafref {
            path "../config/identifier";
          }
          description
            "TE tunnel Identifier.";
        }
        uses tunnel-p2p-properties;
        uses tunnel-actions;
      }
      list tunnel-p2mp {
        key "name";
        unique "identifier";
        description "P2MP TE tunnels list.";
        leaf name {
          type leafref {
            path "../config/name";
          }
          description "TE tunnel name.";
        }
        leaf identifier {
          type leafref {
            path "../config/identifier";
          }
          description
            "TE tunnel Identifier.";
        }
        uses tunnel-p2mp-properties;
      }
    }
  }

  /* TE LSPs ephemeral state container data */
  grouping lsps-state-grouping {
    description
      "LSPs state operational data grouping";
    container lsps-state {
      config "false";
      description "LSPs operational state data.";

      list lsp {



Saad, et al.           Expires September 11, 2017              [Page 96]


Internet-Draft             TE YANG Data Model                 March 2017


        key
          "source destination tunnel-id lsp-id "+
          "extended-tunnel-id type";
        description
          "List of LSPs associated with the tunnel.";
        leaf source {
          type inet:ip-address;
          description
            "Tunnel sender address extracted from
            SENDER_TEMPLATE  object";
          reference "RFC3209";
        }
        leaf destination {
          type inet:ip-address;
          description
            "Tunnel endpoint address extracted from
            SESSION object";
          reference "RFC3209";
        }
        leaf tunnel-id {
          type uint16;
          description
            "Tunnel identifier used in the SESSION
            that remains constant over the life
            of the tunnel.";
          reference "RFC3209";
        }
        leaf lsp-id {
          type uint16;
          description
            "Identifier used in the SENDER_TEMPLATE
            and the FILTER_SPEC that can be changed
            to allow a sender to share resources with
            itself.";
          reference "RFC3209";
        }
        leaf extended-tunnel-id {
          type inet:ip-address;
           description
            "Extended Tunnel ID of the LSP.";
          reference "RFC3209";
        }
        leaf type {
          type identityref {
            base te-types:tunnel-type;
          }
          description "The LSP type P2P or P2MP";
        }



Saad, et al.           Expires September 11, 2017              [Page 97]


Internet-Draft             TE YANG Data Model                 March 2017


        uses lsp-properties_state;
        uses lsp-record-route-information_state;
      }
    }
  }
  /*** End of TE global groupings ***/

  /**
   * TE configurations container
   */
  container te {
    presence "Enable TE feature.";
    description
       "TE global container.";

    /* TE Global Configuration Data */
    uses globals-grouping;

    /* TE Tunnel Configuration Data */
    uses tunnels-grouping;

    /* TE LSPs State Data */
    uses lsps-state-grouping;
  }

  /* TE Global RPCs/execution Data */
  rpc globals-rpc {
    description
      "Execution data for TE global.";
  }

  /* TE interfaces RPCs/execution Data */
  rpc interfaces-rpc {
    description
      "Execution data for TE interfaces.";
  }

  /* TE Tunnel RPCs/execution Data */
  rpc tunnels-rpc {
    description "TE tunnels RPC nodes";
    input {
      container tunnel-info {
        description "Tunnel Identification";
        choice type {
          description "Tunnel information type";
          case tunnel-p2p {
            leaf p2p-id {
              type te:tunnel-ref;



Saad, et al.           Expires September 11, 2017              [Page 98]


Internet-Draft             TE YANG Data Model                 March 2017


              description "P2P TE tunnel";
            }
          }
          case tunnel-p2mp {
            leaf p2mp-id {
              type te:tunnel-p2mp-ref;
              description "P2MP TE tunnel";
            }
          }
        }
      }
    }
    output {
      container result {
        description
          "The container result of the RPC operation";
        leaf result {
          type enumeration {
            enum success {
              description "Origin ingress";
            }
            enum in-progress {
              description "Origin egress";
            }
            enum fail {
              description "transit";
            }
          }
          description "The result of the RPC operation";
        }
      }
    }
  }

  /* TE Global Notification Data */
  notification globals-notif {
    description
      "Notification messages for Global TE.";
  }

  /* TE Tunnel Notification Data */
  notification tunnels-notif {
    description
      "Notification messages for TE tunnels.";
  }
}
<CODE ENDS>




Saad, et al.           Expires September 11, 2017              [Page 99]


Internet-Draft             TE YANG Data Model                 March 2017


                     Figure 8: TE generic YANG module

   <CODE BEGINS> file "ietf-te-device@2017-03-10.yang"
   module ietf-te-device {

     namespace "urn:ietf:params:xml:ns:yang:ietf-te-device";

     /* Replace with IANA when assigned */
     prefix "te-dev";

     /* Import TE generic types */
     import ietf-te {
       prefix te;
     }

     /* Import TE generic types */
     import ietf-te-types {
       prefix te-types;
     }

     import ietf-interfaces {
       prefix if;
     }

     import ietf-inet-types {
       prefix inet;
     }

     import ietf-routing-types {
       prefix "rt-types";
     }

     organization
       "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/teas/>
        WG List:  <mailto:teas@ietf.org>

        WG Chair: Lou Berger
                  <mailto:lberger@labn.net>

        WG Chair: Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Tarek Saad
                  <mailto:tsaad@cisco.com>



Saad, et al.           Expires September 11, 2017             [Page 100]


Internet-Draft             TE YANG Data Model                 March 2017


        Editor:   Rakesh Gandhi
                  <mailto:rgandhi@cisco.com>

        Editor:   Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Himanshu Shah
                  <mailto:hshah@ciena.com>

        Editor:   Xufeng Liu
                  <mailto:xufeng.liu@ericsson.com>

        Editor:   Xia Chen
                  <mailto:jescia.chenxia@huawei.com>

        Editor:   Raqib Jones
                  <mailto:raqib@Brocade.com>

        Editor:   Bin Wen
                  <mailto:Bin_Wen@cable.comcast.com>";

     description
       "YANG data module for TE device configurations,
       state, RPC and notifications.";

     revision "2017-03-10" {
       description "Latest update to TE device YANG module.";
       reference "TBD";
     }


     /**
      * TE LSP device state grouping
      */
     grouping lsps-device_state {
       description "TE LSP device state grouping";
       container lsp-timers {
         when "../te:origin-type = 'ingress'" {
           description "Applicable to ingress LSPs only";
         }
         description "Ingress LSP timers";
         leaf life-time {
           type uint32;
           units seconds;
           description
             "lsp life time";
         }




Saad, et al.           Expires September 11, 2017             [Page 101]


Internet-Draft             TE YANG Data Model                 March 2017


         leaf time-to-install {
           type uint32;
           units seconds;
           description
             "lsp installation delay time";
         }

         leaf time-to-destroy {
           type uint32;
           units seconds;
           description
             "lsp expiration delay time";
         }
       }

       container downstream-info {
         when "../te:origin-type != 'egress'" {
           description "Applicable to ingress LSPs only";
         }
         description
           "downstream information";

         leaf nhop {
           type inet:ip-address;
           description
             "downstream nexthop.";
         }

         leaf outgoing-interface {
           type if:interface-ref;
           description
             "downstream interface.";
         }

         leaf neighbor {
           type inet:ip-address;
           description
             "downstream neighbor.";
         }

         leaf label {
           type rt-types:generalized-label;
           description
             "downstream label.";
         }
       }

       container upstream-info {



Saad, et al.           Expires September 11, 2017             [Page 102]


Internet-Draft             TE YANG Data Model                 March 2017


         when "../te:origin-type != 'ingress'" {
           description "Applicable to non-ingress LSPs only";
         }
         description
           "upstream information";

         leaf phop {
           type inet:ip-address;
           description
             "upstream nexthop or previous-hop.";
         }

         leaf neighbor {
           type inet:ip-address;
           description
             "upstream neighbor.";
         }

         leaf label {
           type rt-types:generalized-label;
           description
             "upstream label.";
         }
       }
     }

     /**
      * Device general groupings.
      */
     grouping tunnel-device_config {
       description "Device TE tunnel configs";
       leaf path-invalidation-action {
         type identityref {
           base te-types:path-invalidation-action-type;
         }
         description "Tunnel path invalidtion action";
       }
     }

     grouping lsp-device-timers_config {
       description "Device TE LSP timers configs";
       leaf lsp-install-interval {
         type uint32;
         units seconds;
         description
           "lsp installation delay time";
       }
       leaf lsp-cleanup-interval {



Saad, et al.           Expires September 11, 2017             [Page 103]


Internet-Draft             TE YANG Data Model                 March 2017


         type uint32;
         units seconds;
         description
           "lsp cleanup delay time";
       }
       leaf lsp-invalidation-interval {
         type uint32;
         units seconds;
         description
           "lsp path invalidation before taking action delay time";
       }
     }
     grouping lsp-device-timers {
       description "TE LSP timers configuration";
       container config {
         description
           "Configuration parameters for TE LSP timers";
         uses lsp-device-timers_config;

       }
       container state {
         config false;
         description
           "State parameters for TE LSP timers";
         uses lsp-device-timers_config;
       }
     }

     /**
      * TE global device generic groupings
      */

     /* TE interface container data */
     grouping interfaces-grouping {
       description
         "Interface TE configuration data grouping";
       container interfaces {
         description
           "Configuration data model for TE interfaces.";
         uses te-all-attributes;
         list interface {
           key "interface";
           description "TE interfaces.";
           leaf interface {
             type if:interface-ref;
             description
               "TE interface name.";
           }



Saad, et al.           Expires September 11, 2017             [Page 104]


Internet-Draft             TE YANG Data Model                 March 2017


           /* TE interface parameters */
           uses te-attributes;
         }
       }
     }

     /**
      * TE interface device generic groupings
      */
     grouping te-admin-groups_config {
       description
         "TE interface affinities grouping";
       choice admin-group-type {
         description
           "TE interface administrative groups
           representation type";
         case value-admin-groups {
           choice value-admin-group-type {
             description "choice of admin-groups";
             case admin-groups {
               description
                 "Administrative group/Resource
                 class/Color.";
               leaf admin-group {
                 type te-types:admin-group;
                 description
                   "TE interface administrative group";
               }
             }
             case extended-admin-groups {
               if-feature te-types:extended-admin-groups;
               description
                 "Extended administrative group/Resource
                 class/Color.";
               leaf extended-admin-group {
                 type te-types:extended-admin-group;
                 description
                   "TE interface extended administrativei
                   group";
               }
             }
           }
         }
         case named-admin-groups {
           list named-admin-groups {
             if-feature te-types:extended-admin-groups;
             if-feature te-types:named-extended-admin-groups;
             key named-admin-group;



Saad, et al.           Expires September 11, 2017             [Page 105]


Internet-Draft             TE YANG Data Model                 March 2017


             description
               "A list of named admin-group entries";
             leaf named-admin-group {
               type leafref {
                 path "../../../../../te:globals/" +
                   "te:named-admin-groups/te:named-admin-group/" +
                   "te:config/te:name";
               }
               description "A named admin-group entry";
             }
           }
         }
       }
     }

     /* TE interface SRLGs */
     grouping te-srlgs_config {
       description "TE interface SRLG grouping";
       choice srlg-type {
         description "Choice of SRLG configuration";
         case value-srlgs {
           list values {
             key "value";
             description "List of SRLG values that
               this link is part of.";
             leaf value {
               type uint32 {
                 range "0..4294967295";
               }
               description
                 "Value of the SRLG";
             }
           }
         }
         case named-srlgs {
           list named-srlgs {
             if-feature te-types:named-srlg-groups;
             key named-srlg;
             description
               "A list of named SRLG entries";
             leaf named-srlg {
               type leafref {
                 path "../../../../../te:globals/" +
                   "te:named-srlgs/te:named-srlg/te:config/te:name";
               }
               description
                 "A named SRLG entry";
             }



Saad, et al.           Expires September 11, 2017             [Page 106]


Internet-Draft             TE YANG Data Model                 March 2017


           }
         }
       }
     }

     grouping te-igp-flooding-bandwidth_config {
       description
         "Configurable items for igp flooding bandwidth
         threshold configuration.";
       leaf threshold-type {
         type enumeration {
           enum DELTA {
             description
               "DELTA indicates that the local
               system should flood IGP updates when a
               change in reserved bandwidth >= the specified
               delta occurs on the interface.";
           }
           enum THRESHOLD_CROSSED {
             description
               "THRESHOLD-CROSSED indicates that
               the local system should trigger an update (and
               hence flood) the reserved bandwidth when the
               reserved bandwidth changes such that it crosses,
               or becomes equal to one of the threshold values.";
           }
         }
         description
           "The type of threshold that should be used to specify the
           values at which bandwidth is flooded. DELTA indicates that
           the local system should flood IGP updates when a change in
           reserved bandwidth >= the specified delta occurs on the
           interface. Where THRESHOLD_CROSSED is specified, the local
           system should trigger an update (and hence flood) the
           reserved bandwidth when the reserved bandwidth changes such
           that it crosses, or becomes equal to one of the threshold
           values";
       }

       leaf delta-percentage {
         when "../threshold-type = 'DELTA'" {
           description
             "The percentage delta can only be specified when the
             threshold type is specified to be a percentage delta of
             the reserved bandwidth";
         }
         type te-types:percentage;
         description



Saad, et al.           Expires September 11, 2017             [Page 107]


Internet-Draft             TE YANG Data Model                 March 2017


           "The percentage of the maximum-reservable-bandwidth
           considered as the delta that results in an IGP update
           being flooded";
       }
       leaf threshold-specification {
         when "../threshold-type = 'THRESHOLD_CROSSED'" {
           description
             "The selection of whether mirrored or separate threshold
             values are to be used requires user specified thresholds to
             be set";
         }
         type enumeration {
           enum MIRRORED_UP_DOWN {
             description
               "MIRRORED_UP_DOWN indicates that a single set of
               threshold values should be used for both increasing
               and decreasing bandwidth when determining whether
               to trigger updated bandwidth values to be flooded
               in the IGP TE extensions.";
           }
           enum SEPARATE_UP_DOWN {
             description
               "SEPARATE_UP_DOWN indicates that a separate
               threshold values should be used for the increasing
               and decreasing bandwidth when determining whether
               to trigger updated bandwidth values to be flooded
               in the IGP TE extensions.";
           }
         }
         description
           "This value specifies whether a single set of threshold
           values should be used for both increasing and decreasing
           bandwidth when determining whether to trigger updated
           bandwidth values to be flooded in the IGP TE extensions.
           MIRRORED-UP-DOWN indicates that a single value (or set of
           values) should be used for both increasing and decreasing
           values, where SEPARATE-UP-DOWN specifies that the increasing
           and decreasing values will be separately specified";
       }

       leaf-list up-thresholds {
         when "../threshold-type = 'THRESHOLD_CROSSED'" +
           "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
             description
               "A list of up-thresholds can only be specified when the
               bandwidth update is triggered based on crossing a
               threshold and separate up and down thresholds are
               required";



Saad, et al.           Expires September 11, 2017             [Page 108]


Internet-Draft             TE YANG Data Model                 March 2017


         }
         type te-types:percentage;
         description
           "The thresholds (expressed as a percentage of the maximum
           reservable bandwidth) at which bandwidth updates are to be
           triggered when the bandwidth is increasing.";
       }

       leaf-list down-thresholds {
         when "../threshold-type = 'THRESHOLD_CROSSED'" +
           "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
             description
               "A list of down-thresholds can only be specified when the
               bandwidth update is triggered based on crossing a
               threshold and separate up and down thresholds are
               required";
         }
         type te-types:percentage;
         description
           "The thresholds (expressed as a percentage of the maximum
           reservable bandwidth) at which bandwidth updates are to be
           triggered when the bandwidth is decreasing.";
       }

       leaf-list up-down-thresholds {
         when "../threshold-type = 'THRESHOLD_CROSSED'" +
           "and ../threshold-specification = 'MIRRORED_UP_DOWN'" {
             description
               "A list of thresholds corresponding to both increasing
               and decreasing bandwidths can be specified only when an
               update is triggered based on crossing a threshold, and
               the same up and down thresholds are required.";
         }
         type te-types:percentage;
         description
           "The thresholds (expressed as a percentage of the maximum
           reservable bandwidth of the interface) at which bandwidth
           updates are flooded - used both when the bandwidth is
           increasing and decreasing";
       }
     }

     /* TE interface metric */
     grouping te-metric_config {
       description "Interface TE metric grouping";
       leaf te-metric {
         type te-types:te-metric;
         description "Interface TE metric.";



Saad, et al.           Expires September 11, 2017             [Page 109]


Internet-Draft             TE YANG Data Model                 March 2017


       }
     }

     /* TE interface switching capabilities */
     grouping te-switching-cap_config {
       description
         "TE interface switching capabilities";
       list switching-capabilities {
         key "switching-capability";
         description
           "List of interface capabilities for this interface";
         leaf switching-capability {
           type identityref {
             base te-types:switching-capabilities;
           }
           description
             "Switching Capability for this interface";
         }
         leaf encoding {
           type identityref {
             base te-types:lsp-encoding-types;
           }
           description
             "Encoding supported by this interface";
         }
       }
     }

     grouping te-advertisements_state {
       description
         "TE interface advertisements state grouping";
       container te-advertisements_state {
         description
           "TE interface advertisements state container";
         leaf flood-interval {
           type uint32;
           description
             "The periodic flooding interval";
         }
         leaf last-flooded-time {
           type uint32;
           units seconds;
           description
             "Time elapsed since last flooding in seconds";
         }
         leaf next-flooded-time {
           type uint32;
           units seconds;



Saad, et al.           Expires September 11, 2017             [Page 110]


Internet-Draft             TE YANG Data Model                 March 2017


           description
             "Time remained for next flooding in seconds";
         }
         leaf last-flooded-trigger {
           type enumeration {
             enum link-up {
               description "Link-up flooding trigger";
             }
             enum link-down {
               description "Link-up flooding trigger";
             }
             enum threshold-up {
               description
                 "Bandwidth reservation up threshold";
             }
             enum threshold-down {
               description
                 "Bandwidth reservation down threshold";
             }
             enum bandwidth-change {
               description "Banwidth capacity change";
             }
             enum user-initiated {
               description "Initiated by user";
             }
             enum srlg-change {
               description "SRLG property change";
             }
             enum periodic-timer {
               description "Periodic timer expired";
             }
           }
           description "Trigger for the last flood";
         }
         list advertized-level-areas {
           key level-area;
           description
             "List of areas the TE interface is advertised
             in";
           leaf level-area {
             type uint32;
             description
               "The IGP area or level where the TE
               interface state is advertised in";
           }
         }
       }
     }



Saad, et al.           Expires September 11, 2017             [Page 111]


Internet-Draft             TE YANG Data Model                 March 2017


     /* TE interface attributes grouping */
     grouping te-attributes {
       description "TE attributes configuration grouping";
       container config {
         description
           "Configuration parameters for interface TE
            attributes";
         uses te-metric_config;
         uses te-admin-groups_config;
         uses te-srlgs_config;
                           uses te-igp-flooding-bandwidth_config;
         uses te-switching-cap_config;
       }
       container state {
         config false;
         description
           "State parameters for interface TE metric";
         uses te-metric_config;
         uses te-admin-groups_config;
         uses te-srlgs_config;
         uses te-switching-cap_config;
                           uses te-igp-flooding-bandwidth_config;
         uses te-advertisements_state;
       }
     }

     grouping te-all-attributes {
       description
         "TE attributes configuration grouping for all
          interfaces";
       container config {
         description
           "Configuration parameters for all interface TE
            attributes";
                           uses te-igp-flooding-bandwidth_config;
       }
       container state {
         config false;
         description
           "State parameters for all interface TE metric";
                           uses te-igp-flooding-bandwidth_config;
       }
     }
     /*** End of TE interfaces device groupings ***/


     /**
      * TE device augmentations



Saad, et al.           Expires September 11, 2017             [Page 112]


Internet-Draft             TE YANG Data Model                 March 2017


      */
     augment "/te:te" {
       description "TE global container.";
       /* TE Interface Configuration Data */
       uses interfaces-grouping;
     }

     /* TE globals device augmentation */
     augment "/te:te/te:globals" {
       description
         "Global TE device specific configuration parameters";
       uses lsp-device-timers;
     }

     /* TE tunnels device configuration augmentation */
     augment "/te:te/te:tunnels/te:tunnel/te:config" {
       description
         "Tunnel device dependent augmentation";
       uses lsp-device-timers_config;
     }
     augment "/te:te/te:tunnels/te:tunnel/te:state" {
       description
         "Tunnel device dependent augmentation";
       uses lsp-device-timers_config;
     }

     /* TE LSPs device state augmentation */
     augment "/te:te/te:lsps-state/te:lsp" {
       description
         "LSP device dependent augmentation";
       uses lsps-device_state;
     }

     /* TE interfaces RPCs/execution Data */
     rpc interfaces-rpc {
       description
         "Execution data for TE interfaces.";
     }

     /* TE Interfaces Notification Data */
     notification interfaces-notif {
       description
         "Notification messages for TE interfaces.";
     }
   }
   <CODE ENDS>

               Figure 9: TE MPLS specific types YANG module



Saad, et al.           Expires September 11, 2017             [Page 113]


Internet-Draft             TE YANG Data Model                 March 2017


   <CODE BEGINS> file "ietf-te-mpls@2017-03-10.yang"
   module ietf-te-mpls {

     namespace "urn:ietf:params:xml:ns:yang:ietf-te-mpls";

     /* Replace with IANA when assigned */
     prefix "te-mpls";

     /* Import TE generic types */
     import ietf-te {
       prefix te;
     }

     /* Import TE generic types */
     import ietf-te-types {
       prefix te-types;
     }

     import ietf-routing-types {
       prefix "rt-types";
     }

     import ietf-mpls-static {
       prefix mpls-static;
     }

     import ietf-inet-types {
       prefix inet;
     }

     organization
       "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/teas/>
        WG List:  <mailto:teas@ietf.org>

        WG Chair: Lou Berger
                  <mailto:lberger@labn.net>

        WG Chair: Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Tarek Saad
                  <mailto:tsaad@cisco.com>

        Editor:   Rakesh Gandhi



Saad, et al.           Expires September 11, 2017             [Page 114]


Internet-Draft             TE YANG Data Model                 March 2017


                  <mailto:rgandhi@cisco.com>

        Editor:   Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Himanshu Shah
                  <mailto:hshah@ciena.com>

        Editor:   Xufeng Liu
                  <mailto:xufeng.liu@ericsson.com>

        Editor:   Xia Chen
                  <mailto:jescia.chenxia@huawei.com>

        Editor:   Raqib Jones
                  <mailto:raqib@Brocade.com>

        Editor:   Bin Wen
                  <mailto:Bin_Wen@cable.comcast.com>";

     description
       "YANG data module for MPLS TE configurations,
       state, RPC and notifications.";

     revision "2017-03-10" {
       description "Latest update to MPLS TE YANG module.";
       reference "TBD";
     }

     /* MPLS TE tunnel properties*/

     grouping tunnel-igp-shortcut_config {
       description "TE tunnel IGP shortcut configs";
       leaf shortcut-eligible {
         type boolean;
         default "true";
         description
           "Whether this LSP is considered to be eligible for us as a
           shortcut in the IGP. In the case that this leaf is set to
           true, the IGP SPF calculation uses the metric specified to
           determine whether traffic should be carried over this LSP";
       }
       leaf metric-type {
         type identityref {
           base te-types:LSP_METRIC_TYPE;
         }
         default te-types:LSP_METRIC_INHERITED;
         description



Saad, et al.           Expires September 11, 2017             [Page 115]


Internet-Draft             TE YANG Data Model                 March 2017


           "The type of metric specification that should be used to set
           the LSP(s) metric";
       }
       leaf metric {
         type int32;
         description
           "The value of the metric that should be specified. The value
           supplied in this leaf is used in conjunction with the metric
           type to determine the value of the metric used by the system.
           Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
           value of this leaf is used directly; where it is set to
           LSP_METRIC_RELATIVE, the relevant (positive or negative)
           offset is used to formulate the metric; where metric-type
           is LSP_METRIC_INHERITED, the value of this leaf is not
           utilised";
       }
       leaf-list routing-afs {
         type inet:ip-version;
         description
           "Address families";
       }
     }

     grouping tunnel-igp-shortcuts {
       description
         "TE tunnel IGP shortcut grouping";
       container tunnel-igp-shortcut {
         description
           "Tunnel IGP shortcut properties";
         container config {
           description
             "Configuration parameters for tunnel IGP shortcuts";
           uses tunnel-igp-shortcut_config;
         }
         container state {
           description
             "State parameters for tunnel IGP shortcuts";
           uses tunnel-igp-shortcut_config;
         }
       }
     }

     grouping tunnel-forwarding-adjacency_configs {
       description "Tunnel forwarding adjacency grouping";
       leaf binding-label {
         type rt-types:mpls-label;
         description "MPLS tunnel binding label";
       }



Saad, et al.           Expires September 11, 2017             [Page 116]


Internet-Draft             TE YANG Data Model                 March 2017


       leaf load-share {
         type uint32 {
           range "1..4294967295";
         }
         description "ECMP tunnel forwarding
           load-share factor.";
       }
       leaf policy-class {
         type uint8 {
           range "1..7";
         }
         description
           "The class associated with this tunnel";
       }
     }

     grouping tunnel-forwarding-adjacency {
       description "Properties for using tunnel in forwarding.";
       container forwarding {
         description
           "Tunnel forwarding properties container";
         container config {
           description
             "Configuration parameters for tunnel forwarding adjacency";
           uses tunnel-forwarding-adjacency_configs;
         }
         container state {
           description
             "State parameters for tunnel forwarding adjacency";
           uses tunnel-forwarding-adjacency_configs;
         }
       }
     }

     /*** End of MPLS TE tunnel configuration/state */


     /**
      * MPLS TE augmentations
      */

     /* MPLS TE tunnel augmentations */
     augment "/te:te/te:tunnels/te:tunnel" {
       description "MPLS TE tunnel config augmentations";
       uses tunnel-igp-shortcuts;
       uses tunnel-forwarding-adjacency;
     }




Saad, et al.           Expires September 11, 2017             [Page 117]


Internet-Draft             TE YANG Data Model                 March 2017


     /* MPLS TE LSPs augmentations */
     augment "/te:te/te:tunnels/te:tunnel/" +
             "te:p2p-primary-paths/te:p2p-primary-path/" +
             "te:config" {
       when "/te:te/te:tunnels/te:tunnel" +
         "/te:p2p-primary-paths/te:p2p-primary-path/te:config" +
         "/te:path-setup-protocol = 'te-types:te-path-setup-static'" {
         description
         "When the path is statically provisioned";
       }
       description "MPLS TE LSP augmentation";
       leaf static-lsp-name {
         type mpls-static:static-lsp-ref;
         description "Static LSP name";
       }
     }
     augment "/te:te/te:tunnels/te:tunnel/" +
             "te:p2p-primary-paths/te:p2p-primary-path/" +
             "te:state" {
       description "MPLS TE LSP augmentation";
       leaf static-lsp-name {
         type mpls-static:static-lsp-ref;
         description "Static LSP name";
       }
     }
     augment "/te:te/te:tunnels/te:tunnel/" +
             "te:p2p-secondary-paths/te:p2p-secondary-path/" +
             "te:config" {
       when "/te:te/te:tunnels/te:tunnel" +
         "/te:p2p-secondary-paths/te:p2p-secondary-path/te:config" +
         "/te:path-setup-protocol = 'te-types:te-path-setup-static'" {
         description
         "When the path is statically provisioned";
       }
       description "MPLS TE LSP augmentation";
       leaf static-lsp-name {
         type mpls-static:static-lsp-ref;
         description "Static LSP name";
       }
     }
     augment "/te:te/te:tunnels/te:tunnel/" +
             "te:p2p-secondary-paths/te:p2p-secondary-path/" +
             "te:state" {
       description "MPLS TE LSP augmentation";
       leaf static-lsp-name {
         type mpls-static:static-lsp-ref;
         description "Static LSP name";
       }



Saad, et al.           Expires September 11, 2017             [Page 118]


Internet-Draft             TE YANG Data Model                 March 2017


     }
   }
   <CODE ENDS>

                      Figure 10: TE MPLS YANG module

   <CODE BEGINS> file "ietf-te-mpls-types@2017-03-10.yang"
   module ietf-te-mpls-types {

     namespace "urn:ietf:params:xml:ns:yang:ietf-te-mpls-types";

     /* Replace with IANA when assigned */
     prefix "te-mpls-types";

     organization
       "IETF TEAS Working Group";

     contact "Fill me";

     description
       "This module contains a collection of generally
       useful TE specific YANG data type defintions.";

     revision "2017-03-10" {
       description "Latest revision of TE MPLS types";
       reference "RFC3209";
     }

     identity backup-protection-type {
       description
         "Base identity for backup protection type";
     }

     identity backup-protection-link {
       base backup-protection-type;
       description
         "backup provides link protection only";
     }

     identity backup-protection-node-link {
       base backup-protection-type;
       description
         "backup offers node (preferred) or link protection";
     }

     identity bc-model-type {
       description
         "Base identity for Diffserv-TE bandwidth constraint



Saad, et al.           Expires September 11, 2017             [Page 119]


Internet-Draft             TE YANG Data Model                 March 2017


         model type";
     }

     identity bc-model-rdm {
       base bc-model-type;
       description
         "Russian Doll bandwidth constraint model type.";
     }

     identity bc-model-mam {
       base bc-model-type;
       description
         "Maximum Allocation bandwidth constraint
         model type.";
     }

     identity bc-model-mar {
       base bc-model-type;
       description
         "Maximum Allocation with Reservation
         bandwidth constraint model type.";
     }

     typedef bandwidth-kbps {
       type uint64;
       units "Kbps";
       description
         "Bandwidth values expressed in kilobits per second";
     }

     typedef bandwidth-mbps {
       type uint64;
       units "Mbps";
       description
         "Bandwidth values expressed in megabits per second";
     }

     typedef bandwidth-gbps {
       type uint64;
       units "Gbps";
       description
         "Bandwidth values expressed in gigabits per second";
     }

     typedef te-bandwidth-type {
       type enumeration {
         enum SPECIFIED {
           description



Saad, et al.           Expires September 11, 2017             [Page 120]


Internet-Draft             TE YANG Data Model                 March 2017


             "Bandwidth is explicitly specified";
         }
         enum AUTO {
           description
             "Bandwidth is automatically computed";
         }
       }
       description
         "enumerated type for specifying whether bandwidth is
          explicitly specified or automatically computed";
     }

     typedef bfd-type {
       type enumeration {
         enum classical {
           description "BFD classical session type.";
         }
         enum seamless {
           description "BFD seamless session type.";
         }
       }
       default "classical";
       description
         "Type of BFD session";
     }

     typedef bfd-encap-mode-type {
       type enumeration {
         enum gal {
           description
             "BFD with GAL mode";
         }
         enum ip {
           description
             "BFD with IP mode";
         }
       }
       default ip;
       description
         "Possible BFD transport modes when running over TE
         LSPs.";
     }
   }
   <CODE ENDS>

                   Figure 11: TE MPLS types YANG module

   <CODE BEGINS> file "ietf-te-sr-mpls@2017-03-10.yang"



Saad, et al.           Expires September 11, 2017             [Page 121]


Internet-Draft             TE YANG Data Model                 March 2017


   module ietf-te-sr-mpls {

     namespace "urn:ietf:params:xml:ns:yang:ietf-te-sr-mpls";

     /* Replace with IANA when assigned */
     prefix "te-sr-mpls";

     /* Import TE generic types */
     import ietf-te {
       prefix te;
     }

     /* Import TE generic types */
     import ietf-te-types {
       prefix te-types;
     }

     organization
       "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/teas/>
        WG List:  <mailto:teas@ietf.org>

        WG Chair: Lou Berger
                  <mailto:lberger@labn.net>

        WG Chair: Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Tarek Saad
                  <mailto:tsaad@cisco.com>

        Editor:   Rakesh Gandhi
                  <mailto:rgandhi@cisco.com>

        Editor:   Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Himanshu Shah
                  <mailto:hshah@ciena.com>

        Editor:   Xufeng Liu
                  <mailto:xufeng.liu@ericsson.com>

        Editor:   Xia Chen
                  <mailto:jescia.chenxia@huawei.com>



Saad, et al.           Expires September 11, 2017             [Page 122]


Internet-Draft             TE YANG Data Model                 March 2017


        Editor:   Raqib Jones
                  <mailto:raqib@Brocade.com>

        Editor:   Bin Wen
                  <mailto:Bin_Wen@cable.comcast.com>";

     description
       "YANG data module for MPLS TE configurations,
       state, RPC and notifications.";

     revision "2017-03-10" {
       description "Latest update to MPLS TE YANG module.";
       reference "TBD";
     }

     identity sr-protection-type {
       description
          "The Adj-SID base protection types";
     }

     identity sr-protection-type-protected {
       base sr-protection-type;
       description
          "The Adj-SID is eligible if protected";
     }

     identity sr-protection-type-unprotected {
       base sr-protection-type;
       description
          "The Adj-SID is eligible if unprotected";
     }

     identity sr-protection-type-any {
       base sr-protection-type;
       description
          "The Adj-SID is eligible if protected or unprotected";
     }

     typedef te-sid-selection-mode {
       type enumeration {
         enum ADJ_SID_ONLY {
           description
             "The SR-TE tunnel should only use adjacency SIDs
             to build the SID stack to be pushed for the LSP";
         }
         enum MIXED_MODE {
           description
             "The SR-TE tunnel can use a mix of adjacency



Saad, et al.           Expires September 11, 2017             [Page 123]


Internet-Draft             TE YANG Data Model                 March 2017


             and prefix SIDs to build the SID stack to be pushed
             to the LSP";
         }
       }
       description "SID selection mode type";
     }

     /* MPLS SR-TE tunnel properties*/
     grouping tunnel-sr-mpls-properties_config {
       description "MPLS TE SR tunnel properties";
       leaf path-signaling-type {
         type identityref {
           base te-types:path-signaling-type;
         }
         description "TE tunnel path signaling type";
       }
     }

     grouping te-sr-named-path-constraints_config {
       description
         "Configuration parameters relating to SR-TE LSPs";

       leaf sid-selection-mode {
         type te-sid-selection-mode;
         default MIXED_MODE;
         description
           "The restrictions placed on the SIDs to be selected by the
           calculation method for the explicit path when it is
           instantiated for a SR-TE LSP";
       }

       leaf sid-protection {
         type identityref {
           base sr-protection-type;
         }
         default sr-protection-type-any;
         description
           "When set to protected only SIDs that are
           protected are to be selected by the calculating method
           when the explicit path is instantiated by a SR-TE LSP.";
       }
     }

     grouping te-sr-named-path-constraints {
       description "Named TE SR path constraints grouping";
       container config {
         description
           "Configuration parameters related to TE SR named



Saad, et al.           Expires September 11, 2017             [Page 124]


Internet-Draft             TE YANG Data Model                 March 2017


            path constraints";
         uses te-sr-named-path-constraints_config;
       }
       container state {
         config false;
         description
           "State parameters related to TE SR named
            path constraints";
         uses te-sr-named-path-constraints_config;
       }
     }

     /*** End of MPLS SR-TE tunnel configuration/state */


     /**
      * MPLS TE augmentations
      */

     /* MPLS TE global augmentations */
     augment "/te:te/te:globals/te:named-path-constraints" +
             "/te:named-path-constraint" {
       description
           "Augmentations for MPLS SR-TE config named constraints";
       uses te-sr-named-path-constraints;
     }

     /* MPLS TE tunnel augmentations */

     /* MPLS TE LSPs augmentations */
   }
   <CODE ENDS>

                     Figure 12: SR TE MPLS YANG module

5.  IANA Considerations

   This document registers the following URIs in the IETF XML registry
   [RFC3688].  Following the format in [RFC3688], the following
   registration is requested to be made.

   URI: urn:ietf:params:xml:ns:yang:ietf-te XML: N/A, the requested URI
   is an XML namespace.

   URI: urn:ietf:params:xml:ns:yang:ietf-te-device XML: N/A, the
   requested URI is an XML namespace.





Saad, et al.           Expires September 11, 2017             [Page 125]


Internet-Draft             TE YANG Data Model                 March 2017


   URI: urn:ietf:params:xml:ns:yang:ietf-te-mpls XML: N/A, the requested
   URI is an XML namespace.

   URI: urn:ietf:params:xml:ns:yang:ietf-te-sr-mpls XML: N/A, the
   requested URI is an XML namespace.

   URI: urn:ietf:params:xml:ns:yang:ietf-te-types XML: N/A, the
   requested URI is an XML namespace.

   URI: urn:ietf:params:xml:ns:yang:ietf-te-mpls-types XML: N/A, the
   requested URI is an XML namespace.

   This document registers a YANG module in the YANG Module Names
   registry [RFC6020].

   name: ietf-te namespace: urn:ietf:params:xml:ns:yang:ietf-te prefix:
   ietf-te reference: RFC3209

   name: ietf-te-device namespace: urn:ietf:params:xml:ns:yang:ietf-te
   prefix: ietf-te-device reference: RFC3209

   name: ietf-te-mpls namespace: urn:ietf:params:xml:ns:yang:ietf-te-
   mpls prefix: ietf-te-mpls reference: RFC3209

   name: ietf-te-sr-mpls namespace: urn:ietf:params:xml:ns:yang:ietf-te-
   sr-mpls prefix: ietf-te-sr-mpls

   name: ietf-te-types namespace: urn:ietf:params:xml:ns:yang:ietf-te-
   types prefix: ietf-te-types reference: RFC3209

   name: ietf-te-mpls-types namespace: urn:ietf:params:xml:ns:yang:ietf-
   te-mpls-types prefix: ietf-te-mpls-types reference: RFC3209

6.  Security Considerations

   The YANG module defined in this memo is designed to be accessed via
   the NETCONF protocol [RFC6241].  The lowest NETCONF layer is the
   secure transport layer and the mandatory-to-implement secure
   transport is SSH [RFC6242].  The NETCONF access control model
   [RFC6536] provides means to restrict access for particular NETCONF

   users to a pre-configured subset of all available NETCONF protocol
   operations and content.

   There are a number of data nodes defined in the YANG module which 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>)



Saad, et al.           Expires September 11, 2017             [Page 126]


Internet-Draft             TE YANG Data Model                 March 2017


   to these data nodes without proper protection can have a negative
   effect on network operations.  Following are the subtrees and data
   nodes and their sensitivity/vulnerability:

   "/te/globals": This module specifies the global TE configurations on
   a device.  Unauthorized access to this container could cause the
   device to ignore packets it should receive and process.

   "/te/tunnels": This list specifies the configured TE tunnels on a
   device.  Unauthorized access to this list could cause the device to
   ignore packets it should receive and process.

   "/te/lsps-state": This list specifies the state derived LSPs.
   Unauthorized access to this list could cause the device to ignore
   packets it should receive and process.

   "/te/interfaces": This list specifies the configured TE interfaces on
   a device.  Unauthorized access to this list could cause the device to
   ignore packets it should receive and process.

7.  Acknowledgement

   The authors would like to thank the members of the multi-vendor YANG
   design team who are involved in the definition of this model.

   The authors would also like to thank Loa Andersson, Lou Berger,
   Sergio Belotti, Italo Busi, Aihua Guo, Dhruv Dhody, Anurag Sharma,
   and Xian Zhang for their comments and providing valuable feedback on
   this document.

8.  Contributors




















Saad, et al.           Expires September 11, 2017             [Page 127]


Internet-Draft             TE YANG Data Model                 March 2017


      Xia Chen
      Huawei Technologies

      Email: jescia.chenxia@huawei.com


      Raqib Jones
      Brocade

      Email: raqib@Brocade.com


      Bin Wen
      Comcast

      Email: Bin_Wen@cable.comcast.com


9.  References

9.1.  Normative References

   [I-D.ietf-teas-yang-rsvp]
              Beeram, V., Saad, T., Gandhi, R., Liu, X., Shah, H., Chen,
              X., Jones, R., and B. Wen, "A YANG Data Model for Resource
              Reservation Protocol (RSVP)", draft-ietf-teas-yang-rsvp-06
              (work in progress), October 2016.

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

   [RFC3209]  Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V.,
              and G. Swallow, "RSVP-TE: Extensions to RSVP for LSP
              Tunnels", RFC 3209, DOI 10.17487/RFC3209, December 2001,
              <http://www.rfc-editor.org/info/rfc3209>.

   [RFC3473]  Berger, L., Ed., "Generalized Multi-Protocol Label
              Switching (GMPLS) Signaling Resource ReserVation Protocol-
              Traffic Engineering (RSVP-TE) Extensions", RFC 3473, DOI
              10.17487/RFC3473, January 2003,
              <http://www.rfc-editor.org/info/rfc3473>.

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




Saad, et al.           Expires September 11, 2017             [Page 128]


Internet-Draft             TE YANG Data Model                 March 2017


   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <http://www.rfc-editor.org/info/rfc6020>.

   [RFC6107]  Shiomoto, K., Ed. and A. Farrel, Ed., "Procedures for
              Dynamically Signaled Hierarchical Label Switched Paths",
              RFC 6107, DOI 10.17487/RFC6107, February 2011,
              <http://www.rfc-editor.org/info/rfc6107>.

   [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,
              <http://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,
              <http://www.rfc-editor.org/info/rfc6242>.

   [RFC6536]  Bierman, A. and M. Bjorklund, "Network Configuration
              Protocol (NETCONF) Access Control Model", RFC 6536, DOI
              10.17487/RFC6536, March 2012,
              <http://www.rfc-editor.org/info/rfc6536>.

   [RFC6991]  Schoenwaelder, J., Ed., "Common YANG Data Types", RFC
              6991, DOI 10.17487/RFC6991, July 2013,
              <http://www.rfc-editor.org/info/rfc6991>.

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

9.2.  Informative References

   [I-D.clemm-netmod-mount]
              Clemm, A., Medved, J., and E. Voit, "Mounting YANG-Defined
              Information from Remote Datastores", draft-clemm-netmod-
              mount-05 (work in progress), September 2016.

   [I-D.openconfig-mpls-consolidated-model]
              George, J., Fang, L., eric.osborne@level3.com, e., and R.
              Shakir, "MPLS / TE Model for Service Provider Networks",
              draft-openconfig-mpls-consolidated-model-02 (work in
              progress), October 2015.







Saad, et al.           Expires September 11, 2017             [Page 129]


Internet-Draft             TE YANG Data Model                 March 2017


   [I-D.openconfig-netmod-opstate]
              Shakir, R., Shaikh, A., and M. Hines, "Consistent Modeling
              of Operational State Data in YANG", draft-openconfig-
              netmod-opstate-01 (work in progress), July 2015.

Authors' Addresses

   Tarek Saad (editor)
   Cisco Systems Inc

   Email: tsaad@cisco.com


   Rakesh Gandhi
   Cisco Systems Inc

   Email: rgandhi@cisco.com


   Xufeng Liu
   Jabil

   Email: Xufeng_Liu@jabil.com


   Vishnu Pavan Beeram
   Juniper Networks

   Email: vbeeram@juniper.net


   Himanshu Shah
   Ciena

   Email: hshah@ciena.com


   Igor Bryskin
   Huawei Technologies

   Email: Igor.Bryskin@huawei.com










Saad, et al.           Expires September 11, 2017             [Page 130]