ISIS Working Group                                          S. Litkowski
Internet-Draft                                                    Orange
Intended status: Standards Track                                D. Yeung
Expires: September 5, December 25, 2015                                     A. Lindem
                                                           Cisco Systems
                                                                J. Zhang
                                                        Juniper Networks
                                                               L. Lhotka
                                                          March 04,

                                                           June 23, 2015

                   YANG Data Model for ISIS protocol
                    draft-ietf-isis-yang-isis-cfg-02
                    draft-ietf-isis-yang-isis-cfg-03

Abstract

   This document defines a YANG data model that can be used to configure
   and manage ISIS protocol on network elements.  It also defined an
   extension module for segment routing configuration and operation.

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 [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 5, December 25, 2015.

Copyright Notice

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

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Tree diagram  . . . . . . . . . . . . . . . . . . . . . .   2   3
   2.  Design of the Data Model  . . . . . . . . . . . . . . . . . .   3
     2.1.  ISIS Configuration  . . . . . . . . . . . . . . . . . . .   5   9
     2.2.  Multitopology Parameters  . . . . . . . . . . . . . . . .   7  10
     2.3.  Per-Level Parameters  . . . . . . . . . . . . . . . . . .   7  10
     2.4.  Per-Interface Parameters  . . . . . . . . . . . . . . . .   8  10
     2.5.  ISO parameters  . . . . . . . . . . . . . . . . . . . . .  10  11
     2.6.  IP FRR  . . . . . . . . . . . . . . . . . . . . . . . . .  10  11
     2.7.  Segment Routing  Operational State . . . . . . . . . . . . . . . . . . . .  11
   3.  RPC Operations  .  10
     2.8.  Operational State . . . . . . . . . . . . . . . . . . . .  11
   3.  RPC Operations . .  12
   4.  Notifications . . . . . . . . . . . . . . . . . . . . .  18
   4.  Notifications . . .  12
   5.  Segment Routing . . . . . . . . . . . . . . . . . . . . . . .  16
     5.1.  Segment Routing activation  . . . . . . . . . . . . . . .  19
     5.2.  Advertising mapping server policy . . . . . . . . . . . .  19
   5.
   6.  Interaction with Other YANG Modules . . . . . . . . . . . . .  23
   6.  19
   7.  ISIS YANG Module  . . . . . . . . . . . . . . . . . . . . . .  20
   8.  ISIS Segment Routing YANG Module  . . . . . . . .  23
   7. . . . . . .  94
   9.  Security Considerations . . . . . . . . . . . . . . . . . . . 110
   8. 106
   10. Contributors  . . . . . . . . . . . . . . . . . . . . . . . . 111
   9. 107
   11. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . 112
   10. 108
   12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 112
   11. 108
   13. Normative References  . . . . . . . . . . . . . . . . . . . . 112 108
   Appendix A.  Example: NETCONF <get> Reply . . . . . . . . . . . . 112 108
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . 115 111

1.  Introduction

   This document defines a YANG data model for ISIS routing protocol.

   The data model covers configuration of an ISIS routing protocol
   instance as well as operational states.

1.1.  Tree diagram

   A simplified graphical representation of the data model is presented
   in Section 2.

   The meaning of the symbols in these diagrams is as follows:

   o  Brackets "[" and "]" enclose list keys.

   o  Curly braces "{" and "}" contain names of optional features that
      make the corresponding node conditional.

   o  Abbreviations before data node names: "rw" means configuration
      (read-write), and "ro" state data (read-only).

   o  Symbols after data node names: "?" means an optional node and "*"
      denotes a "list" or "leaf-list".

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

   o  Ellipsis ("...") stands for contents of subtrees that are not
      shown.

2.  Design of the Data Model

   The ISIS YANG module is divided in two main "isis" containers that
   are augmenting the "routing-protocol" lists in ietf-routing module
   with specific ISIS parameters.

   One container contains the writable parameters, while the other
   contains the operational states.

   The figure below describe the overall structure of the isis YANG
   module:

module: ietf-isis
augment /rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route:
   +--ro metric?       uint32
   +--ro tag*          uint64
   +--ro route-type?   enumeration
   +--ro segment-id?   uint32 {segment-routing}?
augment /rt:active-route/rt:output/rt:route:
   +--ro metric?       uint32
   +--ro tag*          uint64
   +--ro route-type?   enumeration
   +--ro segment-id?   uint32 {segment-routing}?

augment /if:interfaces/if:interface:
   +--rw clns-mtu?   uint16
augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol:
   +--rw isis
      +--rw instance* [routing-instance]
         +--rw routing-instance          rt:routing-instance-ref enable?                   boolean {admin-control}?
      +--rw level-type?               level
      +--rw system-id?                system-id
      +--rw maximum-area-addresses?   uint8 {maximum-area-addresses}?
      +--rw area-address*             area-address
      +--rw mpls
      |     ...  +--rw ipv4-router-id?   inet:ipv4-address {ipv4-router-id}?
      |  +--rw ipv6-router-id?   inet:ipv6-address {ipv6-router-id}?
      |  +--rw igp-ldp-sync {igp-ldp-sync}?
      +--rw reference-bandwidth?      uint32 {reference-bandwidth}?
      +--rw lsp-mtu?                  uint16
      +--rw lsp-lifetime?             uint16
      +--rw lsp-refresh?              uint16 {lsp-refresh}?
      +--rw graceful-restart {graceful-restart}?
      |     ...  +--rw enable?   boolean
      +--rw node-tag {node-tag}?
      |     ...
         +--rw fast-reroute {fast-reroute}?
         |     ...  +--rw segment-routing {segment-routing}? node-tag* [tag]
      |        ...
      +--rw authentication* [level]
      |  +--rw (authentication-type)?
      |  |     ...
      |  +--rw level           level
      +--rw metric-type* [level]
      |     ...  +--rw value?   enumeration
      |  +--rw level    level
      +--rw preference* [level]
      |  +--rw (granularity)?
      |  |     ...
      |  +--rw level       level
      +--rw default-metric* [level]
      |     ...  +--rw value?   wide-metric
      |  +--rw level    level
      +--rw af* [af] {nlpid-control}?
      |     ...  +--rw topologies* [name] {multi-topology}? af        identityref
      |     ...  +--rw enable?   boolean
      +--rw overload* [level]
      |     ...  +--rw status?    boolean
      |  +--rw timeout?   uint16
      |  +--rw level      level
      +--rw overload-max-metric* [level] {overload-max-metric}?
      |     ...  +--rw interfaces
               ...
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol:
   +--ro isis
      +--ro instance* [routing-instance]
         +--ro routing-instance    rt:routing-instance-ref
         +--ro status?    boolean
      |  +--rw timeout?   uint16
      |  +--rw level      level
      +--rw fast-reroute {fast-reroute}?
      |     ...
         +--ro  +--rw lfa {lfa}?
      +--rw topologies* [name] {multi-topology}?
      |     ...
         +--ro system-counters  +--rw enable?           boolean
      |     ...
         +--ro interfaces  +--rw name              rt:rib-ref
      |  +--rw default-metric* [level]
      |     ...
         +--ro spf-log  |     ...

         +--ro lsp-log
      |  +--rw node-tag {node-tag}?
      |  |     ...
         +--ro database
      |  +--rw fast-reroute {fast-reroute}?
      |        ...
         +--ro hostnames
      +--rw interfaces
         +--rw interface* [name]
               ...

2.1.  ISIS Configuration

   The ISIS configuration currently supports both VRF-centric and
   protocol-centric configuration.  This may be changed in future.

   In a protocol-centric configuration, the isis configuration is
   applied within the standard-routing-instance and the instance list
   helps to reference the routing-instance where ISIS is activated.

   In a VRF-centric configuration, the isis configuration is applied
   directly within the appropriate routing-instance where ISIS is
   activated.  In this case, the instance list will contain a single
   element.

   The ISIS configuration container is divided in:

   o  Global parameters.

   o  Per interface configuration (see Section 2.4).

   It would to up to extension modules to augment this model to support
   vendor specific parameters.
augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol:
   +--rw /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol:
   +--ro isis
      +--rw instance* [routing-instance]
         +--rw routing-instance          rt:routing-instance-ref
         +--rw
      +--ro enable?                   boolean {admin-control}?
      +--ro level-type?               level
         +--rw
      +--ro system-id?                system-id
         +--rw
      +--ro maximum-area-addresses?   uint8 {maximum-area-addresses}?
         +--rw
      +--ro area-address*             area-address
         +--rw
      +--ro mpls
      |  +--rw  +--ro ipv4-router-id?   inet:ipv4-address {ipv4-router-id}?
      |  +--rw  +--ro ipv6-router-id?   inet:ipv6-address {ipv6-router-id}?
      |  +--rw  +--ro igp-ldp-sync {igp-ldp-sync}?
         +--rw
      +--ro reference-bandwidth?      uint32 {reference-bandwidth}?
         +--rw
      +--ro lsp-mtu?                  uint16
         +--rw
      +--ro lsp-lifetime?             uint16
         +--rw
      +--ro lsp-refresh?              uint16 {lsp-refresh}?
         +--rw
      +--ro graceful-restart {graceful-restart}?
      |  +--rw enabled?  +--ro enable?   boolean
         +--rw
      +--ro node-tag {node-tag}?
      |  +--rw  +--ro node-tag* [tag]
      |     +--rw tag    uint32
         +--rw fast-reroute {fast-reroute}?
         |  +--rw lfa {lfa}?
         +--rw segment-routing {segment-routing}?        ...
      +--ro authentication* [level]
      |  +--rw enabled?    boolean  +--ro (authentication-type)?
      |  +--rw bindings  |     +--rw advertise?   boolean     ...
      |     +--rw receive?     boolean
         +--rw authentication*  +--ro level           level
      +--ro metric-type* [level]
      |  +--rw (authentication-type)?  +--ro value?   enumeration
      |  +--ro level    level
      +--ro preference* [level]
      |  +--:(key-chain) {key-chain}?  +--ro (granularity)?
      |  |     ...
      |  +--rw key-chain?      key-chain:key-chain-ref  +--ro level       level
      +--ro default-metric* [level]
      |  +--ro value?   wide-metric
      |  +--:(password)  +--ro level    level
      +--ro af* [af] {nlpid-control}?
      |  +--ro af        identityref
      |     +--rw key?            string  +--ro enable?   boolean
      +--ro overload* [level]
      |  +--ro status?    boolean
      |     +--rw (algorithm)?  +--ro timeout?   uint16
      |  +--ro level      level
      +--ro overload-max-metric* [level] {overload-max-metric}?
      |        +--:(hmac-sha1-12)  +--ro status?    boolean
      |  +--ro timeout?   uint16
      |  +--ro level      level
      +--ro fast-reroute {fast-reroute}?
      |  +--rw hmac-sha1-12?   empty  +--ro lfa {lfa}?
      |  +--ro protected-routes
      |        +--:(hmac-sha1-20)  |     ...
      |  +--ro nonprotected-routes
      |  +--rw hmac-sha1-20?   empty  |     ...
      |        +--:(md5)  +--ro protection-statistics* [frr-protection-method]
      |        ...
      +--ro topologies* [name]
      |  +--ro name          rt:rib-ref
      |  +--rw md5?            empty  +--ro fast-route {fast-reroute}?
      |        ...
      +--ro system-counters
      |        +--:(sha-1)  +--ro level* [level]
      |        ...
      +--ro interfaces
      |  +--ro interface* [interface]
      |  +--rw sha-1?          empty        ...
      +--ro spf-log
      |  +--ro event* [id]
      |        +--:(hmac-sha-1)        ...
      +--ro lsp-log
      |  +--ro event* [id]
      |        ...
      +--ro database
      |  +--rw hmac-sha-1?     empty  +--ro level-db* [level]
      |        ...
      +--ro hostnames
         +--ro hostname* [system-id]
               ...
rpcs:
   +---x clear-adjacency
   |        +--:(hmac-sha-256)  +--ro input
   |     +--ro routing-instance-name             rt:routing-instance-state-ref
   |     +--ro routing-protocol-instance-name    instance-state-ref
   |  +--rw hmac-sha-256?   empty     +--ro level?                            level
   |     +--ro interface?                        string
   +---x clear-database
      +--ro input
         +--ro routing-instance-name             rt:routing-instance-state-ref
         +--ro routing-protocol-instance-name    instance-state-ref
         +--ro level?                            level
notifications:
   +---n database-overload
   |        +--:(hmac-sha-384)  +--ro instance-name?    string
   |  +--ro instance-level?   level
   |  +--ro overload?         enumeration
   +---n lsp-too-large
   |  +--rw hmac-sha-384?   empty  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |        +--:(hmac-sha-512)  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |           +--rw hmac-sha-512?   empty  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw level           level
         +--rw metric-type* [level]  +--ro pdu-size?              uint32
   |  +--rw value?   enumeration  +--ro lsp-id?                lsp-id
   +---n corrupted-lsp-detected
   |  +--rw  +--ro instance-name?    string
   |  +--ro instance-level?   level
   |  +--ro lsp-id?           lsp-id
   +---n attempt-to-exceed-max-sequence
   |  +--ro instance-name?    string
   |  +--ro instance-level?   level
         +--rw preference* [level]
   |  +--rw (granularity)?  +--ro lsp-id?           lsp-id
   +---n id-len-mismatch
   |  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |  +--:(detail)  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw internal?  +--ro pdu-field-len?         uint8
   |  +--ro raw-pdu?               binary
   +---n max-area-addresses-mismatch
   |  +--ro instance-name?         string
   |  +--rw external?   uint8  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--:(coarse)  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |     +--rw default?  +--ro max-area-addresses?    uint8
   |  +--rw level       level
         +--rw default-metric* [level]  +--ro raw-pdu?               binary
   +---n own-lsp-purge
   |  +--rw value?   wide-metric  +--ro instance-name?         string
   |  +--rw  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
         +--rw af* [af] {nlpid-control}?
   |  +--rw af         identityref  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw enabled?   boolean
         +--rw topologies* [name] {multi-topology}?  +--ro lsp-id?                lsp-id
   +---n sequence-number-skipped
   |  +--rw enabled?           boolean  +--ro instance-name?         string
   |  +--rw name               rt:rib-ref  +--ro instance-level?        level
   |  +--rw fast-reroute {fast-reroute}?  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--rw lfa {lfa}?  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw segment-routing {segment-routing}?  +--ro lsp-id?                lsp-id
   +---n authentication-type-failure
   |  +--ro instance-name?         string
   |  +--rw enabled?    boolean  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--rw bindings  +--ro extended-circuit-id?   extended-circuit-id
   |  +--ro raw-pdu?               binary
   +---n authentication-failure
   |     +--rw advertise?   boolean  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |     +--rw receive?     boolean  +--ro interface-name?        string
   |  +--rw default-metric* [level]  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw value?   wide-metric  +--ro raw-pdu?               binary
   +---n version-skew
   |  +--ro instance-name?         string
   |  +--rw level  +--ro instance-level?        level
   |  +--rw node-tag {node-tag}?  +--ro interface-name?        string
   |     +--rw node-tag* [tag]  +--ro interface-level?       level
   |        +--rw tag    uint32
         +--rw overload* [level]  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw status?    boolean  +--ro protocol-version?      uint8
   |  +--rw timeout?   uint16  +--ro raw-pdu?               binary
   +---n area-mismatch
   |  +--rw  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
         +--rw overload-max-metric* [level] {overload-max-metric}?
   |  +--rw status?    boolean  +--ro extended-circuit-id?   extended-circuit-id
   |  +--rw timeout?   uint16  +--ro raw-pdu?               binary
   +---n rejected-adjacency
   |  +--rw  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
         +--rw interfaces
            +--rw interface* [name]
                        ...

2.2.  Multitopology Parameters

   The "topologies" list is used to enable support of MT extensions for
   specific address families.

   Each topology should refer to an existing RIB.

   Some specific parameters could be defined for a specific topology at
   global
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--ro raw-pdu?               binary
   |  +--ro reason?                string
   +---n protocols-supported-mismatch
   |  +--ro instance-name?         string
   |  +--ro instance-level?        level and also
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--ro raw-pdu?               binary
   |  +--ro protocols*             uint8
   +---n lsp-error-detected
   |  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--ro lsp-id?                lsp-id
   |  +--ro raw-pdu?               binary
   |  +--ro error-offset?          uint32
   |  +--ro tlv-type?              uint8
   +---n adjacency-change
   |  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--ro neighbor?              string
   |  +--ro neighbor-system-id?    system-id
   |  +--ro level?                 level
   |  +--ro state?                 enumeration
   |  +--ro reason?                string
   +---n lsp-received
   |  +--ro instance-name?         string
   |  +--ro instance-level?        level
   |  +--ro interface-name?        string
   |  +--ro interface-level?       level
   |  +--ro extended-circuit-id?   extended-circuit-id
   |  +--ro lsp-id?                lsp-id
   |  +--ro sequence?              uint32
   |  +--ro received-timestamp?    yang:timestamp
   |  +--ro neighbor-system-id?    system-id
   +---n lsp-generation
      +--ro instance-name?    string
      +--ro instance-level?   level
      +--ro lsp-id?           lsp-id
      +--ro sequence?         uint32
      +--ro send-timestamp?   yang:timestamp

2.1.  ISIS Configuration

   The ISIS configuration supports a VRF-centric configuration approach.
   The isis configuration is applied directly within the appropriate
   routing-instance where ISIS is activated.

   The ISIS configuration container is divided in:

   o  Global parameters.

   o  Per interface configuration (see Section 2.4).

   It would to up to extension modules to augment this model to support
   vendor specific parameters.

2.2.  Multitopology Parameters

   The "topologies" list is used to enable support of MT extensions for
   specific address families.

   Each topology should refer to an existing RIB.

   Some specific parameters could be defined for a specific topology at
   global level and also at interface level.

2.3.  Per-Level Parameters

   Some parameters support per level configuration.  In this case, the
   parameter is built as a list, so different values could be used for
   each level.  The "level-all" permits to apply a value to both levels.

           +--rw priority* [level]
           |  +--rw value?   uint8
           |  +--rw level    level

   Example :

           <priority>
               <value>100</value>
               <level>level-1</level>
           </priority>
           <priority>
               <value>200</value>
               <level>level-2</level>
           </priority>

2.4.  Per-Interface Parameters

   The per-interface section of the ISIS instance describes the
   interface specific parameters.

   The interface is a reference to an interface in the Interface YANG
   model.

   Each interface has interface-specific parameters that may have a
   different value per level as described in previous section.  An
   interface-specific parameter always override an ISIS global parameter
   .

   Some parameters like BFD and hello-padding are defined as containers
   to permit easy extension by vendor specific modules.

    +--rw interfaces
           +--rw interface* [name]
              +--rw name                       if:interface-ref
              +--rw level-type?                level
              +--rw lsp-pacing-interval?       uint16
              +--rw lsp-retransmit-interval?   uint16
              +--rw passive?                   boolean
              +--rw csnp-interval?             uint16
              +--rw hello-padding
              |  +--rw enabled?   boolean
              +--rw mesh-group-enabled?        mesh-group-state
              +--rw mesh-group?                uint8
              +--rw interface-type?            interface-type
              +--rw enabled?                   boolean
              +--rw tag*                       uint32 {prefix-tag}?
              +--rw tag64*                     uint64 {prefix-tag64}?
              +--rw hello-authentication* [level]
              |  +--rw (authentication-type)?
              |  |  +--:(key-chain) {key-chain}?
              |  |  |  +--rw key-chain?      key-chain:key-chain-ref
              |  |  +--:(password)
              |  |     +--rw key?            string
              |  |     +--rw (algorithm)?
              |  |           ...
              |  +--rw level           level
              +--rw hello-interval* [level]
              |  +--rw value?   uint16
              |  +--rw level    level
              +--rw hello-multiplier* [level]
              |  +--rw value?   uint16
              |  +--rw level    level
              +--rw priority* [level]
              |  +--rw value?   uint8
              |  +--rw level    level
              +--rw metric* [level]
              |  +--rw value?   wide-metric
              |  +--rw level    level
              +--rw af* [af]
              |  +--rw af                 identityref
              |  +--rw segment-routing {segment-routing}?
              |  |  +--rw prefix-sid* [value]
              |  |     +--rw value-type?          enumeration
              |  |     +--rw value                uint32
              |  |     +--rw node-flag?           boolean
              |  |     +--rw last-hop-behavior?   enumeration
              |  +--rw bfd {bfd}?
              |     +--rw enabled?   boolean
              +--rw topologies* [name]
              |  +--rw name               rt:rib-ref
              |  +--rw metric* [level]
              |  |  +--rw value?   wide-metric
              |  |  +--rw level    level
              |  +--rw fast-reroute {fast-reroute}?
              |  |  +--rw lfa* [level] {lfa}?
              |  |     +--rw candidate-disabled?   boolean
              |  |     +--rw enabled?              boolean
              |  |     +--rw remote-lfa {remote-lfa}?
              |  |     |     ...
              |  |     +--rw level                 level
              |  +--rw segment-routing {segment-routing}?
              |     +--rw authorize-bundle
              |     |  +--rw enabled?   boolean
              |     |  +--rw weight?    uint8
              |     +--rw advertise-protection?   enumeration
              +--rw fast-reroute {fast-reroute}?
              |  +--rw lfa* [level] {lfa}?
              |     +--rw candidate-disabled?   boolean
              |     +--rw enabled?              boolean
              |     +--rw remote-lfa {remote-lfa}?
              |     |  +--rw enabled?   boolean
              |     +--rw level                 level
              +--rw segment-routing {segment-routing}?
              |  +--rw authorize-bundle
              |  |  +--rw enabled?   boolean
              |  |  +--rw weight?    uint8
              |  +--rw advertise-protection?   enumeration
              +--rw mpls
                     +--rw igp-ldp-sync {igp-ldp-sync}?
                            +--rw enabled?   boolean

2.5.  ISO parameters

   Some ISO parameters may be required.

   This module augments interface configuration model to support ISO
   configuration parameters.

   The clns-mtu can be defined under the interface.

2.6.  IP FRR

   This YANG model supports LFA and remote LFA as IP FRR techniques.
   The "fast-reroute" container may be augmented by other models to
   support other IPFRR flavors (MRT ...).

   The current version of the model supports activation of LFA and
   remote LFA at interface only.  The global "lfa" container is present
   but kept empty to permit augmentation with vendor specific properties
   like policies.

   Remote LFA is considered as a child of LFA.  Remote LFA cannot be
   enabled if LFA is not enabled.

   The "candidate-disabled" permit to mark an interface to not be used
   as a backup.

2.7.  Segment Routing

   This item is still under discussion and some part of the proposed
   configuration may fit in a segment-routing specific model.

2.8.  Operational State

   "isis" container provides operational states for ISIS.  This
   container is divided in multiple components:

   o  system-counters : provides statistical informations about the
      global system.

   o  interface : provides configuration state information for each
      interface.

   o  adjacencies: provides state information about current ISIS
      adjacencies.

   o  spf-log: provides information about SPF events on the node.

   o  lsp-log: provides information about LSP events on the node
      (reception of an LSP or modification of local LSP).

   o  database: provides details on current LSDB.

   o  hostnames: provides information about system-id to hostname
      mappings.

   o  fast-reroute: provides information about IP FRR.

   o  segment-routing: provides information about segment-routing.

augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol:
   +--ro isis
      +--ro instance* [routing-instance]
         +--ro routing-instance    rt:routing-instance-ref
         +--ro fast-reroute {fast-reroute}?
         |  +--ro protected-routes
         |  |  +--ro af-stats* [af prefix alternate]
         |  |     +--ro af                      identityref
         |  |     +--ro prefix                  string
         |  |     +--ro alternate               string
         |  |     +--ro alternate-type?         enumeration
         |  |     +--ro best?                   boolean
         |  |     +--ro non-best-reason?        string
         |  |     +--ro protection-available?   bits
         |  |     +--ro alternate-metric1?      uint32
         |  |     +--ro alternate-metric2?      uint32
         |  |     +--ro alternate-metric3?      uint32
         |  +--ro nonprotected-routes
         |  |  +--ro af-stats* [af prefix]
         |  |     +--ro af        identityref
         |  |     +--ro prefix    string
         |  +--ro protection-statistics* [frr-protection-method]
         |     +--ro frr-protection-method    string
         |     +--ro af-stats* [af]
         |        +--ro af                      identityref
         |        +--ro total-routes?           uint32
         |        +--ro unprotected-routes?     uint32
         |        +--ro protected-routes?       uint32
         |        +--ro linkprotected-routes?   uint32
         |        +--ro nodeprotected-routes?   uint32
         +--ro topologies* [name]
         |  +--ro name          rt:rib-ref
         |  +--ro fast-route {fast-reroute}?
         |     +--ro protected-routes
         |     |  +--ro af-stats* [af prefix alternate]
         |     |     +--ro af                      identityref
         |     |     +--ro prefix                  string
         |     |     +--ro alternate               string
         |     |     +--ro alternate-type?         enumeration
         |     |     +--ro best?                   boolean
         |     |     +--ro non-best-reason?        string
         |     |     +--ro protection-available?   bits
         |     |     +--ro alternate-metric1?      uint32
         |     |     +--ro alternate-metric2?      uint32
         |     |     +--ro alternate-metric3?      uint32
         |     +--ro nonprotected-routes
         |     |  +--ro af-stats* [af prefix]
         |     |     +--ro af        identityref
         |     |     +--ro prefix    string
         |     +--ro protection-statistics* [frr-protection-method]
         |        +--ro frr-protection-method    string
         |        +--ro af-stats* [af]
         |           +--ro af                      identityref
         |           +--ro total-routes?           uint32
         |           +--ro unprotected-routes?     uint32
         |           +--ro protected-routes?       uint32
         |           +--ro linkprotected-routes?   uint32
         |           +--ro nodeprotected-routes?   uint32
         +--ro system-counters
         |  +--ro level* [level]
         |     +--ro level                            level-number
         |     +--ro corrupted-lsps?                  uint32
         |     +--ro authentication-type-fails?       uint32
         |     +--ro authentication-fails?            uint32
         |     +--ro database-overload?               uint32
         |     +--ro own-lsp-purge?                   uint32
         |     +--ro manual-address-drop-from-area?   uint32
         |     +--ro max-sequence?                    uint32
         |     +--ro sequence-number-skipped?         uint32
         |     +--ro id-len-mismatch?                 uint32
         |     +--ro partition-changes?               uint32
         |     +--ro lsp-errors?                      uint32
         |     +--ro spf-runs?                        uint32
         +--ro interfaces
         |  +--ro interfaces* [interface]
         |     +--ro interface          string
         |     +--ro status
         |     |  +--ro circuit-id?            circuit-id
         |     |  +--ro admin-state?           admin-state
         |     |  +--ro interface-type?        interface-type
         |     |  +--ro passive?               empty
         |     |  +--ro three-way-handshake?   boolean
         |     |  +--ro mesh-group-enabled?    mesh-group-state
         |     |  +--ro mesh-group?            uint8
         |     |  +--ro level* [level]
         |     |     +--ro level                level-number
         |     |     +--ro priority?            uint8
         |     |     +--ro hello-multiplier?    uint16
         |     |     +--ro hello-interval?      uint16
         |     |     +--ro dr-hello-interval?   uint32
         |     |     +--ro metric?              wide-metric
         |     +--ro fast-reroute {fast-reroute}?
         |     |  +--ro lfa* [level] {lfa}?
         |     |     +--ro candidate-disabled?   boolean
         |     |     +--ro enabled?              boolean
         |     |     +--ro remote-lfa {remote-lfa}?
         |     |     |  +--ro enabled?   boolean
         |     |     +--ro level                 level-number
         |     +--ro adjacencies
         |     |  +--ro adjacency*
         |     |     +--ro neighbor-systype?               level
         |     |     +--ro neighbor-sysid?                 system-id
         |     |     +--ro neighbor-extended-circuit-id?   extended-circuit-id
         |     |     +--ro neighbor-snpa?                  snpa
         |     |     +--ro usage?                          level
         |     |     +--ro hold-timer?                     uint16
         |     |     +--ro neighbor-priority?              uint8
         |     |     +--ro lastuptime?                     yang:timestamp
         |     |     +--ro state?                          enumeration
         |     |     +--ro adjacency-sid* [value] {segment-routing}?
         |     |        +--ro af?                     identityref
         |     |        +--ro value                   uint32
         |     |        +--ro weight?                 uint8
         |     |        +--ro protection-requested?   boolean
         |     +--ro topologies* [name]
         |     |  +--ro name            rt:rib-ref
         |     |  +--ro fast-reroute {fast-reroute}?
         |     |  |  +--ro lfa* [level] {lfa}?
         |     |  |     +--ro candidate-disabled?   boolean
         |     |  |     +--ro enabled?              boolean
         |     |  |     +--ro remote-lfa {remote-lfa}?
         |     |  |     |     ...
         |     |  |     +--ro level                 level-number
         |     |  +--ro adjacencies
         |     |  |  +--ro adjacency*
         |     |  |     +--ro neighbor-systype?               level
         |     |  |     +--ro neighbor-sysid?                 system-id
         |     |  |     +--ro neighbor-extended-circuit-id?   extended-circuit-id
         |     |  |     +--ro neighbor-snpa?                  snpa
         |     |  |     +--ro usage?                          level
         |     |  |     +--ro hold-timer?                     uint16
         |     |  |     +--ro neighbor-priority?              uint8
         |     |  |     +--ro lastuptime?                     yang:timestamp
         |     |  |     +--ro state?                          enumeration
         |     |  |     +--ro adjacency-sid* [value] {segment-routing}?
         |     |  |           ...
         |     |  +--ro level* [level]
         |     |     +--ro level     level-number
         |     |     +--ro metric?   wide-metric
         |     +--ro event-counters
         |     |  +--ro adjacency-changes?             uint32
         |     |  +--ro adjacency-number?              uint32
         |     |  +--ro init-fails?                    uint32
         |     |  +--ro adjacency-rejects?             uint32
         |     |  +--ro id-len-mismatch?               uint32
         |     |  +--ro max-area-addresses-mismatch?   uint32
         |     |  +--ro authentication-type-fails?     uint32
         |     |  +--ro authentication-fails?          uint32
         |     |  +--ro lan-dis-changes?               uint32
         |     +--ro packet-counters
         |        +--ro level* [level]
         |           +--ro level      level-number
         |           +--ro iih
         |           |  +--ro in?    uint32
         |           |  +--ro out?   uint32
         |           +--ro ish
         |           |  +--ro in?    uint32
         |           |  +--ro out?   uint32
         |           +--ro esh
         |           |  +--ro in?    uint32
         |           |  +--ro out?   uint32
         |           +--ro lsp
         |           |  +--ro in?    uint32
         |           |  +--ro out?   uint32
         |           +--ro psnp
         |           |  +--ro in?    uint32
         |           |  +--ro out?   uint32
         |           +--ro csnp
         |           |  +--ro in?    uint32
         |           |  +--ro out?   uint32
         |           +--ro unknown
         |              +--ro in?    uint32
         |              +--ro out?   uint32
         +--ro spf-log
         |  +--ro event* [id]
         |     +--ro id                    uint32
         |     +--ro spf-type?             enumeration
         |     +--ro level?                level-number
         |     +--ro spf-delay?            uint32
         |     +--ro schedule-timestamp?   yang:timestamp
         |     +--ro start-timestamp?      yang:timestamp
         |     +--ro end-timestamp?        yang:timestamp
         |     +--ro trigger-lsp* [lsp]
         |        +--ro lsp         lsp-id
         |        +--ro sequence?   uint32
         +--ro lsp-log
         |  +--ro event* [id]
         |     +--ro id                    uint32
         |     +--ro level?                level-number
         |     +--ro lsp
         |     |  +--ro lsp?        lsp-id
         |     |  +--ro sequence?   uint32
         |     +--ro received-timestamp?   yang:timestamp
         |     +--ro change?               bits
         +--ro database
         |  +--ro level-db* [level]
         |     +--ro level    level-number
         |     +--ro lsp* [lsp-id]
         |        +--ro lsp-id                           lsp-id
         |        +--ro checksum?                        uint16
         |        +--ro remaining-lifetime?              uint16
         |        +--ro sequence?                        uint32
         |        +--ro attributes?                      bits
         |        +--ro is-neighbor
         |        |  +--ro neighbor* [neighbor-id]
         |        |     +--ro neighbor-id       system-id
         |        |     +--ro i-e?              boolean
         |        |     +--ro default-metric?   std-metric
         |        |     +--ro delay-metric
         |        |     |     ...
         |        |     +--ro expense-metric
         |        |     |     ...

         |        |     +--ro error-metric
         |        |           ...
         |        +--ro authentication
         |        |  +--ro authentication-type?   string
         |        |  +--ro authentication-key?    string
         |        +--ro extended-is-neighbor
         |        |  +--ro neighbor* [neighbor-id]
         |        |     +--ro neighbor-id             system-id
         |        |     +--ro metric?                 wide-metric
         |        |     +--ro adjacency-segment-id* [value]
         |        |           ...
         |        +--ro ipv4-internal-reachability
         |        |  +--ro prefixes* [ip-prefix]
         |        |     +--ro up-down?          boolean
         |        |     +--ro i-e?              boolean
         |        |     +--ro ip-prefix         inet:ipv4-address
         |        |     +--ro prefix-len?       uint8
         |        |     +--ro default-metric?   std-metric
         |        |     +--ro delay-metric
         |        |     |     ...
         |        |     +--ro expense-metric
         |        |     |     ...
         |        |     +--ro error-metric
         |        |           ...
         |        +--ro protocol-supported*              uint8
         |        +--ro ipv4-external-reachability
         |        |  +--ro prefixes* [ip-prefix]
         |        |     +--ro up-down?          boolean
         |        |     +--ro i-e?              boolean
         |        |     +--ro ip-prefix         inet:ipv4-address
         |        |     +--ro prefix-len?       uint8
         |        |     +--ro default-metric?   std-metric
         |        |     +--ro delay-metric
         |        |     |     ...
         |        |     +--ro expense-metric
         |        |     |     ...
         |        |     +--ro error-metric
         |        |           ...
         |        +--ro ipv4-addresses*                  inet:ipv4-address
         |        +--ro ipv4-te-routerid?                inet:ipv4-address
         |        +--ro extended-ipv4-reachability
         |        |  +--ro prefixes* [ip-prefix]
         |        |     +--ro up-down?             boolean
         |        |     +--ro ip-prefix            inet:ipv4-address
         |        |     +--ro prefix-len?          uint8
         |        |     +--ro metric?              wide-metric
         |        |     +--ro tag*                 uint32
         |        |     +--ro tag64*               uint64
         |        |     +--ro prefix-segment-id* [value]
         |        |           ...
         |        +--ro dynamic-hostname?                string
         |        +--ro ipv6-te-routerid?                inet:ipv6-address
         |        +--ro mt-is-neighbor
         |        |  +--ro neighbor* [neighbor-id]
         |        |     +--ro MT-ID?                  uint16
         |        |     +--ro neighbor-id             system-id
         |        |     +--ro metric?                 wide-metric
         |        |     +--ro adjacency-segment-id* [value]
         |        |           ...
         |        +--ro mt-entries
         |        |  +--ro topology* [MT-ID]
         |        |     +--ro MT-ID         uint16
         |        |     +--ro attributes?   bits
         |        +--ro ipv6-addresses*                  inet:ipv6-address
         |        +--ro mt-extended-ipv4-reachability
         |        |  +--ro prefixes* [ip-prefix]
         |        |     +--ro MT-ID?               uint16
         |        |     +--ro up-down?             boolean
         |        |     +--ro ip-prefix            inet:ipv4-address
         |        |     +--ro prefix-len?          uint8
         |        |     +--ro metric?              wide-metric
         |        |     +--ro tag*                 uint32
         |        |     +--ro tag64*               uint64
         |        |     +--ro prefix-segment-id* [value]
         |        |           ...
         |        +--ro mt-ipv6-reachability
         |        |  +--ro prefixes* [ip-prefix]
         |        |     +--ro MT-ID?               uint16
         |        |     +--ro up-down?             boolean
         |        |     +--ro ip-prefix            inet:ipv6-address
         |        |     +--ro prefix-len?          uint8
         |        |     +--ro metric?              wide-metric
         |        |     +--ro tag*                 uint32
         |        |     +--ro tag64*               uint64
         |        |     +--ro prefix-segment-id* [value]
         |        |           ...
         |        +--ro ipv6-reachability
         |        |  +--ro prefixes* [ip-prefix]
         |        |     +--ro up-down?             boolean
         |        |     +--ro ip-prefix            inet:ipv6-address
         |        |     +--ro prefix-len?          uint8
         |        |     +--ro metric?              wide-metric
         |        |     +--ro tag*                 uint32
         |        |     +--ro tag64*               uint64
         |        |     +--ro prefix-segment-id* [value]
         |        |           ...

         |        +--ro segment-routing-bindings* [fec range] {segment-routing}?
         |        |  +--ro fec        string
         |        |  +--ro range      uint16
         |        |  +--ro flags?     bits
         |        |  +--ro weight?    uint8
         |        |  +--ro binding*
         |        |     +--ro prefix-sid
         |        |     |     ...
         |        |     +--ro ero-metric?                           uint32
         |        |     +--ro ero
         |        |     |     ...
         |        |     +--ro backup-ero
         |        |     |     ...
         |        |     +--ro unnumbered-interface-id-ero
         |        |     |     ...
         |        |     +--ro backup-unnumbered-interface-id-ero
         |        |           ...
         |        +--ro router-capabilities*
         |           +--ro flags?                       bits
         |           +--ro node-tag {node-tag}?
         |           |  +--ro node-tag*
         |           |        ...
         |           +--ro segment-routing*
         |           |  +--ro flags?            bits
         |           |  +--ro range?            uint32
         |           |  +--ro starting-value?   uint32
         |           +--ro segment-routing-algorithm*   uint8
         |           +--ro binary?                      binary
         +--ro hostnames
            +--ro hostname* [system-id]
               +--ro system-id

   TODO : interfaces.tree

2.5.  ISO parameters

   Some ISO parameters may be required.

   This module augments interface configuration model to support ISO
   configuration parameters.

   The clns-mtu can be defined under the interface.

2.6.  IP FRR

   This YANG model supports LFA and remote LFA as IP FRR techniques.
   The "fast-reroute" container may be augmented by other models to
   support other IPFRR flavors (MRT ...).

   The current version of the model supports activation of LFA and
   remote LFA at interface only.  The global "lfa" container is present
   but kept empty to permit augmentation with vendor specific properties
   like policies.

   Remote LFA is considered as a child of LFA.  Remote LFA cannot be
   enabled if LFA is not enabled.

   The "candidate-disabled" permit to mark an interface to not be used
   as a backup.

2.7.  Operational State

   "isis" container provides operational states for ISIS.  This
   container is divided in multiple components:

   o  system-counters : provides statistical informations about the
      global system.

   o  interface : provides configuration state information for each
      interface.

   o  adjacencies: provides state information about current ISIS
      adjacencies.

   o  spf-log: provides information about SPF events on the node.

   o  lsp-log: provides information about LSP events on the node
      (reception of an LSP or modification of local LSP).

   o  database: provides details on current LSDB.

   o  hostnames: provides information about system-id
               +--ro hostname?    string to hostname
      mappings.

   o  fast-reroute: provides information about IP FRR.

3.  RPC Operations

   The "ietf-isis" module defines two RPC operations:

   o  clear-isis-database: reset the content of a particular ISIS
      database and restart database synchronization with the neighbors.

   o  clear-isis-adjacency: restart a particular set of ISIS
      adjacencies.

rpcs:
   +---x clear-adjacency
   |  +--ro input
   |     +--ro routing-instance-name             rt:routing-instance-state-ref
   |     +--ro routing-protocol-instance-name    instance-state-ref
   |     +--ro level?                            level
   |     +--ro interface?                        string
   +---x clear-database
      +--ro input
         +--ro routing-instance-name             rt:routing-instance-state-ref
         +--ro routing-protocol-instance-name    instance-state-ref
         +--ro level?                            level

4.  Notifications

   The "ietf-isis" module introduces some notifications :

      database-overload : raised when overload condition is changed.

      lsp-too-large : raised when the system tries to propagate a too
      large PDU.

      corrupted-lsp-detected : raised when the system find that an LSP
      that was stored in memory has become corrupted.

      attempt-to-exceed-max-sequence : This notification is sent when
      the system wraps the 32-bit sequence counter of an LSP.

      id-len-mismatch : This notification is sent when we receive a PDU
      with a different value for the System ID length.

      max-area-addresses-mismatch : This notification is sent when we
      receive a PDU with a different value for the Maximum Area
      Addresses.

      own-lsp-purge : This notification is sent when the system receives
      a PDU with its own system ID and zero age.

      sequence-number-skipped : This notification is sent when the
      system receives a PDU with its own system ID and different
      contents.  The system has to reissue the LSP with a higher
      sequence number.

      authentication-type-failure : This notification is sent when the
      system receives a PDU with the wrong authentication type field.

      authentication-failure : This notification is sent when the system
      receives a PDU with the wrong authentication information.

      version-skew : This notification is sent when the system receives
      a PDU with a different protocol version number.

      area-mismatch : This notification is sent when the system receives
      a Hello PDU from an IS that does not share any area address.

      rejected-adjacency : This notification is sent when the system
      receives a Hello PDU from an IS but does not establish an
      adjacency for some reason.

      protocols-supported-mismatch : This notification is sent when the
      system receives a non pseudonode LSP that has no matching protocol
      supported.

      lsp-error-detected : This notification is sent when the system
      receives a LSP with a parse error.

      adjacency-change : This notification is sent when an ISIS
      adjacency moves to Up state or to Down state.

      lsp-received : This notification is sent when a LSP is received.

      lsp-generation : This notification is sent when a LSP is
      regenerated.

   notifications:
      +---n database-overload
      |  +--ro instance-name?    string
      |  +--ro instance-level?   level
      |  +--ro overload?         enumeration
      +---n lsp-too-large
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro pdu-size?              uint32
      |  +--ro lsp-id?                lsp-id
      +---n corrupted-lsp-detected
      |  +--ro instance-name?    string
      |  +--ro instance-level?   level
      |  +--ro lsp-id?           lsp-id
      +---n attempt-to-exceed-max-sequence
      |  +--ro instance-name?    string
      |  +--ro instance-level?   level
      |  +--ro lsp-id?           lsp-id
      +---n id-len-mismatch
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro pdu-field-len?         uint8
      |  +--ro raw-pdu?               binary
      +---n max-area-addresses-mismatch
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro max-area-addresses?    uint8
      |  +--ro raw-pdu?               binary
      +---n own-lsp-purge
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro lsp-id?                lsp-id
      +---n sequence-number-skipped
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro lsp-id?                lsp-id
      +---n authentication-type-failure
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      +---n authentication-failure
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      +---n version-skew
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro protocol-version?      uint8
      |  +--ro raw-pdu?               binary
      +---n area-mismatch
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      +---n rejected-adjacency
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      |  +--ro reason?                string
      +---n protocols-supported-mismatch
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      |  +--ro protocols*             uint8
      +---n lsp-error-detected
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro lsp-id?                lsp-id
      |  +--ro raw-pdu?               binary
      |  +--ro error-offset?          uint32
      |  +--ro tlv-type?              uint8
      +---n adjacency-change
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro neighbor?              string
      |  +--ro neighbor-system-id?    system-id
      |  +--ro level?                 level
      |  +--ro state?                 enumeration
      |  +--ro reason?                string
      +---n lsp-received
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro lsp-id?                lsp-id
      |  +--ro sequence?              uint32
      |  +--ro received-timestamp?    yang:timestamp
      |  +--ro neighbor-system-id?    system-id
      +---n lsp-generation version-skew
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro lsp-id?           lsp-id interface-name?        string
      |  +--ro sequence?         uint32 interface-level?       level
      |  +--ro send-timestamp?   yang:timestamp

5.  Interaction with Other YANG Modules

   The "isis" configuration container augments the "/rt:routing/
   rt:routing-instance/rt:routing-protocols/routing-protocol" container
   of the ietf-routing module by defining ISIS specific parameters.

   The "isis" module augments "/if:interfaces/if:interface" with ISO
   specific parameters.

   The "isis" operational state container augments the "/rt:routing-
   state/rt:routing-instance/rt:routing-protocols/routing-protocol"
   container of the ietf-routing module by defining ISIS specific
   operational states.

   Some ISIS specific routes attributes are added to route objects of
   the ietf-routing module by augmenting "/rt:routing-
   state/rt:ribs/rt:rib/rt:routes/rt:route" and "/rt:active-
   route/rt:output/rt:route".

6.  YANG Module

   <CODE BEGINS> file "ietf-isis@2015-03-04.yang"

   module ietf-isis {
     namespace "urn:ietf:params:xml:ns:yang:ietf-isis";

     prefix isis;

     import ietf-routing {
               prefix "rt";
           }

     import ietf-inet-types {
       prefix inet;
     }

     import ietf-yang-types {
       prefix yang;
     }

     import ietf-interfaces {
       prefix "if";
     }

     organization
      "IETF ISIS Working Group";

     contact
       "WG List:  &lt;mailto:isis-wg@ietf.org&gt;

       Editor:    Stephane Litkowski
             &lt;mailto:stephane.litkowski@orange.com&gt;

           Derek Yeung
             &lt;mailto:myeung@cisco.com&gt;
           Acee Lindem
             &lt;mailto:acee@cisco.com&gt;
           Jeffrey Zhang
             &lt;mailto:zzhang@juniper.net&gt;
           Ladislav Lhotka
             &lt;mailto:llhotka@nic.cz&gt;
           Yi Yang
             &lt;mailto:yiya@cisco.com&gt;
           Dean Bogdanovic
             &lt;mailto:deanb@juniper.net&gt;
           Kiran Agrahara Sreenivasa
             &lt;mailto:kkoushik@brocade.com&gt;
           Yingzhen Qu
             &lt;mailto:yiqu@cisco.com&gt;

       ";

     description
       "The YANG module defines a generic configuration model for
       ISIS common across all of the vendor implementations.";

     revision 2015-03-03 {
       description
         "
           * Defining hierarchy for operational states
           * Adding CLNS MTU

         ";
       reference "draft-ietf-isis-yang-isis-02";
     }
     revision 2015-02-20 {
       description
         "
           * Removing igp-ldp-sync timer in IS-IS

         ";
       reference "";
     }
     revision 2014-12-15 {
       description
         "
           * Adding IPFRR
           * Adding igp-ldp sync
           * Adding segment routing
           * Adding instance reference to operational states.
           * Move AF type from extended-circuit-id?   extended-circuit-id
      |  +--ro protocol-version?      uint8
      |  +--ro raw-pdu?               binary
      +---n area-mismatch
      |  +--ro instance-name?         string to identity
           * Updated router-capability in LSDB description.
           * packet counters moved to interface-packet-counters.
           * Added modification information in lsp-log
         ";
       reference "";
     }
     revision 2014-10-24 {
       description
         "
           * Change hello-padding to container
           * Change bfd to container
           * Make BFD a feature
           * Creates mpls-te container and put router-id
           inside
           * Remove GR helper disable and timers
         ";
       reference "draft-ietf-isis-yang-isis-cfg-01";
     }
     revision 2014-10-21 {
       description
         "
          * Interface metric move from af container to interface
           container
          * Hello-padding on interface moved to hello-padding-disable
          with empty type
          * three-way-handshake removed
          * route preference changed to a choice
          * csnp-authentication/psnp-authentication merged
          to authentication container
          * lsp-gen-interval-exp-delay removed
          * Added overload-max-metric feature
          * overload-max-metric is in a separate container
         ";
       reference "";
     }

     revision 2014-10-07 {
       description
         "
         * Removed spf parameters (should be part of
           vendor specific extensions.
         * Removed hello parameters at global level.
         * Interface configuration uses a
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string rather
         than a reference. This permits to map to some
         vendor specific configuration.
         ";
       reference "draft-ietf-isis-yang-isis-00";
     }
     revision 2014-09-26 {
       description
         "
         * Add BFD support
         * remove max-elements to max-area-addresses
         ";
       reference "";
     }
     revision 2014-09-11 {
       description
         "
         * Add
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      +---n rejected-adjacency
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      |  +--ro reason?                string
      +---n protocols-supported-mismatch
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level parameter to ispf and spf delay
         * Add LSP generation as a feature
         * Make lsp-refresh a feature
         * Change parameter container to list
         ";
       reference "";
     }
     revision 2014-09-05 {
       description
       " Rewrite of the global hierarchy.";
       reference "";
     }
     revision 2014-08-06 {
       description
       "
       * isis-state renamed to isis.
       * Add GR support
       * Add meshgroup support
       * Add CLNS support
       * Add 64bits tags
       * Add notifications to be aligned with MIB4444
       * Add packet-counters, interface-counters, system-counters
         states
       * Add 3-way handshake support
       * Rename isis-adjacency-updown to
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro raw-pdu?               binary
      |  +--ro protocols*             uint8
      +---n lsp-error-detected
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro lsp-id?                lsp-id
      |  +--ro raw-pdu?               binary
      |  +--ro error-offset?          uint32
      |  +--ro tlv-type?              uint8
      +---n adjacency-change
       * Add notification for LSP reception
       * Use feature for reference BW
       * Add lsp-retransmit-interval on interfaces
       * Rename lsp-interval to lsp-pacing-interval
       * Add ispf support as feature
       * Add spf delay support as feature (2step & exp backoff)
       * Add maximum-area-addresses
       * Add default-metric
       ";
       reference "RFC XXXX:
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro neighbor?              string
      |  +--ro neighbor-system-id?    system-id
      |  +--ro level?                 level
      |  +--ro state?                 enumeration
      |  +--ro reason?                string
      +---n lsp-received
      |  +--ro instance-name?         string
      |  +--ro instance-level?        level
      |  +--ro interface-name?        string
      |  +--ro interface-level?       level
      |  +--ro extended-circuit-id?   extended-circuit-id
      |  +--ro lsp-id?                lsp-id
      |  +--ro sequence?              uint32
      |  +--ro received-timestamp?    yang:timestamp
      |  +--ro neighbor-system-id?    system-id
      +---n lsp-generation
         +--ro instance-name?    string
         +--ro instance-level?   level
         +--ro lsp-id?           lsp-id
         +--ro sequence?         uint32
         +--ro send-timestamp?   yang:timestamp

5.  Segment Routing

   The IS-IS SR YANG Data Model for ISIS Protocol";
     }
     revision 2014-06-25 {
       description "
       * isis-cfg renamed to isis.
       * Add precisions on authentication-keys in description
       ";
       reference "draft-litkowski-isis-yang-isis-01";
     }

     revision 2014-06-20 {
       description "
       * isis-op renamed to isis-state.
       * Multiple instances under ISIS are removed.
       * interface-cfg grouping removed and content module is directly included in container isis.
       * TLVxx renamed with human-readable name in isis-database.
         TLV reference are putted in description.
       * Reference to core routing augmenting IS-IS module were fixed.
       * Namespace fixed.
       * Add simple-iso-address type.
       * area-id and system-id in ISIS container are merged to
         nsap-address.
       * Add isis-system-id type.
       * Add isis-lsp-id type.
       * Add remaining-lifetime leaf in isis-database.
       * Add TLV2 (is-neighbor) in isis-database.
       * Renamed some container name for consistency
         reason ('isis-' prefixed).
       * Add new identities isis-cfg and isis-state.
       * Add descriptions.
       * Add notification isis-adjacency-updown.

       * Add RPC clear-isis-adjacency both
   configuration and clear-isis-database.
       ";
       reference "draft-litkowski-isis-yang-isis-00";
     }

     revision 2014-06-11 {
       description "Initial revision.";
       reference "draft-litkowski-netmod-isis-cfg-00";
     }
     identity isis { operational states.

   The IS-IS SR YANG module requires the base rt:routing-protocol;
       description "Identity for segment routing module
   ([I-D.litkowski-spring-sr-yang]) to be supported as there is a strong
   relationship between those modules.

   The figure below describe the overall structure of the isis-sr YANG
   module:

module: ietf-isis-sr
augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis:
   +--rw segment-routing
      +--rw enabled?    boolean
      +--rw bindings
         +--rw advertise
         |  +--rw policies*   string
         +--rw receive?     boolean
augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:interfaces/isis:interface:
   +--rw segment-routing
      +--rw adjacency-sid
      |  +--rw advertise-adj-group-sid* [group-id]
      |  |  +--rw group-id    uint32
      |  +--rw advertise-protection?      enumeration
      +--rw prefix-sid
         +--rw ipv4
         |  +--rw prefix-sid* [value]
         |     +--rw value-type?          enumeration
         |     +--rw value                uint32
         |     +--rw last-hop-behavior?   enumeration
         +--rw ipv6
            +--rw prefix-sid* [value]
               +--rw value-type?          enumeration
               +--rw value                uint32
               +--rw last-hop-behavior?   enumeration
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis:
   +--ro segment-routing
      +--ro enabled?    boolean
      +--ro bindings
         +--ro advertise
         |  +--ro policies*   string
         +--ro receive?     boolean
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:interfaces/isis:interface:
   +--ro segment-routing
      +--ro adjacency-sid
      |  +--ro advertise-adj-group-sid* [group-id]
      |  |  +--ro group-id    uint32
      |  +--ro advertise-protection?      enumeration
      +--ro prefix-sid
         +--ro ipv4
         |  +--ro prefix-sid* [value]
         |     +--ro value-type?          enumeration
         |     +--ro value                uint32
         |     +--ro last-hop-behavior?   enumeration
         +--ro ipv6
            +--ro prefix-sid* [value]
               +--ro value-type?          enumeration
               +--ro value                uint32
               +--ro last-hop-behavior?   enumeration
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp/isis:extended-is-neighbor/isis:neighbor:
   +--ro sid-list* [value]
      +--ro flags?         bits
      +--ro weight?        uint8
      +--ro neighbor-id?   isis:system-id
      +--ro value          uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp/isis:mt-is-neighbor/isis:neighbor:
   +--ro sid-list* [value]
      +--ro flags?         bits
      +--ro weight?        uint8
      +--ro neighbor-id?   isis:system-id
      +--ro value          uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp/isis:extended-ipv4-reachability/isis:prefixes:
   +--ro sid-list* [value]
      +--ro flags?       bits
      +--ro algorithm?   uint8
      +--ro value        uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp/isis:mt-extended-ipv4-reachability/isis:prefixes:
   +--ro sid-list* [value]
      +--ro flags?       bits
      +--ro algorithm?   uint8
      +--ro value        uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp/isis:ipv6-reachability/isis:prefixes:
   +--ro sid-list* [value]
      +--ro flags?       bits
      +--ro algorithm?   uint8
      +--ro value        uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp/isis:mt-ipv6-reachability/isis:prefixes:
   +--ro sid-list* [value]
      +--ro flags?       bits
      +--ro algorithm?   uint8
      +--ro value        uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/isis:isis/isis:database/isis:level-db/isis:lsp:
   +--ro segment-routing-bindings* [fec range]
      +--ro fec        string
      +--ro range      uint16
      +--ro flags?     bits
      +--ro weight?    uint8
      +--ro binding*
         +--ro prefix-sid
         |  +--ro sid-list* [value]
         |     +--ro flags?       bits
         |     +--ro algorithm?   uint8
         |     +--ro value        uint32
         +--ro ero-metric?                           uint32
         +--ro ero
         |  +--ro address-family?   identityref
         |  +--ro loose?            boolean
         |  +--ro address?          string
         +--ro backup-ero
         |  +--ro address-family?   identityref
         |  +--ro loose?            boolean
         |  +--ro address?          string
         +--ro unnumbered-interface-id-ero
         |  +--ro router-id?      string
         |  +--ro interface-id?   uint32
         +--ro backup-unnumbered-interface-id-ero
            +--ro router-id?      string
            +--ro interface-id?   uint32

5.1.  Segment Routing activation

   Activation of segment-routing IS-IS is done by setting the ISIS routing protocol.";
     }

     identity isis-adjacency-change {
       description "Identity for "enabled"
   leaf to true.  This triggers advertisement of segment-routing
   extensions based on the ISIS routing protocol
         adjacency state.";
     }

     identity clear-isis-database {
       description "Identity for configuration parameters that have been setup
   using the ISIS base segment routing protocol
         database reset action.";
     }

     identity clear-isis-adjacency {
       description "Identity for the ISIS module.

5.2.  Advertising mapping server policy

   The base segment routing protocol
         adjacency reset action.";
     }

     /* Feature definitions */

     feature module defines mapping server policies.  By
   default, IS-IS will not advertise nor receive any mapping server
   entry.  The IS-IS segment-routing {
       description
        "Support of segment-routing.";
     }
     feature node-tag {
       description
         "Support of node tag.";
     }
     feature igp-ldp-sync {
       description
         "Support of RFC5443.";
     }
     feature fast-reroute {
       description
         "Support of IPFRR.";
     }
     feature  lfa {
       description
         "Support of Loop Free Alternates.";
     }
     feature remote-lfa {
       description
         "Support of remote Loop Free Alternates.";
     }

     feature bfd {
       description
         "Support of BFD.";
     }
     feature overload-max-metric {
       description
         "Support of overload by setting
          all links to max metric.";
     }
     feature prefix-tag {
       description
         "Add 32bit tag to prefixes";
     }
     feature prefix-tag64 {
       description
         "Add 64bit tag module permits to prefixes";
     }
     feature reference-bandwidth {
       description
         "Use a reference bandwidth advertise one or
   multiple mapping server policies through the "bindings/advertise/
   policies" leaf-list.  The "bindings/receive" leaf permits to compute metric.";
     }
     feature ipv4-router-id {
       description
        "Support enable
   the reception of IPv4 router ID mapping server entries.

6.  Interaction with Other YANG Modules

   The "isis" configuration under ISIS.";
     }

     feature ipv6-router-id {
       description
        "Support container augments the "/rt:routing/
   rt:routing-instance/rt:routing-protocols/routing-protocol" container
   of the ietf-routing module by defining IS-IS specific parameters.

   The "isis" module augments "/if:interfaces/if:interface" with ISO
   specific parameters.

   The "isis" operational state container augments the "/rt:routing-
   state/rt:routing-instance/rt:routing-protocols/routing-protocol"
   container of IPv6 router ID configuration under ISIS.";
     }

     feature multi-topology {
       description
        "Multitopology routing support.";
     }
     feature nlpid-control {
       description
        "This feature controls the advertisement ietf-routing module by defining ISIS specific
   operational states.

   Some ISIS specific routes attributes are added to route objects of support NLPID within
   the ietf-routing module by augmenting "/rt:routing-
   state/rt:ribs/rt:rib/rt:routes/rt:route" and "/rt:active-
   route/rt:output/rt:route".

7.  ISIS configuration.";

     }
     feature graceful-restart YANG Module

   <CODE BEGINS> file "ietf-isis@2015-06-23.yang"

   module ietf-isis {
       description
         "Graceful restart support as per RFC5306.";
     }

     feature lsp-refresh
     namespace "urn:ietf:params:xml:ns:yang:ietf-isis";

     prefix isis;

     import ietf-routing {
       description
         "Configuration of LSP refresh interval.";
               prefix "rt";
     }

     feature maximum-area-addresses

     import ietf-inet-types {
       description
         "Support of maximum-area-addresses config.";
       prefix inet;
     }

     /* Type definitions */

     typedef instance-state-ref {
       type leafref

     import ietf-yang-types {
         path "/rt:routing-state/rt:routing-instance/"
         +"rt:routing-protocols/rt:routing-protocol/rt:name";
       }
       description
          "This type is used for leaves that reference state data of
           an ISIS protocol instance.";
       prefix yang;
     }

     typedef admin-state {
       type enumeration {
         enum "up"

     import ietf-interfaces {
           description
            "Up state";
       prefix "if";
     }
         enum "down"

     import ietf-key-chain {
           description
            "Down state";
         }
     prefix "key-chain";
     }

     organization
      "IETF ISIS Working Group";

     contact
       "WG List:  &lt;mailto:isis-wg@ietf.org&gt;

       Editor:    Stephane Litkowski
             &lt;mailto:stephane.litkowski@orange.com&gt;

           Derek Yeung
             &lt;mailto:myeung@cisco.com&gt;

           Acee Lindem
             &lt;mailto:acee@cisco.com&gt;
           Jeffrey Zhang
             &lt;mailto:zzhang@juniper.net&gt;
           Ladislav Lhotka
             &lt;mailto:llhotka@nic.cz&gt;
           Yi Yang
             &lt;mailto:yiya@cisco.com&gt;
           Dean Bogdanovic
             &lt;mailto:deanb@juniper.net&gt;
           Kiran Agrahara Sreenivasa
             &lt;mailto:kkoushik@brocade.com&gt;
           Yingzhen Qu
             &lt;mailto:yiqu@cisco.com&gt;
           Jeff Tantsura
             &lt;mailto:jeff.tantsura@ericsson.com&gt;

       ";

     description
        "Administrative state of
       "The YANG module defines a component.";
     }
     typedef oper-state {
       type enumeration {
         enum "up" {
           description
            "Up state";
         }
         enum "down" generic configuration model for
       ISIS common across all of the vendor implementations.";

     revision 2015-06-22  {
       description
            "Down state";
         }
        " * Segment routing is part os a separate module.";
       reference "draft-ietf-isis-yang-isis-03";
     }
     revision 2015-03-03 {
       description
        "Operational
        " * Reviewed config and op state of a component."; groupings.
          * Add default value to lfa candidate-disabled
          * Add enable leaf to isis container to reflect admin state
          * Move to VRF centric only
        ";
       reference "";
     }
     typedef circuit-id
     revision 2015-03-03 {
       type uint8;
       description
        "This type defines the circuit ID
        associated with an interface.";
         "
           * Defining hierarchy for operational states
           * Adding CLNS MTU
           * Adding Keychain
         ";
       reference "draft-ietf-isis-yang-isis-02";
     }

     typedef extended-circuit-id
     revision 2015-02-20 {
       type uint32;
       description
        "This type defines the extended circuit ID
        associated with an interface.";
         "
           * Removing igp-ldp-sync timer in IS-IS

         ";
       reference "";
     }

     typedef interface-type
     revision 2014-12-15 {
       description
         "
           * Adding IPFRR
           * Adding igp-ldp sync
           * Adding segment routing
           * Adding instance reference to operational states.
           * Move AF type enumeration {
         enum broadcast from string to identity
           * Updated router-capability in LSDB description.
           * packet counters moved to interface-packet-counters.
           * Added modification information in lsp-log
         ";
       reference "";
     }
     revision 2014-10-24 {
       description "Broadcast interface type.
           Would result in DIS election.";
         "
           * Change hello-padding to container
           * Change bfd to container
           * Make BFD a feature
           * Creates mpls-te container and put router-id
           inside
           * Remove GR helper disable and timers
         ";
       reference "draft-ietf-isis-yang-isis-cfg-01";
     }
         enum point-to-point
     revision 2014-10-21 {
       description
            "Point
         "
          * Interface metric move from af container to point interface type.";
         }
           container
          * Hello-padding on interface moved to hello-padding-disable
          with empty type
          * three-way-handshake removed
          * route preference changed to a choice
          * csnp-authentication/psnp-authentication merged
          to authentication container
          * lsp-gen-interval-exp-delay removed
          * Added overload-max-metric feature
          * overload-max-metric is in a separate container
         ";
       reference "";

     }

     revision 2014-10-07 {
       description
        "This type defines the type of adjacency
        to
         "
         * Removed spf parameters (should be established on the interface.
        This is affecting the type part of
           vendor specific extensions.
         * Removed hello
        message that would be used."; parameters at global level.
         * Interface configuration uses a string rather
         than a reference. This permits to map to some
         vendor specific configuration.
         ";
       reference "draft-ietf-isis-yang-isis-00";
     }
     typedef authentication-type {
       type enumeration {
           enum  none
     revision 2014-09-26 {
       description "No authentication used.";
         "
         * Add BFD support
         * remove max-elements to max-area-addresses
         ";
       reference "";
     }
           enum  plaintext
     revision 2014-09-11 {
       description "Plain text password used.";
         "
         * Add level parameter to ispf and spf delay
         * Add LSP generation as a feature
         * Make lsp-refresh a feature
         * Change parameter container to list
         ";
       reference "";
     }
           enum  message-digest
     revision 2014-09-05 {
       description "MD5 digest used.";
           }
       " Rewrite of the global hierarchy.";
       reference "";
     }
     revision 2014-08-06 {
       description
       "This type defines available authentication types.";
       "
       * isis-state renamed to isis.
       * Add GR support
       * Add meshgroup support
       * Add CLNS support
       * Add 64bits tags
       * Add notifications to be aligned with MIB4444
       * Add packet-counters, interface-counters, system-counters
         states

       * Add 3-way handshake support
       * Rename isis-adjacency-updown to adjacency-change
       * Add notification for LSP reception
       * Use feature for reference BW
       * Add lsp-retransmit-interval on interfaces
       * Rename lsp-interval to lsp-pacing-interval
       * Add ispf support as feature
       * Add spf delay support as feature (2step & exp backoff)
       * Add maximum-area-addresses
       * Add default-metric
       ";
       reference "RFC XXXX: YANG Data Model for ISIS Protocol";
     }

     typedef level {
       type enumeration {
         enum "level-1"
     revision 2014-06-25 {
       description
            "This enum describes L1 only capability."; "
       * isis-cfg renamed to isis.
       * Add precisions on authentication-keys in description
       ";
       reference "draft-litkowski-isis-yang-isis-01";
     }
         enum "level-2"

     revision 2014-06-20 {
       description
            "This enum describes L2 only capability."; "
       * isis-op renamed to isis-state.
       * Multiple instances under ISIS are removed.
       * interface-cfg grouping removed and content
         is directly included in container isis.
       * TLVxx renamed with human-readable name in isis-database.
         TLV reference are putted in description.
       * Reference to core routing module were fixed.
       * Namespace fixed.
       * Add simple-iso-address type.
       * area-id and system-id in ISIS container are merged to
         nsap-address.
       * Add isis-system-id type.
       * Add isis-lsp-id type.
       * Add remaining-lifetime leaf in isis-database.
       * Add TLV2 (is-neighbor) in isis-database.
       * Renamed some container name for consistency
         reason ('isis-' prefixed).
       * Add new identities isis-cfg and isis-state.
       * Add descriptions.
       * Add notification isis-adjacency-updown.
       * Add RPC clear-isis-adjacency and clear-isis-database.
       ";
       reference "draft-litkowski-isis-yang-isis-00";
     }
         enum "level-all"
     revision 2014-06-11 {
       description
            "This enum describes both levels capability.";
         } "Initial revision.";
       reference "draft-litkowski-netmod-isis-cfg-00";
     }
       default "level-all";
     identity isis {
       base rt:routing-protocol;
       description
        "This type defines "Identity for the ISIS level of an object."; routing protocol.";
     }

     typedef level-number {
       type uint8

     identity isis-adjacency-change {
         range "1 .. 2";
       }
       description
        "This type defines a current "Identity for the ISIS level."; routing protocol
         adjacency state.";
     }

     typedef lsp-id {
       type string

     identity clear-isis-database {
         pattern
          '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]'
                +'{4}\.[0-9][0-9]-[0-9][0-9]';
       }
       description
        "This type defines "Identity for the ISIS LSP ID using pattern,
         system id looks like : 0143.0438.AeF0.02-01"; routing protocol
         database reset action.";
     }

     typedef area-address {
       type string

     identity clear-isis-adjacency {
         pattern '[0-9A-Fa-f]{2}\.([0-9A-Fa-f]{4}\.){0,3}';
       }
       description
        "This type defines "Identity for the area address."; ISIS routing protocol
         adjacency reset action.";
     }

     typedef snpa {
       type string

     /* Feature definitions */

     feature key-chain {
         length "0 .. 20";
       }
     description
        "This type defines Subnetwork Point
      "Support of Attachement format."; keychain for authentication.";
     }

     typedef system-id {
       type string
     feature segment-routing {
         pattern
          '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.00';
       }
       description
        "This type defines ISIS system id using pattern,
         system id looks like : 0143.0438.AeF0.00";
        "Support of segment-routing.";
     }

     typedef wide-metric {
       type uint32
     feature node-tag {
         range "0 .. 16777215";
       }
       description
        "This type defines wide style format
         "Support of ISIS metric."; node tag.";
     }

     typedef std-metric {
       type uint8
     feature igp-ldp-sync {
         range "0 .. 63";
       description
         "Support of RFC5443.";
     }
     feature fast-reroute {
       description
        "This type defines old style format
         "Support of ISIS metric."; IPFRR.";
     }
     typedef mesh-group-state
     feature  lfa {
       type enumeration
       description
         "Support of Loop Free Alternates.";
     }
     feature remote-lfa {
         enum "meshInactive"
       description
         "Support of remote Loop Free Alternates.";
     }

     feature bfd {
       description
            "Interface is not part
         "Support of a mesh group."; BFD.";
     }
         enum "meshSet"
     feature overload-max-metric {
       description
            "Interface is part
         "Support of a mesh group."; overload by setting
          all links to max metric.";
     }
         enum "meshBlocked"
     feature prefix-tag {
       description
            "LSPs must not be flooded over that interface.";
         "Add 32bit tag to prefixes";
     }
     feature prefix-tag64 {
       description
         "Add 64bit tag to prefixes";
     }
     feature reference-bandwidth {
       description
        "This type describes meshgroup state of an interface";
         "Use a reference bandwidth to compute metric.";
     }

     /* Grouping definitions */

     grouping notification-instance-hdr
     feature ipv4-router-id {
       description
        "This group describes common instance specific
         data for notifications.";
       leaf instance-name
        "Support of IPv4 router ID configuration under ISIS.";
     }

     feature ipv6-router-id {
         type string;
       description
          "Describes the name
        "Support of the ISIS instance."; IPv6 router ID configuration under ISIS.";
     }
       leaf instance-level

     feature multi-topology {
         type level;
       description
          "Describes the ISIS level of the instance.";
       }
        "Multitopology routing support.";
     }

     grouping notification-interface-hdr
     feature nlpid-control {
       description
        "This group describes common interface specific
         data for notifications.";
       leaf interface-name {
         type string;
         description
          "Describes feature controls the name advertisement
         of the support NLPID within ISIS interface."; configuration.";
     }
       leaf interface-level
     feature graceful-restart {
         type level;
       description
          "Describes the ISIS level of the interface.";
         "Graceful restart support as per RFC5306.";
     }
       leaf extended-circuit-id

     feature lsp-refresh {
         type extended-circuit-id;
       description
          "Describes the extended circuit-id
         "Configuration of the interface.";
       } LSP refresh interval.";
     }

     grouping route-content

     feature maximum-area-addresses {
       description
        "This group add isis-specific route properties.";
       leaf metric
         "Support of maximum-area-addresses config.";
     }

     feature admin-control {
         type uint32;
       description
          "This leaf describes ISIS metric
        "Control administrative state of a route."; ISIS.";
     }
       leaf-list tag

     /* Type definitions */

     typedef instance-state-ref {
       type uint64; leafref {
         path "/rt:routing-state/rt:routing-instance/"
         +"rt:routing-protocols/rt:routing-protocol/rt:name";
       }
       description
          "This leaf describes list type is used for leaves that reference state data of tags associated
           with the route. The leaf describes both
           32bits and 64bits tags.";
           an ISIS protocol instance.";
     }
       leaf route-type

     typedef admin-state {
       type enumeration {
         enum l2-up-internal {
             description "Level 2 internal route
              and not leaked to a lower level";
           }
           enum l1-up-internal "up" {
           description "Level 1 internal route
              and not leaked to a lower level";
            "Up state";
         }
         enum l2-up-external "down" {
           description "Level 2 external route
              and not leaked to a lower level";
            "Down state";
         }
           enum l1-up-external {
             description "Level 1 external route
              and not leaked to a lower level";
       }
           enum l2-down-internal {
       description "Level 2 internal route
              and leaked to
        "Administrative state of a lower level"; component.";
     }
           enum l1-down-internal
     typedef oper-state {
       type enumeration {
             description "Level 1 internal route
              and leaked to a lower level";
           }
         enum l2-down-external "up" {
           description "Level 2 external route
              and leaked to a lower level";
            "Up state";
         }
         enum l1-down-external "down" {
           description "Level 1 external route
              and leaked to a lower level";
            "Down state";
         }
       }
       description
          "This leaf describes the type
        "Operational state of ISIS route."; a component.";
     }
       leaf segment-id
     typedef circuit-id {
         if-feature segment-routing;
       type uint32; uint8;
       description
          "Segment ID or MPLS label value
          used to reach
        "This type defines the prefix.";
       } circuit ID
        associated with an interface.";
     }

     grouping fast-reroute-global-cfg

     typedef extended-circuit-id {
       type uint32;
       description
        "This group type defines global
        configuration of IPFRR.";
       container fast-reroute {
         if-feature fast-reroute;
         description
           "This container may be
           augmented the extended circuit ID
        associated with global parameters
           for IPFRR.";
           container lfa an interface.";
     }

     typedef interface-type {
       type enumeration {
         enum broadcast {
             if-feature lfa;
           description
               "This container may be
               augmented with global parameters
               for LFA.
               Creating the container has no effect on
               LFA activation."; "Broadcast interface type.
           Would result in DIS election.";
         }
         enum point-to-point {
           description
            "Point to point interface type.";
         }
       }
     grouping fast-reroute-if-cfg {
       description
        "This group defines interface
        configuration of IPFRR.";
       container fast-reroute {
         if-feature fast-reroute;

         list lfa {
           if-feature lfa;

           key level;

           leaf candidate-disabled { type boolean;
             description
              "Prevent defines the interface type of adjacency
        to be used as backup.";
           }
           leaf enabled {
             type boolean;
             description
              "Activates LFA. established on the interface.
        This model assumes activation is affecting the type of per-prefix LFA."; hello
        message that would be used.";

     }

           container remote-lfa {
             if-feature remote-lfa;
             leaf enabled

     typedef level {
       type boolean; enumeration {
         enum "level-1" {
           description
               "Activates rLFA.";
            "This enum describes L1 only capability.";
         }
         enum "level-2" {
           description
              "remote LFA configuration.";
            "This enum describes L2 only capability.";
         }
           leaf level
         enum "level-all" {
             type level;
           description
               "Level applicability.";
            "This enum describes both levels capability.";
         }
           description
            "LFA configuration.";
       }
       default "level-all";
       description
          "Fast-reroute configuration.";
       }
        "This type defines ISIS level of an object.";

     }
     grouping segment-routing-global-cfg

     typedef level-number {
       type uint8 {
         range "1 .. 2";
       }
       description
        "This grouping type defines SR global config";
       container segment-routing {
         if-feature segment-routing;
         leaf enabled a current ISIS level.";
     }

     typedef lsp-id {
       type boolean;
           default false; string {
         pattern
          '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]'
                +'{4}\.[0-9][0-9]-[0-9][0-9]';
       }
       description
            "Enables segment-routing
            protocol extensions.";
        "This type defines ISIS LSP ID using pattern,
         system id looks like : 0143.0438.AeF0.02-01";
     }
         container bindings {
           leaf advertise

     typedef area-address {
       type boolean;
             default true; string {
         pattern '[0-9A-Fa-f]{2}\.([0-9A-Fa-f]{4}\.){0,3}';
       }
       description
             "Authorize
        "This type defines the advertise
             of local mappings in binding TLV."; area address.";
     }
           leaf receive
     typedef snpa {
       type boolean;
             default true;
             description
             "Authorize the reception and usage
             of binding TLV."; string {
         length "0 .. 20";
       }
       description
            "Control
        "This type defines Subnetwork Point of binding advertisement
            and reception.";
         }

         description
         "segment routing global config.";
       } Attachement format.";

     }

     grouping segment-routing-if-cfg

     typedef system-id {
       type string {
         pattern
          '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.00';
       }
       description
        "This grouping type defines SR interface config";
       container segment-routing {
         if-feature segment-routing;
         container authorize-bundle {
           leaf enabled ISIS system id using pattern,
         system id looks like : 0143.0438.AeF0.00";
     }

     typedef wide-metric {
       type boolean; uint32 {
         range "0 .. 16777215";
       }
       description
              "Enable/disable S flag.";
        "This type defines wide style format
         of ISIS metric.";
     }
           leaf weight

     typedef std-metric {
       type uint8;
             description
              "The value represents the
              weight of the Adj-SID
             for the purpose of load balancing."; uint8 {
         range "0 .. 63";
       }
       description
            "Control advertisement
        "This type defines old style format
         of S flag.
            Enable to advertise a common Adj-SID
            for parallel links."; ISIS metric.";
     }
         leaf advertise-protection

     typedef mesh-group-state {
       type enumeration {
         enum "single" "meshInactive" {
           description
                "A single Adj-SID
            "Interface is associated
                with the adjacency and reflects
                the protection configuration."; not part of a mesh group.";
         }
         enum "meshSet" {
           description
            "Interface is part of a mesh group.";
         }
         enum "dual" "meshBlocked" {
           description
                "Two Adj-SIDs will be associated
                with the adjacency if interface
                is protected. In this case
                one will be enforced with
                backup flag set, the other
                will be enforced to backup flag unset.
                In case, protection is
            "LSPs must not configured,
                a single Adj-SID will be advertised
                with backup flag unset.";
             } flooded over that interface.";
         }
           description
            "If set, the Adj-SID refers to an
           adjacency being protected.";
       }
       description
          "Configuration
        "This type describes meshgroup state of segment-routing
           adjacency SID properties.";
       } an interface";
     }

     /* Grouping definitions */

    grouping prefix-segment-id admin-control {
       description
        "This group defines segment routing extensions
        for prefixes.";

       leaf flags enable {
           if-feature admin-control;
           type bits {
             bit readvertisment {
               position 7; boolean;
           default true;
           description
                "If set, then the prefix to
               which this Prefix-SID is attached,
               has been propagated by
                "Control the
               router either from another level
               or from redistribution."; administrative
                state.";
       }
             bit node {
               position 6;

       description
                "If set, then the Prefix-SID refers to
                 the router identified by the prefix.";
        "Grouping for admin control.";
     }
             bit php

    grouping adjacency-state {
               position 5;
              container adjacencies {
                 list adjacency {
                   leaf neighbor-systype {
                     type level;
                     description
               "If set, then the penultimate hop MUST NOT
               pop the Prefix-SID before delivering the packet
               to the node
               that advertised the Prefix-SID.";
                      "Type of neighboring system";

                   }
             bit explicit-null
                   leaf neighbor-sysid {
               position 4;
                     type system-id;
                     description
               "If set, any upstream neighbor
                      "The system-id of the Prefix-SID originator MUST replace
               the Prefix-SID with a
               Prefix-SID having an
               Explicit-NULL value (0 for IPv4 and 2 for
               IPv6) before forwarding the packet."; neighbor";

                   }
             bit  value
                   leaf neighbor-extended-circuit-id {
               position 3;
                     type extended-circuit-id;
                     description
               "If set, then
                      "Circuit ID of the Prefix-SID carries a
               value (instead neighbor";
                   }
                   leaf neighbor-snpa {
                     type snpa;
                     description
                      "SNPA of an index).
               By default the flag is UNSET."; neighbor";
                   }
             bit  local
                   leaf usage {
               position 2;
                     type level;
                     description
               "If set, then the value/index carried by
                     "How is the Prefix-SID has local significance.
               By default adjacency used ?
                     On a p2p link this might be level 1 and 2,
                     but on a LAN, the flag is UNSET.";
             } usage will be level 1
                     between peers at L1 or level 2 between
                     peers at L2.";
                   }
                   leaf hold-timer {
                     type uint16;
                     description
            "Describes flags associated with
                      "The holding time in seconds for this
                       adjacency. This value is based on
                       received hello PDUs and the
            segment ID."; elapsed
                       time since receipt.";
                   }
                   leaf algorithm neighbor-priority {
                     type uint8; uint8 {
                       range "0 .. 127";
                     }
                     description
            "Algorithm to be used
                      "Priority of the neighboring IS for path computation."; becoming
                       the DIS.";
                   }
                   leaf value lastuptime {
                     type uint32; yang:timestamp;
                     description
            "Value
                      "When the adjacency most recently entered
                       state 'up', measured in hundredths of a
                       second since the last reinitialization of
                       the prefix-SID.";
         } network management subsystem.
                       The value is 0 if the adjacency has never
                       been in state 'up'.";

                   }

     grouping adjacency-segment-id {
       description
        "This group defines segment routing extensions
        for adjacencies.";
                   leaf flags state {
                     type bits enumeration {
             bit address-family
                       enum "Up" {
               position 7;
                         description
                "If unset, then the Adj-SID refers
               to an adjacency with outgoing IPv4 encapsulation.
               If set then the Adj-SID refers to an
                          "This state describes that
                           adjacency
               with outgoing IPv6 encapsulation."; is established.";
                       }
             bit backup
                       enum "Down" {
               position 6;
                         description
                "If set, the Adj-SID refers to an
                          "This state describes that
                           adjacency being protected
               (e.g.: using IPFRR or MPLS-FRR)"; is NOT established.";
                       }
                       enum "Init" {
                         description
                          "This state describes that
                           adjacency is establishing.";
                       }
             bit  value
                       enum "Failed" {
               position 5;
                         description
               "If set, then
                          "This state describes that
                           adjacency is failed.";
                       }
                     }
                     description
                      "This leaf describes the SID carries a
               value (instead state of an index).
               By default the flag is SET.";
                      interface.";
                   }
             bit  local {
               position 4;

                   description
               "If set, then
                    "List of operational adjacencies.";
                 }
                 description
                  "This container lists the value/index carried by adjacencies of
                  the SID has local significance.
               By default the flag is SET."; node.";
               }
             bit  set {
               position 3;
               description
               "When set, the S-Flag indicates that the
               Adj-SID refers to a set of adjacencies";
                "Adjacency state";
    }

     grouping fast-reroute-global-state {
             container protected-routes {
               list af-stats {
                 key "af prefix alternate";

                 leaf af {
                   type identityref {
                     base rt:address-family;
                   }
                   description
            "Describes flags associated with the
            segment ID.";
                    "Address-family";
                 }
                 leaf weight prefix {
                   type uint8; string;
                   description
            "The value represents the weight of the Adj-SID
             for the purpose of load balancing.";
                    "Protected prefix.";
                 }
                 leaf neighbor-id alternate {
                   type system-id; string;
                   description
            "Describes the system ID of the neighbor
            associated with
                    "Alternate nexthop for the SID value. This is only
            used on LAN adjacencies."; prefix.";
                 }
                 leaf value alternate-type {
                   type uint32; enumeration {
                     enum equalcost {
                       description
            "Value of the Adj-SID.";
                        "ECMP alternate.";
                     }
                     enum lfa {
                       description
                        "LFA alternate.";
                     }

     grouping prefix-ipv4-std
                     enum remote-lfa {
                       description
        "This group defines attributes
                        "Remote LFA alternate.";
                     }
                     enum tunnel {
                       description
                        "Tunnel based alternate
                        (like RSVP-TE or GRE).";
                     }
                     enum ti-lfa {
                       description
                        "TI LFA alternate.";
                     }
                     enum mrt {
                       description
                        "MRT alternate.";
                     }
                     enum other {
                       description
                        "Unknown alternate type.";
                     }
                   }
                   description
                    "Type of an
         IPv4 standard prefix."; alternate.";
                 }
                 leaf up-down best {
                   type boolean;
                   description
          "This leaf expresses
                    "describes if the value of up/down bit."; alternate is the best one.";
                 }
                 leaf i-e non-best-reason {
                   type boolean; string;
                   description
          "This leaf expresses
                    "Information field to describe why the value of I/E bit."; alternate
                    is not best.";
                 }
                 leaf ip-prefix protection-available {
                   type inet:ipv4-address; bits {
                     bit nodeprotect {
                       position 0;
                       description
          "This leaf describes the IPv4 prefix";
                       "Node protection available.";
                     }
       leaf prefix-len
                     bit linkprotect {
         type uint8;
                       position 1;
                       description
          "This leaf describes
                       "Link protection available.";
                     }
                     bit srlgprotect {
                       position 2;
                       description
                       "SRLG protection available.";
                     }
                     bit downstreamprotect {
                       position 3;
                       description
                       "Downstream protection available.";
                     }
                     bit other {
                       position 4;
                       description
                       "Other protection available.";
                     }
                   }
                   description
                   "Describes protection provided by the IPv4 prefix len in bits"; alternate.";
                 }
                 leaf default-metric alternate-metric1 {
                   type std-metric; uint32;
                   description
          "This leaf describes
                    "Metric from PLR to destination
                     through the ISIS default metric value"; alternate path.";
                 }
       container delay-metric {
                 leaf metric alternate-metric2 {
                   type std-metric; uint32;
                   description
            "This leaf describes
                    "Metric from PLR to the ISIS delay metric value"; alternate node";
                 }
                 leaf supported alternate-metric3 {
                   type boolean;
           default "false"; uint32;
                   description
            "This leaf describes if
                    "Metric from alternate node to the metric is supported."; destination";
                 }

                 description
          "This container defines the ISIS delay metric.";
                  "Per AF statistics.";
               }
               description
                "List of prefixes that are protected.";
             }

             container expense-metric nonprotected-routes {
                list af-stats {
                 key "af prefix";

                 leaf metric af {
                   type std-metric; identityref {
                     base rt:address-family;
                   }
                   description
            "This leaf describes the ISIS expense metric value";
                    "Address-family";
                 }
                 leaf supported prefix {
                   type boolean;
           default "false"; string;
                   description
            "This leaf describes if the metric is supported.";
                    "Protected prefix.";
                 }
                 description
          "This container defines the ISIS expense metric.";
                  "Per AF statistics.";
               }
       container error-metric
               description
                "List of prefixes that are not protected.";
             }

             list protection-statistics {
               key frr-protection-method;

               leaf metric frr-protection-method {
                 type std-metric; string;
                 description
            "This leaf describes the ISIS error metric value";
                  "Protection method used.";
               }
               list af-stats {
                 key af;

                 leaf supported af {
                   type boolean;
           default "false";
           description
            "This leaf describes if the metric is supported."; identityref {
                     base rt:address-family;
                   }
                   description
          "This container defines the ISIS error metric.";
       }
                    "Address-family";
                 }

     grouping prefix-ipv4-extended {
       description
        "This group defines attributes of an
         IPv4 extended prefix.";
                 leaf up-down total-routes {
                   type boolean; uint32;
                   description
          "This leaf expresses the value of up/down bit.";
                    "Total prefixes.";
                 }
                 leaf ip-prefix unprotected-routes {
                   type inet:ipv4-address; uint32;
                   description
          "This leaf describes the IPv4 prefix";
                     "Total of prefixes who are
                     not protected.";
                 }
                 leaf prefix-len protected-routes {
                   type uint8; uint32;
                   description
          "This leaf describes the IPv4 prefix len in bits";
                     "Total of prefixes who are
                     protected.";
                 }
                 leaf metric linkprotected-routes {
                   type wide-metric; uint32;
                   description
          "This leaf describes the ISIS metric value";
                     "Total of prefixes who are
                     link protected.";
                 }
       leaf-list tag
                 leaf nodeprotected-routes {
                   type uint32;
                   description
          "This leaf describes a list
                     "Total of tags associated with
          the prefix."; prefixes who are
                     node protected.";
                 }
       leaf-list tag64
                 description
                  "Per AF statistics.";
               }

               description
                "Global protection statistics.";
             }
             description
              "IPFRR states.";
     }

     grouping notification-instance-hdr {
         type uint64;
       description
        "This leaf group describes a list common instance specific
         data for notifications.";
       leaf instance-name {
         type string;
         description
          "Describes the name of 64-bit tags associated with the prefix."; ISIS instance.";
       }
       list prefix-segment-id
       leaf instance-level {
         key value;
         uses prefix-segment-id;
         type level;
         description
          "List
          "Describes the ISIS level of prefix-segment-id."; the instance.";
       }
     }

     grouping prefix-ipv6-extended notification-interface-hdr {
       description
        "This group defines attributes of an
         IPv6 prefix."; describes common interface specific
         data for notifications.";
       leaf up-down interface-name {
         type boolean; string;
         description
          "This leaf expresses
          "Describes the value name of up/down bit."; the ISIS interface.";
       }
       leaf ip-prefix interface-level {
         type inet:ipv6-address; level;
         description
          "This leaf describes
          "Describes the IPv6 prefix"; ISIS level of the interface.";
       }
       leaf prefix-len extended-circuit-id {
         type extended-circuit-id;
         description
          "Describes the extended circuit-id of the interface.";
       }
     }

     grouping route-content {
         type uint8;
       description
        "This leaf describes the IPv4 prefix len in bits";
       } group add isis-specific route properties.";
       leaf metric {
         type wide-metric; uint32;
         description
          "This leaf describes the ISIS metric value"; of a route.";
       }
       leaf-list tag {
         type uint32; uint64;
         description
          "This leaf describes a list of tags associated
           with the prefix."; route. The leaf describes both
           32bits and 64bits tags.";
       }
       leaf-list tag64
       leaf route-type {
         type uint64; enumeration {
           enum l2-up-internal {
             description "Level 2 internal route
              and not leaked to a lower level";
           }
           enum l1-up-internal {
             description "Level 1 internal route
              and not leaked to a lower level";
           }
           enum l2-up-external {
             description "Level 2 external route
              and not leaked to a lower level";
           }
           enum l1-up-external {
             description "Level 1 external route
              and not leaked to a lower level";
           }
           enum l2-down-internal {
             description "Level 2 internal route
              and leaked to a lower level";
           }
           enum l1-down-internal {
             description "Level 1 internal route
              and leaked to a lower level";
           }
           enum l2-down-external {
             description "Level 2 external route
              and leaked to a lower level";
           }
           enum l1-down-external {
             description "Level 1 external route
              and leaked to a lower level";
           }
         }
         description
          "This leaf describes a list of 64-bit tags associated with the prefix."; type of ISIS route.";
       }
       list prefix-segment-id
     }

     grouping fast-reroute-global-cfg {
         key value;
         uses prefix-segment-id;
       description
          "List
        "This group defines global
        configuration of prefix-segment-id."; IPFRR.";

           container lfa {
             if-feature lfa;
             description
               "This container may be
               augmented with global parameters
               for LFA.
               Creating the container has no effect on
               LFA activation.";
           }

     }

     grouping neighbor-extended fast-reroute-if-cfg {
       description
        "This group defines attributes interface
        configuration of an
         ISIS extended neighbor."; IPFRR.";

         list lfa {
           if-feature lfa;

           key level;

           leaf candidate-disabled {
             type boolean;
             default false;
             description
              "Prevent the interface to be used as backup.";
           }
           leaf neighbor-id enable {
             type system-id; boolean;
             description
          "This leaf describes the system-id
              "Activates LFA.
              This model assumes activation
              of the neighbor."; per-prefix LFA.";
           }

           container remote-lfa {
             if-feature remote-lfa;
             leaf metric enable {
               type wide-metric; boolean;
               description
          "This leaf describes the ISIS metric value";
               "Activates rLFA.";
             }
       list adjacency-segment-id
             description
              "remote LFA configuration.";
           }
           leaf level {
         key value;
         uses adjacency-segment-id;
             type level;
             description
          "List of adjacency-segment-id.";
               "Level applicability.";
           }
           description
            "LFA configuration.";
         }

     }

     grouping neighbor prefix-ipv4-std {
       description
        "This group defines attributes of an
         ISIS
         IPv4 standard neighbor."; prefix.";
       leaf neighbor-id up-down {
         type system-id; boolean;
         description
          "This leaf describes expresses the system-id value of the neighbor."; up/down bit.";
       }
       leaf i-e {
         type boolean;
         description
          "This leaf expresses the value of I/E bit.";
       }
       leaf ip-prefix {
         type inet:ipv4-address;
         description
          "This leaf describes the IPv4 prefix";
       }
       leaf prefix-len {
         type uint8;
         description
          "This leaf describes the IPv4 prefix len in bits";
       }
       leaf default-metric {
         type std-metric;
         description
          "This leaf describes the ISIS default metric value";
       }
       container delay-metric {
         leaf metric {
           type std-metric;
           description
            "This leaf describes the ISIS delay metric value";
         }
         leaf supported {
           type boolean;
           default "false";
           description
            "This leaf describes if the metric is supported.";
         }

         description
          "This container defines the ISIS delay metric.";
       }
       container expense-metric {
         leaf metric {
           type std-metric;
           description
            "This leaf describes the ISIS delay expense metric value";
         }
         leaf supported {
           type boolean;
           default "false";
           description
            "This leaf describes if the metric is supported.";
         }
         description
          "This container defines the ISIS expense metric.";
       }
       container error-metric {
         leaf metric {
           type std-metric;
           description
            "This leaf describes the ISIS error metric value";
         }
         leaf supported {
           type boolean;
           default "false";
           description
            "This leaf describes if the metric is supported.";
         }

         description
          "This container defines the ISIS error metric.";
       }
     }

     grouping database prefix-ipv4-extended {
       description
        "This group defines attributes of an
         ISIS database (Link State DB).";
         IPv4 extended prefix.";
       leaf lsp-id up-down {
         type lsp-id; boolean;
         description
          "This leaf describes expresses the LSP ID value of the LSP."; up/down bit.";
       }
       leaf checksum ip-prefix {
         type uint16; inet:ipv4-address;
         description
          "This leaf describes the checksum of the LSP."; IPv4 prefix";
       }
       leaf remaining-lifetime prefix-len {
         type uint16;
         units "seconds"; uint8;
         description
          "This leaf describes the remaining lifetime IPv4 prefix len in seconds before the LSP expiration."; bits";
       }

       leaf sequence metric {
         type uint32; wide-metric;
         description
          "This leaf describes the sequence number of the LSP."; ISIS metric value";
       }
       leaf attributes
       leaf-list tag {
         type bits {
           bit PARTITIONNED { uint32;
         description
              "If set,
          "This leaf describes a list of tags associated with
          the originator supports partition
               repair."; prefix.";
       }
           bit ATTACHED-ERROR
       leaf-list tag64 {
         type uint64;
         description
              "If set, the originator is attached to
               another area using
          "This leaf describes a list of 64-bit tags associated with
          the referred metric."; prefix.";
       }
           bit ATTACHED-EXPENSE

     }

     grouping prefix-ipv6-extended {
       description
              "If set, the originator is attached to
               another area using the referred metric.";
           }
           bit ATTACHED-DELAY
        "This group defines attributes of an
         IPv6 prefix.";
       leaf up-down {
         type boolean;
         description
              "If set, the originator is attached to
               another area using
          "This leaf expresses the referred metric."; value of up/down bit.";
       }
           bit ATTACHED-DEFAULT
       leaf ip-prefix {
         type inet:ipv6-address;
         description
              "If set, the originator is attached to
               another area using
          "This leaf describes the referred metric."; IPv6 prefix";
       }
           bit OVERLOAD
       leaf prefix-len {
         type uint8;
         description
              "If set,
          "This leaf describes the originator is overloaded,
               and must be avoided IPv4 prefix len in path calculation.";
           } bits";
       }

       leaf metric {
         type wide-metric;
         description
          "This leaf describes attributes of the LSP."; ISIS metric value";
       }

       container is-neighbor {
         list neighbor
       leaf-list tag {
           key "neighbor-id";
           uses neighbor;
           description
            "List of neighbors.";
         }
         type uint32;
         description
          "This leaf describes a list of ISIS neighbors.
          ISIS reference is TLV 2."; tags associated with
          the prefix.";
       }

       container authentication {
         leaf authentication-type
       leaf-list tag64 {
         type authentication-type; uint64;
         description
          "This leaf describes a list of 64-bit tags associated with
          the authentication type
             to be used."; prefix.";
       }

     }

     grouping neighbor-extended {
       description
        "This group defines attributes of an
         ISIS extended neighbor.";
       leaf authentication-key neighbor-id {
         type string; system-id;
         description
          "This leaf describes the authentication key
             to be used. For security reason, the
             authentication key MUST NOT be presented
             in plaintext format. Authors recommends
             to use MD5 hash to present system-id of the authentication-key."; neighbor.";
       }
       leaf metric {
         type wide-metric;
         description
          "This container leaf describes authentication
         information of the node. ISIS reference is TLV 10."; metric value";
       }

       container extended-is-neighbor {
         list

     }

     grouping neighbor {
           key "neighbor-id";
           uses neighbor-extended;
       description
            "List
        "This group defines attributes of neighbors.";
         } an
         ISIS standard neighbor.";
       leaf neighbor-id {
         type system-id;
         description
          "This container leaf describes list the system-id of ISIS extended
          neighbors.
          ISIS reference is TLV 22."; the neighbor.";
       }

       container ipv4-internal-reachability {
         list prefixes
       leaf i-e {
           key "ip-prefix";
           uses prefix-ipv4-std;
         type boolean;
         description
            "List
          "This leaf expresses the value of prefixes."; I/E bit.";
       }
       leaf default-metric {
         type std-metric;
         description
          "This container leaf describes list of IPv4 internal
          reachability information. the ISIS reference is TLV 128."; default metric value";
       }

       leaf-list protocol-supported
       container delay-metric {
         leaf metric {
           type uint8; std-metric;
           description
            "This leaf describes the list of
          supported protocols. ISIS reference is TLV 129."; delay metric value";
         }

       container ipv4-external-reachability {
         list prefixes
         leaf supported {
           key "ip-prefix";
           uses prefix-ipv4-std;
           type boolean;
           default "false";
           description
            "List of prefixes.";
            "This leaf describes if the metric is supported.";
         }
         description
          "This container describes list of IPv4 external
          reachability information. defines the ISIS reference is TLV 130."; delay metric.";
       }

       leaf-list ipv4-addresses
       container expense-metric {
         leaf metric {
           type inet:ipv4-address; std-metric;
           description
            "This leaf describes the IPv4 addresses of the node. ISIS reference is TLV 132."; delay expense value";
         }
         leaf ipv4-te-routerid supported {
           type inet:ipv4-address; boolean;
           default "false";
           description
            "This leaf describes if the IPv4 Traffic Engineering
           router ID of metric is supported.";
         }
         description
          "This container defines the node. ISIS reference is TLV 134."; expense metric.";
       }
       container extended-ipv4-reachability error-metric {

         list prefixes
         leaf metric {
           key "ip-prefix";
           uses prefix-ipv4-extended;
           description
            "List of prefixes.";
         }
           type std-metric;
           description
            "This container leaf describes list of IPv4 extended
          reachability information. the ISIS reference is TLV 135."; error metric value";
         }
         leaf dynamic-hostname supported {
           type string; boolean;
           default "false";
           description
            "This leaf describes if the name of metric is supported.";
         }
         description
          "This container defines the node. ISIS reference is TLV 137."; error metric.";
       }
     }

     grouping database {
       description
        "This group defines attributes of an
         ISIS database (Link State DB).";
       leaf ipv6-te-routerid lsp-id {
         type inet:ipv6-address; lsp-id;
         description
          "This leaf describes the IPv6 Traffic Engineering
           router LSP ID of the node.
           ISIS reference is TLV 140."; LSP.";
       }

       container mt-is-neighbor {
         list neighbor {
           key "neighbor-id";
       leaf MT-ID checksum {
         type uint16 {
               range "0 .. 4095";
             } uint16;
         description
          "This leaf defines describes the identifier
               of a topology.";
           }
           uses neighbor-extended;
           description
            "List checksum of neighbors."; the LSP.";
       }
       leaf remaining-lifetime {
         type uint16;
         units "seconds";
         description
          "This container leaf describes list of ISIS multi-topology
           neighbors.
           ISIS reference is TLV 223."; the remaining lifetime
           in seconds before the LSP expiration.";
       }

       container mt-entries {
         list topology {
           key "MT-ID";
       leaf MT-ID sequence {
         type uint16 {
               range "0 .. 4095";
             } uint32;
         description
          "This leaf defines describes the identifier sequence number of a topology."; the LSP.";
       }
       leaf attributes {
         type bits {
           bit OVERLOAD PARTITIONNED {
             description
              "If set, the originator supports partition
               repair.";
           }
           bit ATTACHED-ERROR {
             description
              "If set, the originator is overloaded,
                   and must be avoided in path
                   calculation."; attached to
               another area using the referred metric.";
           }
           bit ATTACHED ATTACHED-EXPENSE {
             description
              "If set, the originator is attached to
               another area using the referred metric.";
           }
           bit ATTACHED-DELAY {
             description
              "If set, the originator is attached to
               another area using the referred metric.";
           }
           bit ATTACHED-DEFAULT {
             description
              "If set, the originator is attached to
               another area using the referred metric.";
           }
           bit OVERLOAD {
             description
              "If set, the originator is overloaded,
               and must be avoided in path calculation.";
           }
         }
         description
          "This leaf describes attributes of the LSP
               for the associated topology."; LSP.";
       }

       container is-neighbor {
         list neighbor {
           key "neighbor-id";
           uses neighbor;
           description
            "List of topologies supported."; neighbors.";
         }
         description
          "This container leaf describes the topology supported. list of ISIS neighbors.
          ISIS reference is TLV 229."; 2.";
       }

       leaf-list ipv6-addresses

       container authentication {
         leaf authentication-type {
           type inet:ipv6-address; string;
           description
            "This leaf describes the IPv6 interface
          addresses of the node.
          ISIS reference is TLV 232."; authentication type
             to be used.";
         }

       container mt-extended-ipv4-reachability {
         list prefixes {
           key "ip-prefix";
         leaf MT-ID authentication-key {
           type uint16 {
               range "0 .. 4095";
             } string;
           description
            "This leaf defines describes the identifier
               of a topology.";
           }
           uses prefix-ipv4-extended;
           description
            "List of prefixes."; authentication key
             to be used. For security reason, the
             authentication key MUST NOT be presented
             in plaintext format. Authors recommends
             to use MD5 hash to present the authentication-key.";
         }
         description "This container describes list of IPv4
          reachability authentication
         information in multi-topology
          environment. of the node. ISIS reference is TLV 235."; 10.";
       }

       container mt-ipv6-reachability extended-is-neighbor {
         list prefixes {
           key "ip-prefix";
           leaf MT-ID {
             type uint16 neighbor {
               range "0 .. 4095";
             }
             description
              "This leaf defines the identifier
               of a topology.";
           }
           uses prefix-ipv6-extended; neighbor-extended;
           description
            "List of prefixes."; neighbors.";
         }
         description
          "This container describes list of IPv6
          reachability information in multi-topology
          environment. ISIS extended
          neighbors.
          ISIS reference is TLV 237."; 22.";
       }

       container ipv6-reachability ipv4-internal-reachability {
         list prefixes {
           key "ip-prefix";
           uses prefix-ipv6-extended; prefix-ipv4-std;
           description
            "List of prefixes.";
         }
         description
          "This container describes list of IPv6 IPv4 internal
          reachability information.
          ISIS reference is TLV 236.";
       }

       list segment-routing-bindings {
         if-feature segment-routing;
         key "fec range";

         leaf fec {
           type string;
           description
           "IP (v4 or v6) range to be bound to SIDs."; 128.";
       }

         leaf range

       leaf-list protocol-supported {
         type uint16; uint8;
         description
            "Describes number of elements to assign
            a binding to.";
         }
          "This leaf flags {
           type bits {
             bit address-family {
               position 7;
               description
               "If unset, then the Prefix FEC
               carries an IPv4 Prefix.
               If set then the Prefix FEC carries an
               IPv6 Prefix.";
             }
             bit mirror {
               position 6;
               description
               "Set if the advertised SID/path
               corresponds to a mirrored context.
               ";
             }
             bit flooding {
               position 5;
               description
                "If the S bit is set(1),
                the IS-IS Router CAPABILITY TLV
               MUST be flooded across the entire routing domain.
               If the S bit is
               not set(0), the TLV MUST NOT be leaked between levels.
               This bit MUST NOT be altered during the TLV leaking.";
             }
             bit down {
               position 4;
               description
               "When the IS-IS Router CAPABILITY TLV is
               leaked from level-2 to level-1, the D bit
               MUST be set.  Otherwise, this bit MUST
               be clear.  IS-IS Router capability TLVs
               with describes the D bit set MUST NOT
               be leaked from level-1 to level-2.

               This list of
          supported protocols.
          ISIS reference is to prevent TLV looping.
               "; 129.";
       }
             bit attached

       container ipv4-external-reachability {
               position 3;
         list prefixes {
           uses prefix-ipv4-std;
           description
               "The originator
            "List of the SID/Label Binding
               TLV MAY set the A bit in order to signal
               that the prefixes and
               SIDs advertised in the SID/Label Binding
               TLV are directly
               connected to their originators.
               "; prefixes.";
         }
         description
          "This container describes list of IPv4 external
          reachability information.
          ISIS reference is TLV 130.";
       }

       leaf-list ipv4-addresses {
         type inet:ipv4-address;
         description
              "Flags
           "This leaf describes the IPv4 addresses of the binding."; node.
           ISIS reference is TLV 132.";
       }

       leaf weight ipv4-te-routerid {

         type uint8; inet:ipv4-address;
         description
            "Weight
           "This leaf describes the IPv4 Traffic Engineering
           router ID of the path for loadbalancing purpose."; node.
           ISIS reference is TLV 134.";
       }

       container extended-ipv4-reachability {

         list binding prefixes {
           uses prefix-ipv4-extended;
           description
            "List of prefixes.";
         }
         description
          "This container prefix-sid describes list of IPv4 extended
          reachability information.
          ISIS reference is TLV 135.";
       }

       leaf dynamic-hostname {
             uses prefix-segment-id;
         type string;

         description
              "Binding prefix SID to
          "This leaf describes the range."; name of the node.
          ISIS reference is TLV 137.";
       }

       leaf ero-metric ipv6-te-routerid {
         type uint32; inet:ipv6-address;
         description
              "Cost
          "This leaf describes the IPv6 Traffic Engineering
           router ID of ERO path."; the node.
           ISIS reference is TLV 140.";
       }

       container ero mt-is-neighbor {
         list neighbor {
           leaf address-family MT-ID {
             type identityref uint16 {
                 base rt:address-family;
               range "0 .. 4095";
             }
             description
                "Address-family.";
             }
              "This leaf loose {
               type boolean;
               description
                "Set to true,
                if hop is defines the identifier
               of a loose hop."; topology.";
           }
             leaf address {
               type string;
           uses neighbor-extended;
           description
               "IP address
            "List of a node on the
               path."; neighbors.";
         }
         description
              "Binding ERO path to the range.";
          "This container describes list of ISIS multi-topology
           neighbors.
           ISIS reference is TLV 223.";
       }

       container backup-ero mt-entries {
         list topology {

           leaf address-family MT-ID {
             type identityref uint16 {
                 base rt:address-family;
               range "0 .. 4095";
             }
             description
                "Address-family.";
              "This leaf defines the identifier
               of a topology.";
           }

           leaf loose attributes {
             type boolean; bits {
               bit OVERLOAD {
                 description
                "Set to true,
                if hop
                  "If set, the originator is a loose hop."; overloaded,
                   and must be avoided in path
                   calculation.";
               }
             leaf address
               bit ATTACHED {
               type string;
                 description
               "IP address of a node on
                  "If set, the
               path."; originator is attached to
                   another area using the referred metric.";
               }
             }
             description
              "Binding backup ERO path to
              "This leaf describes attributes of the range."; LSP
               for the associated topology.";
           }
           description
            "List of topologies supported.";
         }
         description
          "This container unnumbered-interface-id-ero {
             leaf router-id describes the topology supported.
          ISIS reference is TLV 229.";
       }

       leaf-list ipv6-addresses {
         type string; inet:ipv6-address;
         description
                "Router ID of
          "This leaf describes the node owning IPv6 interface
          addresses of the interface."; node.
          ISIS reference is TLV 232.";
       }

       container mt-extended-ipv4-reachability {
         list prefixes {
           leaf interface-id MT-ID {
             type uint32; uint16 {
               range "0 .. 4095";
             }
             description
               "Interface ID on which
              "This leaf defines the path is built."; identifier
               of a topology.";
           }
           uses prefix-ipv4-extended;
           description
              "Binding a path over unnumbered interface.";
            "List of prefixes.";

         }
         description
          "This container backup-unnumbered-interface-id-ero describes list of IPv4
          reachability information in multi-topology
          environment.
          ISIS reference is TLV 235.";

       }

       container mt-ipv6-reachability {
         list prefixes {
           leaf router-id MT-ID {
             type string; uint16 {
               range "0 .. 4095";
             }
             description
                "Router ID of the node owning
              "This leaf defines the interface."; identifier
               of a topology.";
           }
             leaf interface-id {
               type uint32;
           uses prefix-ipv6-extended;
           description
               "Interface ID on which the path
            "List of prefixes.";
         }
         description
          "This container describes list of IPv6
          reachability information in multi-topology
          environment.
          ISIS reference is built.";
             }
             description
              "Binding a backup path over unnumbered interface."; TLV 237.";
       }

       container ipv6-reachability {
         list prefixes {
           uses prefix-ipv6-extended;
           description
            "Bindings associated with the range.";
            "List of prefixes.";
         }
         description
          "This container describes list of SID/Label
          bindings. IPv6
          reachability information.
          ISIS reference is TLV 149."; 236.";
       }

       list router-capabilities {
         leaf flags {
           type bits {
             bit flooding {
               position 0;
               description
                "If the S bit is set(1),
                the IS-IS Router CAPABILITY TLV
               MUST be flooded across the entire routing domain.
               If the S bit is
               not set(0), the TLV MUST NOT be leaked between levels.

               This bit MUST NOT be altered during the TLV leaking.";
             }
             bit down {
               position 1;
               description
               "When the IS-IS Router CAPABILITY TLV is
               leaked from level-2 to level-1, the D bit
               MUST be set.  Otherwise, this bit MUST
               be clear.  IS-IS Router capability TLVs
               with the D bit set MUST NOT
               be leaked from level-1 to level-2.
               This is to prevent TLV looping.
               ";
             }
           }
           description
            "Flags associated with router capability.";
         }
         container node-tag {
           if-feature node-tag;
           list node-tag {
             leaf tag {
               type uint32;
               description
                "Node tag value.";
             }
             description
              "List of tags.";
           }
           description
            "Container for node tags.";
         }
         list segment-routing {
           leaf flags {
             type bits {
               bit ipv4 {
                 position 7;
                 description
                 "If set, then the router is capable of
                 outgoing IPv4 encapsulation on all interfaces.
                 ";

               }
               bit ipv6 {
                 position 6;
                 description
                 "If set, then the router is capable of
                 outgoing IPv6 encapsulation on all interfaces.
                 ";
               }
             }
             description
              "Flags associated with the capability.";
           }
           leaf range {
             type uint32;
             description
              "Number of values of the range starting with the
              SID/Label value.";
           }
           leaf starting-value {
             type uint32;
             description
             "Lower bound of the label block.";
           }
           description
            "Segment routing capability.";
         }
         leaf-list segment-routing-algorithm {
           type uint8;
           description
            "List of supported algorithm for segment routing.";
         }

         leaf binary {
           type binary;
           description
            "This leaf describes the capability of the node.
            Format is binary according to the protocol encoding.";
         }
         description
          "This container describes the capabilities of the node.
          This container may be extended with detailed
          information.
          ISIS reference is TLV 242.";
       }
     }

     /* */

     augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
       when "rt:source-protocol = 'isis:isis'" {
         description "ISIS-specific route attributes.";
       }
       uses route-content;
       description
        "This augments route object in RIB with ISIS-specific
         attributes.";
       }

     augment "/rt:active-route/rt:output/rt:route"
        {
       uses route-content;
       description "ISIS-specific route attributes.";
       }

     augment "/if:interfaces/if:interface"
        {
       leaf clns-mtu

     grouping isis-node-tag-cfg {
         type uint16;
         description
          "Defines CLNS MTU of the interface.";
       }
       description "ISO interface
        "ISIS node tag config.";
       }

     augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
         +"rt:routing-protocol" {
       when "rt:type = 'isis:isis'" {
         description
          "This augment is only valid when routing protocol
           instance type is isis.";
       }
       description
        "This augments a routing protocol instance with ISIS
         specific parameters.";
       container isis node-tag {
           if-feature node-tag;
           list instance node-tag {
           must "count(area-address) > 0"
             key tag;
             leaf tag {
             error-message "At least one area-address
             must be configured.";
               type uint32;
               description
                "Node tag value.";
             }
             description
              "Enforce configuration
              "List of at least one area."; tags.";
           }

           key routing-instance;

           leaf routing-instance
           description
             "Container for node tags.";
         }
     }

     grouping isis-global-cfg {
             type rt:routing-instance-ref;
       description
               "Reference routing instance.
               For protocol centric model, which is
               supported in
               default-instance only, this could reference
               any VRF routing-instance.
               For VRF centric model, must reference
        "Defines the
               enclosing routing-instance.";
           } ISIS global configuration.";

           uses admin-control;

           leaf level-type {
             type level;
             default "level-all";
             description
              "This leaf describes the type of ISIS node.
              A node can be level-1-only, level-2-only
              or level-1-2.
              ";
           }

           leaf system-id {
             type system-id;
             description
              "This leaf defines the system-id of the node.";
           }

           leaf maximum-area-addresses {
             if-feature maximum-area-addresses;
             type uint8;
             default 3;
             description
              "Defines the maximum areas supported.";
           }

           leaf-list area-address {
             type area-address;
             description
              "List of areas supported by the
              protocol instance.";
           }

           container mpls {
             leaf ipv4-router-id {
               if-feature ipv4-router-id;
               type inet:ipv4-address;
               description
                "Router ID value that would be used in
                TLV 134.";
             }
             leaf ipv6-router-id {
               if-feature ipv6-router-id;
               type inet:ipv6-address;
               description
                "Router ID value that would be used in
                TLV 140.";
             }
             container igp-ldp-sync {
               if-feature igp-ldp-sync;
               description
                 "This container may be augmented
                 with global parameters for igp-ldp-sync.";
             }
             description
               "This container handles mpls config.";
           }
           leaf reference-bandwidth {
             if-feature reference-bandwidth;
             type uint32;
             units "bps";
             description
              "This leaf defines the bandwidth for calculating
               metric.";
           }

           leaf lsp-mtu {
             type uint16;
             units "bytes";
             default 1492;
             description
              "This leaf describes the maximum size of a
               LSP PDU in bytes.";
           }
           leaf lsp-lifetime {
             type uint16;
             units "seconds";
             description
              "This leaf describes the lifetime of the router
               LSP in seconds.";
           }
           leaf lsp-refresh {
             if-feature lsp-refresh;
             type uint16;
             units "seconds";
             description
              "This leaf describes the refresh interval of the
               router LSP in seconds.";
           }

           container graceful-restart {
             if-feature graceful-restart;
             leaf enabled enable {
               type boolean;
               description
                "Control enabling the feature.";
             }
             description
              "This container activates graceful restart.";
           }

           container node-tag {
             if-feature node-tag;

           uses isis-node-tag-cfg;

           list node-tag authentication {
             key tag; level;

             choice authentication-type {
               case key-chain {
                 if-feature key-chain;
                 leaf tag key-chain {
                   type uint32;
                 description
                  "Node tag value.";
               } key-chain:key-chain-ref;
                   description
                "List of tags.";
                     "Reference to a key-chain.";
                 }
             description
               "Container for node tags.";
               }

           uses fast-reroute-global-cfg;

           uses segment-routing-global-cfg;

           list authentication
               case password {
             key level;
                 leaf key {
                   type string;
                   description
                    "This leaf describes the
                      authentication key.";
                 }
             leaf type {
               type authentication-type;
                 uses key-chain:crypto-algorithm-types;
               }
               description
                "This leaf describes the authentication
                 type to be used.";
                  "Choice of authentication.";
             }
             leaf level {
               type level;
               description
                 "Level applicability.";
             }
             description
              "Container for ISIS authentication.
               It covers both LSPs and SNPs.";
           }

           list metric-type {
             key level;

             leaf value {
               type enumeration {
                 enum wide-only {
                   description
                    "Advertise new metric style only
                    (RFC5305)";
                 }
                 enum old-only {
                   description
                    "Advertise old metric style only
                    (RFC1195)";
                 }
                 enum both {
                   description "Advertise both metric
                   styles";
                 }
               }
               description
                "This leaf describes the type of metric
                to be generated.
                Wide-only means only new metric style
                is generated,
                old-only means that only old style metric
                is generated,
                and both means that both are advertised.

                This leaf is only affecting IPv4 metrics.";
             }
             leaf level {
               type level;
               description
                 "Level applicability.";
             }
             description
              "Metric style container.";
           }
           list preference {
             key level;

             choice granularity {
               case detail {
                 leaf internal {
                   type uint8;
                   description
                     "This leaf defines the protocol
                      preference for internal routes.";
                 }
                 leaf external {
                   type uint8;
                   description
                     "This leaf defines the protocol
                      preference for external routes.";
                 }
               }
               case coarse {
                 leaf default {
                   type uint8;
                   description
                     "This leaf defines the protocol
                      preference for all ISIS routes.";
                 }
               }
               description
                "Choice for implementation of route preference.";
             }

             leaf level {
               type level;
               description
                 "Level applicability.";
             }
             description
                "This leaf defines the protocol preference.";
           }
           list default-metric {
             key level;

             leaf value {
               type wide-metric;
               description
                 "Value of the metric";
             }
             leaf level {
               type level;
               description
                 "Level applicability of the metric.";
             }
             description
              "Defines the metric to be used by default.";
           }
           list af {
             if-feature nlpid-control;
             key af;
             leaf af {
               type identityref {
                 base rt:address-family;
               }
               description
                "Address-family";
             }

             leaf enabled enable {
               type boolean;
               description
                 "Describes the activation state of the
                  AF.";
             }
             description
              "This list permits activation
              of new address families.";

           }

           list topologies overload {
             if-feature multi-topology;
             key "name"; level;

             leaf enabled status {
               type boolean;
               description
                 "Describes the activation state of
                "This leaf defines the
                  AF."; overload status.";
             }
             leaf name timeout {
               type rt:rib-ref; uint16;
               units "seconds";
               description "RIB";
             }

             uses fast-reroute-global-cfg;
             uses segment-routing-global-cfg;

             list default-metric {
               key level;
                "This leaf value {
                 type wide-metric;
                 description
                   "Value defines the timeout in seconds
                 of the metric"; overload condition.";
             }
             leaf level {
               type level;
               description
                 "Level applicability of the metric.";
             }
             description
                "Defines
              "This leaf describes if the metric router is
               set to be used by default.";
             }
             container node-tag {
               if-feature node-tag;
               list node-tag {
                 key tag;
                 leaf tag {
                   type uint32;
                   description
                    "Node tag value.";
                 }
                 description
                  "List of tags.";
               }
               description
                 "Container for node tags.";
             }
             description
               "List of topologies"; overload state.";
           }

           list overload overload-max-metric {
             if-feature overload-max-metric;
             key level;

             leaf status {
               type boolean;
               description
                "This leaf defines the overload status.";
             }

             leaf timeout {
               type uint16;
               units "seconds";
               description
                "This leaf defines the timeout in seconds
                 of the overload condition.";
             }
             leaf level {
               type level;
               description
                 "Level applicability of the metric.";
             }
             description
              "This leaf describes if the router is
               set to overload state.";
           }

     }

     grouping isis-global-topologies-cfg {
      description
       "Per topology config.";
       list overload-max-metric default-metric {
             if-feature overload-max-metric;
           key level;

             leaf status {
               type boolean;
               description
                "This leaf defines the overload status.";
             }

             leaf timeout {
               type uint16;
               units "seconds";
               description
                "This leaf defines the timeout in seconds

           leaf value {
             type wide-metric;
             description
               "Value of the overload condition."; metric";
           }
           leaf level {
             type level;
             description
               "Level applicability of the metric.";
           }
           description
              "This leaf describes if
            "Defines the router is
               set metric to overload state."; be used by default.";
         }

           container interfaces {
             list interface {
               key "name";
               leaf name
         uses isis-node-tag-cfg;
     }

     grouping isis-if-cfg {
                 type if:interface-ref;
       description
                  "Reference to the
        "Grouping for interface within
                   the routing-instance.";
               } cfg.";

       leaf level-type {
         type level;
         default "level-all";
         description
          "This leaf defines the associated ISIS
          level of the interface.";
       }
       leaf lsp-pacing-interval {
         type uint16;
         units "milliseconds";
         description
          "This leaf defines the interval between
           LSP transmissions in milli-seconds";
       }
       leaf lsp-retransmit-interval {
         type uint16;
         units "seconds";
         description
          "This leaf defines the interval between
          retransmission of LSP";
       }
       leaf passive {
         type boolean;
         default "false";
         description
          "This leaf defines if interface is in
           passive mode (ISIS not running,
           but network is advertised).";
       }
       leaf csnp-interval {
         type uint16;
         units "seconds";
         description
          "This leaf defines the interval of CSNP
           messages.";
       }

       container hello-padding {
         leaf enabled enable {
           type boolean;
           default "true";
           description
            "Status of Hello-padding activation.
             By default, the implementation shall
             pad HELLOs.";
         }

         description
          "This container handles ISIS hello padding
           configuration.";
       }

       leaf mesh-group-enabled mesh-group-enable {
         type mesh-group-state;
         description
          "Describes the mesh group state of
           the interface.";
       }

       leaf mesh-group {
         when "../mesh-group-enabled "../mesh-group-enable = meshSet" {
           description
            "Only valid when mesh-group-enabled mesh-group-enable
             equals meshSet";
         }
         type uint8;
         description
          "Describes the mesh group ID of
           the interface.";

       }

       leaf interface-type {
         type interface-type;
         description
          "This leaf defines the type of adjacency
          to be established on the interface.
          This is affecting the type of hello
          message that would be used.";
       }

               leaf enabled {
                 type boolean;
                 default "true";
                 description
                  "This leaf describes the administrative
                  status of the ISIS interface.";

               }

       uses admin-control;

       leaf-list tag {
         if-feature prefix-tag;

         type uint32;
         description
          "This leaf defines list of tags associated
           with the interface.";
       }

       leaf-list tag64 {
         if-feature prefix-tag64;

         type uint64;
         description
          "This leaf defines list of 64bits tags
          associated with the interface.";
       }

       list hello-authentication {
         key level;

         choice authentication-type {
           case key-chain {
             if-feature key-chain;
             leaf type key-chain {
               type authentication-type; key-chain:key-chain-ref;
               description
                    "This leaf describes the authentication
                    type
                 "Reference to be used in hello messages."; a key-chain.";
             }
           }
           case password {
             leaf key {
               type string;
               description
                "This leaf describes the
                  authentication key
                    to be used in hello messages.
                    For security reason, the
                    authentication key MUST
                    NOT be presented
                    in plaintext format upon a
                    get-config reply.
                    Authors recommends
                    to use MD5 hash to present the
                    authentication-key"; key.";
             }
             uses key-chain:crypto-algorithm-types;
           }
           description
              "Choice of authentication.";
         }
         leaf level {
           type level;
           description
             "Level applicability.";
         }
         description
          "This leaf describes the authentication type
          to be used in hello messages.";
       }

       list hello-interval {
         key level;

         leaf value {
           type uint16;
           units "seconds";
           description
            "This leaf defines the interval of
            hello messages.";
         }
         leaf level {
           type level;
           description
             "Level applicability.";
         }
         description
            "This leaf defines the interval of
            hello messages.";
       }
       list hello-multiplier {
         key level;

         leaf value {
           type uint16;
           description
            "This leaf defines the number of
            hello failed to be received before
            declaring the adjacency down.";
         }
         leaf level {
           type level;
           description
             "Level applicability.";
         }
         description
            "This leaf defines the number of
             hello failed to be received before
             declaring the adjacency down.";
       }

       list priority {
         must 'interface-type = "broadcast"' {
           error-message
            "Priority only applies to broadcast
            interfaces.";
           description
            "Check for broadcast interface.";
         }
         key level;
         leaf value {
                   type uint8 {
                     range "0 .. 127";
                   }

                   description
                    "This leaf describes the priority of
                    the interface
                    for DIS election.";
                 }
                 leaf level {
                   type level;
                   description
                     "Level applicability.";
                 }
                 description
                    "This leaf describes the priority of
                    the interface
                    for DIS election.";
               }
               list metric {
                 key level;

                 leaf value {
                   type wide-metric;
                   description
                    "Metric value.";
                 }
                 leaf level {
                   type level;
                   description
                     "Level applicability.";
                 }
                 description
                  "Container for interface metric";
               }

               list af {
                 key af;

                 leaf af {
                   type identityref {
                     base rt:address-family;
                   }
                   description
                     "Address-family";
                 }
                 container segment-routing {
                   if-feature segment-routing;
                   list prefix-sid {
                     key value;
                     leaf value-type {
                       type enumeration {
                         enum index {
                           description
                              "The value will be
                              interpreted as an index.";

                         }
                         enum absolute {
                           description
                              "The value will become
                              interpreted as an absolute
                              value.";
                         }
           type uint8 {
             range "0 .. 127";
           }

           description
            "This leaf defines how value
                          must be interpreted."; describes the priority of
            the interface
            for DIS election.";
         }
         leaf value level {
           type uint32; level;
           description
                       "Value associated with
                       prefix. The value must
                       be interpreted in
             "Level applicability.";
         }
         description
            "This leaf describes the
                       context priority of value-type.";
            the interface
            for DIS election.";
       }
       list metric {
         key level;

         leaf node-flag value {
           type boolean;
                       default true; wide-metric;
           description
                       "Set prefix as a node
                        representative prefix.";
            "Metric value.";
         }
         leaf last-hop-behavior level {
           type enumeration {
                         enum explicit-null { level;
           description
                            "Use explicit-null for the SID.";
             "Level applicability.";
         }
                         enum no-php {
         description
                            "Do no use PHP
          "Container for the SID."; interface metric";
       }
                         enum php

       list af {
                           description
                            "Use PHP for the SID.";
                         }
                       }
                       description
                        "Configure last hop behavior.";
                     }

                     description
                     "List of prefix-SID associated with
                      the interface.";
         key af;

         leaf af {
           type identityref {
             base rt:address-family;
           }
           description
                    "Segment routing interface configuration.";
             "Address-family";
         }
         container bfd {
           if-feature bfd;
           leaf enabled enable {
             type boolean;
             default false;
             description
              "This leaf enables BFD.";
           }

           description
             "The container describes
              BFD config.";
         }

         description
          "List of AFs.";
       }

               list topologies

       container mpls {
                 key name;
         container igp-ldp-sync {
           if-feature igp-ldp-sync;
           leaf name enable {
             type rt:rib-ref; boolean;
             description
                    "Name of RIB.";
              "Enable/disable IGP LDP sync.";
           }
           description
            "IGP-LDP sync configuration.";

         }
         description
          "Container for MPLS specific configuration
          for ISIS.";
       }

     }

     grouping isis-if-topologies-cfg {
       description
        "ISIS interface topology cfg.";
       list metric {
           key level;

           leaf value {
             type wide-metric;
             description
              "Metric value.";
           }
           leaf level {
             type level;
             description
               "Level applicability.";
           }
           description
            "Container for interface metric";
       }
                 uses fast-reroute-if-cfg;

                 uses segment-routing-if-cfg;

                 description
                  "List of topologies.";
     }

               uses fast-reroute-if-cfg;

               uses segment-routing-if-cfg;

               container mpls {
                 container igp-ldp-sync

     /* */

     augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
                   if-feature igp-ldp-sync;
                   leaf enabled
       when "rt:source-protocol = 'isis:isis'" {
                     type boolean;
                     description
                      "Enable/disable IGP LDP sync.";
                   }
                   description
                    "IGP-LDP sync configuration.";
                 }
         description
                  "Container for MPLS specific configuration
                  for ISIS."; "ISIS-specific route attributes.";
       }
       uses route-content;
       description
                "List of ISIS interfaces.";
        "This augments route object in RIB with ISIS-specific
         attributes.";
       }

     augment "/rt:active-route/rt:output/rt:route"
        {
       uses route-content;
       description
              "This container defines ISIS interface specific
              configuration objects."; "ISIS-specific route attributes.";
       }

     augment "/if:interfaces/if:interface"
        {
       leaf clns-mtu {
         type uint16;
         description
             "List
          "Defines CLNS MTU of ISIS instances."; the interface.";
       }
       description
          "This container defines ISIS specific configuration
           objects.";
       } "ISO interface config.";
       }

     augment "/rt:routing-state/rt:routing-instance/"
       +"rt:routing-protocols/rt:routing-protocol" "/rt:routing/rt:routing-instance/rt:routing-protocols/"
         +"rt:routing-protocol" {
       when "rt:type = 'isis:isis'" {
         description
          "This augment is only valid when routing protocol
           instance type is isis.";
       }
       description
        "This augments a routing protocol instance states with ISIS
         specific parameters.";
       container isis {
         config false;
         list instance {

           key routing-instance;

           leaf routing-instance

           must "count(area-address) > 0" {
             type rt:routing-instance-ref;
               description
               "Reference routing instance.
               For protocol centric model, which is
               supported in
               default-instance only, this could reference
               any VRF routing-instance.
               For VRF centric model,
             error-message "At least one area-address
             must reference the
               enclosing routing-instance."; be configured.";
             description
              "Enforce configuration of at least one area.";
           }

           uses isis-global-cfg;

           container fast-reroute {
            if-feature fast-reroute;

             container protected-routes {
               list af-stats {
                 key "af prefix alternate";

                 leaf af {
                   type identityref {
                     base rt:address-family;
                   }
            uses fast-reroute-global-cfg;
            description
                    "Address-family";
                 "IPFRR.";
           }
                 leaf prefix
           list topologies {
                   type string;
                   description
                    "Protected prefix.";
                 }
             if-feature multi-topology;

             key "name";

             leaf alternate enable {
               type string; boolean;
               description
                    "Alternate nexthop for the prefix.";
                "Control enabling of topologies";
             }
             leaf alternate-type name {
               type enumeration {
                     enum equalcost {
                       description
                        "ECMP alternate.";
                     }
                     enum lfa {
                       description
                        "LFA alternate.";
                     }
                     enum remote-lfa {
                       description
                        "Remote LFA alternate.";
                     }
                     enum tunnel {
                       description
                        "Tunnel based alternate
                        (like RSVP-TE or GRE).";
                     }
                     enum ti-lfa {
                       description
                        "TI LFA alternate.";
                     }
                     enum mrt { rt:rib-ref;
               description
                        "MRT alternate."; "RIB";
             }
                     enum other

             uses isis-global-topologies-cfg;
             container fast-reroute {
              if-feature fast-reroute;
              uses fast-reroute-global-cfg;
              description
                        "Unknown alternate type.";
                     }
                 "IPFRR.";
             }

             description
                    "Type
               "List of alternate."; topologies";
           }
                 leaf best

           container interfaces {
                   type boolean;
                   description
                    "describes if the alternate is the best one.";

                 }
             list interface {
               key "name";
               leaf non-best-reason name {
                 type string; if:interface-ref;

                 description
                    "Information field
                  "Reference to describe why the alternate
                    is not best."; interface within
                   the routing-instance.";
               }
                 leaf protection-available {
                   type bits {
                     bit nodeprotect

             uses isis-if-cfg;
             container fast-reroute {
                       position 0;
               if-feature fast-reroute;
               uses fast-reroute-if-cfg;
               description
                       "Node protection available.";
                 "IPFRR.";
             }
                     bit linkprotect
             list topologies {
                       position 1;
                 key name;

                 leaf name {
                   type rt:rib-ref;
                   description
                       "Link protection available.";
                    "Name of RIB.";
                 }
                     bit srlgprotect
                 container fast-reroute {
                       position 2;
                   if-feature fast-reroute;
                   uses fast-reroute-if-cfg;
                   description
                       "SRLG protection available.";
                    "IPFRR.";

                 }
                     bit downstreamprotect {
                       position 3;
                 uses isis-if-topologies-cfg;
                 description
                       "Downstream protection available.";
                  "List of topologies.";
             }
                     bit other {
                       position 4;
             description
                       "Other protection available.";
               "List of ISIS interfaces.";
             }
             description
              "This container defines ISIS interface specific
              configuration objects.";
           }

         description
                   "Describes protection provided by the alternate.";
          "This container defines ISIS specific configuration
           objects.";
       }
                 leaf alternate-metric1
     }

     augment "/rt:routing-state/rt:routing-instance/"
       +"rt:routing-protocols/rt:routing-protocol" {
       when "rt:type = 'isis:isis'" {
                   type uint32;
         description
                    "Metric from PLR to destination
                     through the alternate path.";
          "This augment is only valid when routing protocol
           instance type is isis.";
       }
                 leaf alternate-metric2
       description
        "This augments routing protocol instance states with ISIS
         specific parameters.";

       container isis {
                   type uint32;
         config false;
           uses isis-global-cfg;
           container fast-reroute {
             if-feature fast-reroute;
             uses fast-reroute-global-cfg;
             uses fast-reroute-global-state;
             description
                    "Metric from PLR to the alternate node";
              "IPFRR states.";
           }

           list topologies {
             key name;

             leaf alternate-metric3 name {
               type uint32; rt:rib-ref;
               description
                    "Metric from alternate node to the destination";
                 "Name of RIB.";

             }
             container fast-route {
               if-feature fast-reroute;
               uses fast-reroute-global-cfg;
               uses fast-reroute-global-state;
               description
                  "Per AF statistics.";
                 "IPFRR states.";
             }
             description
              "List of prefixes that are protected."; topologies.";
           }

           container nonprotected-routes system-counters {
             list af-stats level {
               key "af prefix"; level;

               leaf af level {
                 type identityref {
                     base rt:address-family;
                   } level-number;
                 description
                    "Address-family";
                  "This leaf describes the ISIS level.";
               }
               leaf prefix corrupted-lsps {
                 type string;
                   description
                    "Protected prefix.";
                 }
                 description
                  "Per AF statistics.";
               } uint32;
                 description
                "List
                  "Number of prefixes that corrupted in-memory LSPs detected.
                  LSPs received from the wire with a bad
                  checksum are silently dropped and not protected."; counted.
                  LSPs received from the wire with parse errors
                  are counted by lsp-errors.";
               }

             list interfaces {
               key interface;
               leaf interface authentication-type-fails {
                 type string; uint32;
                 description
                  "This leaf describes the name
                  "Number of the interface."; authentication type mismatches.";
               }
               leaf protection-enabled authentication-fails {
                 type boolean; uint32;
                 description
                  "This
                  "Number of authentication key failures.";
               }
               leaf describes if protection
                  is requested for database-overload {
                 type uint32;
                 description
                  "Number of times the interface."; database has become
                  overloaded.";
               }
               leaf candidate-disabled own-lsp-purge {
                 type boolean; uint32;
                 description
                  "This leaf describes if interface
                  "Number of times a zero-aged copy of the
                  system's own LSP is prevented to be used as backup.";
               }
               description
                "Interface fast reroute state."; received from some
                  other node.";
               }
             list protection-statistics {
               key frr-protection-method;
               leaf frr-protection-method manual-address-drop-from-area {
                 type string; uint32;
                 description
                  "Protection method used.";
                  "Number of times a manual address
                   has been dropped from the area.";
               }
               list af-stats {
                 key af;
               leaf af max-sequence {
                 type identityref {
                     base rt:address-family;
                   } uint32;
                 description
                    "Address-family";
                  "Number of times the system has attempted
                   to exceed the maximum sequence number.";
               }
               leaf total-routes sequence-number-skipped {
                 type uint32;
                 description
                    "Total prefixes.";
                  "Number of times a sequence number skip has
                  occured.";
               }
               leaf unprotected-routes id-len-mismatch {
                 type uint32;
                 description
                     "Total
                  "Number of prefixes who are
                     not protected."; times a PDU is received with
                   a different value for ID field length
                   from that of the receiving system.";
               }
               leaf protected-routes partition-changes {
                 type uint32;
                 description
                     "Total
                  "Number of prefixes who are
                     protected."; partition changes detected.";
               }
               leaf linkprotected-routes lsp-errors {
                 type uint32;
                 description
                     "Total
                  "Number of prefixes who are
                     link protected."; LSPs with errors we have
                  received.";
               }
               leaf nodeprotected-routes spf-runs {
                 type uint32;
                 description
                     "Total
                  "Number of prefixes who are
                     node protected.";
                 }
                 description
                  "Per AF statistics."; times we ran SPF at this level.";
               }
               description
                "Global protection statistics.";
                "List of supported levels.";

             }
             description
              "IPFRR states.";
              "The container defines a list of counters
               for the IS.";
           }

           container system-counters interfaces {
             list level interface {
               key level;

               leaf level {
                 type level-number;
                 description
                  "This leaf describes the ISIS level.";
               } interface;

               leaf corrupted-lsps interface {
                 type uint32; string;
                 description
                  "Number of corrupted in-memory LSPs detected.
                  LSPs received from
                  "This leaf describes the wire with a bad
                  checksum are silently dropped and not counted.
                  LSPs received from name
                  of the wire with parse errors
                  are counted by lsp-errors."; interface.";
               }
               uses isis-if-cfg;
               container fast-reroute {
                if-feature fast-reroute;
                uses fast-reroute-if-cfg;
                description
                 "IPFRR.";
               }
               uses adjacency-state;

               list topologies {
                 key name;

                 leaf authentication-type-fails name {
                   type uint32; rt:rib-ref;
                   description
                  "Number
                     "Name of authentication type mismatches."; RIB.";
                 }
               leaf authentication-fails
                 uses isis-if-topologies-cfg;
                 container fast-reroute {
                 type uint32;
                  if-feature fast-reroute;
                  uses fast-reroute-if-cfg;
                  description
                  "Number
                   "IPFRR.";
                 }
                 uses adjacency-state;

                 description
                  "List of authentication key failures."; topologies.";
               }
               container event-counters {
                 leaf database-overload adjacency-changes {
                   type uint32;
                   description
                  "Number
                    "The number of times the database an adjacency state
                     change has become
                  overloaded."; occured on this interface.";
                 }
                 leaf own-lsp-purge adjacency-number {
                   type uint32;
                   description
                  "Number of times a zero-aged copy
                    "The number of the
                  system's own LSP is received from some
                  other node."; adjacencies on this
                     interface.";
                 }
                 leaf manual-address-drop-from-area init-fails {
                   type uint32;
                   description
                  "Number
                    "The number of times a manual address initialization of
                     this interface has been dropped from the area."; failed. This counts
                     events such as PPP NCP failures.
                     Failures to form an adjacency are counted
                     by adjacency-rejects.";
                 }
                 leaf max-sequence adjacency-rejects {
                   type uint32;
                   description
                  "Number
                    "The number of times the system an adjacency has attempted
                   to exceed the maximum sequence number."; been
                     rejected on this interface.";
                 }
                 leaf sequence-number-skipped id-len-mismatch {
                   type uint32;
                   description
                  "Number
                    "The number of times a sequence number skip an IS-IS PDU with an ID
                     field length different from that for this
                     system has
                  occured."; been received on this interface.";
                 }
                 leaf id-len-mismatch max-area-addresses-mismatch {
                   type uint32;
                   description
                  "Number
                    "The number of times a an IS-IS PDU is received with
                   a different value for ID
                     according max area address field length
                     differs from that of the receiving system."; for
                     this system has been received on this
                     interface.";
                 }
                 leaf partition-changes authentication-type-fails {
                   type uint32;
                   description
                    "Number of partition changes detected."; authentication type mismatches.";

                 }
                 leaf lsp-errors authentication-fails {
                   type uint32;
                   description
                    "Number of LSPs with errors we have
                  received."; authentication key failures.";
                 }
                 leaf spf-runs lan-dis-changes {
                   type uint32;
                   description
                  "Number
                    "The number of times we ran SPF the DIS has changed
                     on this interface at this level.";
               }
               description
                "List of supported levels."; level.
                     If the interface type is point to point,
                     the count is zero.";
                 }
                 description
              "The container defines a list of counters
               for the IS.";
                  "Provides protocol event counters.";
               }
               container interfaces packet-counters {
                 list interfaces level {
                   key interface; level;

                   leaf interface level {
                     type string; level-number;
                     description
                      "This leaf describes the name
                  of the interface."; ISIS level.";
                   }

                   container status iih {
                     leaf circuit-id in {
                       type circuit-id; uint32;
                       description
                    "This leaf describes the circuit-id
                    associated with the interface.";
                        "Received PDUs.";
                     }
                     leaf admin-state out {
                       type admin-state; uint32;
                       description
                   "This leaf describes the admin state
                        "Sent PDUs.";
                     }
                     description
                      "The number of the interface."; IIH PDUs received/sent.";
                   }
                   container ish {
                     leaf oper-state in {
                       type oper-state; uint32;
                       description
                   "This leaf describes the operational state
                   of the interface.";
                        "Received PDUs.";
                     }
                     leaf interface-type out {
                       type interface-type; uint32;
                       description
                   "Type
                        "Sent PDUs.";
                     }
                     description
                      "The number of interface to be used."; ISH PDUs received/sent.";
                   }
                   container esh {
                     leaf passive in {
                       type empty; uint32;
                       description
                    "The interface is included in LSP, but
                    does not run ISIS protocol.";
                        "Received PDUs.";
                     }
                     leaf three-way-handshake out {
                       type boolean; uint32;
                       description
                        "Sent PDUs.";
                     }
                     description
                      "The interface uses 3-way handshake."; number of ESH PDUs received/sent.";
                   }
                   container lsp {
                     leaf mesh-group-enabled in {
                       type mesh-group-state; uint32;
                       description
                    "Mesh group status.";
                        "Received PDUs.";
                     }
                     leaf mesh-group out {
                       type uint8; uint32;
                       description
                    "Mesh group value.";
                        "Sent PDUs.";
                     }
                 list level
                     description
                      "The number of LSP PDUs received/sent.";
                   }
                   container psnp {
                   key level;
                     leaf level in {
                       type level; uint32;
                       description
                     "Level associated with the interface.";
                        "Received PDUs.";
                     }
                     leaf priority out {
                       type uint8; uint32;
                       description
                      "Priority for becoming the LAN DIS.";
                        "Sent PDUs.";
                     }
                     description
                      "The number of PSNP PDUs received/sent.";

                   }
                   container csnp {
                     leaf hello-multiplier in {
                       type uint16; uint32;
                       description
                      "Hello multiplier.";
                        "Received PDUs.";
                     }
                     leaf hello-interval out {
                       type uint16; uint32;
                       description
                      "Hello interval in msec.";
                        "Sent PDUs.";
                     }
                     description
                      "The number of CSNP PDUs received/sent.";
                   }
                   container unknown {
                     leaf dr-hello-interval in {
                       type uint32;
                       description
                      "Hello interval used by DIS in msec.";
                        "Received PDUs.";
                     }
                     leaf metric out {
                       type empty; uint32;
                       description
                        "Sent PDUs.";
                     }
                     description
                      "The interface is included in LSP, but
                      does not run ISIS protocol."; number of unknown PDUs received/sent.";
                   }
                   description
                    "Per level states.";
                    "List of supported levels.";
                 }
                 description
                  "Provides ISIS interface status parameters."; packet counters per level.";
               }
               description
                "List of interfaces.";
             }
             description
              "The container event-counters defines operational parameters
               of interfaces.";
           }

           container spf-log {
             list event {
               key id;

               leaf adjacency-changes id {
                 type uint32;
                 description
                    "The number of times an adjacency state
                     change has occured on this interface.";
                  "This leaf defines the event identifier.
                   This is a purely internal value.";
               }
               leaf adjacency-number spf-type {
                 type uint32; enumeration {
                   enum full {
                     description
                    "The number
                      "Computation done is a Full SPF.";
                   }
                   enum incremental {
                     description
                      "Computation done is an
                       incremental SPF.";
                   }
                   enum route-only {
                     description
                      "Computation done is a
                       reachability computation
                       only.";
                   }
                 }
                 description
                  "This leaf describes the type of adjacencies on this
                     interface."; computation
                  used.";
               }
               leaf init-fails level {
                 type uint32; level-number;
                 description
                    "The number of times initialization of
                     this interface has failed. This counts
                     events such as PPP NCP failures.
                     Failures to form an adjacency are counted
                  "This leaf describes the level affected by adjacency-rejects."; the
                  the computation.";
               }
               leaf adjacency-rejects spf-delay {
                 type uint32;
                 units "milliseconds";
                 description
                    "The number of times an adjacency has been
                     rejected on
                  "This leaf describes the SPF delay that
                  was used for this interface."; event.";
               }
               leaf id-len-mismatch schedule-timestamp {
                 type uint32; yang:timestamp;
                 description
                    "The number of times an IS-IS PDU with an ID
                     field length different from that for this
                     system has been received on this interface.";
                  "This leaf describes the timestamp
                   when the computation was scheduled.";
               }
               leaf max-area-addresses-mismatch start-timestamp {
                 type uint32; yang:timestamp;
                 description
                    "The number of times an IS-IS PDU with
                     according max area address field
                     differs from that for
                     this system has been received on this
                     interface.";
                  "This leaf describes the timestamp
                   when the computation was started.";
               }
               leaf authentication-type-fails end-timestamp {
                 type uint32; yang:timestamp;
                 description
                    "Number of authentication type mismatches.";
                  "This leaf describes the timestamp
                   when the computation was ended.";
               }
               list trigger-lsp {
                 key "lsp";
                 leaf authentication-fails lsp {
                   type uint32; lsp-id;
                   description
                    "Number
                    "This leaf describes the LSPID
                     of authentication key failures."; the LSP.";
                 }
                 leaf lan-dis-changes sequence {
                   type uint32;
                   description
                    "The
                    "This leaf describes the sequence
                     number of times the DIS has changed
                     on this interface at this level.
                     If the interface type is point to point, LSP.";
                 }
                 description
                  "This leaf describes list of LSPs
                   that triggered the count is zero."; computation.";
               }
               description
                  "Provides protocol event counters.";
                "List of computation events.";
             }

             description
              "This container packet-counters lists the SPF computation events.";
           }
           container lsp-log {
             list level event {
               key level; id;

               leaf id {
                 type uint32;
                 description
                  "This leaf defines the event identifier.
                   This is a purely internal value.";
               }
               leaf level {
                 type level-number;
                 description
                  "This leaf describes the ISIS level."; level affected by the
                  the computation.";
               }
               container iih lsp {
                 leaf in lsp {

                   type uint32; lsp-id;
                   description
                        "Received PDUs.";
                    "This leaf describes the LSPID
                     of the LSP.";
                 }
                 leaf out sequence {
                   type uint32;
                   description
                        "Sent PDUs.";
                    "This leaf describes the sequence
                     number of the LSP.";
                 }
                 description
                      "The number
                  "This container describes the received LSP
                  , in case of IIH PDUs received/sent."; local LSP update the local
                  LSP ID is referenced.";
               }

               leaf received-timestamp {
                 type yang:timestamp;

                 description
                  "This leaf describes the timestamp
                  when the LSP was received. In case of
                  local LSP update, the timestamp refers
                  to the local LSP update time.";
               }
                   container ish {

               leaf in change {
                 type uint32; bits {
                   bit refresh {
                     position 0;
                     description
                        "Received PDUs.";
                      "Refresh LSP, nothing has changed.";
                   }
                     leaf out
                   bit link-down {
                       type uint32;
                     position 1;
                     description
                        "Sent PDUs.";
                      "One or more links are down.";
                   }
                   bit link-up {
                     position 2;
                     description
                      "The number of ISH PDUs received/sent.";
                      "One or more links are up.";
                   }
                   container esh {
                     leaf in
                   bit link-metric-change {
                       type uint32;
                     position 3;
                     description
                        "Received PDUs.";
                      "One or more links experienced
                      a metric change.";
                   }
                     leaf out
                   bit link-other-change {
                       type uint32;
                     position 4;
                     description
                        "Sent PDUs.";
                      "One or more links experienced
                      a change that does not affect state
                      or metric.";
                   }
                   bit prefix-down {
                     position 5;
                     description
                      "The number of ESH PDUs received/sent.";
                      "One or more links are down.";
                   }
                   container lsp {
                     leaf in
                   bit prefix-up {
                       type uint32;
                     position 6;
                     description
                        "Received PDUs.";
                      "One or more prefixes are up.";
                   }
                     leaf out
                   bit prefix-metric-change {
                       type uint32;
                     position 7;
                     description
                        "Sent PDUs.";
                      "One or more prefixes experienced
                      a metric change.";
                   }
                   bit prefix-other-change {
                     position 8;
                     description
                      "The number of LSP PDUs received/sent.";
                      "One or more prefixes experienced
                      a change that does not affect state
                      or metric.";
                   }
                   container psnp {
                     leaf in
                   bit other-change {
                       type uint32;
                     position 9;
                     description
                        "Received PDUs.";
                      "One or more component changed that
                      is not a prefix or link.";
                   }
                 }
                 description
                  "This leaf out { describes the type uint32;
                       description
                        "Sent PDUs."; of change
                  in the LSP.";

               }

               description
                      "The number
                "List of PSNP PDUs received/sent."; LSP events.";
             }

             description
              "This container csnp lists the LSP reception events.
              Local LSP modification are also contained in the
              list.";
           }
           container database {
             list level-db {
               key level;

               leaf in level {
                 type uint32; level-number;
                 description
                        "Received PDUs.";
                  "Current level number";
               }
                     leaf out
               list lsp {
                       type uint32;
                 key lsp-id;

                 uses database;
                 description
                        "Sent PDUs.";
                  "List of LSPs in LSDB.";
               }

               description
                      "The number
                "This container describes the list of CSNP PDUs received/sent."; LSPs
                in the level x database.";
             }

             description
              "This container unknown describes ISIS Link State
               databases.";
           }
           container hostnames {

             list hostname {
               key system-id;
               leaf in system-id {
                 type uint32; system-id;
                 description
                        "Received PDUs.";
                  "This leaf describes the system-id
                  associated with the hostname.";
               }
               leaf out hostname {
                 type uint32;
                       description
                        "Sent PDUs.";
                     } string;
                 description
                      "The number of unknown PDUs received/sent.";
                  "This leaf describes the hostname
                   associated with the system ID.";
               }
               description
                "List of supported levels.";
                 }
                 description
                  "Provides packet counters per level."; system-id/hostname associations";
             }

             description
                "List
              "This container describes the list
              of interfaces."; binding between system-id and
              hostnames.";
           }

         description
              "The
            "This container defines operational parameters
               of interfaces."; various ISIS states objects.";
       }
           container adjacencies
     }

     /* RPC methods */

     rpc clear-adjacency {
             list adjacency
       description
        "This RPC request clears a particular
         set of ISIS adjacencies. If the operation
         fails for ISIS internal reason, then
         error-tag and error-app-tag should be set
         to a meaningful value.";
       input {
                       leaf interface routing-instance-name {
           type string; rt:routing-instance-state-ref;
           mandatory "true";
           description
                  "This leaf describes
            "Name of the routing instance whose ISIS
             information is being queried.

             If the routing instance with name equal to the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag 'routing-instance-not-found'.";

         }
         leaf routing-protocol-instance-name {
           type instance-state-ref;
           mandatory "true";
           description
            "Name of the interface."; ISIS protocol instance whose ISIS
             information is being queried.

             If the ISIS instance with name equal to the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'routing-protocol-instance-not-found'.";
         }
         leaf neighbor-systype level {
           type level;
           description
                  "Type
            "ISIS level of neighboring system"; the adjacency to be cleared.
            If ISIS level is level-1-2, both level 1 and level 2
            adjacencies would be cleared.

            If the value provided is different from the one
            authorized in the enum type, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'bad-isis-level'.
            ";
         }
         leaf neighbor-sysid interface {
           type system-id; string;
           description
                  "The system-id
            "Name of the neighbor"; ISIS interface.

             If the ISIS interface with name equal to the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'isis-interface-not-found'.";
         }
               leaf neighbor-extended-circuit-id
       }
     }

     rpc clear-database {
                 type extended-circuit-id;
       description
                  "Circuit ID of
        "This RPC request clears a particular
         ISIS database. If the neighbor";
               } operation
         fails for ISIS internal reason, then
         error-tag and error-app-tag should be set
         to a meaningful value.";
       input {
         leaf neighbor-snpa routing-instance-name {
           type snpa; rt:routing-instance-state-ref;
           mandatory "true";
           description
                  "SNPA
            "Name of the neighbor";
               }
               leaf usage {
                 type level;
                 description
                 "How routing instance whose ISIS
             information is being queried.

             If the adjacency used ?
                 On a p2p link this might be level 1 and 2,
                 but on a LAN, routing instance with name equal to the usage will be level 1
                 between peers at L1 or level 2 between
                 peers at L2.";
               }
               leaf hold-timer {
                 type uint16;
                 description
                  "The holding time in seconds for this
                   adjacency. This
             value is based on
                   received hello PDUs of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and the elapsed
                   time since receipt."; error-app-tag 'routing-instance-not-found'.";

         }
         leaf neighbor-priority routing-protocol-instance-name {
           type uint8 {
                   range "0 .. 127";
                 } instance-state-ref;
           mandatory "true";
           description
                  "Priority
            "Name of the neighboring IS for becoming ISIS protocol instance whose ISIS
             information is being queried.

             If the DIS."; ISIS instance with name equal to the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'routing-protocol-instance-not-found'.";
         }
         leaf lastuptime level {
           type yang:timestamp; level;
           description
                  "When the adjacency most recently entered
                   state 'up', measured in hundredths
            "ISIS level of a
                   second since the last reinitialization of adjacency to be cleared.
            If ISIS level is level-1-2, both level 1 and level 2
            adjacencies would be cleared.

            If the network management subsystem.
                   The value provided is 0 if different from the adjacency has never
                   been one
            authorized in state 'up'."; the enum type, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'bad-isis-level'.
            ";
         }
       }

     }

     /* Notifications */

     notification database-overload {
       uses notification-instance-hdr;
       leaf state overload {
         type enumeration {
           enum "Up" "off" {
             description
                      "This state describes that
                       adjacency is established.";
              "The system has left overload condition.";
           }
           enum "Down" "on" {
             description
                      "This
              "The system is in overload condition.";
           }

         }
         description
            "Describes the new overload state describes that
                       adjacency of the instance.";
       }
       description
         "This notification is NOT established."; sent when an ISIS instance
          overload condition changes.";
     }
                   enum "Init"

     notification lsp-too-large {
       uses notification-instance-hdr;
       uses notification-interface-hdr;

       leaf pdu-size {
         type uint32;
         description
          "Size of the PDU";
       }
       leaf lsp-id {
         type lsp-id;
         description
          "LSP ID.";
       }
       description
         "This state describes notification is sent when we attempt
          to propagate an LSP that
                       adjacency is establishing."; larger than the
          dataLinkBlockSize for the circuit.
          The notification generation must be throttled
          with at least a 5 second gap.
          ";
     }
                   enum "Failed"

     notification corrupted-lsp-detected {
       uses notification-instance-hdr;
       leaf lsp-id {
         type lsp-id;
         description
          "LSP ID.";
       }
       description
         "This state describes that
                       adjacency notification is failed."; sent when we find
          that an LSP that was stored in memory has
          become corrupted.
          ";
     }

     notification attempt-to-exceed-max-sequence {
       uses notification-instance-hdr;
       leaf lsp-id {
         type lsp-id;
         description
          "LSP ID.";
       }
       description
         "This leaf describes notification is sent when the state of system
         wraps the
                  interface."; 32-bit sequence counter of an LSP.
          ";
     }
               list adjacency-sid

     notification id-len-mismatch {
                 if-feature segment-routing;
                 key value;
       uses notification-instance-hdr;
       uses notification-interface-hdr;

       leaf af pdu-field-len {
         type identityref {
                     base rt:address-family;
                   } uint8;
         description
                    "Address-family associated with
          "Size of the
                    segment ID"; ID length in the received PDU";
       }
       leaf value raw-pdu {
         type uint32; binary;
         description
                    "Value of
          "Received raw PDU.";
       }
       description
         "This notification is sent when we receive a PDU
         with a different value for the Adj-SID."; System ID length.
         The notification generation must be throttled
         with at least a 5 second gap.
          ";
     }

     notification max-area-addresses-mismatch {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf weight max-area-addresses {
         type uint8;
         description
                    "Weight associated with
                    the adjacency SID.";
          "Received number of supported areas";
       }
       leaf protection-requested raw-pdu {
         type boolean; binary;
         description
                    "Describe if
          "Received raw PDU.";
       }
       description
         "This notification is sent when we receive a PDU
         with a different value for the adjacency SID Maximum Area Addresses.
         The notification generation must be protected.";
                 }
                 description
                  "List of adjacency Segment IDs."; throttled
         with at least a 5 second gap.
          ";
     }

     notification own-lsp-purge {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf lsp-id {
         type lsp-id;
         description
                "List of operational adjacencies.";
          "LSP ID.";
       }
       description
         "This container lists the adjacencies of notification is sent when the local node."; system
         receives a PDU with its own system ID and zero age.
          ";
     }
           container spf-log {
             list event

     notification sequence-number-skipped {
               key id;
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf id lsp-id {
         type uint32; lsp-id;
         description
          "LSP ID.";
       }
       description
         "This leaf defines the event identifier.
                   This notification is sent when the system
         receives a purely internal value."; PDU with its own system ID and
         different contents. The system has to reissue
         the LSP with a higher sequence number.
          ";
     }
     notification authentication-type-failure {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf spf-type raw-pdu {
         type enumeration {
                   enum full {
                     description
                      "Computation done is a Full SPF.";
                   }
                   enum incremental { binary;
         description
                      "Computation done is an
                       incremental SPF.";
          "Received raw PDU.";
       }
                   enum route-only {
       description
                      "Computation done
         "This notification is sent when the system
         receives a
                       reachability computation
                       only.";
                   }
                 }
                 description
                  "This leaf describes PDU with the wrong authentication type of computation
                  used.";
         field.
         The notification generation must be throttled with
         at least a 5 second gap.
          ";
     }

     notification authentication-failure {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf level raw-pdu {
         type level-number; binary;
         description
          "Received raw PDU.";
       }
       description
         "This leaf describes the level affected by notification is sent when the system
         receives a PDU with the computation."; wrong authentication
         information.
         The notification generation must be throttled with
         at least a 5 second gap.
          ";
     }

     notification version-skew {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf spf-delay protocol-version {
         type uint32;
                 units "milliseconds"; uint8;
         description
                  "This leaf describes
          "Protocol version received in the SPF delay that
                  was used for this event."; PDU.";
       }
       leaf schedule-timestamp raw-pdu {
         type yang:timestamp; binary;
         description
                  "This leaf describes the timestamp
                   when the computation was scheduled.";
          "Received raw PDU.";
       }
               leaf start-timestamp {
                 type yang:timestamp;
       description
         "This leaf describes the timestamp notification is sent when the computation was started."; system
         receives a PDU with a different protocol version
         number.
         The notification generation must be throttled with at least
          a 5 second gap.
          ";
     }

     notification area-mismatch {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf end-timestamp raw-pdu {
         type yang:timestamp; binary;
         description
          "Received raw PDU.";
       }
       description
         "This leaf describes the timestamp notification is sent when the computation was ended."; system
         receives a Hello PDU from an IS that does
         not share any area address.
         The notification generation must be throttled with at least
          a 5 second gap.
          ";
     }
               list trigger-lsp

     notification rejected-adjacency {
                 key "lsp";
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf lsp raw-pdu {
         type lsp-id; binary;
         description
                    "This leaf describes the LSPID
                     of the LSP.";
          "Received raw PDU.";
       }
       leaf sequence reason {
         type uint32; string;
         description
                    "This leaf describes
          "The system may provide a reason to reject the sequence
                     number of
           adjacency. If the LSP.";
                 }
                 description
                  "This leaf describes list of LSPs
                   that triggered reason is not available,
           the computation.";
               }
               description
                "List of computation events."; system use an empty string.";
       }
       description
         "This container lists notification is sent when the SPF computation events."; system
         receives a Hello PDU from an IS but does not
         establish an adjacency for some reason.
         The notification generation must be throttled with at least
          a 5 second gap.
          ";
     }
           container lsp-log {
             list event
     notification protocols-supported-mismatch {
               key id;
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf id raw-pdu {
         type uint32; binary;
         description
                  "This leaf defines the event identifier.

                   This is a purely internal value.";
          "Received raw PDU.";
       }
               leaf level
       leaf-list protocols {
         type level-number; uint8;
         description
                  "This leaf describes the level affected
          "The list of protocols supported by the
           remote system.";
       }
       description
         "This notification is sent when the computation."; system
         receives a non pseudonode LSP that has no matching
         protocol supported.
         The notification generation must be throttled with at least
          a 5 second gap.
          ";
     }
               container lsp

     notification lsp-error-detected {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf lsp lsp-id {
         type lsp-id;
         description
                    "This
          "LSP ID.";
       }
       leaf describes the LSPID
                     of the LSP."; raw-pdu {
         type binary;
         description
          "Received raw PDU.";
       }
       leaf sequence error-offset {
         type uint32;
         description
                    "This leaf describes
          "If the sequence
                     number of problem is a malformed TLV,
          the LSP.";
                 }
                 description
                  "This container describes error-offset points to the received LSP
                  , in case start of local LSP update the local
                  LSP ID is referenced.";
               }

               leaf received-timestamp {
                 type yang:timestamp;

                 description
                  "This leaf describes TLV.
          If the timestamp
                  when problem is with the LSP was received. In case of
                  local LSP update, header,
          the timestamp refers error-offset points to the local LSP update time."; suspicious byte";
       }
       leaf change tlv-type {
         type bits {
                   bit refresh {
                     position 0;
                     description
                      "Refresh LSP, nothing has changed.";
                   }
                   bit link-down {
                     position 1;
                     description
                      "One or more links are down.";
                   }
                   bit link-up {
                     position 2;
                     description
                      "One or more links are up.";
                   }
                   bit link-metric-change {
                     position 3;
                     description
                      "One or more links experienced
                      a metric change.";
                   }
                   bit link-other-change {
                     position 4;
                     description
                      "One or more links experienced
                      a change that does not affect state
                      or metric.";
                   }
                   bit prefix-down {
                     position 5;
                     description
                      "One or more links are down.";
                   }
                   bit prefix-up {
                     position 6;
                     description
                      "One or more prefixes are up.";
                   }
                   bit prefix-metric-change {
                     position 7;
                     description
                      "One or more prefixes experienced
                      a metric change.";
                   }
                   bit prefix-other-change {
                     position 8; uint8;
         description
                      "One or more prefixes experienced
          "if the problem is a change that does not affect state
                      or metric.";
                   }
                   bit other-change {
                     position 9;
                     description
                      "One or more component changed that malformed TLV, the tlv-type is not a prefix or link.";

                   }
                 }
                 description
                  "This leaf describes set
          to the type value of change
                  in the LSP.";
               }

               description
                "List of LSP events."; suspicious TLV.
          Otherwise this leaf is not present.";
       }
       description
         "This container lists notification is sent when the system
         receives a  LSP reception events.
              Local LSP modification are also contained in the
              list."; with a parse error.
         The notification generation must be throttled with at least
          a 5 second gap.
          ";
     }
           container database {
             list level-db

     notification adjacency-change {
               key level;
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf level neighbor {
         type level-number;
                 description
                  "Current level number";
               }
               list lsp {
                 key lsp-id;

                 uses database; string;
         description
                  "List
          "Describes the name of LSPs in LSDB.";
               }

               description
                "This container describes the list neighbor. If the
          name of LSPs
                in the level x database.";
             }

             description
              "This container describes ISIS Link State
               databases."; neighbor is not available, the
          field would be empty.";
       }
           container hostnames {

             list hostname {
               key system-id;
       leaf system-id neighbor-system-id {
         type system-id;
         description
                  "This leaf describes
          "Describes the system-id
                  associated with of the hostname."; neighbor.";
       }
       leaf hostname level {
         type string; level;
         description
                  "This leaf describes
          "Describes the hostname
                   associated with ISIS level of the system ID."; adjacency.";
       }
       leaf state {
         type enumeration {
           enum "Up" {
             description
                "List of system-id/hostname associations";
              "This state describes that
               adjacency is established.";
           }
           enum "Down" {
             description
              "This container state describes the list
              of binding between system-id and
              hostnames."; that
               adjacency is no more established.";
           }
         }
         description
            "List
          "This leaf describes the new state of the
           ISIS instances."; adjacency.";
       }
       leaf reason {
         type string;
         description
          "If the adjacency is going to DOWN,
          this leaf provides a reason for the adjacency
          going down. The reason is provided as a text.
          If the adjacency is going to UP, no reason is
          provided.";
       }
       description
         "This container defines various notification is sent when an ISIS states objects.";
       } adjacency
          moves to Up state or to Down state.";
     }

     /* RPC methods */

     rpc clear-adjacency

     notification lsp-received {
       description
        "This RPC request clears a particular
         set of ISIS adjacencies. If the operation
         fails for ISIS internal reason, then
         error-tag and error-app-tag should be set
         to a meaningful value.";
       input
       uses notification-instance-hdr;
       uses notification-interface-hdr;

       leaf lsp-id {
         type lsp-id;
         description
          "LSP ID.";
       }
       leaf routing-instance-name sequence {
         type rt:routing-instance-state-ref;
           mandatory "true"; uint32;
         description
            "Name
          "Sequence number of the routing instance whose ISIS
             information is being queried.

             If the routing instance with name equal to the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag 'routing-instance-not-found'."; received LSP.";
       }
       leaf routing-protocol-instance-name received-timestamp {
         type instance-state-ref;
           mandatory "true"; yang:timestamp;

         description
            "Name of the ISIS protocol instance whose ISIS
             information is being queried.

             If
          "This leaf describes the ISIS instance with name equal to timestamp
          when the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'routing-protocol-instance-not-found'."; LSP was received. ";
       }
       leaf level neighbor-system-id {
         type level; system-id;
         description
            "ISIS level
          "Describes the system-id of the adjacency to be cleared.
            If ISIS level is level-1-2, both level 1 and level 2
            adjacencies would be cleared.

            If neighbor
          that sent the value provided LSP.";
       }
       description
         "This notification is different from the one
            authorized in the enum type, then this
             operation SHALL fail sent when a LSP
         is received.
         The notification generation must be throttled with error-tag 'data-missing'
             and error-app-tag
             'bad-isis-level'. at least
          a 5 second gap. ";
     }
     notification lsp-generation {
       uses notification-instance-hdr;

       leaf lsp-id {
         type lsp-id;
         description
          "LSP ID.";
       }
       leaf interface sequence {
         type string; uint32;
         description
            "Name
          "Sequence number of the ISIS interface.

             If the ISIS interface with name equal to received LSP.";
       }
       leaf send-timestamp {
         type yang:timestamp;

         description
          "This leaf describes the
             value of this parameter doesn't exist, then this
             operation SHALL fail timestamp
          when our LSP was regenerated. ";
       }
       description
         "This notification is sent when a LSP
         is regenerated.
         The notification generation must be throttled with error-tag 'data-missing'
             and error-app-tag
             'isis-interface-not-found'."; at least
          a 5 second gap. ";
     }

   }

   <CODE ENDS>

8.  ISIS Segment Routing YANG Module

   <CODE BEGINS> file "ietf-isis-sr@2015-06-23.yang"

   module ietf-isis-sr {
     namespace "urn:ietf:params:xml:ns:"
             + "yang:ietf-isis-sr";
     prefix isis-sr;

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

     import ietf-routing {
       prefix "rt";
     }
     import ietf-interfaces {
     prefix "if";
     }

     import ietf-segment-routing {
       prefix "sr";
     }

     rpc clear-database

     import ietf-isis {
       prefix "isis";
     }

     organization
      "IETF ISIS Working Group";

     contact
       "WG List:  &lt;mailto:spring@ietf.org&gt;

       Editor:    Stephane Litkowski
             &lt;mailto:stephane.litkowski@orange.com&gt;

           Acee Lindem
             &lt;mailto:acee@cisco.com&gt;
           Yingzhen Qu
             &lt;mailto:yiqu@cisco.com&gt;
           Pushpasis Sarkar
             &lt;mailto:psarkar@juniper.net&gt;
           Ing-Wher Chen
             &lt;mailto:ing-wher.chen@ericsson.com&gt;
           Jeff Tantsura
             &lt;mailto:jeff.tantsura@ericsson.com&gt;

       ";

     description
        "This RPC request clears
       "The YANG module defines a particular
         ISIS database. If the operation
         fails generic configuration model for
       Segment routing ISIS internal reason, then
         error-tag and error-app-tag should be set
         to a meaningful value.";
       input extensions common across all of the vendor
       implementations.";

     revision 2015-05-27 {
       description "
        * Initialization
       ";
       reference "";
     }

     /* Identities */
     /* Features */

     /* Groupings */

   grouping adjacency-state {
       description
        "This group will extend adjacency state.";
       list adjacency-sid {
         key value;
         leaf routing-instance-name af {
           type rt:routing-instance-state-ref;
           mandatory "true";
           description
            "Name of the routing instance whose ISIS
             information is being queried.

             If the routing instance with name equal to the
             value of this parameter doesn't exist, then this
             operation SHALL fail identityref {
             base rt:address-family;
           }
           description
            "Address-family associated with error-tag 'data-missing'
             and error-app-tag 'routing-instance-not-found'."; the
            segment ID";
         }
         leaf routing-protocol-instance-name value {
           type instance-state-ref;
           mandatory "true"; uint32;
           description
            "Name
            "Value of the ISIS protocol instance whose ISIS
             information is being queried.

             If the ISIS instance Adj-SID.";
         }
         leaf weight {
           type uint8;
           description
            "Weight associated with name equal to
            the
             value of this parameter doesn't exist, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'routing-protocol-instance-not-found'."; adjacency SID.";
         }
         leaf level protection-requested {
           type level; boolean;
           description
            "ISIS level of
            "Describe if the adjacency to be cleared.
            If ISIS level is level-1-2, both level 1 and level 2
            adjacencies would SID
            must be cleared.

            If the value provided is different from the one
            authorized in the enum type, then this
             operation SHALL fail with error-tag 'data-missing'
             and error-app-tag
             'bad-isis-level'.
            "; protected.";
         }
         description
          "List of adjacency Segment IDs.";
       }
   }

     /* Notifications */

     notification database-overload

   grouping prefix-segment-id {
       uses notification-instance-hdr;
       description
        "This group defines segment routing extensions
        for prefixes.";

       list sid-list {
         key value;
         leaf overload flags {
           type enumeration bits {
           enum "off"
             bit readvertisment {
               position 7;
               description
                "If set, then the prefix to
               which this Prefix-SID is attached,
               has been propagated by the
               router either from another level
               or from redistribution.";
             }

             bit php {
               position 5;
               description
               "If set, then the penultimate hop MUST NOT
               pop the Prefix-SID before delivering the packet
               to the node
               that advertised the Prefix-SID.";
             }
             bit explicit-null {
               position 4;
               description
               "If set, any upstream neighbor of
               the Prefix-SID originator MUST replace
               the Prefix-SID with a
               Prefix-SID having an
               Explicit-NULL value (0 for IPv4 and 2 for
               IPv6) before forwarding the packet.";
             }
             bit  value {
               position 3;
               description
              "The system has left overload condition.";
               "If set, then the Prefix-SID carries a
               value (instead of an index).
               By default the flag is UNSET.";

             }
           enum "on"
             bit  local {
               position 2;
               description
              "The system
               "If set, then the value/index carried by
               the Prefix-SID has local significance.
               By default the flag is in overload condition."; UNSET.";
             }
           }
           description
            "Describes flags associated with the new overload state of the instance.";
            segment ID.";
         }

         leaf algorithm {
           type uint8;
           description
         "This notification is sent when an ISIS instance
          overload condition changes.";
            "Algorithm to be used for path computation.";
         }

     notification lsp-too-large {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
         leaf pdu-size value {
           type uint32;
           description
          "Size
            "Value of the PDU"; prefix-SID.";
         }
       leaf lsp-id {
         type lsp-id;
         description
          "LSP ID.";
          "List of segments.";
       }
     }

     grouping adjacency-segment-id {
       description
        "This notification is sent when we attempt
          to propagate an LSP that is larger than the
          dataLinkBlockSize group defines segment routing extensions
        for the circuit.
          The notification generation must be throttled
          with at least a 5 second gap.
          ";
     }

     notification corrupted-lsp-detected adjacencies.";

       list sid-list {
       uses notification-instance-hdr;
         key value;

         leaf lsp-id flags {
           type lsp-id;
         description
          "LSP ID.";
       }
       description
         "This notification is sent when we find
          that an LSP that was stored in memory has
          become corrupted.
          ";
     }

     notification attempt-to-exceed-max-sequence bits {
       uses notification-instance-hdr;
       leaf lsp-id
             bit address-family {
         type lsp-id;
               position 7;
               description
          "LSP ID.";
                "If unset, then the Adj-SID refers
               to an adjacency with outgoing IPv4 encapsulation.
               If set then the Adj-SID refers to an adjacency
               with outgoing IPv6 encapsulation.";
             }
             bit backup {
               position 6;
               description
         "This notification is sent when
                "If set, the system
         wraps Adj-SID refers to an
               adjacency being protected
               (e.g.: using IPFRR or MPLS-FRR)";
             }
             bit  value {
               position 5;
               description
               "If set, then the 32-bit sequence counter SID carries a
               value (instead of an LSP.
          "; index).
               By default the flag is SET.";

             }

     notification id-len-mismatch {
       uses notification-instance-hdr;
       uses notification-interface-hdr;

       leaf pdu-field-len
             bit  local {
         type uint8;
               position 4;
               description
          "Size of
               "If set, then the ID length in value/index carried by
               the received PDU"; SID has local significance.
               By default the flag is SET.";
             }
       leaf raw-pdu
             bit  set {
         type binary;
               position 3;
               description
          "Received raw PDU.";
               "When set, the S-Flag indicates that the
               Adj-SID refers to a set of adjacencies";
             }
           }

           description
         "This notification is sent when we receive a PDU
            "Describes flags associated with a different value for the System ID length.

         The notification generation must be throttled
         with at least a 5 second gap.
          ";
            segment ID.";
         }

     notification max-area-addresses-mismatch {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
         leaf max-area-addresses weight {
           type uint8;
           description
          "Received number
            "The value represents the weight of supported areas"; the Adj-SID
             for the purpose of load balancing.";
         }
         leaf raw-pdu neighbor-id {
           type binary; isis:system-id;
           description
          "Received raw PDU.";
       }
       description
         "This notification is sent when we receive a PDU
         with a different value for
            "Describes the Maximum Area Addresses.
         The notification generation must be throttled system ID of the neighbor
            associated with at least a 5 second gap.
          "; the SID value. This is only
            used on LAN adjacencies.";
         }

     notification own-lsp-purge {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
         leaf lsp-id value {
           type lsp-id; uint32;
           description
          "LSP ID.";
            "Value of the Adj-SID.";
         }
         description
         "This notification is sent when the system
         receives a PDU with its own system ID and zero age.
          ";
          "List of segments.";
       }

     notification sequence-number-skipped

     }
     grouping segment-routing-binding-tlv {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
     list segment-routing-bindings {

         key "fec range";

         leaf lsp-id fec {
           type lsp-id; string;
           description
          "LSP ID.";
           "IP (v4 or v6) range to be bound to SIDs.";
         }

         leaf range {
           type uint16;
           description
         "This notification is sent when the system
         receives a PDU with its own system ID and
         different contents. The system has
            "Describes number of elements to reissue
         the LSP with assign
            a higher sequence number.
          "; binding to.";
         }

     notification authentication-type-failure {
       uses notification-instance-hdr;
       uses notification-interface-hdr;

         leaf raw-pdu flags {
           type binary; bits {
             bit address-family {
               position 7;
               description
          "Received raw PDU.";
               "If unset, then the Prefix FEC
               carries an IPv4 Prefix.
               If set then the Prefix FEC carries an
               IPv6 Prefix.";
             }
             bit mirror {
               position 6;
               description
         "This notification is sent when the system
         receives a PDU with
               "Set if the wrong authentication type
         field.
         The notification generation must be throttled with
         at least advertised SID/path
               corresponds to a 5 second gap. mirrored context.
               ";
             }

     notification authentication-failure {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf raw-pdu
             bit flooding {
         type binary;
               position 5;
               description
          "Received raw PDU.";
                "If the S bit is set(1),
                the IS-IS Router CAPABILITY TLV
               MUST be flooded across the entire routing domain.
               If the S bit is
               not set(0), the TLV MUST NOT be leaked between levels.
               This bit MUST NOT be altered during the TLV leaking.";
             }
             bit down {
               position 4;
               description
         "This notification is sent when
               "When the system
         receives a PDU with IS-IS Router CAPABILITY TLV is
               leaked from level-2 to level-1, the wrong authentication
         information.
         The notification generation must D bit
               MUST be throttled set.  Otherwise, this bit MUST
               be clear.  IS-IS Router capability TLVs
               with
         at least a 5 second gap. the D bit set MUST NOT
               be leaked from level-1 to level-2.
               This is to prevent TLV looping.
               ";
             }

     notification version-skew {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf protocol-version
             bit attached {
         type uint8;
               position 3;
               description
          "Protocol version received
               "The originator of the SID/Label Binding
               TLV MAY set the A bit in order to signal
               that the prefixes and
               SIDs advertised in the PDU."; SID/Label Binding
               TLV are directly
               connected to their originators.
               ";
             }
       leaf raw-pdu {
         type binary;
         description
          "Received raw PDU.";

           }
           description
         "This notification is sent when
              "Flags of the system
         receives a PDU with a different protocol version
         number.
         The notification generation must be throttled with at least
          a 5 second gap.
          "; binding.";
         }

     notification area-mismatch {
       uses notification-instance-hdr;
       uses notification-interface-hdr;

         leaf raw-pdu weight {
           type binary;
         description
          "Received raw PDU.";
       } uint8;
           description
         "This notification is sent when
            "Weight of the system
         receives a Hello PDU from an IS that does
         not share any area address.
         The notification generation must be throttled with at least
          a 5 second gap.
          "; path for loadbalancing purpose.";
         }

     notification rejected-adjacency

         list binding {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
       leaf raw-pdu
           container prefix-sid {
         type binary;
             uses prefix-segment-id;
             description
          "Received raw PDU.";
              "Binding prefix SID to the range.";
           }
           leaf reason ero-metric {
             type string;
         description
          "The system may provide a reason to reject the
           adjacency. If the reason is not available,
           the system use an empty string.";

       } uint32;
             description
         "This notification is sent when the system
         receives a Hello PDU from an IS but does not
         establish an adjacency for some reason.
         The notification generation must be throttled with at least
          a 5 second gap.
          ";
              "Cost of ERO path.";
           }

     notification protocols-supported-mismatch
           container ero {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
             leaf raw-pdu address-family {
               type binary; identityref {
                 base rt:address-family;
               }
               description
          "Received raw PDU.";
                "Address-family.";
             }
       leaf-list protocols

             leaf loose {
               type uint8; boolean;
               description
          "The list
                "Set to true,
                if hop is a loose hop.";
             }
             leaf address {
               type string;
               description
               "IP address of protocols supported by a node on the
           remote system.";
               path.";
             }

             description
         "This notification is sent when
              "Binding ERO path to the system
         receives a non pseudonode LSP that has no matching
         protocol supported.
         The notification generation must be throttled with at least
          a 5 second gap.
          "; range.";
           }

     notification lsp-error-detected
           container backup-ero {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
             leaf lsp-id address-family {
               type lsp-id; identityref {
                 base rt:address-family;
               }
               description
          "LSP ID.";
                "Address-family.";
             }

             leaf raw-pdu loose {
               type binary; boolean;
               description
          "Received raw PDU.";
                "Set to true,
                if hop is a loose hop.";
             }
             leaf error-offset address {
               type uint32; string;
               description
          "If the problem is a malformed TLV,
          the error-offset points to the start
               "IP address of a node on the TLV.
          If the problem is with the LSP header,
          the error-offset points
               path.";
             }

             description
              "Binding backup ERO path to the suspicious byte"; range.";
           }
           container unnumbered-interface-id-ero {
             leaf tlv-type router-id {
               type uint8; string;
               description
          "if the problem is a malformed TLV,
                "Router ID of the tlv-type is set
          to node owning the interface.";
             }
             leaf interface-id {
               type value of uint32;
               description
               "Interface ID on which the suspicious TLV.
          Otherwise this leaf path is not present."; built.";
             }
             description
         "This notification is sent when the system
         receives a  LSP with a parse error.
         The notification generation must be throttled with at least
              "Binding a 5 second gap.
          "; path over unnumbered interface.";
           }

     notification adjacency-change {
       uses notification-instance-hdr;
       uses notification-interface-hdr;
           container backup-unnumbered-interface-id-ero {
             leaf neighbor router-id {
               type string;
               description
          "Describes the name of the neighbor. If the
          name
                "Router ID of the neighbor is not available, node owning the
          field would be empty."; interface.";
             }
             leaf neighbor-system-id interface-id {
               type system-id; uint32;
               description
          "Describes the system-id of
               "Interface ID on which the neighbor."; path is built.";
             }
       leaf level {
         type level;
             description
          "Describes the ISIS level of
              "Binding a backup path over unnumbered interface.";
           }
           description
            "Bindings associated with the adjacency."; range.";
         }
       leaf state {
         type enumeration {
           enum "Up" {

         description
          "This state container describes that
               adjacency list of SID/Label
          bindings.
          ISIS reference is established."; TLV 149.";
       }
           enum "Down"
       description
        "Defines binding TLV for database.";

     }
     /* Cfg */

     augment "/rt:routing/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis" {
       when "rt:type = 'isis:isis'" {
         description
         "This state describes that
               adjacency is no more established."; augment ISIS routing protocol when used";
       }
       description
        "This augments ISIS protocol configuration
         with segment routing.";

       uses sr:controlplane-cfg;
     }

      augment "/rt:routing/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:interfaces/isis:interface" {
       when "rt:type = 'isis:isis'" {
         description
         "This augment ISIS routing protocol when used";
       }
       description
        "This leaf describes the new state of the augments ISIS adjacency."; protocol configuration
         with segment routing.";

       uses sr:igp-interface-cfg;
     }
       leaf reason

     /* Operational states */

     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis" {
       when "rt:type = 'isis:isis'" {
         type string;
         description
          "If the adjacency is going to DOWN,
          this leaf provides a reason for the adjacency
          going down. The reason is provided as a text.
          If the adjacency is going to UP, no reason is
          provided.";
         "This augment ISIS routing protocol when used";
       }
       description
        "This notification is sent augments ISIS protocol configuration
         with segment routing.";

       uses sr:controlplane-cfg;
     }

      augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:interfaces/isis:interface" {
       when an "rt:type = 'isis:isis'" {
         description
         "This augment ISIS adjacency
          moves to Up state or to Down state."; routing protocol when used";
       }
       description
        "This augments ISIS protocol configuration
         with segment routing.";

       uses sr:igp-interface-cfg;
     }

     notification lsp-received

     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:interfaces/isis:interface" +
           "/isis:adjacencies/isis:adjacency" {
       uses notification-instance-hdr;
       uses notification-interface-hdr;

       leaf lsp-id
       when "rt:type = 'isis:isis'" {
         type lsp-id;
         description
          "LSP ID.";
         "This augment ISIS routing protocol when used";
       }
       leaf sequence {
         type uint32;
       description
          "Sequence number of the received LSP.";
        "This augments ISIS protocol configuration
         with segment routing.";

       uses adjacency-state;
     }
       leaf received-timestamp

     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp"+
           "/isis:extended-is-neighbor/isis:neighbor" {
         type yang:timestamp;
       description
        "This leaf describes the timestamp
          when the LSP was received. "; augments ISIS protocol LSDB neighbor.";
       uses adjacency-segment-id;

     }
       leaf neighbor-system-id
     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp"+
           "/isis:mt-is-neighbor/isis:neighbor" {
         type system-id;
         description
          "Describes the system-id of the neighbor
          that sent the LSP.";
       }
           description
        "This notification is sent when a LSP
         is received.
         The notification generation must be throttled with at least
          a 5 second gap. "; augments ISIS protocol LSDB neighbor.";
       uses adjacency-segment-id;

     }

     notification lsp-generation
     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp"+
           "/isis:extended-ipv4-reachability/isis:prefixes" {
           description
        "This augments ISIS protocol LSDB prefix.";
       uses notification-instance-hdr;

       leaf lsp-id prefix-segment-id;

     }
     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp"+
           "/isis:mt-extended-ipv4-reachability/isis:prefixes" {
         type lsp-id;
           description
          "LSP ID.";
        "This augments ISIS protocol LSDB prefix.";
       uses prefix-segment-id;

     }
       leaf sequence
     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp"+
           "/isis:ipv6-reachability/isis:prefixes" {
         type uint32;
           description
          "Sequence number of the received LSP.";
        "This augments ISIS protocol LSDB prefix.";
       uses prefix-segment-id;

     }
       leaf send-timestamp
     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp"+
           "/isis:mt-ipv6-reachability/isis:prefixes" {
         type yang:timestamp;
           description
        "This leaf describes the timestamp
          when our LSP was regenerated. "; augments ISIS protocol LSDB prefix.";
       uses prefix-segment-id;

     }
     augment "/rt:routing-state/rt:routing-instance/" +
           "rt:routing-protocols/rt:routing-protocol"+
           "/isis:isis/isis:database/isis:level-db/isis:lsp" {
           description
        "This notification is sent when a LSP
         is regenerated.
         The notification generation must be throttled with at least
          a 5 second gap. "; augments ISIS protocol LSDB.";
       uses segment-routing-binding-tlv;

     }

     /* Notifications */

   }

   <CODE ENDS>

7.

9.  Security Considerations

   Configuration and state data defined in this document are designed to
   be accessed via the NETCONF protocol [RFC6241].

   As ISIS is an IGP protocol (critical piece of the network), ensuring
   stability and security of the protocol is mandatory for the network
   service.

   Authors recommends to implement NETCONF access control model
   ([RFC6536]) to restrict access to all or part of the configuration to
   specific users.  Access control to RPCs is also critical as RPC
   permits to clear protocol datastructures that would definitively
   impact the network service.  This kind of RPC needs only to be used
   in specific cases by well-known experienced users.

   Authors consider that all the configuration is considered as
   sensitive/vulnerable as well as RPCs.  But security teams can decide
   to open some part of the configuration to less experienced users
   depending on the internal organization, for example:

   o  User FullWrite: would access to the whole data model.  This kind
      of profile may be restricted to few experienced people.

   o  User PartialWrite: would only access to configuration part within
      /isis/interfaces/interface.  So this kind of profile is restricted
      to creation/modification/deletion of interfaces.  This profile
      does not have access to RPC.

   o  User Read: would only access to state part /isis-state.

   Unauthorized access to configuration or RPC may cause high damages to
   the network service.

   The /isis-state/database may contain authentication information.  As
   presented in the description of the /isis-state/database/level-
   1/lsp/authentication/authentication-key, the authentication MUST
   never be presented in plaintext format for security reason.  Authors
   recommends the usage of MD5 to present the authentication-key.

   Some authentication-key may also be present in the /isis
   configuration.  When configuring ISIS using the NETCONF protocol,
   authors recommends the usage of secure transport of NETCONF using SSH
   ([RFC6242]).

8.

10.  Contributors

   Authors would like to thank Kiran Agrahara Sreenivasa, Dean
   Bogdanovic, Yingzhen Qu, Yi Yang for their major contributions to the
   draft.

9.

11.  Acknowledgements

   TBD.

10.

12.  IANA Considerations

   TBD.

11.

13.  Normative References

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

   [I-D.litkowski-spring-sr-yang]
              Litkowski, S., Lindem, A., Sarkar, P., and H. Chen, "YANG
              Data Model for Segment Routing", draft-litkowski-spring-
              sr-yang-00 (work in progress),
              October 2014. March 2015.

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

   [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.

Appendix A.  Example: NETCONF <get> Reply

   This section gives an example of a reply to the NETCONF <get> request
   for a device that implements the data model defined in this document.
   The example is written in XML.

   <?xml version="1.0" encoding="utf-8"?>
   <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
       <routing-instance>
         <name>SLI</name>
         <router-id>1.1.1.1</router-id>
         <description/>
         <default-ribs>
           <default-rib>
             <address-family>ipv4-unicast</address-family>
             <rib-name>default</rib-name>
           </default-rib>
         </default-ribs>
         <interfaces>
           <interface>
             <name>Loopback0</name>
           </interface>
           <interface>
             <name>Eth1</name>
           </interface>
         </interfaces>
         <routing-protocols>
           <routing-protocol>
             <name>ISIS</name>
             <description/>
             <type>isis:isis</type>
             <connected-ribs>
               <connected-rib>
                 <rib-name>default</rib-name>
                 <import-filter/>
                 <export-filter/>
               </connected-rib>
             </connected-ribs>
             <isis xmlns="urn:ietf:params:xml:ns:yang:ietf-isis">
               <instance>
                 <routing-instance>SLI</routing-instance>
                 <level-type>level-2</level-type>
                 <system-id>87FC.FCDF.4432</system-id>
                 <area-address>49.0001</area-address>
                 <mpls-te>
                   <ipv4-router-id>1.1.1.1</ipv4-router-id>
                 </mpls-te>
                 <lsp-lifetime>65535</lsp-lifetime>
                 <lsp-refresh>65000</lsp-refresh>
                 <authentication>
                   <key>ThisIsThePassword</key>
                   <type>plain-text</type>
                   <level>level-2</level>
                 </authentication>
                 <metric-type>
                   <value>wide</value>
                 </metric-type>
                 <default-metric>
                   <value>111111</value>
                 </default-metric>
                 <af>
                   <af>ipv4-unicast</af>
                   <enabled>true</enabled>
                 </af>
                 <interfaces>
                   <interface>
                     <name>Loopback0</name>
                     <tag>200</tag>
                     <metric>
                       <value>0</value>
                     </metric>
                     <passive>true</passive>
                   </interface>
                   <interface>
                     <name>Eth1</name>
                     <level-type>level-2</level-type>
                     <interface-type>point-to-point</interface-type>
                     <metric>
                       <value>167890</value>
                     </metric>

                   </interface>
                 </interfaces>
               </instance>
             </isis>
           </routing-protocol>
         </routing-protocols>
       </routing-instance>
       <ribs>
         <rib>
           <name>default</name>
           <address-family>ipv4-unicast</address-family>
           <description/>
           <recipient-ribs>
             <recipient-rib>
               <rib-name/>
               <filter/>
             </recipient-rib>
           </recipient-ribs>
         </rib>
       </ribs>
       <route-filters>
         <route-filter>
           <name/>
           <description/>
           <type/>
         </route-filter>
       </route-filters>
     </routing>
     <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
       <interface>
         <name>Loopback0</name>
         <description/>
         <type/>
         <link-up-down-trap-enable/>
         <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
           <mtu/>
           <address>
             <ip>1.1.1.1</ip>
             <prefix-length>32</prefix-length>
           </address>
         </ipv4>

       </interface>
       <interface>
         <name>Eth1</name>
         <description/>
         <type/>
         <link-up-down-trap-enable/>
         <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
           <mtu/>
           <address>
             <ip>10.0.0.1</ip>
             <prefix-length>30</prefix-length>
           </address>
         </ipv4>

       </interface>
     </interfaces>
   </data>

Authors' Addresses

   Stephane Litkowski
   Orange

   Email: stephane.litkowski@orange.com

   Derek Yeung
   Cisco Systems

   Email: myeung@cisco.com
   Acee Lindem
   Cisco Systems

   Email: acee@cisco.com

   Jeffrey Zhang
   Juniper Networks

   Email: zzhang@juniper.net

   Ladislav Lhotka

   Email: lhotka@nic.cz