Internet DRAFT - draft-jiang-opsawg-nettunnel-model-yang

draft-jiang-opsawg-nettunnel-model-yang







Network Working Group                                           R. Jiang
Internet-Draft                                                     Z. Li
Intended status: Informational                       Huawei Technologies
Expires: September 14, 2017                               March 13, 2017


               Yang Model of Network-based P2P TE Tunnel
               draft-jiang-opsawg-nettunnel-model-yang-00

Abstract

   This document defines a YANG data model for network-based P2P TE
   Tunnel which can be abstracted and exposed as north bound API of SDN
   Controller.

Requirements Language

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

Status of This Memo

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

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

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

   This Internet-Draft will expire on September 14, 2017.

Copyright Notice

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

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect



Jiang & Li             Expires September 14, 2017               [Page 1]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Network Tunnel Service Models . . . . . . . . . . . . . . . .   3
   3.  UTE Tunnel YANG Model . . . . . . . . . . . . . . . . . . . .   3
     3.1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . .   3
     3.2.  Configuration . . . . . . . . . . . . . . . . . . . . . .   4
       3.2.1.  Configuration Hierarchy . . . . . . . . . . . . . . .   6
     3.3.  Operational state . . . . . . . . . . . . . . . . . . . .   7
     3.4.  Notifications . . . . . . . . . . . . . . . . . . . . . .   8
     3.5.  Actions . . . . . . . . . . . . . . . . . . . . . . . . .   9
   4.  Network TE Tunnel YANG Model  . . . . . . . . . . . . . . . .   9
     4.1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . .   9
     4.2.  Configuration . . . . . . . . . . . . . . . . . . . . . .  10
       4.2.1.  Configuration Hierarchy . . . . . . . . . . . . . . .  13
     4.3.  Operational state . . . . . . . . . . . . . . . . . . . .  14
     4.4.  Notifications . . . . . . . . . . . . . . . . . . . . . .  16
     4.5.  Actions . . . . . . . . . . . . . . . . . . . . . . . . .  16
     4.6.  Open Items  . . . . . . . . . . . . . . . . . . . . . . .  17
   5.  YANG Specification  . . . . . . . . . . . . . . . . . . . . .  17
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  40
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  40
   8.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .  40
   9.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  41
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  41
     10.1.  Normative References . . . . . . . . . . . . . . . . . .  41
     10.2.  Informative References . . . . . . . . . . . . . . . . .  42
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  42

1.  Introduction

   This document defines a YANG data model for network-based P2P TE
   tunnel which can be abstracted and exposed as north bound API of SDN
   Controller.  The Network P2P TE tunnel includes RSVP-TE[RFC3209]
   tunnel and SR-TE[RFC6241] tunnel.The data model is defined for
   following structures that are used for managing the API of Network TE
   Tunnel:

   o Configuration

   o Operational State

   o Executables (Actions)



Jiang & Li             Expires September 14, 2017               [Page 2]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   o Notifications

2.  Network Tunnel Service Models

   The hierarchy of Network-based P2P TE Tunnel service models are
   depicted in the following figure:

                              +--------------+
                              |              |
                              |    Network   |
                              |   UTETunnel  |
                              +-------+------+
                                      |
                       +--------------+--------------+
                       |                             |
                       V                             V
               +--------------+              +--------------+
               |   Network    |              |   Network    |
               |   TE Tunnel  |              |   UNI Tunnel |
               |              |              |              |
               +--------------+              +--------------+
                      |
            +-------------------+
            |                   |
            V                   V
    +---------------+   +---------------+
    |    RSVP TE    |   |    SR TE      |
    |    Tunnel     |   |    Tunnel     |
    |               |   |               |
    +---------------+   +---------------+
    Figure 1: Architecture of Tunnel Service Model

   For Network TE Tunnel hierarchical service models, Network UTE Tunnel
   means the abstract common Tunnel model for different kind of Network
   TE tunnels, and Network TE-Tunnel in this draft is augmented from
   Network UTE Tunnel model.  Network TE Tunnel include SR Tunnel and
   RSVP TE Tunnel.

3.  UTE Tunnel YANG Model

3.1.  Overview

   This section describes a new model named as "net-ute-tunnel" for
   unified Network TE Tunnel data model.

   There are four main containers in "net-ute-tunnel" module as follows:

   o Read-Write parameters for configuration (Discussed in Section 3.2)



Jiang & Li             Expires September 14, 2017               [Page 3]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   o Read-only parameters for operational state (Discussed in
   Section 3.3)

   o Notifications for events (Discussed in Section 3.4)

   o RPCs for executing commands to perform some action (Discussed in
   Section 3.5)

   For the configuration and state data, this model include two types:
   one is configurable item (rw), the other is operational item(ro)
   which means applied and derived state.

   The following diagram depicts high level Unified Network TE Tunnel
   Yang tree organization and hierarchy:

           module: ietf-OPSAWG-ute-tunnel
               +--rw ute-tunnel-cfg
               |  +--rw p2p-tunnel
               |     +--rw tunnels
               |     |  +--rw tunnel* [tunnel-name]
               |     +--rw bidirection-co-route-groups
               |        +--rw co-route-group* [co-route-name]
               +--ro ute-tunnel-oper
               |    +--ro p2p-tunnel
               |        +--ro tunnels
               notifications:
               +---n tunnel-state-down
               +---n tunnel-state-down-clear
               +---n tunnel-lsp-changed

    Figure 2: high level Network UTE Tunnel yang tree organization and
                                 hierarchy

   This model includes common abstract properties of different Network
   TE Tunnels, such as Network P2P tunnel configuration and set up
   bidirection co-route groups, in notification part it only support
   basic events like tunnel down and changed.

3.2.  Configuration

   This specification defines the configuration parameters for Network
   UTE Tunnel resource, and defines some of the most significant and
   commonly used capabilities.

   As mentioned above, the configuration tree presents read-write
   intended configuration leave/items as well as read-only state of the
   applied configuration.




Jiang & Li             Expires September 14, 2017               [Page 4]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   Following is high-level configuration organization for Network UTE
   Tunnel:

           module: ietf-OPSAWG-ute-tunnel
               augment /ute-tunnel:ute-tunnel-cfg:
                   +--rw p2p-tunnel
                       +--rw tunnels
                       +--rw bidirection-co-route-groups

      Figure 3: high-level configuration organization for UTE Tunnel

   Following is a simplified graphical representation of the data model
   for Network UTE Tunnel configuration:






































Jiang & Li             Expires September 14, 2017               [Page 5]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


           +--rw ute-tunnel-cfg
           |  +--rw p2p-tunnel
           |     +--rw tunnels
           |     |  +--rw tunnel* [tunnel-name]
           |     |     +--rw tunnel-name         string
           |     |     +--rw user-label?         string
           |     |     +--rw tunnel-type         identityref
           |     |     +--rw admin-status?       ac-type:admin-status
           |     |     +--rw sym-tunnel-name?    string
           |     |     +--rw mtu?                uint32
           |     |     +--rw manage-type?        manage-type
           |     |     +--rw manage-protocol?    manage-protocol
           |     |     +--rw control-protocol?   control-protocol
           |     |     +--rw control-mode?       control-mode
           |     |     +--rw adopt?              boolean
           |     |     +--rw ip-address?         inet:ipv4-address
           |     |     +--rw ip-unnumbered?      string
           |     |     +--rw source
           |     |     |  +--rw ne-id?        yang:uuid
           |     |     |  +--rw ip-address    inet:ip-address
           |     |     +--rw destination
           |     |        +--rw ne-id?        yang:uuid
           |     |        +--rw ip-address    inet:ip-address
           |     +--rw bidirection-co-route-groups
           |        +--rw co-route-group* [co-route-name]
           |           +--rw co-route-name    string
           |           +--rw user-label?      string
           |           +--rw bfd-enable?      boolean
           |           +--rw first-tunnel
           |           |  +--rw tunnel-name?   string
           |           +--rw second-tunnel
           |              +--rw tunnel-name?   string

    Figure 4: simplified graphical representation of the data model for
                     Network UTE Tunnel configuration

3.2.1.  Configuration Hierarchy

   The Network UTE Tunnel configuration container is logically divided
   into following high-level config areas:











Jiang & Li             Expires September 14, 2017               [Page 6]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


           UTE-Tunnel parameters
               o Point to Point Tunnel parameters
                   - Tunnels
                       - Per-Tunnel:
                   - bidirection-co-route-groups
                       - co-route-group

      Figure 5: high-level Network UTE Tunnel configuration container

   Following subsections briefly explain these configuration areas.

3.2.1.1.  Network P2P Tunnel parameters

   Network P2P Tunnel parameters is used to configure the detail
   properties of Network TE Tunnel, The manage-type describe the tunnel
   management right belongs to SDN controller or network element.  The
   manage-protocol means the tunnel management protocol between SDN
   controller and devices.

   bidirection-co-route-groups bind two tunnel which use the same path-
   hops but the direction is opposite together, we can choose whether
   need to enable BFD feature or not

3.3.  Operational state

   Operational state of Network TE tunnel can be queried and obtained
   from read-only state containers that fall under the same tree (/ute-
   tunnel:ute-tunnel-oper /ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-
   tunnel:tunnel) as the configuration.

   Please note this state tree refers both the configuration "applied"
   state.  Following is a simplified graphical representation of the
   data model for Network UTE tunnel operational state.


















Jiang & Li             Expires September 14, 2017               [Page 7]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


           +--ro ute-tunnel-oper
               +--ro p2p-tunnel
                   +--ro tunnels
                       +--ro tunnel* [tunnel-name]
                       +--ro tunnel-name        string
                       +--ro tunnel-type        identityref
                       +--ro oper-status?       ac-type:operate-status
                       +--ro tunnel-id?         uint32
                       +--ro sym-tunnel-name?   string
                       +--ro source
                       |  +--ro ne-id?        yang:uuid
                       |  +--ro ip-address    inet:ip-address
                       +--ro destination
                           +--ro ne-id?        yang:uuid
                           +--ro ip-address    inet:ip-address

    Figure 6: simplified graphical representation of the data model for
                   Network UTE Tunnel Operational state

   The Network UTE Tunnel Operational states mostly the subset of
   configuration data,such as tunnel name and other basic properties.

3.4.  Notifications

   This model defines a list of notifications to inform subscriber of
   important events detected during the configuration and operation.
   These events include events related to changes in the operational
   state of Network TE Tunnel, including tunnel-state-down event,
   Tunnel-state-down-clear event, tunnel-lsp-changed event.  Following
   is a simplified graphical representation of the data model for
   Network UTE Tunnel notifications.

           notifications:
           +---n tunnel-state-down
           |  +--ro tunnel-name?   leafref
           +---n tunnel-state-down-clear
           |  +--ro tunnel-name?   leafref
           |  +--ro reason?        tunnel-down-clear-reason
           +---n tunnel-lsp-changed
               +--ro tunnel-name?     leafref
               +--ro oper-type?       oper-type
               +--ro sym-path-name?   leafref
               +--ro source
                   +--ro ne-id?        yang:uuid
                   +--ro ip-address    inet:ip-address

    Figure 7: simplified graphical representation of the data model for
                         UTE Tunnel notifications



Jiang & Li             Expires September 14, 2017               [Page 8]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


3.5.  Actions

   There is no rpc that allow performing an action or executing a
   command on the QoS operation.

4.  Network TE Tunnel YANG Model

4.1.  Overview

   This section defines a new module named "net-te-tunnel" for Network
   TE Tunnel data model where this module augments net-ute-tunnel that
   is defined in previous section.

   There are four main containers in "net-te-tunnel" module as follows:
   o Read-Write parameters for configuration (Discussed in Section 3.2)
   o Read-only parameters for operational state (Discussed in
   Section 3.3) o Notifications for events (Discussed in Section 3.4) o
   RPCs for executing commands to perform some action (Discussed in
   Section 3.5)

   Following diagram depicts high level Network TE Tunnel yang tree
   organization and hierarchy:

        module: ietf-OPSAWG-te-tunnel
            augment /ute-tunnel:ute-tunnel-cfg:
                +--rw global-cfg
            augment /ute-tunnel:ute-tunnel-cfg/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel:
                +--rw path-setup-type?      pce-type:path-setup-type
                +--rw sr-path-type?         sr-path-type
                +--rw ...
            augment /ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel:
                +--ro path-setup-type?   pce-type:path-setup-type
                +--ro co-route-name?     string
                +--ro ...
            rpcs:
                +---x query-te-tunnels-nbi
                    +--ro input
                    +--ro output
            notifications:
            +--- n tunnel-besteffort
            +--- n ...

     Figure 8: high level Network TE Tunnel yang tree organization and
                                 hierarchy

   Before going into data model details, it is important to take note of
   the following points:




Jiang & Li             Expires September 14, 2017               [Page 9]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   o This module does not cover CR-LDP, only focus on RSVP-TE and SR-TE
   which is widely used on devices.

   o This model supports two address-families, namely "ipv4" and "ipv6".

   o When in SR-TE Scenario, this model support centralized control of
   allocating adjacency label/segment to avoid extending IGP to allocate
   label/segment which will take effect on network performance.

   A graphical representation of Network TE YANG data model is presented
   in Figure 10, Figure 12, Figure 13, and Figure 14.  Whereas, the
   actual model definition in YANG is captured in the end of this
   Section.  While presenting the YANG tree view and actual yang
   specification, this document assumes the reader is familiar with the
   concepts of YANG modelling, its presentation and its compilation.

4.2.  Configuration

   This specification defines the configuration parameters for Network
   TE Tunnel resource, and defines some of the most significant and
   commonly used capabilities such as Hot Standby, SR-TE label/segment
   adherence when label stack is too deep, and Fast Reroute.

   This model augments net-ute-tunnel that is defined in previous
   section.  As mentioned above, the configuration tree presents read-
   write intended configuration leave/items as well as read-only state
   of the applied configuration.

   Following is high-level configuration organization for Network TE
   Tunnel:

         module: ietf-OPSAWG-te-tunnel
           augment /ute-tunnel:ute-tunnel-cfg:
               +--rw global-cfg
               +--rw p2p-tunnel
                   +--rw tunnels
                   +--rw bidirection-co-route-groups

   Figure 9: high-level configuration organization for Network TE Tunnel

   Following is a simplified graphical representation of the data model
   for Tunnel configuration:

            +--rw te-tunnel-cfg
                    +--rw global-cfg
                        +--rw bandwith-threshold?   uint32
                    +--rw p2p-tunnel
                        +--rw tunnels



Jiang & Li             Expires September 14, 2017              [Page 10]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        |    +--rw tunnel
                        |        +--rw tunnelname   string
                        |        +--rw user-label   string
                        |        +--rw tunnel-type   tunl-type
                        |        +--rw admin-status   ac-typeadmin-status
                        |        +--rw sym-tunnel-name   string
                        |        +--rw mtu       uint32
                        |        +--rw manage-type     manage-type
                        |        +--rw manage-protocol     manage-protocol
                        |        +--rw control-protocol     control-protocol
                        |        +--rw control-mode     control-mode
                        |        +--rw adopt          boolean
                        |        +--rw ip-address    inetipv4-address
                        |        +--rw ip-unnumbered   string
                        |        +--rw source
                        |            +--rw ne-id yanguuid
                        |            +--rw ip-address inetip-address;
                        |        +--rw destination
                        |            +--rw ne-id yanguuid
                        |            +--rw ip-address inetip-address;
                        |        +--rw path-setup-type?      pce-type:path-setup-type
                        |        +--rw sr-path-type?         sr-path-type
                        |        +--rw is-bypass-tunnel?     boolean
                        |        +--rw bypass-tunnel
                        |        |  +--rw protect-interface
                        |        |     +--rw ltp-id?   yang:uuid
                        |        +--rw hot-standby-enable?   boolean
                        |        +--rw tunnel-constraint
                        |        |  +--rw setup-priority?    uint8
                        |        |  +--rw holdup-priority?   uint8
                        |        |  +--rw bandwidth?         uint32
                        |        |  +--rw oper-bandwidth?    uint32
                        |        |  +--rw path-options* [option-number]
                        |        |     +--rw option-number       uint16
                        |        |     +--rw path-constraints* [path-role]
                        |        |        +--rw path-role               pce-type:lsp-role
                        |        |        +--rw latency?                uint32
                        |        |        +--rw hop-limit?              uint16
                        |        |        +--rw include-affinity-any?   pce-type:affinity
                        |        |        +--rw include-affinity-all?   pce-type:affinity
                        |        |        +--rw exclude-affinity?       pce-type:affinity
                        |        |        +--rw te-attribute-ignore?    bits
                        |        |        +--rw explicit-path-hops
                        |        |           +--rw explicit-path-hop* [hop-index]
                        |        |              +--rw hop-index       uint32
                        |        |              +--rw ne-id?          yang:uuid
                        |        |              +--rw ltp-id?         yang:uuid
                        |        |              +--rw ip-address?     inet:ipv4-address



Jiang & Li             Expires September 14, 2017              [Page 11]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        |        |              +--rw hop-inc-type?   pce-type:hop-inc-type
                        |        |              +--rw hop-type?       pce-type:hop-type
                        |        +--rw protect-policy
                        |        |  +--rw hot-standby
                        |        |  |  +--rw revertive?        revertive-type
                        |        |  |  +--rw bandwidth-mode?   bandwidth-mode
                        |        |  |  +--rw wtr?              uint32
                        |        |  +--rw frr
                        |        |     +--rw fast-reroute?        boolean
                        |        |     +--rw bypass-attributes
                        |        |        +--rw setup-priority?         uint8
                        |        |        +--rw holdup-priority?        uint8
                        |        |        +--rw bandwidth?              uint32
                        |        |        +--rw include-affinity-any?   pce-type:affinity
                        |        |        +--rw include-affinity-all?   pce-type:affinity
                        |        |        +--rw exclude-affinity?       pce-type:affinity
                        |        |        +--rw te-attribute-ignore?    bits
                        |        +--rw tunnel-service
                        |            +--rw service-class?          bits
                        |            +--rw outbound-limit?         boolean
                        |            +--rw reserved-for-binding?   boolean
                        |            +--rw statistic-enable?       boolean
                        |            +--rw igp-capabilities
                        |                +--rw igp-instance* [index]
                        |                |  +--rw index              uint32
                        |                |  +--rw protocol-type      protocol-type
                        |                |  +--rw igp-instance-id?   uint32
                        |                |  +--rw ospf-area-id?      uint32
                        |                +--rw propagate-mode?          propagate-mode
                        |                +--rw advertise-hold-time?     uint32
                        |                +--rw igp-metric-type?         igp-metric-type
                        |                +--rw relative-metric-value?   int32
                        |                +--rw absolute-metric-value?   uint32
                        +--rw bidirection-co-route-groups
                            +--rw co-route-group
                                +--rw co-route-name  string
                                +--rw user-label   string
                                +--rw co-route-group
                                    +--rw co-route-name  string
                                    +--rw user-label    string
                                    +--rw bfd-enable     boolean
                                    +--rw first-tunnel
                                        +--rw  tunnel-name   string
                                    +--rw second-tunnel
                                        +--rw   tunnel-name string

   Figure 10: Simplified graphical representation of the data model for
                      Network TE Tunnel configuration



Jiang & Li             Expires September 14, 2017              [Page 12]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


4.2.1.  Configuration Hierarchy

   The Tunnel configuration container is logically divided into
   following high-level config areas:

               TE-Tunnel parameters
                   o Global Tunnel parameters
                   o Point to Point Tunnel parameters
                       - Tunnels
                           - Per-Tunnel:
                               tunnel-constraint
                               protect-policy
                               tunnel-service
                       - bidirection-co-route-groups
                           - co-route-group

           Figure 11: high-level Tunnel configuration container

   Following subsections briefly explain these configuration areas.

4.2.1.1.  Network TE-Tunnel parameters

   Network TE tunnel parameters is used to describe the common
   properties of different types of Network TE tunnels, including SR-TE
   and RSVP-TE Tunnel, So the configuration is further divided into sub
   categories as follows.

4.2.1.1.1.  Global Tunnel parameters

   Global Tunnel parameters is used to configure the bandwidth threshold
   of Network TE tunnel, it describe Network TE tunnel max bandwidth of
   network, only effective when enable auto-bandwidth adjustment.

4.2.1.1.2.  Point to Point Tunnel parameters

   Network Point to Point Tunnel parameters is used to configure the
   detail properties of Network TE Tunnel, the Tunnel-type include SR-TE
   and RSVP-TE.  The manage-type describe the tunnel management right
   belongs to SDN controller or network element.  The manage-protocol
   means the tunnel management protocol between SDN controller and
   devices.  The tunnel configuration support explicit other constraints
   on path set up, also the protect-policy like Hot standby, FRR is in
   parameters.  Tunnel service is used to for identify the tunnel can be
   used on forwarding plane such as Qos and IGP capabilities of this
   tunnel interface

   bidirection-co-route-groups is already mentioned above in Network UTE
   tunnel configuration.



Jiang & Li             Expires September 14, 2017              [Page 13]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


4.3.  Operational state

   Operational state of Network TE tunnel can be queried and obtained
   from read-only state containers that fall under the same tree (/ute-
   tunnel:ute-tunnel-oper /ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-
   tunnel:tunnel) as the configuration.

   Please note this state tree refers both the configuration "applied"
   state.  Following is a simplified graphical representation of the
   data model for Network TE tunnel operational state.









































Jiang & Li             Expires September 14, 2017              [Page 14]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


            +--ro  te-tunnel-oper
                augment /ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel:
                +--ro path-setup-type?   pce-type:path-setup-type
                +--ro co-route-name?     string
                +--ro trigger-source?    pce-type:trigger-type
                +--ro path-lists
                    +--ro path-list* [option-number]
                        +--ro option-number    uint16
                        +--ro paths* [path-role lsp-id]
                            +--ro path-role               pce-type:lsp-role
                            +--ro lsp-id                  uint32
                            +--ro active?                 boolean
                            +--ro bandwidth?              pce-type:bandwidth
                            +--ro request-latency?        uint32
                            +--ro path-latency?           uint32
                            +--ro path-metric?            uint32
                            +--ro include-affinity-any?   pce-type:affinity
                            +--ro include-affinity-all?   pce-type:affinity
                            +--ro exclude-affinity?       pce-type:affinity
                            +--ro setup-priority?         uint8
                            +--ro holdup-priority?        uint8
                            +--ro hops
                            |  +--ro hop* [hop-index]
                            |     +--ro hop-index       uint32
                            |     +--ro ne-id?          yang:uuid
                            |     +--ro ltp-id?         yang:uuid
                            |     +--ro ip-address?     inet:ipv4-address
                            |     +--ro hop-inc-type?   pce-type:hop-inc-type
                            +--ro sr-label-stack
                            +--ro sr-label* [hop-index]
                                +--ro hop-index              uint32
                                +--ro sid?                   uint32
                                +--ro sid-type?              sid-type
                                +--ro ipv4-node-info
                                |  +--ro node-address?   inet:ipv4-address
                                +--ro ipv6-node-info
                                |  +--ro node-address?   inet:ipv6-address
                                +--ro ipv4-adjacency-info
                                |  +--ro local-address?    inet:ipv4-address
                                |  +--ro remote-address?   inet:ipv4-address
                                +--ro ipv6-adjacency-info
                                |  +--ro local-address?    inet:ipv6-address
                                |  +--ro remote-address?   inet:ipv6-address
                                +--ro lsr-id
                                    +--ro node-lsr-id?   inet:ip-address

   Figure 12: simplified graphical representation of the data model for
                         Tunnel Operational state



Jiang & Li             Expires September 14, 2017              [Page 15]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   The Network TE Tunnel Operational states mostly the subset of
   configuration data, based on path constraints, SDN Controller can
   calculate the path which can be represent by hops for both RSVP-TE
   and SR-TE, these two kind of tunnels have many features in common
   like affinity, but for SR-TE only it needs the SR label stack to show
   the whole path, and if the label stack is too deep, it also need to
   identify the lsr-id who should do the label adhesion job in the path.

4.4.  Notifications

   This model defines a list of notifications to inform subscriber of
   important events detected during the configuration and operation.
   These events include events related to changes in the operational
   state of an Network TE Tunnel, including tunnel-besteffort event when
   Tunnel downgrades to best effort, tunnel-unprotected when Tunnel
   downgrades to non protection, tunnel-overlap event when Tunnel's
   primary and secondary LSPs are overlap, tunnel-constraint-unsatisfied
   event when Tunnel new constraint is unsatisfied.  Following is a
   simplified graphical representation of the data model for Network TE
   Tunnel notifications.

               module: net-te-tunnel
                   notifications:
                       +---n tunnel-besteffort
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-besteffort-clear
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-unprotected
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-unprotected-clear
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-overlap
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-overlap-clear
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-constraint-unsatisfied
                       |  +--ro tunnel-name?   leafref
                       +---n tunnel-constraint-unsatisfied-clear
                           +--ro tunnel-name?   leafref

   Figure 13: simplified graphical representation of the data model for
                      Network TE Tunnel notifications

4.5.  Actions

   This model defines a list of rpcs that allow performing an action or
   executing a command on the protocol.  For here, it only have one RPC
   to support query-te-tunnels-nbi to query all TE Tunnels Following is



Jiang & Li             Expires September 14, 2017              [Page 16]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


   a simplified graphical representation of the data model for Network
   TE Tunnel actions.

            module: ietf-OPSAWG-te-tunnel
                RPCs:
                    +---x query-te-tunnels-nbi
                        +--ro input
                        |  +--ro src-ne-id      yang:uuid
                        |  +--ro dst-ne-id      yang:uuid
                        |  +--ro tunnel-name?   pce-type:tunnel-name
                        +--ro output
                            +--ro te-tunnel-brief
                                +--ro total-record-num?   uint32
                                +--ro te-tunnel*
                                +--ro tunnel-name?   pce-type:tunnel-name
                                +--ro tunnel-type?   identityref
                                +--ro user-label?    string
                                +--ro source
                                |  +--ro ne-id?        yang:uuid
                                |  +--ro ip-address    inet:ip-address
                                +--ro destination
                                |  +--ro ne-id?        yang:uuid
                                |  +--ro ip-address    inet:ip-address
                                +--ro bandwidth?     uint32
                                +--ro min-latency?   uint32

   Figure 14: simplified graphical representation of the data model for
                         Network TE Tunnel actions

4.6.  Open Items

   TBD

5.  YANG Specification

   Following are actual YANG definition for Network UTE Tunnel and
   Network TE Tunnel constructs defined earlier in the document, Network
   UTE Tunnel yang file is Unified TE tunnel and used to describe the
   common properties of different types of Network TE tunnels, Network
   TE Tunnel yang file is augment from it.

<CODE BEGINS> file "ietf-OPSAWG-ute-tunnel.yang"----->
module ietf-OPSAWG-ute-tunnel {
    namespace namespace "urn:ietf:params:xml:ns:yang:ietf-OPSAWG-ute-tunnel";
    prefix ute-tunnel;

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



Jiang & Li             Expires September 14, 2017              [Page 17]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


    import ietf-ac-pub-type {prefix ac-type;}

    organization "IETF OPSA Working Group";
    contact
    "Editor:   Robin Li
                <mailto:lizhenbin@huawei.com>";
    description ;
    revision 2017-03-11{
        description Initial version;
        reference ;
    }


   enumeration


    typedef manage-protocol{
        type enumeration{
            enum netconf{
                value 0;
            }
        }
    }

    typedef control-protocol{
        type enumeration{
            enum pcep{
                value 0;
            }
            enum netconf{
                value 1;
            }
        }
    }

    typedef manage-type{
        type enumeration{
            enum ne{
                value 0;
                description Tunnel is create and delete,modified by ne;
            }
            enum controller{
                value 1;
                description tunne is create,delete andmodified by controller;
            }
        }
    }




Jiang & Li             Expires September 14, 2017              [Page 18]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


    typedef control-mode{
        type enumeration{
            enum delegate{
                value 0;
            }
            enum report{
                value 1;
            }
            enum none{
                value 2;
            }
        }
    }

    typedef tunnel-down-clear-reason {
        type enumeration {
              enum up {
                   value 1;
                   description indicates the tunnel is down .;
              }
              enum delete {
                    value 2;
                    description indicates the tunnel is delete .;
              }
        }
    }
    typedef oper-type {
        type enumeration {
              enum update {
                   value 0;
                   description indicates the tunnel lsp is update .;
              }
              enum remove {
                    value 1;
                    description indicates the tunnel lsp is remove .;
              }
        }
    }

   Identities

    identity tunl-type {
    }
    identity te{
        base tunl-type;
    }
    identity uni{
        base tunl-type;



Jiang & Li             Expires September 14, 2017              [Page 19]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


    }


   Groupings

    grouping src-or-dst{
        leaf ne-id{
            type yanguuid;
        }
        leaf ip-address{
            type inetip-address;
            mandatory true;
        }
    }

   Main container of cfg

    container ute-tunnel-cfg{
        container p2p-tunnel{
            container tunnels{
                list tunnel{
                    key tunnel-name;
                    leaf tunnel-name{
                        type string {
                            length 1..64;
                        }
                        description Tunnel Name;
                    }
                    leaf user-label{
                        type string {
                            length 0..242;
                        }
                    }
                    leaf tunnel-type{
                        type identityref{
                            base tunl-type;
                        }
                        mandatory true;
                    }
                    leaf admin-status{
                        type ac-typeadmin-status;
                        default admin-up;
                    }
                    leaf sym-tunnel-name{
                        type string {
                            length 1..255;
                        }
                    }



Jiang & Li             Expires September 14, 2017              [Page 20]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                    leaf mtu{
                        type uint32 {
                            range 46..9600;
                        }
                        default 1500;
                    }
                    leaf manage-type{
                        type manage-type;
                    }
                    leaf manage-protocol{
                        type manage-protocol;
                    }
                    leaf control-protocol {
                            description The tunnel path's control protocol type;
                        type control-protocol;
                        default pcep;
                    }
                    leaf control-mode{
                        type control-mode;
                    }
                    leaf adopt {
                        description Tunnel is adopted by controller and can be relayed by services;
                        type boolean;
                        default false;
                    }
                    leaf ip-address{
                        type inetipv4-address;
                    }
                    leaf ip-unnumbered{
                        type string {
                            length 1..64;
                        }
                    }
                    container source{
                        uses src-or-dst;
                    }
                    container destination{
                        uses src-or-dst;
                    }
                }
            }

            container bidirection-co-route-groups{
                list co-route-group{
                    key co-route-name;
                    leaf co-route-name{
                        type string {
                            length 1..64;



Jiang & Li             Expires September 14, 2017              [Page 21]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        }
                    }
                    leaf user-label{
                        type string {
                            length 0..242;
                        }
                    }
                    leaf bfd-enable {
                        type boolean;
                        default false;
                    }
                    container first-tunnel{
                        leaf tunnel-name {
                            type string {
                                length 1..64;
                            }
                        }
                    }
                    container second-tunnel{
                        leaf tunnel-name {
                            type string {
                                length 1..64;
                            }
                        }
                    }
                }
            }
        }
    }

   Main container of oper


    container ute-tunnel-oper{
        config false;
        container p2p-tunnel{
            container tunnels{
                list tunnel{
                    key tunnel-name;
                    leaf tunnel-name{
                        type string {
                            length 1..64;
                        }
                        description Tunnel Name;
                    }
                    leaf tunnel-type{
                        type identityref{
                            base tunl-type;



Jiang & Li             Expires September 14, 2017              [Page 22]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        }
                        mandatory true;
                    }
                    leaf oper-status{
                        type ac-typeoperate-status;
                    }
                    leaf tunnel-id{
                        type uint32;
                    }
                    leaf sym-tunnel-name{
                        type string {
                            length 1..255;
                        }
                    }
                    container source{
                        uses src-or-dst;
                    }
                    container destination{
                        uses src-or-dst;
                    }
                }
            }
        }
    }


     notification



    notification tunnel-state-down{
        leaf tunnel-name{
             type leafref{
                 path ute-tunnel-operp2p-tunneltunnelstunneltunnel-name;
             }
        }
    }

    notification tunnel-state-down-clear{
        leaf tunnel-name{
             type leafref{
                 path ute-tunnel-operp2p-tunneltunnelstunneltunnel-name;
             }
        }
        leaf reason {
            type  tunnel-down-clear-reason;
        }
    }



Jiang & Li             Expires September 14, 2017              [Page 23]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


    notification tunnel-lsp-changed{
               leaf tunnel-name{
                   type leafref{
                     path ute-tunnel-operp2p-tunneltunnelstunneltunnel-name;
                   }
                }
                leaf oper-type{
                    type oper-type;
                }
                leaf sym-path-name{
                    type leafref{
                      path ute-tunnel-operp2p-tunneltunnelstunnelsym-tunnel-name;
                    }
                }
                container source{
                    uses src-or-dst;
                }
            }
} <CODE ENDS>

                  Figure 15: Network UTE Tunnel Yang File

<CODE BEGINS> file "ietf-OPSAWG-te-tunnel.yang"----->
module ietf-OPSAWG-te-tunnel{
    namespace "urn:ietf:params:xml:ns:yang:ietf-OPSAWG-te-tunnel";
    prefix "te-tunnel";

    import ietf-yang-types {prefix yang;}
    import ietf-inet-types {prefix inet;}
    import ietf-OPSAWG-ute-tunnel{prefix ute-tunnel;}
    import ietf-pce-type {prefix pce-type;}

    organization "IETF OPSA Working Group";
    contact
    "Editor:   Robin Li
                <mailto:lizhenbin@huawei.com>";
    description "Net MPLS TE tunnel";
    revision 2016-01-01{
        description "Initial version";
        reference "";
    }

  /*****************************************************************
  * enumeration
  *****************************************************************/
    typedef  revertive-type{
        type enumeration{
            enum revertive{



Jiang & Li             Expires September 14, 2017              [Page 24]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                value 0;
                description "hot-standby revertive";
            }
            enum no-revertive{
                value 1;
                description "hot-standby no-revertive";
            }
        }
    }

    typedef bandwidth-mode{
        type enumeration{
            enum original-bandwidth{
                value 0;
                description "hotstandby lsp's bandwidth is same with the primary lsp";
            }
            enum dynamic-bandwidth{
                value 1;
                description "hotstandby lsp use 0 bandwidth";
            }
        }
    }

    typedef sr-path-type{
        type enumeration{
            enum adjacency-sid{
                value 1;
            }
            enum node-sid{
                value 2;
            }
            /*
            enum hybrid{
                value 3;
            }
            */
        }
    }

    typedef sid-type {
        type enumeration {
            enum "ipv4-node" {
                value 1;
                description "IPv4 node sid";
            }
            /*
            enum "ipv6-node" {
                value 2;



Jiang & Li             Expires September 14, 2017              [Page 25]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                description "IPv6 node sid";
            }
            */
            enum "ipv4-adjacency" {
                value 3;
                description "IPv4 adjacency sid";
            }
            /*
            enum "ipv6-adjacency" {
                value 4;
                description "IPv6 adjacency sid";
            }
            */
            /* value 5 is remained for unnumbered adjacency */
            enum "adhere-label" {
                value 6;
                description "IPv6 adjacency sid";
            }
        }
      }

    typedef protocol-type{
        type enumeration{
            enum isis{
                value 1;
            }
            enum ospf{
                value 2;
            }
        }
    }

      typedef igp-metric-type{
        type enumeration{
            enum relative{
                value 1;
            }
            enum absolute{
                value 2;
            }
        }
    }

    typedef propagate-mode{
        type enumeration{
            enum shortcut{
                value 1;
            }



Jiang & Li             Expires September 14, 2017              [Page 26]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


            enum forward-adjacency{
                value 2;
            }
        }
    }

 /*****************************************************************
  * Groupings
  *****************************************************************/
    grouping tunnel-constraint-cfg{

            leaf setup-priority{
                type uint8 {
                    range "0 .. 7";
                }
                default 7;
            }
            leaf holdup-priority{
                type uint8 {
                    range "0 .. 7";
                }
                default 7;
            }
            leaf bandwidth{
                type uint32 {
                    range "0..4000000000";
                }
                default 0;
            }
            leaf oper-bandwidth{
                type uint32 {
                    range "0..4000000000";
                }
                default 0;
            }
            list path-options{
                key "option-number";
                leaf option-number{
                    type uint16{
                        range "1 | 65535";
                    }
                    description "path option number , only support  1 and 65535, 65535 is for the best-effort path";
                }
                list path-constraints{
                    key "path-role";
                    leaf path-role{
                        type pce-type:lsp-role;
                    }



Jiang & Li             Expires September 14, 2017              [Page 27]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                    leaf latency{
                        type uint32 {
                            range "0..60000000";
                        }
                        default 0;
                    }
                    leaf hop-limit{
                        type uint16 {
                            range "1..32";
                        }
                        default 32;
                    }
                    leaf include-affinity-any{
                        type pce-type:affinity;
                    }
                    leaf include-affinity-all{
                        type pce-type:affinity;
                                                description "include-affinity-all";
                    }
                    leaf exclude-affinity{
                        type pce-type:affinity;
                    }
                    leaf te-attribute-ignore{
                        type bits {
                            bit ignore-affinity {
                                position 0;
                            }
                        }
                    }
                    container explicit-path-hops{
                        list explicit-path-hop{
                            key "hop-index";
                            leaf hop-index{
                                type uint32{
                                    range 0..63;
                                }
                            }
                            leaf ne-id{
                                type yang:uuid;
                            }
                            leaf ltp-id{
                                type yang:uuid;
                            }
                            leaf ip-address{
                                type "inet:ipv4-address";
                            }
                            leaf hop-inc-type{
                                type pce-type:hop-inc-type;



Jiang & Li             Expires September 14, 2017              [Page 28]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                            }
                            leaf hop-type{
                                type pce-type:hop-type;
                            }
                        }
                    }
                }
            }
        }

    grouping hot-standby{
        leaf revertive{
            type revertive-type;
            default revertive;
        }
        leaf bandwidth-mode{
            type bandwidth-mode;
            default original-bandwidth;
        }
        leaf wtr{
            type uint32 {
                range "0..2592000";
            }
            default 10;
            description "wait to restore";
        }
    }
/*************************************************************
  * augment extension
  **************************************************************/
    augment "/ute-tunnel:ute-tunnel-cfg" {
        container global-cfg {
            leaf bandwidth-threshold {
                description "TE tunel max bandwidth of network, only effective to service-driven tunnel";
                type uint32 {
                    range "0..4000000000";
                }
                default 500000;
            }
        }
    }
    augment "/ute-tunnel:ute-tunnel-cfg/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel"{
        when "ute-tunnel:tunnel-type='te'";

        leaf path-setup-type{
            type pce-type:path-setup-type;
            default rsvp-te;
        }



Jiang & Li             Expires September 14, 2017              [Page 29]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


        leaf sr-path-type {
                description "The SR-TE tunnel path's type";
            type sr-path-type;
            default adjacency-sid;
        }

        leaf is-bypass-tunnel{
            must "path-setup-type = 'pce-type:rsvp-te'";
            type boolean;
            default false;
        }

        container bypass-tunnel{
            must "path-setup-type = 'pce-type:rsvp-te'";
            when "is-bypass-tunnel='true'";
            container protect-interface{
                leaf ltp-id{
                    type yang:uuid;
                }
            }
        }

        leaf hot-standby-enable {
            type "boolean";
            default false;
            description "hot-standby protect capability";
        }

        container tunnel-constraint{
            uses tunnel-constraint-cfg;
        }

        container protect-policy{
            when "is-bypass-tunnel='false'";

            container hot-standby{
                uses hot-standby;
            }
            container frr{
                must "path-setup-type = 'pce-type:rsvp-te'";

                leaf fast-reroute{
                    type boolean;
                }
                container bypass-attributes{
                    leaf setup-priority{
                        type uint8 {
                            range "0 .. 7";



Jiang & Li             Expires September 14, 2017              [Page 30]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        }
                        default 7;
                    }
                    leaf holdup-priority{
                        type uint8 {
                            range "0 .. 7";
                        }
                        default 7;
                    }
                    leaf bandwidth{
                        type uint32 {
                            range "0..4000000000";
                        }
                        default 0;
                    }
                    leaf include-affinity-any{
                        type pce-type:affinity;
                    }
                    leaf include-affinity-all{
                            type pce-type:affinity;
                    }
                    leaf exclude-affinity{
                        type pce-type:affinity;
                    }
                    leaf te-attribute-ignore{
                        type bits {
                            bit ignore-affinity {
                                position 0;
                            }
                        }
                    }
                }
            }
        }

        container tunnel-service{
            leaf service-class{
                type bits{
                    bit be{
                        position 0;
                    }
                    bit af1{
                        position 1;
                    }
                    bit af2{
                        position 2;
                    }
                    bit af3{



Jiang & Li             Expires September 14, 2017              [Page 31]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        position 3;
                    }
                    bit af4{
                        position 4;
                    }
                    bit ef{
                        position 5;
                    }
                    bit cs6{
                        position 6;
                    }
                    bit cs7{
                        position 7;
                    }
                    bit default{
                        position 8;
                    }
                }
            }
            leaf outbound-limit{
                type boolean;
                default false;
            }
            leaf reserved-for-binding{
                type boolean;
            }
            leaf statistic-enable{
                type boolean;
                default false;
                description "traffic statistic enable";
            }
            container igp-capabilities {
            description "The IGP capabilities of this tunnel interface";
                list igp-instance {
                description "The key of this IGP instance";
                    key "index";
                    leaf index{
                        type uint32;
                        description "The index of this object";
                    }
                    leaf protocol-type{
                        type protocol-type;
                        description "The protocol type of this tunnel interface";
                        mandatory true;
                    }
                    leaf igp-instance-id{
                        type uint32{
                            range 1..4294967295;



Jiang & Li             Expires September 14, 2017              [Page 32]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                        }
                        description "The id of this protocol instance";
                        default 1;
                    }
                    leaf ospf-area-id{
                        when protocol-type=ospf;
                        type uint32{
                            range 0..4294967295;
                        }
                        description "The id of OSPF area";
                    }
                    }
                leaf propagate-mode{
                    type propagate-mode;
                    description "The propagate mode";
                }
                    leaf advertise-hold-time {
                    when propagate-mode=forward-adjacency;
                           type uint32{
                        range 0..4294967295;
                    }
                    description "The time value of advertise hold timer when FA is enabled";
                       }
                leaf igp-metric-type{
                    type igp-metric-type;
                    description "The igp metric type";
                }
                       leaf relative-metric-value {
                    when igp-metric-type=relative;
                           type int32{
                        range -10..10;
                    }
                    description "The igp metric value when type is relative";
                       }
                       leaf absolute-metric-value {
                    when igp-metric-type=absolute;
                        type uint32{
                        range 1..65535;
                    }
                    description "The igp metric value when type is absolute";
                }
                }
        }
    }

    augment "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel" {
        when "ute-tunnel:tunnel-type='te'";
        leaf path-setup-type{



Jiang & Li             Expires September 14, 2017              [Page 33]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


            config "false";
            type pce-type:path-setup-type;
            default rsvp-te;
        }
        leaf co-route-name{
            type string {
                length "1..64";
            }
        }
        leaf trigger-source{
            type pce-type:trigger-type;
        }
        container path-lists{
            list path-list{
                key "option-number";
                leaf option-number{
                    type uint16;
                    description "path option number , only support  1 and 65535, 65535 is for the best-effort path";
                }
                list paths{
                    key "path-role lsp-id";
                    leaf path-role{
                        type pce-type:lsp-role;
                    }
                    leaf lsp-id{
                        type uint32{
                            range 0..4294967295;
                        }
                    }
                    leaf active {
                        type boolean;
                    }
                                        uses path-constraint-inuse;
                    container hops{
                        list hop{
                            key "hop-index";
                            leaf hop-index{
                                type uint32{
                                    range 0..63;
                                }
                            }
                            leaf ne-id{
                                type yang:uuid;
                            }
                            leaf ltp-id{
                                type yang:uuid;
                            }
                            leaf ip-address{



Jiang & Li             Expires September 14, 2017              [Page 34]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                                type inet:ipv4-address;
                            }
                            leaf hop-inc-type{
                                type pce-type:hop-inc-type;
                            }
                        }
                    }
                    container sr-label-stack{
                    description "The label stack of this SR-TE tunnel";
                        list sr-label{
                        description "The SID information of this hop instance";
                            key "hop-index";
                            leaf hop-index{
                                type uint32{
                                    range 0..63;
                                }
                                description "The index of this hop instance";
                            }
                            leaf sid {
                                type uint32;
                                description "The SID of this hop instance";
                            }
                            leaf sid-type {
                                type sid-type;
                                description "The type of this SID";
                            }
                            container ipv4-node-info {
                            description "The information of this IPv4 node SID";
                                when sid-type=ipv4-node;
                                    leaf node-address {
                                        type inet:ipv4-address;
                                description "The address of this IPv4 node SID";
                                    }
                                }
                                container ipv6-node-info {
                            description "The information of this IPv6 node SID";
                                when sid-type=ipv6-node;
                                    leaf node-address {
                                        type inet:ipv6-address;
                                description "The address of this IPv6 node SID";
                                    }
                                }
                                container ipv4-adjacency-info {
                            description "The information of this IPv4 adj SID";
                                when sid-type=ipv4-adjacency;
                                    leaf local-address {
                                        type inet:ipv4-address;
                                description "The local address of this IPv4 adj SID";



Jiang & Li             Expires September 14, 2017              [Page 35]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                                    }
                                    leaf remote-address {
                                        type inet:ipv4-address;
                                description "The remote address of this IPv4 adj SID";
                                    }
                                }
                                container ipv6-adjacency-info {
                            description "The information of this IPv6 node SID";
                                when sid-type=ipv6-adjacency;
                                    leaf local-address {
                                        type inet:ipv6-address;
                                description "The local address of this IPv6 adj SID";
                                    }
                                    leaf remote-address {
                                        type inet:ipv6-address;
                                description "The remote address of this IPv6 adj SID";
                                    }
                                }
                                container lsr-id {
                            description "The information of this adhere node";
                                when sid-type=adhere-label;
                                    leaf node-lsr-id {
                                        type inet:ip-address;
                                description "The LSR-ID address of this adhere node";
                                    }
                                }
                        }
                    }
                }
            }
        }
    }

    grouping te-tunnel-brief-grouping{
            leaf total-record-num{
                type uint32;
            }
            list te-tunnel{
                leaf tunnel-name{
                    type pce-type:tunnel-name;
                    description "Tunnel Name";
                }
                leaf tunnel-type{
                    type identityref{
                        base ute-tunnel:tunl-type;
                    }
                }
                leaf user-label{



Jiang & Li             Expires September 14, 2017              [Page 36]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                    type string {
                        length "0..242";
                    }
                }
                container source{
                    uses ute-tunnel:src-or-dst;
                }
                container destination{
                    uses ute-tunnel:src-or-dst;
                }
                leaf bandwidth{
                    type uint32;
                }
                leaf min-latency{
                    type uint32 {
                        range "0..60000000";
                    }
                    description "Min latency of configuration";
                }
            }
    }
    grouping path-constraint-inuse{
                leaf bandwidth{
                        type pce-type:bandwidth;
                        description "bandwidth";
                }
                leaf request-latency{
                                        type uint32{
                        range 0..4294967295;
                    }
                    description "latency";
                                }
                                leaf path-latency{
                                        type uint32{
                        range 0..4294967295;
                    }
                                }
                                leaf path-metric{
                                    type uint32;
                    description "The metric value of this path";
                                }
                                leaf include-affinity-any{
                    type pce-type:affinity;
                }
                leaf include-affinity-all{
                    type pce-type:affinity;
                                        description "include-affinity-all";
                }



Jiang & Li             Expires September 14, 2017              [Page 37]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


                leaf exclude-affinity{
                    type pce-type:affinity;
                }
                leaf setup-priority{
                        type uint8 {
                                 range "0 .. 7";
                        }
                }
                leaf holdup-priority{
                       type uint8 {
                                range "0 .. 7";
                        }
                }
    }
  /*************************************************************
  * rpc
  **************************************************************/
    rpc query-te-tunnels-nbi{
        description "Tunnels generated through NBI, E2E sync and adopted, state is up";
        input{
            leaf src-ne-id{
                type yang:uuid;
                mandatory true;
            }
            leaf dst-ne-id{
                type yang:uuid;
                mandatory true;
            }
            leaf tunnel-name{
                type pce-type:tunnel-name;
                description "Tunnel Name";
                mandatory false;
            }
        }
        output{
            container te-tunnel-brief{
            uses te-tunnel-brief-grouping;
            }
        }
    }

  /***************************************************************
  * notification
  ***************************************************************/
    notification tunnel-besteffort{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";



Jiang & Li             Expires September 14, 2017              [Page 38]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


             }
             description "Tunnel Name";
        }
        description "Tunnel downgrades to besteffort";
    }
    notification tunnel-besteffort-clear{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }
        description "Tunnel upgrades to main LSP";
    }
    notification tunnel-unprotected{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }
        description "Tunnel downgrades to non protection";
    }
    notification tunnel-unprotected-clear{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }
        description "Tunnel upgrades to protection";
    }
    notification tunnel-overlap{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }
        description "Tunnel's primary and secondary LSPs are overlap";
    }
    notification tunnel-overlap-clear{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }



Jiang & Li             Expires September 14, 2017              [Page 39]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


        description "Tunnel's primary and secondary LSPs completely separate";
    }
    notification tunnel-constraint-unsatisfied{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }
        description "Tunnel new constraint is unsatisfied";
    }
    notification tunnel-constraint-unsatisfied-clear{
        leaf tunnel-name{
            type leafref{
                 path "/ute-tunnel:ute-tunnel-oper/ute-tunnel:p2p-tunnel/ute-tunnel:tunnels/ute-tunnel:tunnel/ute-tunnel:tunnel-name";
             }
             description "Tunnel Name";
        }
        description "Tunnel new constraint is satisfied";
    }
}<CODE ENDS>

                  Figure 16: Network TE Tunnel Yang File

6.  Security Considerations

   The configuration, state, action and notification data defined using
   YANG data models in this document are likely to be accessed via the
   protocols such as NETCONF [RFC6241] etc.  Hence, YANG implementations
   MUST comply with the security requirements specified in section 15 of
   [RFC6020].  Additionally, NETCONF implementations MUST comply with
   the security requirements specified in sections 2.2, 2.3 and 9 of
   [RFC6241] as well as section 3.7 of [RFC6536].

7.  IANA Considerations

   This document has no actions for IANA.

8.  Contributors

   The following people all contributed to creating this document,
   listed in alphabetical order:

      TBD







Jiang & Li             Expires September 14, 2017              [Page 40]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


9.  Acknowledgements

   This document has benefited from reviews, suggestions, comments and
   proposed text provided by the following members, listed in
   alphabetical order:xxx.

   Part of the initial draft of this document was picked up from
   previous documents, and this section lists the acknowledgements from
   them.

   From "xxx" [xxx]

   The following people all contributed to creating this document,
   listed in alphabetical order:

   xxx, Huawei Technologies

   This document has benefited from reviews, suggestions, comments and
   proposed text provided by the following members, listed in
   alphabetical order: xxx.

   The authors of "xxx" [xxx] were:

   xxx , NetCracker

   The initial draft of this document merged one document, and this
   section lists the acknowledgements from it.

   From "draft-jiang-opsawg-nettunnel-model-yang"

   The authors of this draft would like to thank the following persons
   for the provided valuable feedback and contributions: xxx contributed
   to an early version of this draft.

   The authors of "draft-jiang-opsawg-nettunnel-model-yang" were:

   TBD

   The authors of this draft would like to thank the following persons
   for the provided valuable feedback: TBD

10.  References

10.1.  Normative References







Jiang & Li             Expires September 14, 2017              [Page 41]

Internet-Draft  Yang Model of Network-based P2P TE Tunnel     March 2017


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

10.2.  Informative References

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

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

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

Authors' Addresses

   Rui Jiang
   Huawei Technologies
   Huawei Bld., No.156 Beiqing Rd.
   Beijing  100095
   China

   Email: jiangrui1@huawei.com


   Zhenbin Li
   Huawei Technologies
   Huawei Bld., No.156 Beiqing Rd.
   Beijing  100095
   China

   Email: lizhenbin@huawei.com











Jiang & Li             Expires September 14, 2017              [Page 42]