Skip to main content

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

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Active".
Authors Tarek Saad , Rakesh Gandhi , Xufeng Liu , Vishnu Pavan Beeram , Himanshu C. Shah , Xia Chen , Raqib Jones , Bin Wen
Last updated 2015-09-17
RFC stream Internet Engineering Task Force (IETF)
Formats
Reviews
Additional resources Mailing list discussion
Stream WG state WG Document
Document shepherd (None)
IESG IESG state I-D Exists
Consensus boilerplate Unknown
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-ietf-teas-yang-te-00
quot;urn:ietf:params:xml:ns:yang:ietf-te-psc-types";

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

     import ietf-inet-types { prefix inet; }

     organization
       "IETF TEAS Working Group";

     contact "Fill me";

Saad, et al.             Expires January 7, 2016               [Page 48]
Internet-Draft             TE YANG Data Model                  July 2015

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

     revision 2015-07-06 {
       description "Latest revision of TE MPLS/packet types";
       reference "RFC3209";
     }

     /* Describes egress LSP label allocation */
     typedef egress-label {
       type enumeration {
         enum "IPv4-EXPLICIT-NULL" {
           description
             "Use IPv4 explicit-NULL MPLS label at the
             egress";
         }
         enum "IPv6-EXPLICIT-NULL" {
           description
             "Use IPv6 explicit-NULL MPLS label at the
             egress";
         }
         enum "IMPLICIT-NULL" {
           description
             "Use implicit-NULL MPLS label at the egress";
         }
         enum "NON-NULL"{
           description
           "Use a non NULL MPLS label at the egress";
       }
       }
       description
         "Describes egress label allocation";
     }

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

     identity backup-facility {
       base backup-type;
       description
         "Use facility backup to protect LSPs traversing
         protected TE interface";
       reference
         "RFC49090: RSVP-TE Fast Reroute";
     }

Saad, et al.             Expires January 7, 2016               [Page 49]
Internet-Draft             TE YANG Data Model                  July 2015

     identity backup-detour {
       base backup-type;
       description
         "Use detour or 1-for-1 protection";
       reference
         "RFC49090: RSVP-TE Fast Reroute";
     }

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

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

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

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

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

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

     identity bc-model-mar {
       base bc-model-type;
       description
         "Maximum Allocation with Reservation

Saad, et al.             Expires January 7, 2016               [Page 50]
Internet-Draft             TE YANG Data Model                  July 2015

         bandwidth constraint model type.";
     }

     grouping bandwidth-constraint-values {
       description
         "Packet bandwidth contraints values";
       choice value-type {
         description
           "Value representation";
         case percentages {
           container perc-values {
             uses bandwidth-psc-constraints;
             description
               "Percentage values";
           }
         }
         case absolutes {
           container abs-values {
             uses bandwidth-psc-constraints;
             description
               "Absolute values";
           }
         }
       }
     }

     grouping bandwidth-psc-reservable {
       description
         "Packet reservable bandwidth";
       choice bandwidth-value {
         description "Reservable bandwidth configuraiton choice";
         case absolute {
           leaf absolute-value {
             type uint32;
             description "Absolute value of the bandwidth";
           }
         }
         case precentage {
           leaf percent-value {
             type uint32 {
               range "0..4294967295";
             }
             description "Percentage reservable bandwidth";
           }
           description
             "The maximum reservable bandwidth on the
             interface";
         }

Saad, et al.             Expires January 7, 2016               [Page 51]
Internet-Draft             TE YANG Data Model                  July 2015

       }
       choice bc-model-type {
         description
           "Reservable bandwidth percentage capacity
           values.";
         case bc-model-rdm {
           container bc-model-rdm {
             description
               "Russian Doll Model Bandwidth Constraints.";
             uses bandwidth-psc-constraints;
           }
         }
         case bc-model-mam {
           container bc-model-mam {
             uses bandwidth-psc-constraints;
             description
               "Maximum Allocation Model Bandwidth
               Constraints.";
           }
         }
         case bc-model-mar {
           container bc-model-mar {
             uses bandwidth-psc-constraints;
             description
               "Maximum Allocation with Reservation Model
               Bandwidth Constraints.";
           }
         }
       }
     }

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

     typedef bfd-encap-mode-type {
       type enumeration {
         enum gal {

Saad, et al.             Expires January 7, 2016               [Page 52]
Internet-Draft             TE YANG Data Model                  July 2015

           description
             "BFD with GAL mode";
         }
         enum ip {
           description
             "BFD with IP mode";
         }
       }
       default ip;
       description
         "Possible BFD transport modes when running over TE
         LSPs.";
     }

     grouping bandwidth-psc-constraints {
       description "Bandwidth constraints.";
       container bandwidth-psc-constraints {
         description
           "Holds the bandwidth contraints properties";
         leaf maximum-reservable {
           type uint32 {
             range "0..4294967295";
           }
           description
             "The maximum reservable bandwidth on the
             interface";
         }
         leaf-list bc-value {
           type uint32 {
             range "0..4294967295";
           }
           max-elements 8;
           description
             "The bandwidth contraint type";
         }
       }
     }

     grouping tunnel-forwarding-properties {
       description "Properties for using tunnel in forwarding.";
       container forwarding {
         description
           "Tunnel forwarding properties container";
         leaf load-share {
           type uint32 {
             range "1..4294967295";
           }
           description "ECMP tunnel forwarding

Saad, et al.             Expires January 7, 2016               [Page 53]
Internet-Draft             TE YANG Data Model                  July 2015

             load-share factor.";
         }
         choice policy-type {
           description
             "Tunnel policy type";
           container class {
             description
               "Tunnel forwarding per class properties";
             leaf class {
               type uint8 {
                 range "1..7";
               }
               description
                 "The class associated with this tunnel";
             }
           }
           container group {
             description
               "Tunnel frowarding per group properties";
             leaf-list classes {
               type uint8 {
                 range "1..7";
               }
               description
                 "The forwarding class";
             }
           }
         }
       }
     }

     grouping tunnel-routing-properties {
       description
         "TE tunnel routing properties";
       choice routing-choice {
         description
           "Announces the tunnel to IGP as either
           autoroute or forwarding adjacency.";
         case autoroute {
           container autoroute-announce {
             presence "Enable autoroute announce.";
             description
               "Announce the TE tunnel as autoroute to
               IGP for use as IGP shortcut.";
             leaf-list routing-afs {
               type inet:ip-version;
               description
                 "Address families";

Saad, et al.             Expires January 7, 2016               [Page 54]
Internet-Draft             TE YANG Data Model                  July 2015

             }
             choice metric-type {
               description
                 "Type of metric to use when announcing
                 the tunnel as shortcut";
               leaf metric {
                 type uint32 {
                   range "1..2147483647";
                 }
                 description
                   "Describes the metric to use when
                   announcing the tunnel as shortcut";
               }
               leaf relative-metric {
                 type int32 {
                   range "-10..10";
                 }
                 description
                   "Relative TE metric to use when
                   announcing the tunnel as shortcut";
               }
               leaf absolute-metric {
                 type uint32 {
                   range "1..2147483647";
                 }
                 description
                   "Absolute TE metric to use when
                   announcing the tunnel as shortcut";
               }
             }
           }
         }
         case forwarding-adjacency {
           container forwarding-adjacency {
             presence "Enable forwarding adjacency
               on the tunnel.";
             description
               "Announce the TE tunnel
               as forwarding adjacency.";
             leaf holdtime {
               type uint32 {
                 range "0..4294967295";
               }
               description
                 "Holdtime in seconds after
                 tunnel becomes UP.";
             }
             leaf-list routing-afs {

Saad, et al.             Expires January 7, 2016               [Page 55]
Internet-Draft             TE YANG Data Model                  July 2015

               type inet:ip-version;
               description
                 "Address families";
             }
           }
         }
       }
     }
   }
   <CODE ENDS>

           Figure 11: TE packet/MPLS specific types YANG module

   <CODE BEGINS> file "ietf-te@2015-07-06.yang"
   module ietf-te {

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

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

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

     /* Import TE packet specific types */
     import ietf-te-psc-types {
       prefix ietf-te-psc-types;
     }

     import ietf-interfaces {
       prefix if;
     }

     import ietf-inet-types {
       prefix inet;
     }

     organization
       "IETF TEAS Working Group";

     contact
       "Fill me";

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

Saad, et al.             Expires January 7, 2016               [Page 56]
Internet-Draft             TE YANG Data Model                  July 2015

     revision 2015-07-06 {
       description "Latest update to TE generic YANG module.";
       reference "TBD";
     }

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

Saad, et al.             Expires January 7, 2016               [Page 57]
Internet-Draft             TE YANG Data Model                  July 2015

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

     grouping te-admin-groups {
       description "TE admin-group configuration grouping";
       container te-admin-groups {
         description
           "Configuration parameters for interface
           administrative groups";
         container config {
           description
             "Configuration parameters for interface
             administrative groups";
           uses te-admin-groups_config;
         }
         container state {
           config false;
           description
             "Configuration parameters for interface
             administrative groups";
           uses te-admin-groups_config;
         }
       }
     }

     /* TE interface SRLGs */
     grouping te-srlgs_config {
       description "TE interface SRLG grouping";
       choice srlg-type {
         description "Choice of SRLG configuration";
         case value-srlgs {
           list values {
             key "value";
             description "List of SRLG values that
               this link is part of.";
             leaf value {

Saad, et al.             Expires January 7, 2016               [Page 58]
Internet-Draft             TE YANG Data Model                  July 2015

               type uint32 {
                 range "0..4294967295";
               }
               description
                 "Value of the SRLG";
             }
           }
         }
         case named-srlgs {
           list named-srlgs {
             if-feature ietf-te-types:named-srlg-groups;
             key named-srlg;
             description
               "A list of named SRLG entries";
             leaf named-srlg {
               type leafref {
                 path "/te:te/te:globals/" +
                   "te:named-srlgs/te:config/te:named-srlgs/te:name";
               }
               description
                 "A named SRLG entry";
             }
           }
         }
       }
     }

     grouping te-srlgs {
       description "TE SRLG configuration grouping";
       container te-srlgs {
         description "TBD";
         container config {
           description
             "Configuration parameters for interface SRLG
             groups";
           uses te-srlgs_config;
         }
         container state {
           config false;
           description
             "State parameters for interface SRLG groups";
           uses te-srlgs_config;
         }
       }
     }

     grouping te-metric_config {
       description "Interface TE metric grouping";

Saad, et al.             Expires January 7, 2016               [Page 59]
Internet-Draft             TE YANG Data Model                  July 2015

       leaf te-metric {
         type ietf-te-types:te-metric;
         description "Interface TE metric.";
       }
     }

     grouping te-attributes {
       description "TE attributes configuration grouping";
       container config {
         description
           "Configuration parameters for interface TE
            attributes";
         uses te-metric_config;
       }
       container state {
         config false;
         description
           "State parameters for interface TE metric";
         uses te-metric_config;
         uses interface-advertisements_state;
       }
     }

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

Saad, et al.             Expires January 7, 2016               [Page 60]
Internet-Draft             TE YANG Data Model                  July 2015

     grouping te-switching-cap {
       description "TE interface switching capability grouping";
       container te-switching-cap {
         description
           "Interface switching capabilities container";
         container config {
           description
             "Configuration parameters for interface
             switching capabilities";
           uses te-switching-cap_config;
         }
         container state {
           config false;
           description
             "State parameters for interface switching
             capabilities";
           uses te-switching-cap_config;
         }
       }
     }

     grouping interface-advertisements_state {
       description
         "TE interface advertisements state grouping";
       container interface-advertisements_state {
         description
           "TE interface advertisements state container";
         leaf flood-interval {
           type uint32;
           description
             "The periodic flooding interval";
         }
         leaf last-flooded-time {
           type uint32;
           units seconds;
           description
             "Time elapsed since last flooding in seconds";
         }
         leaf next-flooded-time {
           type uint32;
           units seconds;
           description
             "Time remained for next flooding in seconds";
         }
         leaf last-flooded-trigger {
           type enumeration {
             enum link-up {
               description "Link-up flooding trigger";

Saad, et al.             Expires January 7, 2016               [Page 61]
Internet-Draft             TE YANG Data Model                  July 2015

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

     /**
      * TE tunnel generic groupings
      */

     /* TE tunnel path properties */

Saad, et al.             Expires January 7, 2016               [Page 62]
Internet-Draft             TE YANG Data Model                  July 2015

     grouping tunnel-path-params {
       description
         "Tunnel path properties grouping";
       container tunnel-path-params {
         description
           "Defines a TE tunnel path properties";
         leaf path-named-constraint {
           if-feature ietf-te-types:named-path-constraints;
           type leafref {
             path "/te/globals/named-path-constraints/config/"+
               "named-path-constraints/name";
           }
           description
             "Reference to a globally defined named path
             constraint set";
         }
         uses ietf-te-types:tunnel-path-selection;
         choice type {
           description
             "Describes the path type";
           case dynamic {
             leaf dynamic {
               type empty;
               description
                 "A CSPF dynamically computed path";
             }
           }
           case explicit {
             leaf explicit-path-name {
               type leafref {
                 path "/te/globals/named-explicit-paths/config/"+
                   "named-explicit-paths/name";
               }
               description
                 "Reference to a globally defined
                 explicit-path";
             }
           }
         }
         leaf no-cspf {
           type empty;
           description
             "Indicates no CSPF is to be attempted on this
             path.";
         }
         leaf lockdown {
           type empty;
           description

Saad, et al.             Expires January 7, 2016               [Page 63]
Internet-Draft             TE YANG Data Model                  July 2015

             "Indicates no reoptimization to be attempted for
             this path.";
         }
       }
     }

     grouping tunnel-properties_config {
       description
         "Configuration parameters relating to TE tunnel";
       leaf description {
         type string;
         description
           "TE tunnel description.";
       }
       leaf admin-status {
         type identityref {
           base ietf-te-types:state-type;
         }
         default ietf-te-types:state-up;
         description "TE tunnel administrative state.";
       }
       uses ietf-te-psc-types:tunnel-routing-properties;
       uses ietf-te-psc-types:tunnel-forwarding-properties;
       uses ietf-te-types:tunnel-bidir-assoc-properties;
       choice path-type {
         description
           "Describes the path type";
         case p2p {
           leaf destination {
             type inet:ip-address;
             description
               "P2P tunnel destination address";
           }
           /* P2P list of path(s) */
           list primary-paths {
             key "preference";
             description
               "List of primary paths for this
               tunnel.";
             leaf preference {
               type uint8 {
                 range "1..255";
               }
               description
                 "Specifies a preference for
                 this path. The lower the
                 number higher the
                 preference";

Saad, et al.             Expires January 7, 2016               [Page 64]
Internet-Draft             TE YANG Data Model                  July 2015

             }
             uses tunnel-path-params;
             list seondary-paths {
               key "preference";
               description
                 "List of secondary paths for this
                 tunnel.";
               leaf preference {
                 type uint8 {
                   range "1..255";
                 }
                 description
                   "Specifies a preference for
                   this path. The lower the
                   number higher the
                   preference";
               }
               uses tunnel-path-params;
             }
           }
         }
         case p2mp {
           if-feature ietf-te-types:p2mp-te;
           list p2mp-paths {
             key "destination";
             description
               "List of destinations and their
               paths.";
             leaf destination {
               type inet:ip-address;
               description
                 "P2MP destination leaf address";
             }
             list primary-paths {
               key "preference";
               description
                 "List of primary paths";
               leaf preference {
                 type uint8 {
                   range "1..255";
                 }
                 description
                   "Specifies a preference for
                   this path. The lower the
                   number higher the
                   preference";
               }
               uses tunnel-path-params;

Saad, et al.             Expires January 7, 2016               [Page 65]
Internet-Draft             TE YANG Data Model                  July 2015

               list seondary-paths {
                 key "preference";
                 description
                   "List of secondary paths";
                 leaf preference {
                   type uint8 {
                     range "1..255";
                   }
                   description
                     "Specifies a preference
                     for this path. The lower
                       the number higher
                         the preference";
                 }
                 uses tunnel-path-params;
               }
             }
           }
         }
       }
     }

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

     grouping tunnel-properties_state {
       description
         "State parameters relating to TE tunnel";
       leaf oper-status {
         type identityref {
           base ietf-te-types:state-type;
         }

Saad, et al.             Expires January 7, 2016               [Page 66]
Internet-Draft             TE YANG Data Model                  July 2015

         description "TE tunnel operational state.";
       }
       list lsp {
         key "source destination tunnel-id lsp-id";
         description "List of LSPs associated with the tunnel.";

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

Saad, et al.             Expires January 7, 2016               [Page 67]
Internet-Draft             TE YANG Data Model                  July 2015

           }
           description
             "Extended Tunnel ID of the LSP.";
           reference "RFC3209";
         }
         leaf type {
           type leafref {
             path "/te/lsps-state/lsp/type";
           }
           description "LSP type P2P or P2MP";
         }
       }
     }
     /*** End of TE tunnel groupings ***/

     /**
      * LSP related generic groupings
      */

     grouping lsp-properties_state {
       description
         "State parameters relating to LSP";
       leaf oper-status {
         type identityref {
           base ietf-te-types:state-type;
         }
         description "LSP operational state.";
       }

       leaf origin-type {
         type enumeration {
           enum ingress {
             description
               "Origin ingress";
           }
           enum egress {
             description
               "Origin egress";
           }
           enum transit {
             description
               "transit";
           }
         }
         description
           "Origin type of LSP relative to the location
           of the local switch in the path.";
       }

Saad, et al.             Expires January 7, 2016               [Page 68]
Internet-Draft             TE YANG Data Model                  July 2015

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

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

       leaf lsp-operational-status {
         type empty;
         description
           "This bit is set when a protecting LSP is carrying the normal
            traffic after protection switching";
       }

       container lsp-timers {
         when "../origin-type = 'ingress'" {

Saad, et al.             Expires January 7, 2016               [Page 69]
Internet-Draft             TE YANG Data Model                  July 2015

           description "Applicable to ingress LSPs only";
         }
         description "Ingress LSP timers";
         leaf life-time {
           type uint32;
           units seconds;
           description
             "lsp life time";
         }

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

         leaf time-to-die {
           type uint32;
           units seconds;
           description
             "lsp expire delay time";
         }
       }

       container downstream-info {
         description
           "downstream information";

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

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

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

         leaf label {

Saad, et al.             Expires January 7, 2016               [Page 70]
Internet-Draft             TE YANG Data Model                  July 2015

           type uint32;
           description
             "downstream label.";
         }
       }

       container upstream-info {
         description
           "upstream information";

         leaf nhop { // phop?
           type inet:ip-address;
           description
             "upstream nexthop.";
         }

         leaf incoming-interface {
           type if:interface-ref;
           description
             "upstream interface.";
         }

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

         leaf label {
           type uint32;
           description
             "upstream label.";
         }
       }
     }
     /*** End of TE LSP groupings ***/

     /**
      * TE global generic groupings
      */

     grouping global-attributes_config {
       description
         "Top level grouping for global config data.";
     }

     grouping global-attributes_state {
       description

Saad, et al.             Expires January 7, 2016               [Page 71]
Internet-Draft             TE YANG Data Model                  July 2015

         "Top level grouping for global state data.";
       leaf tunnels-counter {
         type uint32;
         description "Tunnels count";
       }
       leaf lsps-counter {
         type uint32;
         description "Tunnels count";
       }
     }

     grouping global-attributes {
       description "TE Global attributes grouping";
       container config {
         description
           "Global configuration parameters";
         uses global-attributes_config;
       }
       container state {
         config false;
         description
           "Global configuration parameters";
         uses global-attributes_config;
         uses global-attributes_state;
       }
     }

     grouping named-admin-groups_config {
       description
         "Global named administrative groups configuration
         grouping";
       list named-admin-groups {
         if-feature ietf-te-types:extended-admin-groups;
         if-feature ietf-te-types:named-extended-admin-groups;
         key "name";
         description
           "List of named TE admin-groups";
         leaf name {
           type string;
           description
             "A string name that uniquely identifies a TE
             interface named admin-group";
         }
         leaf group {
           type ietf-te-types:admin-groups;
           description
             "An SRLG value";
         }

Saad, et al.             Expires January 7, 2016               [Page 72]
Internet-Draft             TE YANG Data Model                  July 2015

       }
     }

     grouping named-admin-groups {
       description
         "Named admin groups grouping";
       container named-admin-groups {
         description
           "Named admin groups container";
         container config {
           description
             "Configuration parameters for named admin
             groups";
           uses named-admin-groups_config;
         }
         container state {
           config false;
           description
             "State parameters for named admin groups";
           uses named-admin-groups_config;
         }
       }
     }

     grouping named-srlgs_config {
       description
         "Global named SRLGs configuration
         grouping";
       list named-srlgs {
         if-feature ietf-te-types:named-srlg-groups;
         key "name";
         description
           "A list of named SRLG groups";
         leaf name {
           type string;
           description
             "A string name that uniquely identifies a TE
             interface named srlg";
         }
         leaf group {
           type ietf-te-types:srlg;
           description "An SRLG value";
         }
       }
     }

     grouping named-srlgs {
       description

Saad, et al.             Expires January 7, 2016               [Page 73]
Internet-Draft             TE YANG Data Model                  July 2015

         "Global named SRLGs grouping";
       container named-srlgs {
         description
           "Named SRLGs container";
         container config {
           description
             "Configuration parameters for named SRLG groups";
           uses named-srlgs_config;
         }
         container state {
           config false;
           description
             "State parameters for named SRLG groups";
           uses named-srlgs_config;
         }
       }
     }

     grouping named-explicit-paths_config {
       description
         "Global explicit path configuration
         grouping";
       list named-explicit-paths {
         key "name";
         description
           "A list of explicit paths";
         leaf name {
           type string;
           description
             "A string name that uniquely identifies an
             explicit path";
         }
         list explicit-route-objects {
           key "index";
           description
             "List of explicit route objects";
           leaf index {
             type uint8 {
               range "0..255";
             }
             description
               "Index of this explicit route object";
           }
           uses ietf-te-types:explicit-route-subobject;
           leaf explicit-route-usage {
             type identityref {
               base ietf-te-types:route-usage-type;
             }

Saad, et al.             Expires January 7, 2016               [Page 74]
Internet-Draft             TE YANG Data Model                  July 2015

             description
               "An IP hop action.";
           }
         }
       }
     }

     grouping named-explicit-paths {
       description
         "Global named explicit path grouping";
       container named-explicit-paths {
         description
           "Nmaed explicit paths container";
         container config {
           description
             "Configuration parameters for named explicit
             paths";
           uses named-explicit-paths_config;
         }
         container state {
           config false;
           description
             "State parameters for named explicit paths";
           uses named-explicit-paths_config;
         }
       }
     }

     grouping named-path-constraints_config {
       description
         "Global named path constraints configuration
         grouping";
       list named-path-constraints {
         if-feature ietf-te-types:named-path-constraints;
         key "name";
         description
           "A list of named path constraints";
         leaf name {
           type string;
           description
             "A string name that uniquely identifies a
             path constraint set";
         }
         uses ietf-te-types:tunnel-path-selection;
       }
     }

     grouping named-path-constraints {

Saad, et al.             Expires January 7, 2016               [Page 75]
Internet-Draft             TE YANG Data Model                  July 2015

       description
         "Global named path constraints grouping";
       container named-path-constraints {
         description
           "Nmaed explicit paths container";
         container config {
           description
             "Configuration parameters for named explicit
             paths";
           uses named-path-constraints_config;
         }
         container state {
           config false;
           description
             "State parameters for named explicit paths";
           uses named-path-constraints_config;
         }
       }
     }
     /*** End of TE global groupings ***/

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

       /* TE Global Configuration Data */
       container globals {
         description
           "Configuration data for Global System-wide
           Traffic Engineering.";
         uses global-attributes;
         uses named-admin-groups;
         uses named-srlgs;
         uses named-explicit-paths;
         uses named-path-constraints;
       }

       /* TE Interface Configuration Data */
       container interfaces {
         description
           "Configuration data model for TE interfaces.";
         list interface {
           key "interface";
           description "TE interfaces.";

Saad, et al.             Expires January 7, 2016               [Page 76]
Internet-Draft             TE YANG Data Model                  July 2015

           leaf interface {
             type if:interface-ref;
             description
               "TE interface name.";
           }
           /* TE interface parameters */
           uses te-attributes;
           uses te-admin-groups;
           uses te-srlgs;
           uses te-switching-cap;
           /* TE interface flooding parameters */
           uses ietf-te-types:interface-te-flooding-parameters;
         }
       }

       /* TE Tunnel Configuration Data */
       container tunnels {
         description
           "Configuration, operational, notification and RPC
           data model for TE tunnels.";

         list tunnel {
           key "name type";
           unique "identifier";
           description "TE tunnel.";
           leaf name {
             type string;
             description "TE tunnel name.";
           }
           leaf type {
             type identityref {
               base ietf-te-types:tunnel-type;
             }
             description "TE tunnel type.";
           }
           leaf identifier {
             type uint16;
             description
               "TE tunnel Identifier.";
           }
           uses tunnel-properties;
         }
       }

       /* TE Tunnel Ephemeral State Data (TBD) */
       container tunnels-state {
         config "false";
         description

Saad, et al.             Expires January 7, 2016               [Page 77]
Internet-Draft             TE YANG Data Model                  July 2015

           "Derived state corresponding to ephemeral tunnels";

         list tunnel {
           key "name type";
           unique "identifier";
           description "TE tunnel.";
           leaf name {
             type string;
             description "TE tunnel name.";
           }
           leaf type {
             type identityref {
               base ietf-te-types:tunnel-type;
             }
             description "TE tunnel type.";
           }
           leaf identifier {
             type uint16;
             description
               "TE tunnel Identifier.";
           }

         }
       }

       /* TE LSPs State Data */
       container lsps-state {
         config "false";
         description "MPLS-TE LSP operational state data.";

         list lsp {
           key
             "source destination tunnel-id lsp-id "+
             "extended-tunnel-id type";
           description
             "List of LSPs associated with the tunnel.";
           leaf source {
             type inet:ip-address;
             description
               "Tunnel sender address extracted from
               SENDER_TEMPLATE  object";
             reference "RFC3209";
           }
           leaf destination {
             type inet:ip-address;
             description
               "Tunnel endpoint address extracted from
               SESSION object";

Saad, et al.             Expires January 7, 2016               [Page 78]
Internet-Draft             TE YANG Data Model                  July 2015

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

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

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

Saad, et al.             Expires January 7, 2016               [Page 79]
Internet-Draft             TE YANG Data Model                  July 2015

     /* TE Tunnel RPCs/execution Data */
     rpc tunnels-rpc {
       description
         "TE tunnels RPC nodes";
     }

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

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

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

                     Figure 12: TE generic YANG module

5.  IANA Considerations

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

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

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

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

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

Saad, et al.             Expires January 7, 2016               [Page 80]
Internet-Draft             TE YANG Data Model                  July 2015

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

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

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

6.  Security Considerations

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

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

   There are a number of data nodes defined in the YANG module which are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g., <edit-config>)
   to these data nodes without proper protection can have a negative
   effect on network operations.  Following are the subtrees and data
   nodes and their sensitivity/vulnerability:

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

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

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

7.  Acknowledgement

   The authors would like to thank Lou Berger for reviewing and
   providing valuable feedback on this document.

Saad, et al.             Expires January 7, 2016               [Page 81]
Internet-Draft             TE YANG Data Model                  July 2015

8.  References

8.1.  Normative References

   [I-D.ietf-netmod-routing-cfg]
              Lhotka, L. and A. Lindem, "A YANG Data Model for Routing
              Management", draft-ietf-netmod-routing-cfg-19 (work in
              progress), May 2015.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC3209]  Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V.,
              and G. Swallow, "RSVP-TE: Extensions to RSVP for LSP
              Tunnels", RFC 3209, December 2001.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              January 2004.

   [RFC6020]  Bjorklund, M., "YANG - A Data Modeling Language for the
              Network Configuration Protocol (NETCONF)", RFC 6020,
              October 2010.

   [RFC6241]  Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
              Bierman, "Network Configuration Protocol (NETCONF)", RFC
              6241, June 2011.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, June 2011.

   [RFC6536]  Bierman, A. and M. Bjorklund, "Network Configuration
              Protocol (NETCONF) Access Control Model", RFC 6536, March
              2012.

   [RFC6991]  Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
              July 2013.

8.2.  Informative References

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

Saad, et al.             Expires January 7, 2016               [Page 82]
Internet-Draft             TE YANG Data Model                  July 2015

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

   [RFC3473]  Berger, L., "Generalized Multi-Protocol Label Switching
              (GMPLS) Signaling Resource ReserVation Protocol-Traffic
              Engineering (RSVP-TE) Extensions", RFC 3473, January 2003.

   [RFC4328]  Papadimitriou, D., "Generalized Multi-Protocol Label
              Switching (GMPLS) Signaling Extensions for G.709 Optical
              Transport Networks Control", RFC 4328, January 2006.

Authors' Addresses

   Tarek Saad (editor)
   Cisco Systems Inc

   Email: tsaad@cisco.com

   Rakesh Gandhi
   Cisco Systems Inc

   Email: rgandhi@cisco.com

   Xufeng Liu
   Ericsson

   Email: xufeng.liu@ericsson.com

   Vishnu Pavan Beeram
   Juniper Networks

   Email: vbeeram@juniper.net

   Himanshu Shah
   Ciena

   Email: hshah@ciena.com

Saad, et al.             Expires January 7, 2016               [Page 83]
Internet-Draft             TE YANG Data Model                  July 2015

   Xia Chen
   Huawei Technologies

   Email: jescia.chenxia@huawei.com

   Raqib Jones
   Brocade

   Email: raqib@Brocade.com

   Bin Wen
   Comcast

   Email: Bin_Wen@cable.comcast.com

Saad, et al.             Expires January 7, 2016               [Page 84]