netconfcentral logo

ietf-network-state@2018-02-26



  module ietf-network-state {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-network-state";

    prefix nw-s;

    import ietf-network {
      prefix nw;
      reference
        "RFC 8345: A YANG Data Model for Network Topologies";


    }

    organization
      "IETF I2RS (Interface to the Routing System) Working Group";

    contact
      "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
WG List:   <mailto:i2rs@ietf.org>

Editor:    Alexander Clemm
	   <mailto:ludwig@clemm.org>

Editor:    Jan Medved
	   <mailto:jmedved@cisco.com>

Editor:    Robert Varga
	   <mailto:robert.varga@pantheon.tech>

Editor:    Nitin Bahadur
	   <mailto:nitin_bahadur@yahoo.com>
Editor:    Hariharan Ananthakrishnan
	   <mailto:hari@packetdesign.com>

Editor:    Xufeng Liu
	   <mailto:xufeng.liu.ietf@gmail.com>";

    description
      "This module defines a common base data model for a collection
of nodes in a network.  Node definitions are further used
in network topologies and inventories.  It represents
information that either (1) is learned and automatically
populated or (2) results from applying network information
that has been configured per the 'ietf-network' data model,
mirroring the corresponding data nodes in this data model.

The data model mirrors 'ietf-network' but contains only
read-only state data.  The data model is not needed when the
underlying implementation infrastructure supports the Network
Management Datastore Architecture (NMDA).

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

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

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

    revision "2018-02-26" {
      description "Initial revision.";
      reference
        "RFC 8345: A YANG Data Model for Network Topologies";

    }


    container networks {
      config false;
      description
        "Serves as a top-level container for a list of networks.";
      list network {
        key "network-id";
        description
          "Describes a network.
A network typically contains an inventory of nodes,
topological information (augmented through the
network-topology data model), and layering information.";
        container network-types {
          description
            "Serves as an augmentation target.
The network type is indicated through corresponding
presence containers augmented into this container.";
          container fabric-network {
            presence
              "indicates fabric Network";
            description
              "The presence of the container node indicates
fabric topology";
          }  // container fabric-network

          container te-topology {
            presence
              "Indicates a TE topology";
            description
              "Its presence identifies the TE topology type.";
          }  // container te-topology

          container l3-unicast-topology {
            presence
              "indicates L3 Unicast topology";
            description
              "The presence of the container node indicates L3 Unicast
topology";
          }  // container l3-unicast-topology
        }  // container network-types

        leaf network-id {
          type nw:network-id;
          description
            "Identifies a network.";
        }

        list supporting-network {
          key "network-ref";
          description
            "An underlay network, used to represent layered network
topologies.";
          leaf network-ref {
            type leafref {
              path "/nw-s:networks/nw-s:network/nw-s:network-id";
              require-instance false;
            }
            description
              "References the underlay network.";
          }
        }  // list supporting-network

        list node {
          key "node-id";
          description
            "The inventory of nodes of this network.";
          leaf node-id {
            type nw:node-id;
            description
              "Uniquely identifies a node within the containing
network.";
          }

          list supporting-node {
            key "network-ref node-ref";
            description
              "Represents another node that is in an underlay network
and that supports this node.  Used to represent layering
structure.";
            leaf network-ref {
              type leafref {
                path "../../../nw-s:supporting-network/nw-s:network-ref";
                require-instance false;
              }
              description
                "References the underlay network of which the
underlay node is a part.";
            }

            leaf node-ref {
              type leafref {
                path "/nw-s:networks/nw-s:network/nw-s:node/nw-s:node-id";
                require-instance false;
              }
              description
                "References the underlay node itself.";
            }
          }  // list supporting-node

          container fabric-attributes-state {
            description
              "Attributes for a fabric network";
            leaf fabric-id {
              type fabrictypes:fabric-id;
              description "Fabric ID";
            }

            leaf name {
              type string;
              description
                "Name of the fabric";
            }

            leaf type {
              type fabrictypes:underlay-network-type;
              description
                "The type of physical network that implements this
fabric.  Examples are VLAN and TRILL.";
            }

            container vni-capacity {
              description
                "The range of the VXLAN Network
Identifier (VNI) defined in RFC 7348 that the POD uses.";
              leaf min {
                type int32;
                description
                  "The lower-limit VNI.";
              }

              leaf max {
                type int32;
                description
                  "The upper-limit VNI.";
              }
            }  // container vni-capacity

            leaf description {
              type string;
              description
                "Description of the fabric";
            }

            container options {
              description
                "Options of the fabric";
              leaf gateway-mode {
                type enumeration {
                  enum "centralized" {
                    value 0;
                    description
                      "The fabric uses centralized
gateway, in which gateway is deployed on SPINE
node.";
                  }
                  enum "distributed" {
                    value 1;
                    description
                      "The fabric uses distributed
gateway, in which gateway is deployed on LEAF
node.";
                  }
                }
                default "distributed";
                description
                  "Gateway mode of the fabric";
              }

              leaf traffic-behavior {
                type enumeration {
                  enum "normal" {
                    value 0;
                    description
                      "Normal means no policy is needed
for all traffic";
                  }
                  enum "policy-driven" {
                    value 1;
                    description
                      "Policy driven means policy is
needed for the traffic; otherwise, the traffic
will be discarded.";
                  }
                }
                default "normal";
                description
                  "Traffic behavior of the fabric";
              }

              leaf-list capability-supported {
                type fabrictypes:service-capabilities;
                description
                  "It provides a list of supported services of the
fabric.  The service-capabilities is defined as
identity-ref.  Users can define more services
by defining new identities.";
              }
            }  // container options

            list device-nodes {
              key "device-ref";
              description
                "Device nodes that are included in a fabric.";
              leaf device-ref {
                type fabrictypes:node-ref;
                description
                  "The device that the fabric includes that refers
to a node in another topology.";
              }

              leaf-list role {
                type fabrictypes:device-role;
                default "fabrictypes:leaf";
                description
                  "It is a list of device roles to represent the roles
that a device plays within a POD, such as SPINE,
LEAF, Border, or Border-Leaf.
The device role is defined as identity-ref.  If more
than 2 stages are used for a POD, users can
define new identities for the device role.";
              }
            }  // list device-nodes

            list device-links {
              key "link-ref";
              description
                "Links that are included within a fabric.";
              leaf link-ref {
                type fabrictypes:link-ref;
                description
                  "The link that the fabric includes that refers to
a link in another topology.";
              }
            }  // list device-links

            list device-ports {
              key "port-ref";
              description
                "Ports that are included in the fabric.";
              leaf port-ref {
                type fabrictypes:tp-ref;
                description
                  "The port that the fabric includes that refers to
a termination-point in another topology.";
              }

              leaf port-type {
                type fabrictypes:port-type;
                description
                  "Port type is defined as identity-ref.  The current
types include ethernet or serial.  If more types
are needed, developers can define new identities.";
              }

              leaf bandwidth {
                type fabrictypes:bandwidth;
                description
                  "Bandwidth of the port.  It is defined as
identity-ref.  If more speeds are introduced,
developers can define new identities for them.  Current
speeds include 1M, 10M, 100M, 1G, 10G,
25G, 40G, 100G, and 400G.";
              }
            }  // list device-ports
          }  // container fabric-attributes-state

          list termination-point {
            key "tp-id";
            description
              "A termination point can terminate a link.
Depending on the type of topology, a termination point
could, for example, refer to a port or an interface.";
            leaf tp-id {
              type nt:tp-id;
              description
                "Termination point identifier.";
            }

            list supporting-termination-point {
              key "network-ref node-ref tp-ref";
              description
                "This list identifies any termination points on which a
given termination point depends or onto which it maps.
Those termination points will themselves be contained
in a supporting node.  This dependency information can be
inferred from the dependencies between links.  Therefore,
this item is not separately configurable.  Hence, no
corresponding constraint needs to be articulated.
The corresponding information is simply provided by the
implementing system.";
              leaf network-ref {
                type leafref {
                  path "../../../nw-s:supporting-node/nw-s:network-ref";
                  require-instance false;
                }
                description
                  "This leaf identifies in which topology the
supporting termination point is present.";
              }

              leaf node-ref {
                type leafref {
                  path "../../../nw-s:supporting-node/nw-s:node-ref";
                  require-instance false;
                }
                description
                  "This leaf identifies in which node the supporting
termination point is present.";
              }

              leaf tp-ref {
                type leafref {
                  path "/nw-s:networks/nw-s:network[nw-s:network-id=current()/../network-ref]/nw-s:node[nw-s:node-id=current()/../node-ref]/termination-point/tp-id";
                  require-instance false;
                }
                description
                  "Reference to the underlay node (the underlay node must
be in a different topology).";
              }
            }  // list supporting-termination-point

            leaf te-tp-id {
              type te-types:te-tp-id;
              description
                "An identifier that uniquely identifies a TE termination
point.";
            }

            container te {
              must "../te-tp-id";
              presence "TE support";
              description
                "Indicates TE support.";
              leaf admin-status {
                type te-types:te-admin-status;
                description
                  "The administrative state of the LTP.";
              }

              leaf name {
                type string;
                description
                  "A descriptive name for the LTP.";
              }

              list interface-switching-capability {
                key "switching-capability encoding";
                description
                  "List of ISCDs for this link.";
                reference
                  "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS)
                  Signaling Functional Description
                   RFC 4203: OSPF Extensions in Support of Generalized
                  Multi-Protocol Label Switching (GMPLS)";

                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.";
                }

                list max-lsp-bandwidth {
                  key "priority";
                  max-elements 8;
                  description
                    "Maximum Label Switched Path (LSP) bandwidth at
priorities 0-7.";
                  leaf priority {
                    type uint8 {
                      range "0..7";
                    }
                    description "Priority.";
                  }

                  container te-bandwidth {
                    description
                      "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type te-bandwidth;
                        description
                          "Bandwidth specified in a generic format.";
                      }
                    }  // choice technology
                  }  // container te-bandwidth
                }  // list max-lsp-bandwidth
              }  // list interface-switching-capability

              leaf inter-domain-plug-id {
                type binary;
                description
                  "A network-wide unique number that identifies on the
network a connection that supports a given inter-domain
TE link.  This is a more flexible alternative to specifying
'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link
when the provider either does not know 'remote-te-node-id'
and 'remote-te-link-tp-id' or needs to give the client the
flexibility to mix and match multiple topologies.";
              }

              leaf-list inter-layer-lock-id {
                type uint32;
                description
                  "Inter-layer lock ID, used for path computation in a TE
topology covering multiple layers or multiple regions.";
                reference
                  "RFC 5212: Requirements for GMPLS-Based Multi-Region and
                  Multi-Layer Networks (MRN/MLN)
                   RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions
                  for Multi-Layer and Multi-Region Networks (MLN/MRN)";

              }

              leaf oper-status {
                type te-types:te-oper-status;
                config false;
                description
                  "The current operational state of the LTP.";
              }

              container geolocation {
                config false;
                description
                  "Contains a GPS location.";
                leaf altitude {
                  type int64;
                  units "millimeters";
                  description
                    "Distance above sea level.";
                }

                leaf latitude {
                  type geographic-coordinate-degree {
                    fraction-digits 0;
                    range "-90..90";
                  }
                  description
                    "Relative position north or south on the Earth's surface.";
                }

                leaf longitude {
                  type geographic-coordinate-degree {
                    fraction-digits 0;
                    range "-180..180";
                  }
                  description
                    "Angular distance east or west on the Earth's surface.";
                }
              }  // container geolocation
            }  // container te

            container l3-termination-point-attributes {
              description
                "Contains termination point attributes";
              choice termination-point-type {
                description
                  "Indicates the termination point type";
                leaf-list ip-address {
                  type inet:ip-address;
                  description
                    "IPv4 or IPv6 address.";
                }
                leaf unnumbered-id {
                  type uint32;
                  description
                    "Unnumbered interface identifier.
The identifier will correspond to the ifIndex value
of the interface, i.e., the ifIndex value of the
ifEntry that represents the interface in
implementations where the Interfaces Group MIB
(RFC 2863) is supported.";
                  reference
                    "RFC 2863: The Interfaces Group MIB";

                }
                leaf interface-name {
                  type string;
                  description
                    "Name of the interface.  The name can (but does not
have to) correspond to an interface reference of a
containing node's interface, i.e., the path name of a
corresponding interface data node on the containing
node reminiscent of data type interface-ref defined
in RFC 8343. It should be noted that data type
interface-ref of RFC 8343 cannot be used directly,

as this data type is used to reference an interface
in a datastore of a single node in the network, not
to uniquely reference interfaces across a network.";
                  reference
                    "RFC 8343: A YANG Data Model for Interface Management";

                }
              }  // choice termination-point-type
            }  // container l3-termination-point-attributes
          }  // list termination-point

          leaf te-node-id {
            type te-types:te-node-id;
            description
              "The identifier of a node in the TE topology.
A node is specific to a topology to which it belongs.";
          }

          container te {
            must "../te-node-id" {
              description
                "'te-node-id' is mandatory.";
            }
            must
              "count(../nw-s:supporting-node)<=1" {
              description
                "For a node in a TE topology, there cannot be more
than one supporting node.  If multiple nodes are
abstracted, the 'underlay-topology' field is used.";
            }
            presence "TE support";
            description
              "Indicates TE support.";
            leaf-list te-node-template {
              if-feature template;
              type leafref {
                path "../../../../te/templates/node-template/name";
              }
              description
                "The reference to a TE node template.";
            }

            container te-node-attributes {
              description
                "Contains node attributes in a TE topology.";
              leaf admin-status {
                type te-types:te-admin-status;
                description
                  "The administrative state of the link.";
              }

              container connectivity-matrices {
                description
                  "Contains a connectivity matrix on a TE node.";
                leaf number-of-entries {
                  type uint16;
                  description
                    "The number of connectivity matrix entries.
If this number is specified in the configuration request,
the number is the requested number of entries, which may
not all be listed in the list;
if this number is reported in the state data,
the number is the current number of operational entries.";
                }

                container label-restrictions {
                  description
                    "The label restrictions container.";
                  list label-restriction {
                    key "index";
                    description
                      "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                    reference
                      "RFC 7579: General Network Element Constraint Encoding
                      for GMPLS-Controlled Networks";

                    leaf restriction {
                      type enumeration {
                        enum "inclusive" {
                          value 0;
                          description
                            "The label or label range is inclusive.";
                        }
                        enum "exclusive" {
                          value 1;
                          description
                            "The label or label range is exclusive.";
                        }
                      }
                      default "inclusive";
                      description
                        "Indicates whether the list item is inclusive or exclusive.";
                    }

                    leaf index {
                      type uint32;
                      description
                        "The index of the label restriction list entry.";
                    }

                    container label-start {
                      must
                        "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                        error-message
                          "'label-start' and 'label-end' must have the same direction.";
                      }
                      description
                        "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                      container te-label {
                        description
                          "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type rt-types:generalized-label;
                            description
                              "TE label specified in a generic format.";
                          }
                        }  // choice technology

                        leaf direction {
                          type te-label-direction;
                          default "forward";
                          description
                            "Label direction.";
                        }
                      }  // container te-label
                    }  // container label-start

                    container label-end {
                      must
                        "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                        error-message
                          "'label-start' and 'label-end' must have the same direction.";
                      }
                      description
                        "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                      container te-label {
                        description
                          "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type rt-types:generalized-label;
                            description
                              "TE label specified in a generic format.";
                          }
                        }  // choice technology

                        leaf direction {
                          type te-label-direction;
                          default "forward";
                          description
                            "Label direction.";
                        }
                      }  // container te-label
                    }  // container label-end

                    container label-step {
                      description
                        "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type int32;
                          default "1";
                          description
                            "Label range step.";
                        }
                      }  // choice technology
                    }  // container label-step

                    leaf range-bitmap {
                      type yang:hex-string;
                      description
                        "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                    }
                  }  // list label-restriction
                }  // container label-restrictions

                leaf is-allowed {
                  type boolean;
                  description
                    "'true' - switching is allowed;
'false' - switching is disallowed.";
                }

                container underlay {
                  if-feature te-topology-hierarchy;
                  description
                    "Attributes of the TE link underlay.";
                  reference
                    "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                    Generalized Multi-Protocol Label Switching (GMPLS)
                    Traffic Engineering (TE)";

                  leaf enabled {
                    type boolean;
                    description
                      "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                  }

                  container primary-path {
                    description
                      "The service path on the underlay topology that
supports this link.";
                    leaf network-ref {
                      type leafref {
                        path "/nw:networks/nw:network/nw:network-id";
                        require-instance
                          false;
                      }
                      description
                        "Used to reference a network -- for example, an underlay
network.";
                    }

                    list path-element {
                      key "path-element-id";
                      description
                        "A list of path elements describing the service path.";
                      leaf path-element-id {
                        type uint32;
                        description
                          "To identify the element in a path.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-element
                  }  // container primary-path

                  list backup-path {
                    key "index";
                    description
                      "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                    leaf index {
                      type uint32;
                      description
                        "A sequence number to identify a backup path.";
                    }

                    leaf network-ref {
                      type leafref {
                        path "/nw:networks/nw:network/nw:network-id";
                        require-instance
                          false;
                      }
                      description
                        "Used to reference a network -- for example, an underlay
network.";
                    }

                    list path-element {
                      key "path-element-id";
                      description
                        "A list of path elements describing the backup service
path.";
                      leaf path-element-id {
                        type uint32;
                        description
                          "To identify the element in a path.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-element
                  }  // list backup-path

                  leaf protection-type {
                    type identityref {
                      base te-types:lsp-protection-type;
                    }
                    description
                      "Underlay protection type desired for this link.";
                  }

                  container tunnel-termination-points {
                    description
                      "Underlay TTPs desired for this link.";
                    leaf source {
                      type binary;
                      description
                        "Source TTP identifier.";
                    }

                    leaf destination {
                      type binary;
                      description
                        "Destination TTP identifier.";
                    }
                  }  // container tunnel-termination-points

                  container tunnels {
                    description
                      "Underlay TE tunnels supporting this TE link.";
                    leaf sharing {
                      type boolean;
                      default "true";
                      description
                        "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                    }

                    list tunnel {
                      key "tunnel-name";
                      description
                        "Zero, one, or more underlay TE tunnels that support this
TE link.";
                      leaf tunnel-name {
                        type string;
                        description
                          "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                      }

                      leaf sharing {
                        type boolean;
                        description
                          "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                      }
                    }  // list tunnel
                  }  // container tunnels
                }  // container underlay

                container path-constraints {
                  description
                    "TE named path constraints container.";
                  container te-bandwidth {
                    description
                      "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type te-bandwidth;
                        description
                          "Bandwidth specified in a generic format.";
                      }
                    }  // choice technology
                  }  // container te-bandwidth

                  leaf link-protection {
                    type identityref {
                      base link-protection-type;
                    }
                    default
                      "te-types:link-protection-unprotected";
                    description
                      "Link protection type required for the links included
in the computed path.";
                    reference
                      "RFC 4202: Routing Extensions in Support of
                      Generalized Multi-Protocol Label Switching (GMPLS)";

                  }

                  leaf setup-priority {
                    type uint8 {
                      range "0..7";
                    }
                    default "7";
                    description
                      "TE LSP requested setup priority.";
                    reference
                      "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                  }

                  leaf hold-priority {
                    type uint8 {
                      range "0..7";
                    }
                    default "7";
                    description
                      "TE LSP requested hold priority.";
                    reference
                      "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                  }

                  leaf signaling-type {
                    type identityref {
                      base path-signaling-type;
                    }
                    default
                      "te-types:path-setup-rsvp";
                    description
                      "TE tunnel path signaling type.";
                  }

                  container path-metric-bounds {
                    description
                      "TE path metric bounds container.";
                    list path-metric-bound {
                      key "metric-type";
                      description
                        "List of TE path metric bounds.";
                      leaf metric-type {
                        type identityref {
                          base path-metric-type;
                        }
                        description
                          "Identifies an entry in the list of 'metric-type' items
bound for the TE path.";
                      }

                      leaf upper-bound {
                        type uint64;
                        default "0";
                        description
                          "Upper bound on the end-to-end TE path metric.  A zero
indicates an unbounded upper limit for the specific
'metric-type'.";
                      }
                    }  // list path-metric-bound
                  }  // container path-metric-bounds

                  container path-affinities-values {
                    description
                      "Path affinities represented as values.";
                    list path-affinities-value {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of value affinity
constraints.";
                      }

                      leaf value {
                        type admin-groups;
                        default "";
                        description
                          "The affinity value.  The default is empty.";
                      }
                    }  // list path-affinities-value
                  }  // container path-affinities-values

                  container path-affinity-names {
                    description
                      "Path affinities represented as names.";
                    list path-affinity-name {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of named affinity
constraints.";
                      }

                      list affinity-name {
                        key "name";
                        description
                          "List of named affinities.";
                        leaf name {
                          type string;
                          description
                            "Identifies a named affinity entry.";
                        }
                      }  // list affinity-name
                    }  // list path-affinity-name
                  }  // container path-affinity-names

                  container path-srlgs-lists {
                    description
                      "Path SRLG properties container.";
                    list path-srlgs-list {
                      key "usage";
                      description
                        "List of SRLG values to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of SRLGs to either
include or exclude.";
                      }

                      leaf-list values {
                        type srlg;
                        description
                          "List of SRLG values.";
                      }
                    }  // list path-srlgs-list
                  }  // container path-srlgs-lists

                  container path-srlgs-names {
                    description
                      "Container for the list of named SRLGs.";
                    list path-srlgs-name {
                      key "usage";
                      description
                        "List of named SRLGs to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                      }

                      leaf-list names {
                        type string;
                        description
                          "List of named SRLGs.";
                      }
                    }  // list path-srlgs-name
                  }  // container path-srlgs-names

                  leaf disjointness {
                    type te-path-disjointness;
                    description
                      "The type of resource disjointness.
When configured for a primary path, the disjointness level
applies to all secondary LSPs.  When configured for a
secondary path, the disjointness level overrides the level
configured for the primary path.";
                  }
                }  // container path-constraints

                container optimizations {
                  description
                    "The objective function container that includes
attributes to impose when computing a TE path.";
                  choice algorithm {
                    description
                      "Optimizations algorithm.";
                    case metric {
                      if-feature path-optimization-metric;
                      list optimization-metric {
                        key "metric-type";
                        description
                          "TE path metric type.";
                        leaf metric-type {
                          type identityref {
                            base path-metric-type;
                          }
                          description
                            "Identifies the 'metric-type' that the path computation
process uses for optimization.";
                        }

                        leaf weight {
                          type uint8;
                          default "1";
                          description
                            "TE path metric normalization weight.";
                        }

                        container explicit-route-exclude-objects {
                          when
                            "../metric-type = 'te-types:path-metric-optimize-excludes'";
                          description
                            "Container for the 'exclude route' object list.";
                          list route-object-exclude-object {
                            key "index";
                            ordered-by
                              user;
                            description
                              "List of Explicit Route Objects to be excluded in the
path computation.";
                            leaf index {
                              type uint32;
                              description
                                "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                            }

                            choice type {
                              description
                                "The explicit route entry type.";
                              container numbered-node-hop {
                                description
                                  "Numbered node route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container numbered-node-hop
                              container numbered-link-hop {
                                description
                                  "Numbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE Link Termination Point (LTP) identifier.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container numbered-link-hop
                              container unnumbered-link-hop {
                                description
                                  "Unnumbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                }

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container unnumbered-link-hop
                              container as-number-hop {
                                description
                                  "AS explicit route hop.";
                                leaf as-number {
                                  type inet:as-number;
                                  mandatory
                                    true;
                                  description
                                    "The Autonomous System (AS) number.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container as-number-hop

                              case label {
                                description
                                  "The label explicit route hop type.";
                                container label-hop {
                                  description
                                    "Label hop type.";
                                  container te-label {
                                    description
                                      "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                    choice technology {
                                      default
                                        "generic";
                                      description
                                        "Data-plane technology type.";
                                      leaf generic {
                                        type rt-types:generalized-label;
                                        description
                                          "TE label specified in a generic format.";
                                      }
                                    }  // choice technology

                                    leaf direction {
                                      type te-label-direction;
                                      default
                                        "forward";
                                      description
                                        "Label direction.";
                                    }
                                  }  // container te-label
                                }  // container label-hop
                              }  // case label

                              case srlg {
                                description
                                  "An SRLG value to be included or excluded.";
                                container srlg {
                                  description
                                    "SRLG container.";
                                  leaf srlg {
                                    type uint32;
                                    description
                                      "SRLG value.";
                                  }
                                }  // container srlg
                              }  // case srlg
                            }  // choice type
                          }  // list route-object-exclude-object
                        }  // container explicit-route-exclude-objects

                        container explicit-route-include-objects {
                          when
                            "../metric-type = 'te-types:path-metric-optimize-includes'";
                          description
                            "Container for the 'include route' object list.";
                          list route-object-include-object {
                            key "index";
                            ordered-by
                              user;
                            description
                              "List of Explicit Route Objects to be included in the
path computation.";
                            leaf index {
                              type uint32;
                              description
                                "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                            }

                            choice type {
                              description
                                "The explicit route entry type.";
                              container numbered-node-hop {
                                description
                                  "Numbered node route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container numbered-node-hop
                              container numbered-link-hop {
                                description
                                  "Numbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE Link Termination Point (LTP) identifier.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container numbered-link-hop
                              container unnumbered-link-hop {
                                description
                                  "Unnumbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                }

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container unnumbered-link-hop
                              container as-number-hop {
                                description
                                  "AS explicit route hop.";
                                leaf as-number {
                                  type inet:as-number;
                                  mandatory
                                    true;
                                  description
                                    "The Autonomous System (AS) number.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container as-number-hop

                              case label {
                                description
                                  "The label explicit route hop type.";
                                container label-hop {
                                  description
                                    "Label hop type.";
                                  container te-label {
                                    description
                                      "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                    choice technology {
                                      default
                                        "generic";
                                      description
                                        "Data-plane technology type.";
                                      leaf generic {
                                        type rt-types:generalized-label;
                                        description
                                          "TE label specified in a generic format.";
                                      }
                                    }  // choice technology

                                    leaf direction {
                                      type te-label-direction;
                                      default
                                        "forward";
                                      description
                                        "Label direction.";
                                    }
                                  }  // container te-label
                                }  // container label-hop
                              }  // case label
                            }  // choice type
                          }  // list route-object-include-object
                        }  // container explicit-route-include-objects
                      }  // list optimization-metric

                      container tiebreakers {
                        description
                          "Container for the list of tiebreakers.";
                        list tiebreaker {
                          key "tiebreaker-type";
                          description
                            "The list of tiebreaker criteria to apply on an
equally favored set of paths, in order to pick
the best.";
                          leaf tiebreaker-type {
                            type identityref {
                              base path-metric-type;
                            }
                            description
                              "Identifies an entry in the list of tiebreakers.";
                          }
                        }  // list tiebreaker
                      }  // container tiebreakers
                    }  // case metric

                    case objective-function {
                      if-feature path-optimization-objective-function;
                      container objective-function {
                        description
                          "The objective function container that includes
attributes to impose when computing a TE path.";
                        leaf objective-function-type {
                          type identityref {
                            base objective-function-type;
                          }
                          default
                            "te-types:of-minimize-cost-path";
                          description
                            "Objective function entry.";
                        }
                      }  // container objective-function
                    }  // case objective-function
                  }  // choice algorithm
                }  // container optimizations

                container path-properties {
                  config false;
                  description
                    "The TE path properties.";
                  list path-metric {
                    key "metric-type";
                    description
                      "TE path metric type.";
                    leaf metric-type {
                      type identityref {
                        base path-metric-type;
                      }
                      description
                        "TE path metric type.";
                    }

                    leaf accumulative-value {
                      type uint64;
                      description
                        "TE path metric accumulative value.";
                    }
                  }  // list path-metric

                  container path-affinities-values {
                    description
                      "Path affinities represented as values.";
                    list path-affinities-value {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of value affinity
constraints.";
                      }

                      leaf value {
                        type admin-groups;
                        default "";
                        description
                          "The affinity value.  The default is empty.";
                      }
                    }  // list path-affinities-value
                  }  // container path-affinities-values

                  container path-affinity-names {
                    description
                      "Path affinities represented as names.";
                    list path-affinity-name {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of named affinity
constraints.";
                      }

                      list affinity-name {
                        key "name";
                        description
                          "List of named affinities.";
                        leaf name {
                          type string;
                          description
                            "Identifies a named affinity entry.";
                        }
                      }  // list affinity-name
                    }  // list path-affinity-name
                  }  // container path-affinity-names

                  container path-srlgs-lists {
                    description
                      "Path SRLG properties container.";
                    list path-srlgs-list {
                      key "usage";
                      description
                        "List of SRLG values to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of SRLGs to either
include or exclude.";
                      }

                      leaf-list values {
                        type srlg;
                        description
                          "List of SRLG values.";
                      }
                    }  // list path-srlgs-list
                  }  // container path-srlgs-lists

                  container path-srlgs-names {
                    description
                      "Container for the list of named SRLGs.";
                    list path-srlgs-name {
                      key "usage";
                      description
                        "List of named SRLGs to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                      }

                      leaf-list names {
                        type string;
                        description
                          "List of named SRLGs.";
                      }
                    }  // list path-srlgs-name
                  }  // container path-srlgs-names

                  container path-route-objects {
                    description
                      "Container for the list of route objects either returned by
the computation engine or actually used by an LSP.";
                    list path-route-object {
                      key "index";
                      ordered-by user;
                      description
                        "List of route objects either returned by the computation
engine or actually used by an LSP.";
                      leaf index {
                        type uint32;
                        description
                          "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key
values.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-route-object
                  }  // container path-route-objects
                }  // container path-properties

                list connectivity-matrix {
                  key "id";
                  description
                    "Represents a node's switching limitations, i.e.,
limitations in the interconnecting network TE links
across the node.";
                  reference
                    "RFC 7579: General Network Element Constraint Encoding
                    for GMPLS-Controlled Networks";

                  leaf id {
                    type uint32;
                    description
                      "Identifies the connectivity matrix entry.";
                  }

                  container from {
                    description
                      "Reference to a source Link Termination Point (LTP).";
                    leaf tp-ref {
                      type leafref {
                        path "../../../../../../nt-s:termination-point/nt-s:tp-id";
                      }
                      description
                        "Relative reference to a termination point.";
                    }

                    container label-restrictions {
                      description
                        "The label restrictions container.";
                      list label-restriction {
                        key "index";
                        description
                          "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                        reference
                          "RFC 7579: General Network Element Constraint Encoding
                          for GMPLS-Controlled Networks";

                        leaf restriction {
                          type enumeration {
                            enum "inclusive" {
                              value 0;
                              description
                                "The label or label range is inclusive.";
                            }
                            enum "exclusive" {
                              value 1;
                              description
                                "The label or label range is exclusive.";
                            }
                          }
                          default
                            "inclusive";
                          description
                            "Indicates whether the list item is inclusive or exclusive.";
                        }

                        leaf index {
                          type uint32;
                          description
                            "The index of the label restriction list entry.";
                        }

                        container label-start {
                          must
                            "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-start

                        container label-end {
                          must
                            "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-end

                        container label-step {
                          description
                            "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                          choice technology {
                            default
                              "generic";
                            description
                              "Data-plane technology type.";
                            leaf generic {
                              type int32;
                              default "1";
                              description
                                "Label range step.";
                            }
                          }  // choice technology
                        }  // container label-step

                        leaf range-bitmap {
                          type yang:hex-string;
                          description
                            "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                        }
                      }  // list label-restriction
                    }  // container label-restrictions
                  }  // container from

                  container to {
                    description
                      "Reference to a destination LTP.";
                    leaf tp-ref {
                      type leafref {
                        path "../../../../../../nt-s:termination-point/nt-s:tp-id";
                      }
                      description
                        "Relative reference to a termination point.";
                    }

                    container label-restrictions {
                      description
                        "The label restrictions container.";
                      list label-restriction {
                        key "index";
                        description
                          "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                        reference
                          "RFC 7579: General Network Element Constraint Encoding
                          for GMPLS-Controlled Networks";

                        leaf restriction {
                          type enumeration {
                            enum "inclusive" {
                              value 0;
                              description
                                "The label or label range is inclusive.";
                            }
                            enum "exclusive" {
                              value 1;
                              description
                                "The label or label range is exclusive.";
                            }
                          }
                          default
                            "inclusive";
                          description
                            "Indicates whether the list item is inclusive or exclusive.";
                        }

                        leaf index {
                          type uint32;
                          description
                            "The index of the label restriction list entry.";
                        }

                        container label-start {
                          must
                            "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-start

                        container label-end {
                          must
                            "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-end

                        container label-step {
                          description
                            "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                          choice technology {
                            default
                              "generic";
                            description
                              "Data-plane technology type.";
                            leaf generic {
                              type int32;
                              default "1";
                              description
                                "Label range step.";
                            }
                          }  // choice technology
                        }  // container label-step

                        leaf range-bitmap {
                          type yang:hex-string;
                          description
                            "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                        }
                      }  // list label-restriction
                    }  // container label-restrictions
                  }  // container to

                  leaf is-allowed {
                    type boolean;
                    description
                      "'true' - switching is allowed;
'false' - switching is disallowed.";
                  }

                  container underlay {
                    if-feature te-topology-hierarchy;
                    description
                      "Attributes of the TE link underlay.";
                    reference
                      "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                      Generalized Multi-Protocol Label Switching (GMPLS)
                      Traffic Engineering (TE)";

                    leaf enabled {
                      type boolean;
                      description
                        "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                    }

                    container primary-path {
                      description
                        "The service path on the underlay topology that
supports this link.";
                      leaf network-ref {
                        type leafref {
                          path "/nw:networks/nw:network/nw:network-id";
                          require-instance
                            false;
                        }
                        description
                          "Used to reference a network -- for example, an underlay
network.";
                      }

                      list path-element {
                        key "path-element-id";
                        description
                          "A list of path elements describing the service path.";
                        leaf path-element-id {
                          type uint32;
                          description
                            "To identify the element in a path.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-element
                    }  // container primary-path

                    list backup-path {
                      key "index";
                      description
                        "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                      leaf index {
                        type uint32;
                        description
                          "A sequence number to identify a backup path.";
                      }

                      leaf network-ref {
                        type leafref {
                          path "/nw:networks/nw:network/nw:network-id";
                          require-instance
                            false;
                        }
                        description
                          "Used to reference a network -- for example, an underlay
network.";
                      }

                      list path-element {
                        key "path-element-id";
                        description
                          "A list of path elements describing the backup service
path.";
                        leaf path-element-id {
                          type uint32;
                          description
                            "To identify the element in a path.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-element
                    }  // list backup-path

                    leaf protection-type {
                      type identityref {
                        base te-types:lsp-protection-type;
                      }
                      description
                        "Underlay protection type desired for this link.";
                    }

                    container tunnel-termination-points {
                      description
                        "Underlay TTPs desired for this link.";
                      leaf source {
                        type binary;
                        description
                          "Source TTP identifier.";
                      }

                      leaf destination {
                        type binary;
                        description
                          "Destination TTP identifier.";
                      }
                    }  // container tunnel-termination-points

                    container tunnels {
                      description
                        "Underlay TE tunnels supporting this TE link.";
                      leaf sharing {
                        type boolean;
                        default "true";
                        description
                          "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                      }

                      list tunnel {
                        key "tunnel-name";
                        description
                          "Zero, one, or more underlay TE tunnels that support this
TE link.";
                        leaf tunnel-name {
                          type string;
                          description
                            "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                        }

                        leaf sharing {
                          type boolean;
                          description
                            "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                        }
                      }  // list tunnel
                    }  // container tunnels
                  }  // container underlay

                  container path-constraints {
                    description
                      "TE named path constraints container.";
                    container te-bandwidth {
                      description
                        "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type te-bandwidth;
                          description
                            "Bandwidth specified in a generic format.";
                        }
                      }  // choice technology
                    }  // container te-bandwidth

                    leaf link-protection {
                      type identityref {
                        base link-protection-type;
                      }
                      default
                        "te-types:link-protection-unprotected";
                      description
                        "Link protection type required for the links included
in the computed path.";
                      reference
                        "RFC 4202: Routing Extensions in Support of
                        Generalized Multi-Protocol Label Switching (GMPLS)";

                    }

                    leaf setup-priority {
                      type uint8 {
                        range "0..7";
                      }
                      default "7";
                      description
                        "TE LSP requested setup priority.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf hold-priority {
                      type uint8 {
                        range "0..7";
                      }
                      default "7";
                      description
                        "TE LSP requested hold priority.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf signaling-type {
                      type identityref {
                        base path-signaling-type;
                      }
                      default
                        "te-types:path-setup-rsvp";
                      description
                        "TE tunnel path signaling type.";
                    }

                    container path-metric-bounds {
                      description
                        "TE path metric bounds container.";
                      list path-metric-bound {
                        key "metric-type";
                        description
                          "List of TE path metric bounds.";
                        leaf metric-type {
                          type identityref {
                            base path-metric-type;
                          }
                          description
                            "Identifies an entry in the list of 'metric-type' items
bound for the TE path.";
                        }

                        leaf upper-bound {
                          type uint64;
                          default "0";
                          description
                            "Upper bound on the end-to-end TE path metric.  A zero
indicates an unbounded upper limit for the specific
'metric-type'.";
                        }
                      }  // list path-metric-bound
                    }  // container path-metric-bounds

                    container path-affinities-values {
                      description
                        "Path affinities represented as values.";
                      list path-affinities-value {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of value affinity
constraints.";
                        }

                        leaf value {
                          type admin-groups;
                          default "";
                          description
                            "The affinity value.  The default is empty.";
                        }
                      }  // list path-affinities-value
                    }  // container path-affinities-values

                    container path-affinity-names {
                      description
                        "Path affinities represented as names.";
                      list path-affinity-name {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of named affinity
constraints.";
                        }

                        list affinity-name {
                          key "name";
                          description
                            "List of named affinities.";
                          leaf name {
                            type string;
                            description
                              "Identifies a named affinity entry.";
                          }
                        }  // list affinity-name
                      }  // list path-affinity-name
                    }  // container path-affinity-names

                    container path-srlgs-lists {
                      description
                        "Path SRLG properties container.";
                      list path-srlgs-list {
                        key "usage";
                        description
                          "List of SRLG values to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of SRLGs to either
include or exclude.";
                        }

                        leaf-list values {
                          type srlg;
                          description
                            "List of SRLG values.";
                        }
                      }  // list path-srlgs-list
                    }  // container path-srlgs-lists

                    container path-srlgs-names {
                      description
                        "Container for the list of named SRLGs.";
                      list path-srlgs-name {
                        key "usage";
                        description
                          "List of named SRLGs to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                        }

                        leaf-list names {
                          type string;
                          description
                            "List of named SRLGs.";
                        }
                      }  // list path-srlgs-name
                    }  // container path-srlgs-names

                    leaf disjointness {
                      type te-path-disjointness;
                      description
                        "The type of resource disjointness.
When configured for a primary path, the disjointness level
applies to all secondary LSPs.  When configured for a
secondary path, the disjointness level overrides the level
configured for the primary path.";
                    }
                  }  // container path-constraints

                  container optimizations {
                    description
                      "The objective function container that includes
attributes to impose when computing a TE path.";
                    choice algorithm {
                      description
                        "Optimizations algorithm.";
                      case metric {
                        if-feature path-optimization-metric;
                        list optimization-metric {
                          key "metric-type";
                          description
                            "TE path metric type.";
                          leaf metric-type {
                            type identityref {
                              base path-metric-type;
                            }
                            description
                              "Identifies the 'metric-type' that the path computation
process uses for optimization.";
                          }

                          leaf weight {
                            type uint8;
                            default "1";
                            description
                              "TE path metric normalization weight.";
                          }

                          container explicit-route-exclude-objects {
                            when
                              "../metric-type = 'te-types:path-metric-optimize-excludes'";
                            description
                              "Container for the 'exclude route' object list.";
                            list route-object-exclude-object {
                              key "index";
                              ordered-by
                                user;
                              description
                                "List of Explicit Route Objects to be excluded in the
path computation.";
                              leaf index {
                                type uint32;
                                description
                                  "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                              }

                              choice type {
                                description
                                  "The explicit route entry type.";
                                container numbered-node-hop {
                                  description
                                    "Numbered node route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container numbered-node-hop
                                container numbered-link-hop {
                                  description
                                    "Numbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE Link Termination Point (LTP) identifier.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container numbered-link-hop
                                container unnumbered-link-hop {
                                  description
                                    "Unnumbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                  }

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container unnumbered-link-hop
                                container as-number-hop {
                                  description
                                    "AS explicit route hop.";
                                  leaf as-number {
                                    type inet:as-number;
                                    mandatory
                                      true;
                                    description
                                      "The Autonomous System (AS) number.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container as-number-hop

                                case label {
                                  description
                                    "The label explicit route hop type.";
                                  container label-hop {
                                    description
                                      "Label hop type.";
                                    container te-label {
                                      description
                                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                      choice technology {
                                        default
                                          "generic";
                                        description
                                          "Data-plane technology type.";
                                        leaf generic {
                                          type rt-types:generalized-label;
                                          description
                                            "TE label specified in a generic format.";
                                        }
                                      }  // choice technology

                                      leaf direction {
                                        type te-label-direction;
                                        default
                                          "forward";
                                        description
                                          "Label direction.";
                                      }
                                    }  // container te-label
                                  }  // container label-hop
                                }  // case label

                                case srlg {
                                  description
                                    "An SRLG value to be included or excluded.";
                                  container srlg {
                                    description
                                      "SRLG container.";
                                    leaf srlg {
                                      type uint32;
                                      description
                                        "SRLG value.";
                                    }
                                  }  // container srlg
                                }  // case srlg
                              }  // choice type
                            }  // list route-object-exclude-object
                          }  // container explicit-route-exclude-objects

                          container explicit-route-include-objects {
                            when
                              "../metric-type = 'te-types:path-metric-optimize-includes'";
                            description
                              "Container for the 'include route' object list.";
                            list route-object-include-object {
                              key "index";
                              ordered-by
                                user;
                              description
                                "List of Explicit Route Objects to be included in the
path computation.";
                              leaf index {
                                type uint32;
                                description
                                  "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                              }

                              choice type {
                                description
                                  "The explicit route entry type.";
                                container numbered-node-hop {
                                  description
                                    "Numbered node route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container numbered-node-hop
                                container numbered-link-hop {
                                  description
                                    "Numbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE Link Termination Point (LTP) identifier.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container numbered-link-hop
                                container unnumbered-link-hop {
                                  description
                                    "Unnumbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                  }

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container unnumbered-link-hop
                                container as-number-hop {
                                  description
                                    "AS explicit route hop.";
                                  leaf as-number {
                                    type inet:as-number;
                                    mandatory
                                      true;
                                    description
                                      "The Autonomous System (AS) number.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container as-number-hop

                                case label {
                                  description
                                    "The label explicit route hop type.";
                                  container label-hop {
                                    description
                                      "Label hop type.";
                                    container te-label {
                                      description
                                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                      choice technology {
                                        default
                                          "generic";
                                        description
                                          "Data-plane technology type.";
                                        leaf generic {
                                          type rt-types:generalized-label;
                                          description
                                            "TE label specified in a generic format.";
                                        }
                                      }  // choice technology

                                      leaf direction {
                                        type te-label-direction;
                                        default
                                          "forward";
                                        description
                                          "Label direction.";
                                      }
                                    }  // container te-label
                                  }  // container label-hop
                                }  // case label
                              }  // choice type
                            }  // list route-object-include-object
                          }  // container explicit-route-include-objects
                        }  // list optimization-metric

                        container tiebreakers {
                          description
                            "Container for the list of tiebreakers.";
                          list tiebreaker {
                            key "tiebreaker-type";
                            description
                              "The list of tiebreaker criteria to apply on an
equally favored set of paths, in order to pick
the best.";
                            leaf tiebreaker-type {
                              type identityref {
                                base path-metric-type;
                              }
                              description
                                "Identifies an entry in the list of tiebreakers.";
                            }
                          }  // list tiebreaker
                        }  // container tiebreakers
                      }  // case metric

                      case objective-function {
                        if-feature path-optimization-objective-function;
                        container objective-function {
                          description
                            "The objective function container that includes
attributes to impose when computing a TE path.";
                          leaf objective-function-type {
                            type identityref {
                              base objective-function-type;
                            }
                            default
                              "te-types:of-minimize-cost-path";
                            description
                              "Objective function entry.";
                          }
                        }  // container objective-function
                      }  // case objective-function
                    }  // choice algorithm
                  }  // container optimizations

                  container path-properties {
                    config false;
                    description
                      "The TE path properties.";
                    list path-metric {
                      key "metric-type";
                      description
                        "TE path metric type.";
                      leaf metric-type {
                        type identityref {
                          base path-metric-type;
                        }
                        description
                          "TE path metric type.";
                      }

                      leaf accumulative-value {
                        type uint64;
                        description
                          "TE path metric accumulative value.";
                      }
                    }  // list path-metric

                    container path-affinities-values {
                      description
                        "Path affinities represented as values.";
                      list path-affinities-value {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of value affinity
constraints.";
                        }

                        leaf value {
                          type admin-groups;
                          default "";
                          description
                            "The affinity value.  The default is empty.";
                        }
                      }  // list path-affinities-value
                    }  // container path-affinities-values

                    container path-affinity-names {
                      description
                        "Path affinities represented as names.";
                      list path-affinity-name {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of named affinity
constraints.";
                        }

                        list affinity-name {
                          key "name";
                          description
                            "List of named affinities.";
                          leaf name {
                            type string;
                            description
                              "Identifies a named affinity entry.";
                          }
                        }  // list affinity-name
                      }  // list path-affinity-name
                    }  // container path-affinity-names

                    container path-srlgs-lists {
                      description
                        "Path SRLG properties container.";
                      list path-srlgs-list {
                        key "usage";
                        description
                          "List of SRLG values to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of SRLGs to either
include or exclude.";
                        }

                        leaf-list values {
                          type srlg;
                          description
                            "List of SRLG values.";
                        }
                      }  // list path-srlgs-list
                    }  // container path-srlgs-lists

                    container path-srlgs-names {
                      description
                        "Container for the list of named SRLGs.";
                      list path-srlgs-name {
                        key "usage";
                        description
                          "List of named SRLGs to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                        }

                        leaf-list names {
                          type string;
                          description
                            "List of named SRLGs.";
                        }
                      }  // list path-srlgs-name
                    }  // container path-srlgs-names

                    container path-route-objects {
                      description
                        "Container for the list of route objects either returned by
the computation engine or actually used by an LSP.";
                      list path-route-object {
                        key "index";
                        ordered-by user;
                        description
                          "List of route objects either returned by the computation
engine or actually used by an LSP.";
                        leaf index {
                          type uint32;
                          description
                            "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key
values.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-route-object
                    }  // container path-route-objects
                  }  // container path-properties
                }  // list connectivity-matrix
              }  // container connectivity-matrices

              leaf domain-id {
                type uint32;
                description
                  "Identifies the domain to which this node belongs.
This attribute is used to support inter-domain links.";
                reference
                  "RFC 5152: A Per-Domain Path Computation Method for
                  Establishing Inter-Domain Traffic Engineering (TE)
                  Label Switched Paths (LSPs)
                   RFC 5316: ISIS Extensions in Support of Inter-Autonomous
                  System (AS) MPLS and GMPLS Traffic Engineering
                   RFC 5392: OSPF Extensions in Support of Inter-Autonomous
                  System (AS) MPLS and GMPLS Traffic Engineering";

              }

              leaf is-abstract {
                type empty;
                description
                  "Present if the node is abstract; not present if the node
is actual.";
              }

              leaf name {
                type string;
                description "Node name.";
              }

              leaf-list signaling-address {
                type inet:ip-address;
                description
                  "The node's signaling address.";
              }

              container underlay-topology {
                if-feature te-topology-hierarchy;
                description
                  "When an abstract node encapsulates a topology, the
attributes in this container point to said topology.";
                leaf network-ref {
                  type leafref {
                    path "/nw:networks/nw:network/nw:network-id";
                    require-instance false;
                  }
                  description
                    "Used to reference a network -- for example, an underlay
network.";
                }
              }  // container underlay-topology
            }  // container te-node-attributes

            leaf oper-status {
              type te-types:te-oper-status;
              config false;
              description
                "The current operational state of the node.";
            }

            container geolocation {
              config false;
              description
                "Contains a GPS location.";
              leaf altitude {
                type int64;
                units "millimeters";
                description
                  "Distance above sea level.";
              }

              leaf latitude {
                type geographic-coordinate-degree {
                  fraction-digits 0;
                  range "-90..90";
                }
                description
                  "Relative position north or south on the Earth's surface.";
              }

              leaf longitude {
                type geographic-coordinate-degree {
                  fraction-digits 0;
                  range "-180..180";
                }
                description
                  "Angular distance east or west on the Earth's surface.";
              }
            }  // container geolocation

            leaf is-multi-access-dr {
              type empty;
              config false;
              description
                "The presence of this attribute indicates that this TE node
is a pseudonode elected as a designated router.";
              reference
                "RFC 1195: Use of OSI IS-IS for Routing in TCP/IP and Dual
                Environments
                 RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                Version 2";

            }

            leaf information-source {
              type te-info-source;
              config false;
              description
                "Indicates the type of information source.";
            }

            leaf information-source-instance {
              type string;
              config false;
              description
                "The name indicating the instance of the information
source.";
            }

            container information-source-state {
              config false;
              description
                "Contains state attributes related to the information
source.";
              leaf credibility-preference {
                type uint16;
                description
                  "The preference value for calculating the Traffic
Engineering database credibility value used for
tie-break selection between different information-source
values.  A higher value is preferable.";
              }

              leaf logical-network-element {
                type string;
                description
                  "When applicable, this is the name of a logical network
element from which the information is learned.";
              }

              leaf network-instance {
                type string;
                description
                  "When applicable, this is the name of a network instance
from which the information is learned.";
              }

              container topology {
                description
                  "When the information is processed by the system,
the attributes in this container indicate which topology
is used to generate the result information.";
                leaf node-ref {
                  type leafref {
                    path "/nw:networks/nw:network[nw:network-id=current()/../network-ref]/nw:node/nw:node-id";
                    require-instance false;
                  }
                  description
                    "Used to reference a node.
Nodes are identified relative to the network that
contains them.";
                }

                leaf network-ref {
                  type leafref {
                    path "/nw:networks/nw:network/nw:network-id";
                    require-instance false;
                  }
                  description
                    "Used to reference a network -- for example, an underlay
network.";
                }
              }  // container topology
            }  // container information-source-state

            list information-source-entry {
              key "information-source information-source-instance";
              config false;
              description
                "A list of information sources learned, including the source
that is used.";
              leaf information-source {
                type te-info-source;
                config false;
                description
                  "Indicates the type of information source.";
              }

              leaf information-source-instance {
                type string;
                config false;
                description
                  "The name indicating the instance of the information
source.";
              }

              container information-source-state {
                config false;
                description
                  "Contains state attributes related to the information
source.";
                leaf credibility-preference {
                  type uint16;
                  description
                    "The preference value for calculating the Traffic
Engineering database credibility value used for
tie-break selection between different information-source
values.  A higher value is preferable.";
                }

                leaf logical-network-element {
                  type string;
                  description
                    "When applicable, this is the name of a logical network
element from which the information is learned.";
                }

                leaf network-instance {
                  type string;
                  description
                    "When applicable, this is the name of a network instance
from which the information is learned.";
                }

                container topology {
                  description
                    "When the information is processed by the system,
the attributes in this container indicate which topology
is used to generate the result information.";
                  leaf node-ref {
                    type leafref {
                      path "/nw:networks/nw:network[nw:network-id=current()/../network-ref]/nw:node/nw:node-id";
                      require-instance
                        false;
                    }
                    description
                      "Used to reference a node.
Nodes are identified relative to the network that
contains them.";
                  }

                  leaf network-ref {
                    type leafref {
                      path "/nw:networks/nw:network/nw:network-id";
                      require-instance
                        false;
                    }
                    description
                      "Used to reference a network -- for example, an underlay
network.";
                  }
                }  // container topology
              }  // container information-source-state

              container connectivity-matrices {
                description
                  "Contains a connectivity matrix on a TE node.";
                leaf number-of-entries {
                  type uint16;
                  description
                    "The number of connectivity matrix entries.
If this number is specified in the configuration request,
the number is the requested number of entries, which may
not all be listed in the list;
if this number is reported in the state data,
the number is the current number of operational entries.";
                }

                container label-restrictions {
                  description
                    "The label restrictions container.";
                  list label-restriction {
                    key "index";
                    description
                      "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                    reference
                      "RFC 7579: General Network Element Constraint Encoding
                      for GMPLS-Controlled Networks";

                    leaf restriction {
                      type enumeration {
                        enum "inclusive" {
                          value 0;
                          description
                            "The label or label range is inclusive.";
                        }
                        enum "exclusive" {
                          value 1;
                          description
                            "The label or label range is exclusive.";
                        }
                      }
                      default "inclusive";
                      description
                        "Indicates whether the list item is inclusive or exclusive.";
                    }

                    leaf index {
                      type uint32;
                      description
                        "The index of the label restriction list entry.";
                    }

                    container label-start {
                      must
                        "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                        error-message
                          "'label-start' and 'label-end' must have the same direction.";
                      }
                      description
                        "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                      container te-label {
                        description
                          "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type rt-types:generalized-label;
                            description
                              "TE label specified in a generic format.";
                          }
                        }  // choice technology

                        leaf direction {
                          type te-label-direction;
                          default "forward";
                          description
                            "Label direction.";
                        }
                      }  // container te-label
                    }  // container label-start

                    container label-end {
                      must
                        "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                        error-message
                          "'label-start' and 'label-end' must have the same direction.";
                      }
                      description
                        "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                      container te-label {
                        description
                          "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type rt-types:generalized-label;
                            description
                              "TE label specified in a generic format.";
                          }
                        }  // choice technology

                        leaf direction {
                          type te-label-direction;
                          default "forward";
                          description
                            "Label direction.";
                        }
                      }  // container te-label
                    }  // container label-end

                    container label-step {
                      description
                        "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type int32;
                          default "1";
                          description
                            "Label range step.";
                        }
                      }  // choice technology
                    }  // container label-step

                    leaf range-bitmap {
                      type yang:hex-string;
                      description
                        "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                    }
                  }  // list label-restriction
                }  // container label-restrictions

                leaf is-allowed {
                  type boolean;
                  description
                    "'true' - switching is allowed;
'false' - switching is disallowed.";
                }

                container underlay {
                  if-feature te-topology-hierarchy;
                  description
                    "Attributes of the TE link underlay.";
                  reference
                    "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                    Generalized Multi-Protocol Label Switching (GMPLS)
                    Traffic Engineering (TE)";

                  leaf enabled {
                    type boolean;
                    description
                      "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                  }

                  container primary-path {
                    description
                      "The service path on the underlay topology that
supports this link.";
                    leaf network-ref {
                      type leafref {
                        path "/nw:networks/nw:network/nw:network-id";
                        require-instance
                          false;
                      }
                      description
                        "Used to reference a network -- for example, an underlay
network.";
                    }

                    list path-element {
                      key "path-element-id";
                      description
                        "A list of path elements describing the service path.";
                      leaf path-element-id {
                        type uint32;
                        description
                          "To identify the element in a path.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-element
                  }  // container primary-path

                  list backup-path {
                    key "index";
                    description
                      "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                    leaf index {
                      type uint32;
                      description
                        "A sequence number to identify a backup path.";
                    }

                    leaf network-ref {
                      type leafref {
                        path "/nw:networks/nw:network/nw:network-id";
                        require-instance
                          false;
                      }
                      description
                        "Used to reference a network -- for example, an underlay
network.";
                    }

                    list path-element {
                      key "path-element-id";
                      description
                        "A list of path elements describing the backup service
path.";
                      leaf path-element-id {
                        type uint32;
                        description
                          "To identify the element in a path.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-element
                  }  // list backup-path

                  leaf protection-type {
                    type identityref {
                      base te-types:lsp-protection-type;
                    }
                    description
                      "Underlay protection type desired for this link.";
                  }

                  container tunnel-termination-points {
                    description
                      "Underlay TTPs desired for this link.";
                    leaf source {
                      type binary;
                      description
                        "Source TTP identifier.";
                    }

                    leaf destination {
                      type binary;
                      description
                        "Destination TTP identifier.";
                    }
                  }  // container tunnel-termination-points

                  container tunnels {
                    description
                      "Underlay TE tunnels supporting this TE link.";
                    leaf sharing {
                      type boolean;
                      default "true";
                      description
                        "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                    }

                    list tunnel {
                      key "tunnel-name";
                      description
                        "Zero, one, or more underlay TE tunnels that support this
TE link.";
                      leaf tunnel-name {
                        type string;
                        description
                          "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                      }

                      leaf sharing {
                        type boolean;
                        description
                          "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                      }
                    }  // list tunnel
                  }  // container tunnels
                }  // container underlay

                container path-constraints {
                  description
                    "TE named path constraints container.";
                  container te-bandwidth {
                    description
                      "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type te-bandwidth;
                        description
                          "Bandwidth specified in a generic format.";
                      }
                    }  // choice technology
                  }  // container te-bandwidth

                  leaf link-protection {
                    type identityref {
                      base link-protection-type;
                    }
                    default
                      "te-types:link-protection-unprotected";
                    description
                      "Link protection type required for the links included
in the computed path.";
                    reference
                      "RFC 4202: Routing Extensions in Support of
                      Generalized Multi-Protocol Label Switching (GMPLS)";

                  }

                  leaf setup-priority {
                    type uint8 {
                      range "0..7";
                    }
                    default "7";
                    description
                      "TE LSP requested setup priority.";
                    reference
                      "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                  }

                  leaf hold-priority {
                    type uint8 {
                      range "0..7";
                    }
                    default "7";
                    description
                      "TE LSP requested hold priority.";
                    reference
                      "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                  }

                  leaf signaling-type {
                    type identityref {
                      base path-signaling-type;
                    }
                    default
                      "te-types:path-setup-rsvp";
                    description
                      "TE tunnel path signaling type.";
                  }

                  container path-metric-bounds {
                    description
                      "TE path metric bounds container.";
                    list path-metric-bound {
                      key "metric-type";
                      description
                        "List of TE path metric bounds.";
                      leaf metric-type {
                        type identityref {
                          base path-metric-type;
                        }
                        description
                          "Identifies an entry in the list of 'metric-type' items
bound for the TE path.";
                      }

                      leaf upper-bound {
                        type uint64;
                        default "0";
                        description
                          "Upper bound on the end-to-end TE path metric.  A zero
indicates an unbounded upper limit for the specific
'metric-type'.";
                      }
                    }  // list path-metric-bound
                  }  // container path-metric-bounds

                  container path-affinities-values {
                    description
                      "Path affinities represented as values.";
                    list path-affinities-value {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of value affinity
constraints.";
                      }

                      leaf value {
                        type admin-groups;
                        default "";
                        description
                          "The affinity value.  The default is empty.";
                      }
                    }  // list path-affinities-value
                  }  // container path-affinities-values

                  container path-affinity-names {
                    description
                      "Path affinities represented as names.";
                    list path-affinity-name {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of named affinity
constraints.";
                      }

                      list affinity-name {
                        key "name";
                        description
                          "List of named affinities.";
                        leaf name {
                          type string;
                          description
                            "Identifies a named affinity entry.";
                        }
                      }  // list affinity-name
                    }  // list path-affinity-name
                  }  // container path-affinity-names

                  container path-srlgs-lists {
                    description
                      "Path SRLG properties container.";
                    list path-srlgs-list {
                      key "usage";
                      description
                        "List of SRLG values to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of SRLGs to either
include or exclude.";
                      }

                      leaf-list values {
                        type srlg;
                        description
                          "List of SRLG values.";
                      }
                    }  // list path-srlgs-list
                  }  // container path-srlgs-lists

                  container path-srlgs-names {
                    description
                      "Container for the list of named SRLGs.";
                    list path-srlgs-name {
                      key "usage";
                      description
                        "List of named SRLGs to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                      }

                      leaf-list names {
                        type string;
                        description
                          "List of named SRLGs.";
                      }
                    }  // list path-srlgs-name
                  }  // container path-srlgs-names

                  leaf disjointness {
                    type te-path-disjointness;
                    description
                      "The type of resource disjointness.
When configured for a primary path, the disjointness level
applies to all secondary LSPs.  When configured for a
secondary path, the disjointness level overrides the level
configured for the primary path.";
                  }
                }  // container path-constraints

                container optimizations {
                  description
                    "The objective function container that includes
attributes to impose when computing a TE path.";
                  choice algorithm {
                    description
                      "Optimizations algorithm.";
                    case metric {
                      if-feature path-optimization-metric;
                      list optimization-metric {
                        key "metric-type";
                        description
                          "TE path metric type.";
                        leaf metric-type {
                          type identityref {
                            base path-metric-type;
                          }
                          description
                            "Identifies the 'metric-type' that the path computation
process uses for optimization.";
                        }

                        leaf weight {
                          type uint8;
                          default "1";
                          description
                            "TE path metric normalization weight.";
                        }

                        container explicit-route-exclude-objects {
                          when
                            "../metric-type = 'te-types:path-metric-optimize-excludes'";
                          description
                            "Container for the 'exclude route' object list.";
                          list route-object-exclude-object {
                            key "index";
                            ordered-by
                              user;
                            description
                              "List of Explicit Route Objects to be excluded in the
path computation.";
                            leaf index {
                              type uint32;
                              description
                                "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                            }

                            choice type {
                              description
                                "The explicit route entry type.";
                              container numbered-node-hop {
                                description
                                  "Numbered node route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container numbered-node-hop
                              container numbered-link-hop {
                                description
                                  "Numbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE Link Termination Point (LTP) identifier.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container numbered-link-hop
                              container unnumbered-link-hop {
                                description
                                  "Unnumbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                }

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container unnumbered-link-hop
                              container as-number-hop {
                                description
                                  "AS explicit route hop.";
                                leaf as-number {
                                  type inet:as-number;
                                  mandatory
                                    true;
                                  description
                                    "The Autonomous System (AS) number.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container as-number-hop

                              case label {
                                description
                                  "The label explicit route hop type.";
                                container label-hop {
                                  description
                                    "Label hop type.";
                                  container te-label {
                                    description
                                      "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                    choice technology {
                                      default
                                        "generic";
                                      description
                                        "Data-plane technology type.";
                                      leaf generic {
                                        type rt-types:generalized-label;
                                        description
                                          "TE label specified in a generic format.";
                                      }
                                    }  // choice technology

                                    leaf direction {
                                      type te-label-direction;
                                      default
                                        "forward";
                                      description
                                        "Label direction.";
                                    }
                                  }  // container te-label
                                }  // container label-hop
                              }  // case label

                              case srlg {
                                description
                                  "An SRLG value to be included or excluded.";
                                container srlg {
                                  description
                                    "SRLG container.";
                                  leaf srlg {
                                    type uint32;
                                    description
                                      "SRLG value.";
                                  }
                                }  // container srlg
                              }  // case srlg
                            }  // choice type
                          }  // list route-object-exclude-object
                        }  // container explicit-route-exclude-objects

                        container explicit-route-include-objects {
                          when
                            "../metric-type = 'te-types:path-metric-optimize-includes'";
                          description
                            "Container for the 'include route' object list.";
                          list route-object-include-object {
                            key "index";
                            ordered-by
                              user;
                            description
                              "List of Explicit Route Objects to be included in the
path computation.";
                            leaf index {
                              type uint32;
                              description
                                "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                            }

                            choice type {
                              description
                                "The explicit route entry type.";
                              container numbered-node-hop {
                                description
                                  "Numbered node route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container numbered-node-hop
                              container numbered-link-hop {
                                description
                                  "Numbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE Link Termination Point (LTP) identifier.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container numbered-link-hop
                              container unnumbered-link-hop {
                                description
                                  "Unnumbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                }

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container unnumbered-link-hop
                              container as-number-hop {
                                description
                                  "AS explicit route hop.";
                                leaf as-number {
                                  type inet:as-number;
                                  mandatory
                                    true;
                                  description
                                    "The Autonomous System (AS) number.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container as-number-hop

                              case label {
                                description
                                  "The label explicit route hop type.";
                                container label-hop {
                                  description
                                    "Label hop type.";
                                  container te-label {
                                    description
                                      "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                    choice technology {
                                      default
                                        "generic";
                                      description
                                        "Data-plane technology type.";
                                      leaf generic {
                                        type rt-types:generalized-label;
                                        description
                                          "TE label specified in a generic format.";
                                      }
                                    }  // choice technology

                                    leaf direction {
                                      type te-label-direction;
                                      default
                                        "forward";
                                      description
                                        "Label direction.";
                                    }
                                  }  // container te-label
                                }  // container label-hop
                              }  // case label
                            }  // choice type
                          }  // list route-object-include-object
                        }  // container explicit-route-include-objects
                      }  // list optimization-metric

                      container tiebreakers {
                        description
                          "Container for the list of tiebreakers.";
                        list tiebreaker {
                          key "tiebreaker-type";
                          description
                            "The list of tiebreaker criteria to apply on an
equally favored set of paths, in order to pick
the best.";
                          leaf tiebreaker-type {
                            type identityref {
                              base path-metric-type;
                            }
                            description
                              "Identifies an entry in the list of tiebreakers.";
                          }
                        }  // list tiebreaker
                      }  // container tiebreakers
                    }  // case metric

                    case objective-function {
                      if-feature path-optimization-objective-function;
                      container objective-function {
                        description
                          "The objective function container that includes
attributes to impose when computing a TE path.";
                        leaf objective-function-type {
                          type identityref {
                            base objective-function-type;
                          }
                          default
                            "te-types:of-minimize-cost-path";
                          description
                            "Objective function entry.";
                        }
                      }  // container objective-function
                    }  // case objective-function
                  }  // choice algorithm
                }  // container optimizations

                container path-properties {
                  config false;
                  description
                    "The TE path properties.";
                  list path-metric {
                    key "metric-type";
                    description
                      "TE path metric type.";
                    leaf metric-type {
                      type identityref {
                        base path-metric-type;
                      }
                      description
                        "TE path metric type.";
                    }

                    leaf accumulative-value {
                      type uint64;
                      description
                        "TE path metric accumulative value.";
                    }
                  }  // list path-metric

                  container path-affinities-values {
                    description
                      "Path affinities represented as values.";
                    list path-affinities-value {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of value affinity
constraints.";
                      }

                      leaf value {
                        type admin-groups;
                        default "";
                        description
                          "The affinity value.  The default is empty.";
                      }
                    }  // list path-affinities-value
                  }  // container path-affinities-values

                  container path-affinity-names {
                    description
                      "Path affinities represented as names.";
                    list path-affinity-name {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of named affinity
constraints.";
                      }

                      list affinity-name {
                        key "name";
                        description
                          "List of named affinities.";
                        leaf name {
                          type string;
                          description
                            "Identifies a named affinity entry.";
                        }
                      }  // list affinity-name
                    }  // list path-affinity-name
                  }  // container path-affinity-names

                  container path-srlgs-lists {
                    description
                      "Path SRLG properties container.";
                    list path-srlgs-list {
                      key "usage";
                      description
                        "List of SRLG values to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of SRLGs to either
include or exclude.";
                      }

                      leaf-list values {
                        type srlg;
                        description
                          "List of SRLG values.";
                      }
                    }  // list path-srlgs-list
                  }  // container path-srlgs-lists

                  container path-srlgs-names {
                    description
                      "Container for the list of named SRLGs.";
                    list path-srlgs-name {
                      key "usage";
                      description
                        "List of named SRLGs to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                      }

                      leaf-list names {
                        type string;
                        description
                          "List of named SRLGs.";
                      }
                    }  // list path-srlgs-name
                  }  // container path-srlgs-names

                  container path-route-objects {
                    description
                      "Container for the list of route objects either returned by
the computation engine or actually used by an LSP.";
                    list path-route-object {
                      key "index";
                      ordered-by user;
                      description
                        "List of route objects either returned by the computation
engine or actually used by an LSP.";
                      leaf index {
                        type uint32;
                        description
                          "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key
values.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-route-object
                  }  // container path-route-objects
                }  // container path-properties

                list connectivity-matrix {
                  key "id";
                  description
                    "Represents a node's switching limitations, i.e.,
limitations in the interconnecting network TE links
across the node.";
                  reference
                    "RFC 7579: General Network Element Constraint Encoding
                    for GMPLS-Controlled Networks";

                  leaf id {
                    type uint32;
                    description
                      "Identifies the connectivity matrix entry.";
                  }

                  container from {
                    description
                      "Reference to a source Link Termination Point (LTP).";
                    leaf tp-ref {
                      type leafref {
                        path "../../../../../../nt-s:termination-point/nt-s:tp-id";
                      }
                      description
                        "Relative reference to a termination point.";
                    }

                    container label-restrictions {
                      description
                        "The label restrictions container.";
                      list label-restriction {
                        key "index";
                        description
                          "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                        reference
                          "RFC 7579: General Network Element Constraint Encoding
                          for GMPLS-Controlled Networks";

                        leaf restriction {
                          type enumeration {
                            enum "inclusive" {
                              value 0;
                              description
                                "The label or label range is inclusive.";
                            }
                            enum "exclusive" {
                              value 1;
                              description
                                "The label or label range is exclusive.";
                            }
                          }
                          default
                            "inclusive";
                          description
                            "Indicates whether the list item is inclusive or exclusive.";
                        }

                        leaf index {
                          type uint32;
                          description
                            "The index of the label restriction list entry.";
                        }

                        container label-start {
                          must
                            "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-start

                        container label-end {
                          must
                            "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-end

                        container label-step {
                          description
                            "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                          choice technology {
                            default
                              "generic";
                            description
                              "Data-plane technology type.";
                            leaf generic {
                              type int32;
                              default "1";
                              description
                                "Label range step.";
                            }
                          }  // choice technology
                        }  // container label-step

                        leaf range-bitmap {
                          type yang:hex-string;
                          description
                            "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                        }
                      }  // list label-restriction
                    }  // container label-restrictions
                  }  // container from

                  container to {
                    description
                      "Reference to a destination LTP.";
                    leaf tp-ref {
                      type leafref {
                        path "../../../../../../nt-s:termination-point/nt-s:tp-id";
                      }
                      description
                        "Relative reference to a termination point.";
                    }

                    container label-restrictions {
                      description
                        "The label restrictions container.";
                      list label-restriction {
                        key "index";
                        description
                          "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                        reference
                          "RFC 7579: General Network Element Constraint Encoding
                          for GMPLS-Controlled Networks";

                        leaf restriction {
                          type enumeration {
                            enum "inclusive" {
                              value 0;
                              description
                                "The label or label range is inclusive.";
                            }
                            enum "exclusive" {
                              value 1;
                              description
                                "The label or label range is exclusive.";
                            }
                          }
                          default
                            "inclusive";
                          description
                            "Indicates whether the list item is inclusive or exclusive.";
                        }

                        leaf index {
                          type uint32;
                          description
                            "The index of the label restriction list entry.";
                        }

                        container label-start {
                          must
                            "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-start

                        container label-end {
                          must
                            "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                            error-message
                              "'label-start' and 'label-end' must have the same direction.";
                          }
                          description
                            "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-end

                        container label-step {
                          description
                            "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                          choice technology {
                            default
                              "generic";
                            description
                              "Data-plane technology type.";
                            leaf generic {
                              type int32;
                              default "1";
                              description
                                "Label range step.";
                            }
                          }  // choice technology
                        }  // container label-step

                        leaf range-bitmap {
                          type yang:hex-string;
                          description
                            "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                        }
                      }  // list label-restriction
                    }  // container label-restrictions
                  }  // container to

                  leaf is-allowed {
                    type boolean;
                    description
                      "'true' - switching is allowed;
'false' - switching is disallowed.";
                  }

                  container underlay {
                    if-feature te-topology-hierarchy;
                    description
                      "Attributes of the TE link underlay.";
                    reference
                      "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                      Generalized Multi-Protocol Label Switching (GMPLS)
                      Traffic Engineering (TE)";

                    leaf enabled {
                      type boolean;
                      description
                        "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                    }

                    container primary-path {
                      description
                        "The service path on the underlay topology that
supports this link.";
                      leaf network-ref {
                        type leafref {
                          path "/nw:networks/nw:network/nw:network-id";
                          require-instance
                            false;
                        }
                        description
                          "Used to reference a network -- for example, an underlay
network.";
                      }

                      list path-element {
                        key "path-element-id";
                        description
                          "A list of path elements describing the service path.";
                        leaf path-element-id {
                          type uint32;
                          description
                            "To identify the element in a path.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-element
                    }  // container primary-path

                    list backup-path {
                      key "index";
                      description
                        "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                      leaf index {
                        type uint32;
                        description
                          "A sequence number to identify a backup path.";
                      }

                      leaf network-ref {
                        type leafref {
                          path "/nw:networks/nw:network/nw:network-id";
                          require-instance
                            false;
                        }
                        description
                          "Used to reference a network -- for example, an underlay
network.";
                      }

                      list path-element {
                        key "path-element-id";
                        description
                          "A list of path elements describing the backup service
path.";
                        leaf path-element-id {
                          type uint32;
                          description
                            "To identify the element in a path.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-element
                    }  // list backup-path

                    leaf protection-type {
                      type identityref {
                        base te-types:lsp-protection-type;
                      }
                      description
                        "Underlay protection type desired for this link.";
                    }

                    container tunnel-termination-points {
                      description
                        "Underlay TTPs desired for this link.";
                      leaf source {
                        type binary;
                        description
                          "Source TTP identifier.";
                      }

                      leaf destination {
                        type binary;
                        description
                          "Destination TTP identifier.";
                      }
                    }  // container tunnel-termination-points

                    container tunnels {
                      description
                        "Underlay TE tunnels supporting this TE link.";
                      leaf sharing {
                        type boolean;
                        default "true";
                        description
                          "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                      }

                      list tunnel {
                        key "tunnel-name";
                        description
                          "Zero, one, or more underlay TE tunnels that support this
TE link.";
                        leaf tunnel-name {
                          type string;
                          description
                            "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                        }

                        leaf sharing {
                          type boolean;
                          description
                            "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                        }
                      }  // list tunnel
                    }  // container tunnels
                  }  // container underlay

                  container path-constraints {
                    description
                      "TE named path constraints container.";
                    container te-bandwidth {
                      description
                        "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type te-bandwidth;
                          description
                            "Bandwidth specified in a generic format.";
                        }
                      }  // choice technology
                    }  // container te-bandwidth

                    leaf link-protection {
                      type identityref {
                        base link-protection-type;
                      }
                      default
                        "te-types:link-protection-unprotected";
                      description
                        "Link protection type required for the links included
in the computed path.";
                      reference
                        "RFC 4202: Routing Extensions in Support of
                        Generalized Multi-Protocol Label Switching (GMPLS)";

                    }

                    leaf setup-priority {
                      type uint8 {
                        range "0..7";
                      }
                      default "7";
                      description
                        "TE LSP requested setup priority.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf hold-priority {
                      type uint8 {
                        range "0..7";
                      }
                      default "7";
                      description
                        "TE LSP requested hold priority.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf signaling-type {
                      type identityref {
                        base path-signaling-type;
                      }
                      default
                        "te-types:path-setup-rsvp";
                      description
                        "TE tunnel path signaling type.";
                    }

                    container path-metric-bounds {
                      description
                        "TE path metric bounds container.";
                      list path-metric-bound {
                        key "metric-type";
                        description
                          "List of TE path metric bounds.";
                        leaf metric-type {
                          type identityref {
                            base path-metric-type;
                          }
                          description
                            "Identifies an entry in the list of 'metric-type' items
bound for the TE path.";
                        }

                        leaf upper-bound {
                          type uint64;
                          default "0";
                          description
                            "Upper bound on the end-to-end TE path metric.  A zero
indicates an unbounded upper limit for the specific
'metric-type'.";
                        }
                      }  // list path-metric-bound
                    }  // container path-metric-bounds

                    container path-affinities-values {
                      description
                        "Path affinities represented as values.";
                      list path-affinities-value {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of value affinity
constraints.";
                        }

                        leaf value {
                          type admin-groups;
                          default "";
                          description
                            "The affinity value.  The default is empty.";
                        }
                      }  // list path-affinities-value
                    }  // container path-affinities-values

                    container path-affinity-names {
                      description
                        "Path affinities represented as names.";
                      list path-affinity-name {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of named affinity
constraints.";
                        }

                        list affinity-name {
                          key "name";
                          description
                            "List of named affinities.";
                          leaf name {
                            type string;
                            description
                              "Identifies a named affinity entry.";
                          }
                        }  // list affinity-name
                      }  // list path-affinity-name
                    }  // container path-affinity-names

                    container path-srlgs-lists {
                      description
                        "Path SRLG properties container.";
                      list path-srlgs-list {
                        key "usage";
                        description
                          "List of SRLG values to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of SRLGs to either
include or exclude.";
                        }

                        leaf-list values {
                          type srlg;
                          description
                            "List of SRLG values.";
                        }
                      }  // list path-srlgs-list
                    }  // container path-srlgs-lists

                    container path-srlgs-names {
                      description
                        "Container for the list of named SRLGs.";
                      list path-srlgs-name {
                        key "usage";
                        description
                          "List of named SRLGs to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                        }

                        leaf-list names {
                          type string;
                          description
                            "List of named SRLGs.";
                        }
                      }  // list path-srlgs-name
                    }  // container path-srlgs-names

                    leaf disjointness {
                      type te-path-disjointness;
                      description
                        "The type of resource disjointness.
When configured for a primary path, the disjointness level
applies to all secondary LSPs.  When configured for a
secondary path, the disjointness level overrides the level
configured for the primary path.";
                    }
                  }  // container path-constraints

                  container optimizations {
                    description
                      "The objective function container that includes
attributes to impose when computing a TE path.";
                    choice algorithm {
                      description
                        "Optimizations algorithm.";
                      case metric {
                        if-feature path-optimization-metric;
                        list optimization-metric {
                          key "metric-type";
                          description
                            "TE path metric type.";
                          leaf metric-type {
                            type identityref {
                              base path-metric-type;
                            }
                            description
                              "Identifies the 'metric-type' that the path computation
process uses for optimization.";
                          }

                          leaf weight {
                            type uint8;
                            default "1";
                            description
                              "TE path metric normalization weight.";
                          }

                          container explicit-route-exclude-objects {
                            when
                              "../metric-type = 'te-types:path-metric-optimize-excludes'";
                            description
                              "Container for the 'exclude route' object list.";
                            list route-object-exclude-object {
                              key "index";
                              ordered-by
                                user;
                              description
                                "List of Explicit Route Objects to be excluded in the
path computation.";
                              leaf index {
                                type uint32;
                                description
                                  "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                              }

                              choice type {
                                description
                                  "The explicit route entry type.";
                                container numbered-node-hop {
                                  description
                                    "Numbered node route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container numbered-node-hop
                                container numbered-link-hop {
                                  description
                                    "Numbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE Link Termination Point (LTP) identifier.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container numbered-link-hop
                                container unnumbered-link-hop {
                                  description
                                    "Unnumbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                  }

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container unnumbered-link-hop
                                container as-number-hop {
                                  description
                                    "AS explicit route hop.";
                                  leaf as-number {
                                    type inet:as-number;
                                    mandatory
                                      true;
                                    description
                                      "The Autonomous System (AS) number.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container as-number-hop

                                case label {
                                  description
                                    "The label explicit route hop type.";
                                  container label-hop {
                                    description
                                      "Label hop type.";
                                    container te-label {
                                      description
                                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                      choice technology {
                                        default
                                          "generic";
                                        description
                                          "Data-plane technology type.";
                                        leaf generic {
                                          type rt-types:generalized-label;
                                          description
                                            "TE label specified in a generic format.";
                                        }
                                      }  // choice technology

                                      leaf direction {
                                        type te-label-direction;
                                        default
                                          "forward";
                                        description
                                          "Label direction.";
                                      }
                                    }  // container te-label
                                  }  // container label-hop
                                }  // case label

                                case srlg {
                                  description
                                    "An SRLG value to be included or excluded.";
                                  container srlg {
                                    description
                                      "SRLG container.";
                                    leaf srlg {
                                      type uint32;
                                      description
                                        "SRLG value.";
                                    }
                                  }  // container srlg
                                }  // case srlg
                              }  // choice type
                            }  // list route-object-exclude-object
                          }  // container explicit-route-exclude-objects

                          container explicit-route-include-objects {
                            when
                              "../metric-type = 'te-types:path-metric-optimize-includes'";
                            description
                              "Container for the 'include route' object list.";
                            list route-object-include-object {
                              key "index";
                              ordered-by
                                user;
                              description
                                "List of Explicit Route Objects to be included in the
path computation.";
                              leaf index {
                                type uint32;
                                description
                                  "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                              }

                              choice type {
                                description
                                  "The explicit route entry type.";
                                container numbered-node-hop {
                                  description
                                    "Numbered node route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container numbered-node-hop
                                container numbered-link-hop {
                                  description
                                    "Numbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE Link Termination Point (LTP) identifier.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container numbered-link-hop
                                container unnumbered-link-hop {
                                  description
                                    "Unnumbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                  }

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container unnumbered-link-hop
                                container as-number-hop {
                                  description
                                    "AS explicit route hop.";
                                  leaf as-number {
                                    type inet:as-number;
                                    mandatory
                                      true;
                                    description
                                      "The Autonomous System (AS) number.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container as-number-hop

                                case label {
                                  description
                                    "The label explicit route hop type.";
                                  container label-hop {
                                    description
                                      "Label hop type.";
                                    container te-label {
                                      description
                                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                      choice technology {
                                        default
                                          "generic";
                                        description
                                          "Data-plane technology type.";
                                        leaf generic {
                                          type rt-types:generalized-label;
                                          description
                                            "TE label specified in a generic format.";
                                        }
                                      }  // choice technology

                                      leaf direction {
                                        type te-label-direction;
                                        default
                                          "forward";
                                        description
                                          "Label direction.";
                                      }
                                    }  // container te-label
                                  }  // container label-hop
                                }  // case label
                              }  // choice type
                            }  // list route-object-include-object
                          }  // container explicit-route-include-objects
                        }  // list optimization-metric

                        container tiebreakers {
                          description
                            "Container for the list of tiebreakers.";
                          list tiebreaker {
                            key "tiebreaker-type";
                            description
                              "The list of tiebreaker criteria to apply on an
equally favored set of paths, in order to pick
the best.";
                            leaf tiebreaker-type {
                              type identityref {
                                base path-metric-type;
                              }
                              description
                                "Identifies an entry in the list of tiebreakers.";
                            }
                          }  // list tiebreaker
                        }  // container tiebreakers
                      }  // case metric

                      case objective-function {
                        if-feature path-optimization-objective-function;
                        container objective-function {
                          description
                            "The objective function container that includes
attributes to impose when computing a TE path.";
                          leaf objective-function-type {
                            type identityref {
                              base objective-function-type;
                            }
                            default
                              "te-types:of-minimize-cost-path";
                            description
                              "Objective function entry.";
                          }
                        }  // container objective-function
                      }  // case objective-function
                    }  // choice algorithm
                  }  // container optimizations

                  container path-properties {
                    config false;
                    description
                      "The TE path properties.";
                    list path-metric {
                      key "metric-type";
                      description
                        "TE path metric type.";
                      leaf metric-type {
                        type identityref {
                          base path-metric-type;
                        }
                        description
                          "TE path metric type.";
                      }

                      leaf accumulative-value {
                        type uint64;
                        description
                          "TE path metric accumulative value.";
                      }
                    }  // list path-metric

                    container path-affinities-values {
                      description
                        "Path affinities represented as values.";
                      list path-affinities-value {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of value affinity
constraints.";
                        }

                        leaf value {
                          type admin-groups;
                          default "";
                          description
                            "The affinity value.  The default is empty.";
                        }
                      }  // list path-affinities-value
                    }  // container path-affinities-values

                    container path-affinity-names {
                      description
                        "Path affinities represented as names.";
                      list path-affinity-name {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of named affinity
constraints.";
                        }

                        list affinity-name {
                          key "name";
                          description
                            "List of named affinities.";
                          leaf name {
                            type string;
                            description
                              "Identifies a named affinity entry.";
                          }
                        }  // list affinity-name
                      }  // list path-affinity-name
                    }  // container path-affinity-names

                    container path-srlgs-lists {
                      description
                        "Path SRLG properties container.";
                      list path-srlgs-list {
                        key "usage";
                        description
                          "List of SRLG values to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of SRLGs to either
include or exclude.";
                        }

                        leaf-list values {
                          type srlg;
                          description
                            "List of SRLG values.";
                        }
                      }  // list path-srlgs-list
                    }  // container path-srlgs-lists

                    container path-srlgs-names {
                      description
                        "Container for the list of named SRLGs.";
                      list path-srlgs-name {
                        key "usage";
                        description
                          "List of named SRLGs to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                        }

                        leaf-list names {
                          type string;
                          description
                            "List of named SRLGs.";
                        }
                      }  // list path-srlgs-name
                    }  // container path-srlgs-names

                    container path-route-objects {
                      description
                        "Container for the list of route objects either returned by
the computation engine or actually used by an LSP.";
                      list path-route-object {
                        key "index";
                        ordered-by user;
                        description
                          "List of route objects either returned by the computation
engine or actually used by an LSP.";
                        leaf index {
                          type uint32;
                          description
                            "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key
values.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-route-object
                    }  // container path-route-objects
                  }  // container path-properties
                }  // list connectivity-matrix
              }  // container connectivity-matrices

              leaf domain-id {
                type uint32;
                description
                  "Identifies the domain to which this node belongs.
This attribute is used to support inter-domain links.";
                reference
                  "RFC 5152: A Per-Domain Path Computation Method for
                  Establishing Inter-Domain Traffic Engineering (TE)
                  Label Switched Paths (LSPs)
                   RFC 5316: ISIS Extensions in Support of Inter-Autonomous
                  System (AS) MPLS and GMPLS Traffic Engineering
                   RFC 5392: OSPF Extensions in Support of Inter-Autonomous
                  System (AS) MPLS and GMPLS Traffic Engineering";

              }

              leaf is-abstract {
                type empty;
                description
                  "Present if the node is abstract; not present if the node
is actual.";
              }

              leaf name {
                type string;
                description "Node name.";
              }

              leaf-list signaling-address {
                type inet:ip-address;
                description
                  "The node's signaling address.";
              }

              container underlay-topology {
                if-feature te-topology-hierarchy;
                description
                  "When an abstract node encapsulates a topology, the
attributes in this container point to said topology.";
                leaf network-ref {
                  type leafref {
                    path "/nw:networks/nw:network/nw:network-id";
                    require-instance false;
                  }
                  description
                    "Used to reference a network -- for example, an underlay
network.";
                }
              }  // container underlay-topology
            }  // list information-source-entry

            container statistics {
              config false;
              description "Statistics data.";
              leaf discontinuity-time {
                type yang:date-and-time;
                description
                  "The time of the most recent occasion at which any one or
more of this interface's counters suffered a
discontinuity.  If no such discontinuities have occurred
since the last re-initialization of the local management
subsystem, then this node contains the time the local
management subsystem re-initialized itself.";
              }

              container node {
                description
                  "Contains statistics attributes at the TE node level.";
                leaf disables {
                  type yang:counter32;
                  description
                    "Number of times that a node was disabled.";
                }

                leaf enables {
                  type yang:counter32;
                  description
                    "Number of times that a node was enabled.";
                }

                leaf maintenance-sets {
                  type yang:counter32;
                  description
                    "Number of times that a node was put in maintenance.";
                }

                leaf maintenance-clears {
                  type yang:counter32;
                  description
                    "Number of times that a node was taken out of
maintenance.";
                }

                leaf modifies {
                  type yang:counter32;
                  description
                    "Number of times that a node was modified.";
                }
              }  // container node

              container connectivity-matrix-entry {
                description
                  "Contains statistics attributes at the level of a
connectivity matrix entry.";
                leaf creates {
                  type yang:counter32;
                  description
                    "Number of times that a connectivity matrix entry was
created.";
                  reference
                    "RFC 6241: Network Configuration Protocol (NETCONF),
                    	  Section 7.2, 'create' operation";

                }

                leaf deletes {
                  type yang:counter32;
                  description
                    "Number of times that a connectivity matrix entry was
deleted.";
                  reference
                    "RFC 6241: Network Configuration Protocol (NETCONF),
                    	  Section 7.2, 'delete' operation";

                }

                leaf disables {
                  type yang:counter32;
                  description
                    "Number of times that a connectivity matrix entry was
disabled.";
                }

                leaf enables {
                  type yang:counter32;
                  description
                    "Number of times that a connectivity matrix entry was
enabled.";
                }

                leaf modifies {
                  type yang:counter32;
                  description
                    "Number of times that a connectivity matrix entry was
modified.";
                }
              }  // container connectivity-matrix-entry
            }  // container statistics

            list tunnel-termination-point {
              key "tunnel-tp-id";
              description
                "A termination point can terminate a tunnel.";
              leaf tunnel-tp-id {
                type binary;
                description
                  "TTP identifier.";
              }

              leaf admin-status {
                type te-types:te-admin-status;
                description
                  "The administrative state of the TTP.";
              }

              leaf name {
                type string;
                description
                  "A descriptive name for the TTP.";
              }

              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.";
              }

              leaf-list inter-layer-lock-id {
                type uint32;
                description
                  "Inter-layer lock ID, used for path computation in a TE
topology covering multiple layers or multiple regions.";
                reference
                  "RFC 5212: Requirements for GMPLS-Based Multi-Region and
                  Multi-Layer Networks (MRN/MLN)
                   RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions
                  for Multi-Layer and Multi-Region Networks (MLN/MRN)";

              }

              leaf protection-type {
                type identityref {
                  base te-types:lsp-protection-type;
                }
                description
                  "The protection type that this TTP is capable of.";
              }

              container client-layer-adaptation {
                description
                  "Contains capability information to support a client-layer
adaptation in a multi-layer topology.";
                list switching-capability {
                  key "switching-capability encoding";
                  description
                    "List of supported switching capabilities.";
                  reference
                    "RFC 4202: Routing Extensions in Support of
                    Generalized Multi-Protocol Label Switching (GMPLS)
                     RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions
                    for Multi-Layer and Multi-Region Networks (MLN/MRN)";

                  leaf switching-capability {
                    type identityref {
                      base te-types:switching-capabilities;
                    }
                    description
                      "Switching capability for the client-layer adaptation.";
                  }

                  leaf encoding {
                    type identityref {
                      base te-types:lsp-encoding-types;
                    }
                    description
                      "Encoding supported by the client-layer adaptation.";
                  }

                  container te-bandwidth {
                    description
                      "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type te-bandwidth;
                        description
                          "Bandwidth specified in a generic format.";
                      }
                    }  // choice technology
                  }  // container te-bandwidth
                }  // list switching-capability
              }  // container client-layer-adaptation

              container local-link-connectivities {
                description
                  "Contains an LLCL for a TTP on a TE node.";
                leaf number-of-entries {
                  type uint16;
                  description
                    "The number of LLCL entries.
If this number is specified in the configuration request,
the number is the requested number of entries, which may
not all be listed in the list;
if this number is reported in the state data,
the number is the current number of operational entries.";
                }

                container label-restrictions {
                  description
                    "The label restrictions container.";
                  list label-restriction {
                    key "index";
                    description
                      "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                    reference
                      "RFC 7579: General Network Element Constraint Encoding
                      for GMPLS-Controlled Networks";

                    leaf restriction {
                      type enumeration {
                        enum "inclusive" {
                          value 0;
                          description
                            "The label or label range is inclusive.";
                        }
                        enum "exclusive" {
                          value 1;
                          description
                            "The label or label range is exclusive.";
                        }
                      }
                      default "inclusive";
                      description
                        "Indicates whether the list item is inclusive or exclusive.";
                    }

                    leaf index {
                      type uint32;
                      description
                        "The index of the label restriction list entry.";
                    }

                    container label-start {
                      must
                        "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                        error-message
                          "'label-start' and 'label-end' must have the same direction.";
                      }
                      description
                        "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                      container te-label {
                        description
                          "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type rt-types:generalized-label;
                            description
                              "TE label specified in a generic format.";
                          }
                        }  // choice technology

                        leaf direction {
                          type te-label-direction;
                          default "forward";
                          description
                            "Label direction.";
                        }
                      }  // container te-label
                    }  // container label-start

                    container label-end {
                      must
                        "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                        error-message
                          "'label-start' and 'label-end' must have the same direction.";
                      }
                      description
                        "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                      container te-label {
                        description
                          "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type rt-types:generalized-label;
                            description
                              "TE label specified in a generic format.";
                          }
                        }  // choice technology

                        leaf direction {
                          type te-label-direction;
                          default "forward";
                          description
                            "Label direction.";
                        }
                      }  // container te-label
                    }  // container label-end

                    container label-step {
                      description
                        "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type int32;
                          default "1";
                          description
                            "Label range step.";
                        }
                      }  // choice technology
                    }  // container label-step

                    leaf range-bitmap {
                      type yang:hex-string;
                      description
                        "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                    }
                  }  // list label-restriction
                }  // container label-restrictions

                leaf is-allowed {
                  type boolean;
                  description
                    "'true' - switching is allowed;
'false' - switching is disallowed.";
                }

                container underlay {
                  if-feature te-topology-hierarchy;
                  description
                    "Attributes of the TE link underlay.";
                  reference
                    "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                    Generalized Multi-Protocol Label Switching (GMPLS)
                    Traffic Engineering (TE)";

                  leaf enabled {
                    type boolean;
                    description
                      "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                  }

                  container primary-path {
                    description
                      "The service path on the underlay topology that
supports this link.";
                    leaf network-ref {
                      type leafref {
                        path "/nw:networks/nw:network/nw:network-id";
                        require-instance
                          false;
                      }
                      description
                        "Used to reference a network -- for example, an underlay
network.";
                    }

                    list path-element {
                      key "path-element-id";
                      description
                        "A list of path elements describing the service path.";
                      leaf path-element-id {
                        type uint32;
                        description
                          "To identify the element in a path.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-element
                  }  // container primary-path

                  list backup-path {
                    key "index";
                    description
                      "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                    leaf index {
                      type uint32;
                      description
                        "A sequence number to identify a backup path.";
                    }

                    leaf network-ref {
                      type leafref {
                        path "/nw:networks/nw:network/nw:network-id";
                        require-instance
                          false;
                      }
                      description
                        "Used to reference a network -- for example, an underlay
network.";
                    }

                    list path-element {
                      key "path-element-id";
                      description
                        "A list of path elements describing the backup service
path.";
                      leaf path-element-id {
                        type uint32;
                        description
                          "To identify the element in a path.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-element
                  }  // list backup-path

                  leaf protection-type {
                    type identityref {
                      base te-types:lsp-protection-type;
                    }
                    description
                      "Underlay protection type desired for this link.";
                  }

                  container tunnel-termination-points {
                    description
                      "Underlay TTPs desired for this link.";
                    leaf source {
                      type binary;
                      description
                        "Source TTP identifier.";
                    }

                    leaf destination {
                      type binary;
                      description
                        "Destination TTP identifier.";
                    }
                  }  // container tunnel-termination-points

                  container tunnels {
                    description
                      "Underlay TE tunnels supporting this TE link.";
                    leaf sharing {
                      type boolean;
                      default "true";
                      description
                        "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                    }

                    list tunnel {
                      key "tunnel-name";
                      description
                        "Zero, one, or more underlay TE tunnels that support this
TE link.";
                      leaf tunnel-name {
                        type string;
                        description
                          "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                      }

                      leaf sharing {
                        type boolean;
                        description
                          "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                      }
                    }  // list tunnel
                  }  // container tunnels
                }  // container underlay

                container path-constraints {
                  description
                    "TE named path constraints container.";
                  container te-bandwidth {
                    description
                      "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type te-bandwidth;
                        description
                          "Bandwidth specified in a generic format.";
                      }
                    }  // choice technology
                  }  // container te-bandwidth

                  leaf link-protection {
                    type identityref {
                      base link-protection-type;
                    }
                    default
                      "te-types:link-protection-unprotected";
                    description
                      "Link protection type required for the links included
in the computed path.";
                    reference
                      "RFC 4202: Routing Extensions in Support of
                      Generalized Multi-Protocol Label Switching (GMPLS)";

                  }

                  leaf setup-priority {
                    type uint8 {
                      range "0..7";
                    }
                    default "7";
                    description
                      "TE LSP requested setup priority.";
                    reference
                      "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                  }

                  leaf hold-priority {
                    type uint8 {
                      range "0..7";
                    }
                    default "7";
                    description
                      "TE LSP requested hold priority.";
                    reference
                      "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                  }

                  leaf signaling-type {
                    type identityref {
                      base path-signaling-type;
                    }
                    default
                      "te-types:path-setup-rsvp";
                    description
                      "TE tunnel path signaling type.";
                  }

                  container path-metric-bounds {
                    description
                      "TE path metric bounds container.";
                    list path-metric-bound {
                      key "metric-type";
                      description
                        "List of TE path metric bounds.";
                      leaf metric-type {
                        type identityref {
                          base path-metric-type;
                        }
                        description
                          "Identifies an entry in the list of 'metric-type' items
bound for the TE path.";
                      }

                      leaf upper-bound {
                        type uint64;
                        default "0";
                        description
                          "Upper bound on the end-to-end TE path metric.  A zero
indicates an unbounded upper limit for the specific
'metric-type'.";
                      }
                    }  // list path-metric-bound
                  }  // container path-metric-bounds

                  container path-affinities-values {
                    description
                      "Path affinities represented as values.";
                    list path-affinities-value {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of value affinity
constraints.";
                      }

                      leaf value {
                        type admin-groups;
                        default "";
                        description
                          "The affinity value.  The default is empty.";
                      }
                    }  // list path-affinities-value
                  }  // container path-affinities-values

                  container path-affinity-names {
                    description
                      "Path affinities represented as names.";
                    list path-affinity-name {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of named affinity
constraints.";
                      }

                      list affinity-name {
                        key "name";
                        description
                          "List of named affinities.";
                        leaf name {
                          type string;
                          description
                            "Identifies a named affinity entry.";
                        }
                      }  // list affinity-name
                    }  // list path-affinity-name
                  }  // container path-affinity-names

                  container path-srlgs-lists {
                    description
                      "Path SRLG properties container.";
                    list path-srlgs-list {
                      key "usage";
                      description
                        "List of SRLG values to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of SRLGs to either
include or exclude.";
                      }

                      leaf-list values {
                        type srlg;
                        description
                          "List of SRLG values.";
                      }
                    }  // list path-srlgs-list
                  }  // container path-srlgs-lists

                  container path-srlgs-names {
                    description
                      "Container for the list of named SRLGs.";
                    list path-srlgs-name {
                      key "usage";
                      description
                        "List of named SRLGs to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                      }

                      leaf-list names {
                        type string;
                        description
                          "List of named SRLGs.";
                      }
                    }  // list path-srlgs-name
                  }  // container path-srlgs-names

                  leaf disjointness {
                    type te-path-disjointness;
                    description
                      "The type of resource disjointness.
When configured for a primary path, the disjointness level
applies to all secondary LSPs.  When configured for a
secondary path, the disjointness level overrides the level
configured for the primary path.";
                  }
                }  // container path-constraints

                container optimizations {
                  description
                    "The objective function container that includes
attributes to impose when computing a TE path.";
                  choice algorithm {
                    description
                      "Optimizations algorithm.";
                    case metric {
                      if-feature path-optimization-metric;
                      list optimization-metric {
                        key "metric-type";
                        description
                          "TE path metric type.";
                        leaf metric-type {
                          type identityref {
                            base path-metric-type;
                          }
                          description
                            "Identifies the 'metric-type' that the path computation
process uses for optimization.";
                        }

                        leaf weight {
                          type uint8;
                          default "1";
                          description
                            "TE path metric normalization weight.";
                        }

                        container explicit-route-exclude-objects {
                          when
                            "../metric-type = 'te-types:path-metric-optimize-excludes'";
                          description
                            "Container for the 'exclude route' object list.";
                          list route-object-exclude-object {
                            key "index";
                            ordered-by
                              user;
                            description
                              "List of Explicit Route Objects to be excluded in the
path computation.";
                            leaf index {
                              type uint32;
                              description
                                "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                            }

                            choice type {
                              description
                                "The explicit route entry type.";
                              container numbered-node-hop {
                                description
                                  "Numbered node route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container numbered-node-hop
                              container numbered-link-hop {
                                description
                                  "Numbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE Link Termination Point (LTP) identifier.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container numbered-link-hop
                              container unnumbered-link-hop {
                                description
                                  "Unnumbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                }

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container unnumbered-link-hop
                              container as-number-hop {
                                description
                                  "AS explicit route hop.";
                                leaf as-number {
                                  type inet:as-number;
                                  mandatory
                                    true;
                                  description
                                    "The Autonomous System (AS) number.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container as-number-hop

                              case label {
                                description
                                  "The label explicit route hop type.";
                                container label-hop {
                                  description
                                    "Label hop type.";
                                  container te-label {
                                    description
                                      "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                    choice technology {
                                      default
                                        "generic";
                                      description
                                        "Data-plane technology type.";
                                      leaf generic {
                                        type rt-types:generalized-label;
                                        description
                                          "TE label specified in a generic format.";
                                      }
                                    }  // choice technology

                                    leaf direction {
                                      type te-label-direction;
                                      default
                                        "forward";
                                      description
                                        "Label direction.";
                                    }
                                  }  // container te-label
                                }  // container label-hop
                              }  // case label

                              case srlg {
                                description
                                  "An SRLG value to be included or excluded.";
                                container srlg {
                                  description
                                    "SRLG container.";
                                  leaf srlg {
                                    type uint32;
                                    description
                                      "SRLG value.";
                                  }
                                }  // container srlg
                              }  // case srlg
                            }  // choice type
                          }  // list route-object-exclude-object
                        }  // container explicit-route-exclude-objects

                        container explicit-route-include-objects {
                          when
                            "../metric-type = 'te-types:path-metric-optimize-includes'";
                          description
                            "Container for the 'include route' object list.";
                          list route-object-include-object {
                            key "index";
                            ordered-by
                              user;
                            description
                              "List of Explicit Route Objects to be included in the
path computation.";
                            leaf index {
                              type uint32;
                              description
                                "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                            }

                            choice type {
                              description
                                "The explicit route entry type.";
                              container numbered-node-hop {
                                description
                                  "Numbered node route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container numbered-node-hop
                              container numbered-link-hop {
                                description
                                  "Numbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE Link Termination Point (LTP) identifier.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container numbered-link-hop
                              container unnumbered-link-hop {
                                description
                                  "Unnumbered link explicit route hop.";
                                reference
                                  "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                  Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                   RFC 3477: Signalling Unnumbered Links in Resource
                                  ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                leaf link-tp-id {
                                  type te-tp-id;
                                  mandatory
                                    true;
                                  description
                                    "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                }

                                leaf node-id {
                                  type te-node-id;
                                  mandatory
                                    true;
                                  description
                                    "The identifier of a node in the TE topology.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }

                                leaf direction {
                                  type te-link-direction;
                                  default
                                    "outgoing";
                                  description
                                    "Link route object direction.";
                                }
                              }  // container unnumbered-link-hop
                              container as-number-hop {
                                description
                                  "AS explicit route hop.";
                                leaf as-number {
                                  type inet:as-number;
                                  mandatory
                                    true;
                                  description
                                    "The Autonomous System (AS) number.";
                                }

                                leaf hop-type {
                                  type te-hop-type;
                                  default
                                    "strict";
                                  description
                                    "Strict or loose hop.";
                                }
                              }  // container as-number-hop

                              case label {
                                description
                                  "The label explicit route hop type.";
                                container label-hop {
                                  description
                                    "Label hop type.";
                                  container te-label {
                                    description
                                      "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                    choice technology {
                                      default
                                        "generic";
                                      description
                                        "Data-plane technology type.";
                                      leaf generic {
                                        type rt-types:generalized-label;
                                        description
                                          "TE label specified in a generic format.";
                                      }
                                    }  // choice technology

                                    leaf direction {
                                      type te-label-direction;
                                      default
                                        "forward";
                                      description
                                        "Label direction.";
                                    }
                                  }  // container te-label
                                }  // container label-hop
                              }  // case label
                            }  // choice type
                          }  // list route-object-include-object
                        }  // container explicit-route-include-objects
                      }  // list optimization-metric

                      container tiebreakers {
                        description
                          "Container for the list of tiebreakers.";
                        list tiebreaker {
                          key "tiebreaker-type";
                          description
                            "The list of tiebreaker criteria to apply on an
equally favored set of paths, in order to pick
the best.";
                          leaf tiebreaker-type {
                            type identityref {
                              base path-metric-type;
                            }
                            description
                              "Identifies an entry in the list of tiebreakers.";
                          }
                        }  // list tiebreaker
                      }  // container tiebreakers
                    }  // case metric

                    case objective-function {
                      if-feature path-optimization-objective-function;
                      container objective-function {
                        description
                          "The objective function container that includes
attributes to impose when computing a TE path.";
                        leaf objective-function-type {
                          type identityref {
                            base objective-function-type;
                          }
                          default
                            "te-types:of-minimize-cost-path";
                          description
                            "Objective function entry.";
                        }
                      }  // container objective-function
                    }  // case objective-function
                  }  // choice algorithm
                }  // container optimizations

                container path-properties {
                  config false;
                  description
                    "The TE path properties.";
                  list path-metric {
                    key "metric-type";
                    description
                      "TE path metric type.";
                    leaf metric-type {
                      type identityref {
                        base path-metric-type;
                      }
                      description
                        "TE path metric type.";
                    }

                    leaf accumulative-value {
                      type uint64;
                      description
                        "TE path metric accumulative value.";
                    }
                  }  // list path-metric

                  container path-affinities-values {
                    description
                      "Path affinities represented as values.";
                    list path-affinities-value {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of value affinity
constraints.";
                      }

                      leaf value {
                        type admin-groups;
                        default "";
                        description
                          "The affinity value.  The default is empty.";
                      }
                    }  // list path-affinities-value
                  }  // container path-affinities-values

                  container path-affinity-names {
                    description
                      "Path affinities represented as names.";
                    list path-affinity-name {
                      key "usage";
                      description
                        "List of named affinity constraints.";
                      leaf usage {
                        type identityref {
                          base resource-affinities-type;
                        }
                        description
                          "Identifies an entry in the list of named affinity
constraints.";
                      }

                      list affinity-name {
                        key "name";
                        description
                          "List of named affinities.";
                        leaf name {
                          type string;
                          description
                            "Identifies a named affinity entry.";
                        }
                      }  // list affinity-name
                    }  // list path-affinity-name
                  }  // container path-affinity-names

                  container path-srlgs-lists {
                    description
                      "Path SRLG properties container.";
                    list path-srlgs-list {
                      key "usage";
                      description
                        "List of SRLG values to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of SRLGs to either
include or exclude.";
                      }

                      leaf-list values {
                        type srlg;
                        description
                          "List of SRLG values.";
                      }
                    }  // list path-srlgs-list
                  }  // container path-srlgs-lists

                  container path-srlgs-names {
                    description
                      "Container for the list of named SRLGs.";
                    list path-srlgs-name {
                      key "usage";
                      description
                        "List of named SRLGs to be included or excluded.";
                      leaf usage {
                        type identityref {
                          base route-usage-type;
                        }
                        description
                          "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                      }

                      leaf-list names {
                        type string;
                        description
                          "List of named SRLGs.";
                      }
                    }  // list path-srlgs-name
                  }  // container path-srlgs-names

                  container path-route-objects {
                    description
                      "Container for the list of route objects either returned by
the computation engine or actually used by an LSP.";
                    list path-route-object {
                      key "index";
                      ordered-by user;
                      description
                        "List of route objects either returned by the computation
engine or actually used by an LSP.";
                      leaf index {
                        type uint32;
                        description
                          "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key
values.";
                      }

                      choice type {
                        description
                          "The explicit route entry type.";
                        container numbered-node-hop {
                          description
                            "Numbered node route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container numbered-node-hop
                        container numbered-link-hop {
                          description
                            "Numbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE Link Termination Point (LTP) identifier.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container numbered-link-hop
                        container unnumbered-link-hop {
                          description
                            "Unnumbered link explicit route hop.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                            Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                             RFC 3477: Signalling Unnumbered Links in Resource
                            ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                          leaf link-tp-id {
                            type te-tp-id;
                            mandatory true;
                            description
                              "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                          }

                          leaf node-id {
                            type te-node-id;
                            mandatory true;
                            description
                              "The identifier of a node in the TE topology.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }

                          leaf direction {
                            type te-link-direction;
                            default
                              "outgoing";
                            description
                              "Link route object direction.";
                          }
                        }  // container unnumbered-link-hop
                        container as-number-hop {
                          description
                            "AS explicit route hop.";
                          leaf as-number {
                            type inet:as-number;
                            mandatory true;
                            description
                              "The Autonomous System (AS) number.";
                          }

                          leaf hop-type {
                            type te-hop-type;
                            default "strict";
                            description
                              "Strict or loose hop.";
                          }
                        }  // container as-number-hop

                        case label {
                          description
                            "The label explicit route hop type.";
                          container label-hop {
                            description
                              "Label hop type.";
                            container te-label {
                              description
                                "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                              choice technology {
                                default
                                  "generic";
                                description
                                  "Data-plane technology type.";
                                leaf generic {
                                  type rt-types:generalized-label;
                                  description
                                    "TE label specified in a generic format.";
                                }
                              }  // choice technology

                              leaf direction {
                                type te-label-direction;
                                default
                                  "forward";
                                description
                                  "Label direction.";
                              }
                            }  // container te-label
                          }  // container label-hop
                        }  // case label
                      }  // choice type
                    }  // list path-route-object
                  }  // container path-route-objects
                }  // container path-properties

                list local-link-connectivity {
                  key "link-tp-ref";
                  description
                    "The termination capabilities between the TTP and the LTP.
This capability information can be used to compute
the tunnel path.
The Interface Adjustment Capability Descriptors (IACDs)
(defined in RFC 6001) on each LTP can be derived from
this list.";
                  reference
                    "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions
                    for Multi-Layer and Multi-Region Networks (MLN/MRN)";

                  leaf link-tp-ref {
                    type leafref {
                      path "../../../../../nt-s:termination-point/nt-s:tp-id";
                    }
                    description "LTP.";
                  }

                  container label-restrictions {
                    description
                      "The label restrictions container.";
                    list label-restriction {
                      key "index";
                      description
                        "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                      reference
                        "RFC 7579: General Network Element Constraint Encoding
                        for GMPLS-Controlled Networks";

                      leaf restriction {
                        type enumeration {
                          enum "inclusive" {
                            value 0;
                            description
                              "The label or label range is inclusive.";
                          }
                          enum "exclusive" {
                            value 1;
                            description
                              "The label or label range is exclusive.";
                          }
                        }
                        default "inclusive";
                        description
                          "Indicates whether the list item is inclusive or exclusive.";
                      }

                      leaf index {
                        type uint32;
                        description
                          "The index of the label restriction list entry.";
                      }

                      container label-start {
                        must
                          "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                          error-message
                            "'label-start' and 'label-end' must have the same direction.";
                        }
                        description
                          "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                        container te-label {
                          description
                            "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                          choice technology {
                            default
                              "generic";
                            description
                              "Data-plane technology type.";
                            leaf generic {
                              type rt-types:generalized-label;
                              description
                                "TE label specified in a generic format.";
                            }
                          }  // choice technology

                          leaf direction {
                            type te-label-direction;
                            default
                              "forward";
                            description
                              "Label direction.";
                          }
                        }  // container te-label
                      }  // container label-start

                      container label-end {
                        must
                          "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                          error-message
                            "'label-start' and 'label-end' must have the same direction.";
                        }
                        description
                          "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                        container te-label {
                          description
                            "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                          choice technology {
                            default
                              "generic";
                            description
                              "Data-plane technology type.";
                            leaf generic {
                              type rt-types:generalized-label;
                              description
                                "TE label specified in a generic format.";
                            }
                          }  // choice technology

                          leaf direction {
                            type te-label-direction;
                            default
                              "forward";
                            description
                              "Label direction.";
                          }
                        }  // container te-label
                      }  // container label-end

                      container label-step {
                        description
                          "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                        choice technology {
                          default "generic";
                          description
                            "Data-plane technology type.";
                          leaf generic {
                            type int32;
                            default "1";
                            description
                              "Label range step.";
                          }
                        }  // choice technology
                      }  // container label-step

                      leaf range-bitmap {
                        type yang:hex-string;
                        description
                          "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                      }
                    }  // list label-restriction
                  }  // container label-restrictions

                  leaf is-allowed {
                    type boolean;
                    description
                      "'true' - switching is allowed;
'false' - switching is disallowed.";
                  }

                  container underlay {
                    if-feature te-topology-hierarchy;
                    description
                      "Attributes of the TE link underlay.";
                    reference
                      "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                      Generalized Multi-Protocol Label Switching (GMPLS)
                      Traffic Engineering (TE)";

                    leaf enabled {
                      type boolean;
                      description
                        "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                    }

                    container primary-path {
                      description
                        "The service path on the underlay topology that
supports this link.";
                      leaf network-ref {
                        type leafref {
                          path "/nw:networks/nw:network/nw:network-id";
                          require-instance
                            false;
                        }
                        description
                          "Used to reference a network -- for example, an underlay
network.";
                      }

                      list path-element {
                        key "path-element-id";
                        description
                          "A list of path elements describing the service path.";
                        leaf path-element-id {
                          type uint32;
                          description
                            "To identify the element in a path.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-element
                    }  // container primary-path

                    list backup-path {
                      key "index";
                      description
                        "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                      leaf index {
                        type uint32;
                        description
                          "A sequence number to identify a backup path.";
                      }

                      leaf network-ref {
                        type leafref {
                          path "/nw:networks/nw:network/nw:network-id";
                          require-instance
                            false;
                        }
                        description
                          "Used to reference a network -- for example, an underlay
network.";
                      }

                      list path-element {
                        key "path-element-id";
                        description
                          "A list of path elements describing the backup service
path.";
                        leaf path-element-id {
                          type uint32;
                          description
                            "To identify the element in a path.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-element
                    }  // list backup-path

                    leaf protection-type {
                      type identityref {
                        base te-types:lsp-protection-type;
                      }
                      description
                        "Underlay protection type desired for this link.";
                    }

                    container tunnel-termination-points {
                      description
                        "Underlay TTPs desired for this link.";
                      leaf source {
                        type binary;
                        description
                          "Source TTP identifier.";
                      }

                      leaf destination {
                        type binary;
                        description
                          "Destination TTP identifier.";
                      }
                    }  // container tunnel-termination-points

                    container tunnels {
                      description
                        "Underlay TE tunnels supporting this TE link.";
                      leaf sharing {
                        type boolean;
                        default "true";
                        description
                          "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                      }

                      list tunnel {
                        key "tunnel-name";
                        description
                          "Zero, one, or more underlay TE tunnels that support this
TE link.";
                        leaf tunnel-name {
                          type string;
                          description
                            "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                          reference
                            "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                        }

                        leaf sharing {
                          type boolean;
                          description
                            "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                        }
                      }  // list tunnel
                    }  // container tunnels
                  }  // container underlay

                  container path-constraints {
                    description
                      "TE named path constraints container.";
                    container te-bandwidth {
                      description
                        "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type te-bandwidth;
                          description
                            "Bandwidth specified in a generic format.";
                        }
                      }  // choice technology
                    }  // container te-bandwidth

                    leaf link-protection {
                      type identityref {
                        base link-protection-type;
                      }
                      default
                        "te-types:link-protection-unprotected";
                      description
                        "Link protection type required for the links included
in the computed path.";
                      reference
                        "RFC 4202: Routing Extensions in Support of
                        Generalized Multi-Protocol Label Switching (GMPLS)";

                    }

                    leaf setup-priority {
                      type uint8 {
                        range "0..7";
                      }
                      default "7";
                      description
                        "TE LSP requested setup priority.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf hold-priority {
                      type uint8 {
                        range "0..7";
                      }
                      default "7";
                      description
                        "TE LSP requested hold priority.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf signaling-type {
                      type identityref {
                        base path-signaling-type;
                      }
                      default
                        "te-types:path-setup-rsvp";
                      description
                        "TE tunnel path signaling type.";
                    }

                    container path-metric-bounds {
                      description
                        "TE path metric bounds container.";
                      list path-metric-bound {
                        key "metric-type";
                        description
                          "List of TE path metric bounds.";
                        leaf metric-type {
                          type identityref {
                            base path-metric-type;
                          }
                          description
                            "Identifies an entry in the list of 'metric-type' items
bound for the TE path.";
                        }

                        leaf upper-bound {
                          type uint64;
                          default "0";
                          description
                            "Upper bound on the end-to-end TE path metric.  A zero
indicates an unbounded upper limit for the specific
'metric-type'.";
                        }
                      }  // list path-metric-bound
                    }  // container path-metric-bounds

                    container path-affinities-values {
                      description
                        "Path affinities represented as values.";
                      list path-affinities-value {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of value affinity
constraints.";
                        }

                        leaf value {
                          type admin-groups;
                          default "";
                          description
                            "The affinity value.  The default is empty.";
                        }
                      }  // list path-affinities-value
                    }  // container path-affinities-values

                    container path-affinity-names {
                      description
                        "Path affinities represented as names.";
                      list path-affinity-name {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of named affinity
constraints.";
                        }

                        list affinity-name {
                          key "name";
                          description
                            "List of named affinities.";
                          leaf name {
                            type string;
                            description
                              "Identifies a named affinity entry.";
                          }
                        }  // list affinity-name
                      }  // list path-affinity-name
                    }  // container path-affinity-names

                    container path-srlgs-lists {
                      description
                        "Path SRLG properties container.";
                      list path-srlgs-list {
                        key "usage";
                        description
                          "List of SRLG values to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of SRLGs to either
include or exclude.";
                        }

                        leaf-list values {
                          type srlg;
                          description
                            "List of SRLG values.";
                        }
                      }  // list path-srlgs-list
                    }  // container path-srlgs-lists

                    container path-srlgs-names {
                      description
                        "Container for the list of named SRLGs.";
                      list path-srlgs-name {
                        key "usage";
                        description
                          "List of named SRLGs to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                        }

                        leaf-list names {
                          type string;
                          description
                            "List of named SRLGs.";
                        }
                      }  // list path-srlgs-name
                    }  // container path-srlgs-names

                    leaf disjointness {
                      type te-path-disjointness;
                      description
                        "The type of resource disjointness.
When configured for a primary path, the disjointness level
applies to all secondary LSPs.  When configured for a
secondary path, the disjointness level overrides the level
configured for the primary path.";
                    }
                  }  // container path-constraints

                  container optimizations {
                    description
                      "The objective function container that includes
attributes to impose when computing a TE path.";
                    choice algorithm {
                      description
                        "Optimizations algorithm.";
                      case metric {
                        if-feature path-optimization-metric;
                        list optimization-metric {
                          key "metric-type";
                          description
                            "TE path metric type.";
                          leaf metric-type {
                            type identityref {
                              base path-metric-type;
                            }
                            description
                              "Identifies the 'metric-type' that the path computation
process uses for optimization.";
                          }

                          leaf weight {
                            type uint8;
                            default "1";
                            description
                              "TE path metric normalization weight.";
                          }

                          container explicit-route-exclude-objects {
                            when
                              "../metric-type = 'te-types:path-metric-optimize-excludes'";
                            description
                              "Container for the 'exclude route' object list.";
                            list route-object-exclude-object {
                              key "index";
                              ordered-by
                                user;
                              description
                                "List of Explicit Route Objects to be excluded in the
path computation.";
                              leaf index {
                                type uint32;
                                description
                                  "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                              }

                              choice type {
                                description
                                  "The explicit route entry type.";
                                container numbered-node-hop {
                                  description
                                    "Numbered node route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container numbered-node-hop
                                container numbered-link-hop {
                                  description
                                    "Numbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE Link Termination Point (LTP) identifier.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container numbered-link-hop
                                container unnumbered-link-hop {
                                  description
                                    "Unnumbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                  }

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container unnumbered-link-hop
                                container as-number-hop {
                                  description
                                    "AS explicit route hop.";
                                  leaf as-number {
                                    type inet:as-number;
                                    mandatory
                                      true;
                                    description
                                      "The Autonomous System (AS) number.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container as-number-hop

                                case label {
                                  description
                                    "The label explicit route hop type.";
                                  container label-hop {
                                    description
                                      "Label hop type.";
                                    container te-label {
                                      description
                                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                      choice technology {
                                        default
                                          "generic";
                                        description
                                          "Data-plane technology type.";
                                        leaf generic {
                                          type rt-types:generalized-label;
                                          description
                                            "TE label specified in a generic format.";
                                        }
                                      }  // choice technology

                                      leaf direction {
                                        type te-label-direction;
                                        default
                                          "forward";
                                        description
                                          "Label direction.";
                                      }
                                    }  // container te-label
                                  }  // container label-hop
                                }  // case label

                                case srlg {
                                  description
                                    "An SRLG value to be included or excluded.";
                                  container srlg {
                                    description
                                      "SRLG container.";
                                    leaf srlg {
                                      type uint32;
                                      description
                                        "SRLG value.";
                                    }
                                  }  // container srlg
                                }  // case srlg
                              }  // choice type
                            }  // list route-object-exclude-object
                          }  // container explicit-route-exclude-objects

                          container explicit-route-include-objects {
                            when
                              "../metric-type = 'te-types:path-metric-optimize-includes'";
                            description
                              "Container for the 'include route' object list.";
                            list route-object-include-object {
                              key "index";
                              ordered-by
                                user;
                              description
                                "List of Explicit Route Objects to be included in the
path computation.";
                              leaf index {
                                type uint32;
                                description
                                  "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key values.";
                              }

                              choice type {
                                description
                                  "The explicit route entry type.";
                                container numbered-node-hop {
                                  description
                                    "Numbered node route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container numbered-node-hop
                                container numbered-link-hop {
                                  description
                                    "Numbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE Link Termination Point (LTP) identifier.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container numbered-link-hop
                                container unnumbered-link-hop {
                                  description
                                    "Unnumbered link explicit route hop.";
                                  reference
                                    "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                                    Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                                     RFC 3477: Signalling Unnumbered Links in Resource
                                    ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                                  leaf link-tp-id {
                                    type te-tp-id;
                                    mandatory
                                      true;
                                    description
                                      "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                                  }

                                  leaf node-id {
                                    type te-node-id;
                                    mandatory
                                      true;
                                    description
                                      "The identifier of a node in the TE topology.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }

                                  leaf direction {
                                    type te-link-direction;
                                    default
                                      "outgoing";
                                    description
                                      "Link route object direction.";
                                  }
                                }  // container unnumbered-link-hop
                                container as-number-hop {
                                  description
                                    "AS explicit route hop.";
                                  leaf as-number {
                                    type inet:as-number;
                                    mandatory
                                      true;
                                    description
                                      "The Autonomous System (AS) number.";
                                  }

                                  leaf hop-type {
                                    type te-hop-type;
                                    default
                                      "strict";
                                    description
                                      "Strict or loose hop.";
                                  }
                                }  // container as-number-hop

                                case label {
                                  description
                                    "The label explicit route hop type.";
                                  container label-hop {
                                    description
                                      "Label hop type.";
                                    container te-label {
                                      description
                                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                      choice technology {
                                        default
                                          "generic";
                                        description
                                          "Data-plane technology type.";
                                        leaf generic {
                                          type rt-types:generalized-label;
                                          description
                                            "TE label specified in a generic format.";
                                        }
                                      }  // choice technology

                                      leaf direction {
                                        type te-label-direction;
                                        default
                                          "forward";
                                        description
                                          "Label direction.";
                                      }
                                    }  // container te-label
                                  }  // container label-hop
                                }  // case label
                              }  // choice type
                            }  // list route-object-include-object
                          }  // container explicit-route-include-objects
                        }  // list optimization-metric

                        container tiebreakers {
                          description
                            "Container for the list of tiebreakers.";
                          list tiebreaker {
                            key "tiebreaker-type";
                            description
                              "The list of tiebreaker criteria to apply on an
equally favored set of paths, in order to pick
the best.";
                            leaf tiebreaker-type {
                              type identityref {
                                base path-metric-type;
                              }
                              description
                                "Identifies an entry in the list of tiebreakers.";
                            }
                          }  // list tiebreaker
                        }  // container tiebreakers
                      }  // case metric

                      case objective-function {
                        if-feature path-optimization-objective-function;
                        container objective-function {
                          description
                            "The objective function container that includes
attributes to impose when computing a TE path.";
                          leaf objective-function-type {
                            type identityref {
                              base objective-function-type;
                            }
                            default
                              "te-types:of-minimize-cost-path";
                            description
                              "Objective function entry.";
                          }
                        }  // container objective-function
                      }  // case objective-function
                    }  // choice algorithm
                  }  // container optimizations

                  container path-properties {
                    config false;
                    description
                      "The TE path properties.";
                    list path-metric {
                      key "metric-type";
                      description
                        "TE path metric type.";
                      leaf metric-type {
                        type identityref {
                          base path-metric-type;
                        }
                        description
                          "TE path metric type.";
                      }

                      leaf accumulative-value {
                        type uint64;
                        description
                          "TE path metric accumulative value.";
                      }
                    }  // list path-metric

                    container path-affinities-values {
                      description
                        "Path affinities represented as values.";
                      list path-affinities-value {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of value affinity
constraints.";
                        }

                        leaf value {
                          type admin-groups;
                          default "";
                          description
                            "The affinity value.  The default is empty.";
                        }
                      }  // list path-affinities-value
                    }  // container path-affinities-values

                    container path-affinity-names {
                      description
                        "Path affinities represented as names.";
                      list path-affinity-name {
                        key "usage";
                        description
                          "List of named affinity constraints.";
                        leaf usage {
                          type identityref {
                            base resource-affinities-type;
                          }
                          description
                            "Identifies an entry in the list of named affinity
constraints.";
                        }

                        list affinity-name {
                          key "name";
                          description
                            "List of named affinities.";
                          leaf name {
                            type string;
                            description
                              "Identifies a named affinity entry.";
                          }
                        }  // list affinity-name
                      }  // list path-affinity-name
                    }  // container path-affinity-names

                    container path-srlgs-lists {
                      description
                        "Path SRLG properties container.";
                      list path-srlgs-list {
                        key "usage";
                        description
                          "List of SRLG values to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of SRLGs to either
include or exclude.";
                        }

                        leaf-list values {
                          type srlg;
                          description
                            "List of SRLG values.";
                        }
                      }  // list path-srlgs-list
                    }  // container path-srlgs-lists

                    container path-srlgs-names {
                      description
                        "Container for the list of named SRLGs.";
                      list path-srlgs-name {
                        key "usage";
                        description
                          "List of named SRLGs to be included or excluded.";
                        leaf usage {
                          type identityref {
                            base route-usage-type;
                          }
                          description
                            "Identifies an entry in a list of named SRLGs to either
include or exclude.";
                        }

                        leaf-list names {
                          type string;
                          description
                            "List of named SRLGs.";
                        }
                      }  // list path-srlgs-name
                    }  // container path-srlgs-names

                    container path-route-objects {
                      description
                        "Container for the list of route objects either returned by
the computation engine or actually used by an LSP.";
                      list path-route-object {
                        key "index";
                        ordered-by user;
                        description
                          "List of route objects either returned by the computation
engine or actually used by an LSP.";
                        leaf index {
                          type uint32;
                          description
                            "Route object entry index.  The index is used to
identify an entry in the list.  The order of entries
is defined by the user without relying on key
values.";
                        }

                        choice type {
                          description
                            "The explicit route entry type.";
                          container numbered-node-hop {
                            description
                              "Numbered node route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container numbered-node-hop
                          container numbered-link-hop {
                            description
                              "Numbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE Link Termination Point (LTP) identifier.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container numbered-link-hop
                          container unnumbered-link-hop {
                            description
                              "Unnumbered link explicit route hop.";
                            reference
                              "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                              Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                               RFC 3477: Signalling Unnumbered Links in Resource
                              ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                            leaf link-tp-id {
                              type te-tp-id;
                              mandatory
                                true;
                              description
                                "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                            }

                            leaf node-id {
                              type te-node-id;
                              mandatory
                                true;
                              description
                                "The identifier of a node in the TE topology.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }

                            leaf direction {
                              type te-link-direction;
                              default
                                "outgoing";
                              description
                                "Link route object direction.";
                            }
                          }  // container unnumbered-link-hop
                          container as-number-hop {
                            description
                              "AS explicit route hop.";
                            leaf as-number {
                              type inet:as-number;
                              mandatory
                                true;
                              description
                                "The Autonomous System (AS) number.";
                            }

                            leaf hop-type {
                              type te-hop-type;
                              default
                                "strict";
                              description
                                "Strict or loose hop.";
                            }
                          }  // container as-number-hop

                          case label {
                            description
                              "The label explicit route hop type.";
                            container label-hop {
                              description
                                "Label hop type.";
                              container te-label {
                                description
                                  "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                                choice technology {
                                  default
                                    "generic";
                                  description
                                    "Data-plane technology type.";
                                  leaf generic {
                                    type rt-types:generalized-label;
                                    description
                                      "TE label specified in a generic format.";
                                  }
                                }  // choice technology

                                leaf direction {
                                  type te-label-direction;
                                  default
                                    "forward";
                                  description
                                    "Label direction.";
                                }
                              }  // container te-label
                            }  // container label-hop
                          }  // case label
                        }  // choice type
                      }  // list path-route-object
                    }  // container path-route-objects
                  }  // container path-properties
                }  // list local-link-connectivity
              }  // container local-link-connectivities

              leaf oper-status {
                type te-types:te-oper-status;
                config false;
                description
                  "The current operational state of the TTP.";
              }

              container geolocation {
                config false;
                description
                  "Contains a GPS location.";
                leaf altitude {
                  type int64;
                  units "millimeters";
                  description
                    "Distance above sea level.";
                }

                leaf latitude {
                  type geographic-coordinate-degree {
                    fraction-digits 0;
                    range "-90..90";
                  }
                  description
                    "Relative position north or south on the Earth's surface.";
                }

                leaf longitude {
                  type geographic-coordinate-degree {
                    fraction-digits 0;
                    range "-180..180";
                  }
                  description
                    "Angular distance east or west on the Earth's surface.";
                }
              }  // container geolocation

              container statistics {
                config false;
                description
                  "Statistics data.";
                leaf discontinuity-time {
                  type yang:date-and-time;
                  description
                    "The time of the most recent occasion at which any one or
more of this interface's counters suffered a
discontinuity.  If no such discontinuities have occurred
since the last re-initialization of the local management
subsystem, then this node contains the time the local
management subsystem re-initialized itself.";
                }

                container tunnel-termination-point {
                  description
                    "Contains statistics attributes at the TE TTP level.";
                  leaf disables {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was disabled.";
                  }

                  leaf enables {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was enabled.";
                  }

                  leaf maintenance-clears {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was taken out of maintenance.";
                  }

                  leaf maintenance-sets {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was put in maintenance.";
                  }

                  leaf modifies {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was modified.";
                  }

                  leaf downs {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was set to an operational state
of 'down'.";
                  }

                  leaf ups {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was set to an operational state
of 'up'.";
                  }

                  leaf in-service-clears {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was taken out of service
(TE tunnel was released).";
                  }

                  leaf in-service-sets {
                    type yang:counter32;
                    description
                      "Number of times that a TTP was put in service by a TE
tunnel (TE tunnel was set up).";
                  }
                }  // container tunnel-termination-point

                container local-link-connectivity {
                  description
                    "Contains statistics attributes at the TE LLCL (Local Link
Connectivity List) level.";
                  leaf creates {
                    type yang:counter32;
                    description
                      "Number of times that an LLCL entry was created.";
                    reference
                      "RFC 6241: Network Configuration Protocol (NETCONF),
                      	  Section 7.2, 'create' operation";

                  }

                  leaf deletes {
                    type yang:counter32;
                    description
                      "Number of times that an LLCL entry was deleted.";
                    reference
                      "RFC 6241: Network Configuration Protocol (NETCONF),
                      	  Section 7.2, 'delete' operation";

                  }

                  leaf disables {
                    type yang:counter32;
                    description
                      "Number of times that an LLCL entry was disabled.";
                  }

                  leaf enables {
                    type yang:counter32;
                    description
                      "Number of times that an LLCL entry was enabled.";
                  }

                  leaf modifies {
                    type yang:counter32;
                    description
                      "Number of times that an LLCL entry was modified.";
                  }
                }  // container local-link-connectivity
              }  // container statistics

              list supporting-tunnel-termination-point {
                key "node-ref tunnel-tp-ref";
                description
                  "Identifies the TTPs on which this TTP depends.";
                leaf node-ref {
                  type inet:uri;
                  description
                    "This leaf identifies the node in which the supporting
TTP is present.
This node is either the supporting node or a node in
an underlay topology.";
                }

                leaf tunnel-tp-ref {
                  type binary;
                  description
                    "Reference to a TTP that is in either the supporting node
or a node in an underlay topology.";
                }
              }  // list supporting-tunnel-termination-point
            }  // list tunnel-termination-point
          }  // container te

          container l3-node-attributes {
            description
              "Contains node attributes";
            leaf name {
              type inet:domain-name;
              description "Node name";
            }

            leaf-list flag {
              type node-flag-type;
              description "Node flags";
            }

            leaf-list router-id {
              type rt-types:router-id;
              description
                "Router-id for the node";
            }

            list prefix {
              key "prefix";
              description
                "A list of prefixes along with their attributes";
              leaf prefix {
                type inet:ip-prefix;
                description
                  "IP prefix value";
              }

              leaf metric {
                type uint32;
                description "Prefix metric";
              }

              leaf-list flag {
                type prefix-flag-type;
                description "Prefix flags";
              }
            }  // list prefix
          }  // container l3-node-attributes
        }  // list node

        list link {
          key "link-id";
          description
            "A network link connects a local (source) node and
a remote (destination) node via a set of the respective
node's termination points.  It is possible to have several
links between the same source and destination nodes.
Likewise, a link could potentially be re-homed between
termination points.  Therefore, in order to ensure that we
would always know to distinguish between links, every link
is identified by a dedicated link identifier.  Note that a
link models a point-to-point link, not a multipoint link.";
          container source {
            description
              "This container holds the logical source of a particular
link.";
            leaf source-node {
              type leafref {
                path "../../../nw-s:node/nw-s:node-id";
                require-instance false;
              }
              description
                "Source node identifier.  Must be in the same topology.";
            }

            leaf source-tp {
              type leafref {
                path "../../../nw-s:node[nw-s:node-id=current()/../source-node]/termination-point/tp-id";
                require-instance false;
              }
              description
                "This termination point is located within the source node
and terminates the link.";
            }
          }  // container source

          container destination {
            description
              "This container holds the logical destination of a
particular link.";
            leaf dest-node {
              type leafref {
                path "../../../nw-s:node/nw-s:node-id";
                require-instance false;
              }
              description
                "Destination node identifier.  Must be in the same
network.";
            }

            leaf dest-tp {
              type leafref {
                path "../../../nw-s:node[nw-s:node-id=current()/../dest-node]/termination-point/tp-id";
                require-instance false;
              }
              description
                "This termination point is located within the
destination node and terminates the link.";
            }
          }  // container destination

          leaf link-id {
            type nt:link-id;
            description
              "The identifier of a link in the topology.
A link is specific to a topology to which it belongs.";
          }

          list supporting-link {
            key "network-ref link-ref";
            description
              "Identifies the link or links on which this link depends.";
            leaf network-ref {
              type leafref {
                path "../../../nw-s:supporting-network/nw-s:network-ref";
                require-instance false;
              }
              description
                "This leaf identifies in which underlay topology
the supporting link is present.";
            }

            leaf link-ref {
              type leafref {
                path "/nw-s:networks/nw-s:network[nw-s:network-id=current()/../network-ref]/link/link-id";
                require-instance false;
              }
              description
                "This leaf identifies a link that is a part
of this link's underlay.  Reference loops in which
a link identifies itself as its underlay, either
directly or transitively, are not allowed.";
            }
          }  // list supporting-link

          container te {
            must
              "count(../nt-s:supporting-link)<=1" {
              description
                "For a link in a TE topology, there cannot be more
than one supporting link.  If one or more link paths are
abstracted, the underlay is used.";
            }
            presence "TE support";
            description
              "Indicates TE support.";
            choice bundle-stack-level {
              description
                "The TE link can be partitioned into bundled links or
component links.";
              container bundled-links {
                description
                  "A set of bundled links.";
                reference
                  "RFC 4201: Link Bundling in MPLS Traffic
                  Engineering (TE)";

                list bundled-link {
                  key "sequence";
                  description
                    "Specifies a bundled interface that is
further partitioned.";
                  leaf sequence {
                    type uint32;
                    description
                      "Identifies the sequence in the bundle.";
                  }

                  leaf src-tp-ref {
                    type leafref {
                      path "../../../../../nw-s:node[nw-s:node-id = current()/../../../../nt-s:source/nt-s:source-node]/nt-s:termination-point/nt-s:tp-id";
                      require-instance
                        true;
                    }
                    description
                      "Reference to another TE termination point on the
same source node.";
                  }

                  leaf des-tp-ref {
                    type leafref {
                      path "../../../../../nw-s:node[nw-s:node-id = current()/../../../../nt-s:destination/nt-s:dest-node]/nt-s:termination-point/nt-s:tp-id";
                      require-instance
                        true;
                    }
                    description
                      "Reference to another TE termination point on the
same destination node.";
                  }
                }  // list bundled-link
              }  // container bundled-links
              container component-links {
                description
                  "A set of component links.";
                list component-link {
                  key "sequence";
                  description
                    "Specifies a component interface that is
sufficient to unambiguously identify the
appropriate resources.";
                  leaf sequence {
                    type uint32;
                    description
                      "Identifies the sequence in the bundle.";
                  }

                  leaf src-interface-ref {
                    type string;
                    description
                      "Reference to a component link interface on the
source node.";
                  }

                  leaf des-interface-ref {
                    type string;
                    description
                      "Reference to a component link interface on the
destination node.";
                  }
                }  // list component-link
              }  // container component-links
            }  // choice bundle-stack-level

            leaf-list te-link-template {
              if-feature template;
              type leafref {
                path "../../../../te/templates/link-template/name";
              }
              description
                "The reference to a TE link template.";
            }

            container te-link-attributes {
              description
                "Link attributes in a TE topology.";
              leaf access-type {
                type te-types:te-link-access-type;
                description
                  "Link access type, which can be point-to-point or
multi-access.";
              }

              container external-domain {
                description
                  "For an inter-domain link, specifies the attributes of
the remote end of the link, to facilitate the signaling at
the local end.";
                leaf network-ref {
                  type leafref {
                    path "/nw:networks/nw:network/nw:network-id";
                    require-instance false;
                  }
                  description
                    "Used to reference a network -- for example, an underlay
network.";
                }

                leaf remote-te-node-id {
                  type te-types:te-node-id;
                  description
                    "Remote TE node identifier, used together with
'remote-te-link-tp-id' to identify the remote Link
Termination Point (LTP) in a different domain.";
                }

                leaf remote-te-link-tp-id {
                  type te-types:te-tp-id;
                  description
                    "Remote TE LTP identifier, used together with
'remote-te-node-id' to identify the remote LTP in a
different domain.";
                }
              }  // container external-domain

              leaf is-abstract {
                type empty;
                description
                  "Present if the link is abstract.";
              }

              leaf name {
                type string;
                description "Link name.";
              }

              container underlay {
                if-feature te-topology-hierarchy;
                description
                  "Attributes of the TE link underlay.";
                reference
                  "RFC 4206: Label Switched Paths (LSP) Hierarchy with
                  Generalized Multi-Protocol Label Switching (GMPLS)
                  Traffic Engineering (TE)";

                leaf enabled {
                  type boolean;
                  description
                    "'true' if the underlay is enabled.
'false' if the underlay is disabled.";
                }

                container primary-path {
                  description
                    "The service path on the underlay topology that
supports this link.";
                  leaf network-ref {
                    type leafref {
                      path "/nw:networks/nw:network/nw:network-id";
                      require-instance
                        false;
                    }
                    description
                      "Used to reference a network -- for example, an underlay
network.";
                  }

                  list path-element {
                    key "path-element-id";
                    description
                      "A list of path elements describing the service path.";
                    leaf path-element-id {
                      type uint32;
                      description
                        "To identify the element in a path.";
                    }

                    choice type {
                      description
                        "The explicit route entry type.";
                      container numbered-node-hop {
                        description
                          "Numbered node route hop.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                          Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                           RFC 3477: Signalling Unnumbered Links in Resource
                          ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                        leaf node-id {
                          type te-node-id;
                          mandatory true;
                          description
                            "The identifier of a node in the TE topology.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }
                      }  // container numbered-node-hop
                      container numbered-link-hop {
                        description
                          "Numbered link explicit route hop.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                          Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                           RFC 3477: Signalling Unnumbered Links in Resource
                          ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                        leaf link-tp-id {
                          type te-tp-id;
                          mandatory true;
                          description
                            "TE Link Termination Point (LTP) identifier.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }

                        leaf direction {
                          type te-link-direction;
                          default "outgoing";
                          description
                            "Link route object direction.";
                        }
                      }  // container numbered-link-hop
                      container unnumbered-link-hop {
                        description
                          "Unnumbered link explicit route hop.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                          Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                           RFC 3477: Signalling Unnumbered Links in Resource
                          ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                        leaf link-tp-id {
                          type te-tp-id;
                          mandatory true;
                          description
                            "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                        }

                        leaf node-id {
                          type te-node-id;
                          mandatory true;
                          description
                            "The identifier of a node in the TE topology.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }

                        leaf direction {
                          type te-link-direction;
                          default "outgoing";
                          description
                            "Link route object direction.";
                        }
                      }  // container unnumbered-link-hop
                      container as-number-hop {
                        description
                          "AS explicit route hop.";
                        leaf as-number {
                          type inet:as-number;
                          mandatory true;
                          description
                            "The Autonomous System (AS) number.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }
                      }  // container as-number-hop

                      case label {
                        description
                          "The label explicit route hop type.";
                        container label-hop {
                          description
                            "Label hop type.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-hop
                      }  // case label
                    }  // choice type
                  }  // list path-element
                }  // container primary-path

                list backup-path {
                  key "index";
                  description
                    "A list of backup service paths on the underlay topology that
protect the underlay primary path.  If the primary path is
not protected, the list contains zero elements.  If the
primary path is protected, the list contains one or more
elements.";
                  leaf index {
                    type uint32;
                    description
                      "A sequence number to identify a backup path.";
                  }

                  leaf network-ref {
                    type leafref {
                      path "/nw:networks/nw:network/nw:network-id";
                      require-instance
                        false;
                    }
                    description
                      "Used to reference a network -- for example, an underlay
network.";
                  }

                  list path-element {
                    key "path-element-id";
                    description
                      "A list of path elements describing the backup service
path.";
                    leaf path-element-id {
                      type uint32;
                      description
                        "To identify the element in a path.";
                    }

                    choice type {
                      description
                        "The explicit route entry type.";
                      container numbered-node-hop {
                        description
                          "Numbered node route hop.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                          Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                           RFC 3477: Signalling Unnumbered Links in Resource
                          ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                        leaf node-id {
                          type te-node-id;
                          mandatory true;
                          description
                            "The identifier of a node in the TE topology.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }
                      }  // container numbered-node-hop
                      container numbered-link-hop {
                        description
                          "Numbered link explicit route hop.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                          Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                           RFC 3477: Signalling Unnumbered Links in Resource
                          ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                        leaf link-tp-id {
                          type te-tp-id;
                          mandatory true;
                          description
                            "TE Link Termination Point (LTP) identifier.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }

                        leaf direction {
                          type te-link-direction;
                          default "outgoing";
                          description
                            "Link route object direction.";
                        }
                      }  // container numbered-link-hop
                      container unnumbered-link-hop {
                        description
                          "Unnumbered link explicit route hop.";
                        reference
                          "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels,
                          Section 4.3, EXPLICIT_ROUTE in RSVP-TE
                           RFC 3477: Signalling Unnumbered Links in Resource
                          ReSerVation Protocol - Traffic Engineering (RSVP-TE)";

                        leaf link-tp-id {
                          type te-tp-id;
                          mandatory true;
                          description
                            "TE LTP identifier.  The combination of the TE link ID
and the TE node ID is used to identify an unnumbered
TE link.";
                        }

                        leaf node-id {
                          type te-node-id;
                          mandatory true;
                          description
                            "The identifier of a node in the TE topology.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }

                        leaf direction {
                          type te-link-direction;
                          default "outgoing";
                          description
                            "Link route object direction.";
                        }
                      }  // container unnumbered-link-hop
                      container as-number-hop {
                        description
                          "AS explicit route hop.";
                        leaf as-number {
                          type inet:as-number;
                          mandatory true;
                          description
                            "The Autonomous System (AS) number.";
                        }

                        leaf hop-type {
                          type te-hop-type;
                          default "strict";
                          description
                            "Strict or loose hop.";
                        }
                      }  // container as-number-hop

                      case label {
                        description
                          "The label explicit route hop type.";
                        container label-hop {
                          description
                            "Label hop type.";
                          container te-label {
                            description
                              "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                            choice technology {
                              default
                                "generic";
                              description
                                "Data-plane technology type.";
                              leaf generic {
                                type rt-types:generalized-label;
                                description
                                  "TE label specified in a generic format.";
                              }
                            }  // choice technology

                            leaf direction {
                              type te-label-direction;
                              default
                                "forward";
                              description
                                "Label direction.";
                            }
                          }  // container te-label
                        }  // container label-hop
                      }  // case label
                    }  // choice type
                  }  // list path-element
                }  // list backup-path

                leaf protection-type {
                  type identityref {
                    base te-types:lsp-protection-type;
                  }
                  description
                    "Underlay protection type desired for this link.";
                }

                container tunnel-termination-points {
                  description
                    "Underlay TTPs desired for this link.";
                  leaf source {
                    type binary;
                    description
                      "Source TTP identifier.";
                  }

                  leaf destination {
                    type binary;
                    description
                      "Destination TTP identifier.";
                  }
                }  // container tunnel-termination-points

                container tunnels {
                  description
                    "Underlay TE tunnels supporting this TE link.";
                  leaf sharing {
                    type boolean;
                    default "true";
                    description
                      "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.
This leaf is the default option for all TE tunnels
and may be overridden by the per-TE-tunnel value.";
                  }

                  list tunnel {
                    key "tunnel-name";
                    description
                      "Zero, one, or more underlay TE tunnels that support this
TE link.";
                    leaf tunnel-name {
                      type string;
                      description
                        "A tunnel name uniquely identifies an underlay TE tunnel,
used together with the 'source-node' value for this
link.";
                      reference
                        "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels";

                    }

                    leaf sharing {
                      type boolean;
                      description
                        "'true' if the underlay tunnel can be shared with other
TE links;
'false' if the underlay tunnel is dedicated to this
TE link.";
                    }
                  }  // list tunnel
                }  // container tunnels
              }  // container underlay

              leaf admin-status {
                type te-types:te-admin-status;
                description
                  "The administrative state of the link.";
              }

              leaf link-index {
                type uint64;
                description
                  "The link identifier.  If OSPF is used, this object
represents an ospfLsdbID.  If IS-IS is used, this object
represents an isisLSPID.  If a locally configured link is
used, this object represents a unique value, which is
locally defined in a router.";
              }

              leaf administrative-group {
                type te-types:admin-groups;
                description
                  "Administrative group or color of the link.
This attribute covers both administrative groups (defined
in RFCs 3630 and 5305) and Extended Administrative Groups
(defined in RFC 7308).";
                reference
                  "RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                  Version 2
                   RFC 5305: IS-IS Extensions for Traffic Engineering
                   RFC 7308: Extended Administrative Groups in MPLS Traffic
                  Engineering (MPLS-TE)";

              }

              list interface-switching-capability {
                key "switching-capability encoding";
                description
                  "List of ISCDs for this link.";
                reference
                  "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS)
                  Signaling Functional Description
                   RFC 4203: OSPF Extensions in Support of Generalized
                  Multi-Protocol Label Switching (GMPLS)";

                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.";
                }

                list max-lsp-bandwidth {
                  key "priority";
                  max-elements 8;
                  description
                    "Maximum Label Switched Path (LSP) bandwidth at
priorities 0-7.";
                  leaf priority {
                    type uint8 {
                      range "0..7";
                    }
                    description "Priority.";
                  }

                  container te-bandwidth {
                    description
                      "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type te-bandwidth;
                        description
                          "Bandwidth specified in a generic format.";
                      }
                    }  // choice technology
                  }  // container te-bandwidth
                }  // list max-lsp-bandwidth
              }  // list interface-switching-capability

              container label-restrictions {
                description
                  "The label restrictions container.";
                list label-restriction {
                  key "index";
                  description
                    "The absence of the label restrictions container implies
that all labels are acceptable; otherwise, only restricted
labels are available.";
                  reference
                    "RFC 7579: General Network Element Constraint Encoding
                    for GMPLS-Controlled Networks";

                  leaf restriction {
                    type enumeration {
                      enum "inclusive" {
                        value 0;
                        description
                          "The label or label range is inclusive.";
                      }
                      enum "exclusive" {
                        value 1;
                        description
                          "The label or label range is exclusive.";
                      }
                    }
                    default "inclusive";
                    description
                      "Indicates whether the list item is inclusive or exclusive.";
                  }

                  leaf index {
                    type uint32;
                    description
                      "The index of the label restriction list entry.";
                  }

                  container label-start {
                    must
                      "(not(../label-end/te-label/direction) and not(te-label/direction)) or (../label-end/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-end/te-label/direction = 'forward')) or (not(../label-end/te-label/direction) and (te-label/direction = 'forward'))" {
                      error-message
                        "'label-start' and 'label-end' must have the same direction.";
                    }
                    description
                      "This is the starting label if a label range is specified.
This is the label value if a single label is specified,
in which case the 'label-end' attribute is not set.";
                    container te-label {
                      description
                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type rt-types:generalized-label;
                          description
                            "TE label specified in a generic format.";
                        }
                      }  // choice technology

                      leaf direction {
                        type te-label-direction;
                        default "forward";
                        description
                          "Label direction.";
                      }
                    }  // container te-label
                  }  // container label-start

                  container label-end {
                    must
                      "(not(../label-start/te-label/direction) and not(te-label/direction)) or (../label-start/te-label/direction = te-label/direction) or (not(te-label/direction) and (../label-start/te-label/direction = 'forward')) or (not(../label-start/te-label/direction) and (te-label/direction = 'forward'))" {
                      error-message
                        "'label-start' and 'label-end' must have the same direction.";
                    }
                    description
                      "This is the ending label if a label range is specified.
This attribute is not set if a single label is specified.";
                    container te-label {
                      description
                        "Container that specifies the TE label.  The choices can
be augmented for specific data-plane technologies.";
                      choice technology {
                        default "generic";
                        description
                          "Data-plane technology type.";
                        leaf generic {
                          type rt-types:generalized-label;
                          description
                            "TE label specified in a generic format.";
                        }
                      }  // choice technology

                      leaf direction {
                        type te-label-direction;
                        default "forward";
                        description
                          "Label direction.";
                      }
                    }  // container te-label
                  }  // container label-end

                  container label-step {
                    description
                      "The step increment between labels in the label range.
The label start/end values will have to be consistent
with the sign of label step.  For example,
'label-start' < 'label-end' enforces 'label-step' > 0
'label-start' > 'label-end' enforces 'label-step' < 0.";
                    choice technology {
                      default "generic";
                      description
                        "Data-plane technology type.";
                      leaf generic {
                        type int32;
                        default "1";
                        description
                          "Label range step.";
                      }
                    }  // choice technology
                  }  // container label-step

                  leaf range-bitmap {
                    type yang:hex-string;
                    description
                      "When there are gaps between 'label-start' and 'label-end',
this attribute is used to specify the positions
of the used labels.  This is represented in big endian as
'hex-string'.
The most significant byte in the hex-string is the farthest
to the left in the byte sequence.  Leading zero bytes in the
configured value may be omitted for brevity.
Each bit position in the 'range-bitmap' 'hex-string' maps
to a label in the range derived from 'label-start'.

For example, assuming that 'label-start' = 16000 and
'range-bitmap' = 0x01000001, then:

- bit position (0) is set, and the corresponding mapped
  label from the range is 16000 + (0 * 'label-step') or
  16000 for default 'label-step' = 1.
- bit position (24) is set, and the corresponding mapped
  label from the range is 16000 + (24 * 'label-step') or
  16024 for default 'label-step' = 1.";
                  }
                }  // list label-restriction
              }  // container label-restrictions

              leaf link-protection-type {
                type identityref {
                  base te-types:link-protection-type;
                }
                description
                  "Link Protection Type desired for this link.";
                reference
                  "RFC 4202: Routing Extensions in Support of
                  Generalized Multi-Protocol Label Switching (GMPLS)";

              }

              container max-link-bandwidth {
                description
                  "Maximum bandwidth that can be seen on this link in this
direction.  Units are in bytes per second.";
                reference
                  "RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                  Version 2
                   RFC 5305: IS-IS Extensions for Traffic Engineering";

                container te-bandwidth {
                  description
                    "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                  choice technology {
                    default "generic";
                    description
                      "Data-plane technology type.";
                    leaf generic {
                      type te-bandwidth;
                      description
                        "Bandwidth specified in a generic format.";
                    }
                  }  // choice technology
                }  // container te-bandwidth
              }  // container max-link-bandwidth

              container max-resv-link-bandwidth {
                description
                  "Maximum amount of bandwidth that can be reserved in this
direction in this link.  Units are in bytes per second.";
                reference
                  "RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                  Version 2
                   RFC 5305: IS-IS Extensions for Traffic Engineering";

                container te-bandwidth {
                  description
                    "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                  choice technology {
                    default "generic";
                    description
                      "Data-plane technology type.";
                    leaf generic {
                      type te-bandwidth;
                      description
                        "Bandwidth specified in a generic format.";
                    }
                  }  // choice technology
                }  // container te-bandwidth
              }  // container max-resv-link-bandwidth

              list unreserved-bandwidth {
                key "priority";
                max-elements 8;
                description
                  "Unreserved bandwidth for priority levels 0-7.  Units are in
bytes per second.";
                reference
                  "RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                  Version 2
                   RFC 5305: IS-IS Extensions for Traffic Engineering";

                leaf priority {
                  type uint8 {
                    range "0..7";
                  }
                  description "Priority.";
                }

                container te-bandwidth {
                  description
                    "Container that specifies TE bandwidth.  The choices
can be augmented for specific data-plane technologies.";
                  choice technology {
                    default "generic";
                    description
                      "Data-plane technology type.";
                    leaf generic {
                      type te-bandwidth;
                      description
                        "Bandwidth specified in a generic format.";
                    }
                  }  // choice technology
                }  // container te-bandwidth
              }  // list unreserved-bandwidth

              leaf te-default-metric {
                type uint32;
                description
                  "Traffic Engineering metric.";
                reference
                  "RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                  Version 2
                   RFC 5305: IS-IS Extensions for Traffic Engineering";

              }

              leaf te-delay-metric {
                type uint32;
                description
                  "Traffic Engineering delay metric.";
                reference
                  "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions";

              }

              leaf te-igp-metric {
                type uint32;
                description
                  "IGP metric used for Traffic Engineering.";
                reference
                  "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a
                  second MPLS Traffic Engineering (TE) Metric";

              }

              container te-srlgs {
                description
                  "Contains a list of SRLGs.";
                leaf-list value {
                  type te-types:srlg;
                  description "SRLG value.";
                  reference
                    "