<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-ietf-isis-sr-yang-13" ipr="trust200902" category="std" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.13.1 -->
  <front>
    <title abbrev="isis-sr-yang">YANG Data Model for IS-IS Segment Routing</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-isis-sr-yang-13"/>
    <author fullname="Stephane Litkowski" initials="S" surname="Litkowski">
      <organization>Cisco Systems</organization>
      <address>
        <email>slitkows.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei</organization>
      <address>
        <email>yingzhen.qu@futurewei.com</email>
      </address>
    </author>
    <author fullname="Pushpasis Sarkar" initials="P" surname="Sarkar">
      <organization>Individual</organization>
      <address>
        <email>pushpasis.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Ing-Wher Chen" initials="I." surname="Chen">
      <organization>The MITRE Corporation</organization>
      <address>
        <email>ingwherchen@mitre.org</email>
      </address>
    </author>
    <author fullname="Jeff Tantsura" initials="J" surname="Tantsura">
      <organization>Microsoft</organization>
      <address>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>
    <date/>
    <area/>
    <workgroup>LSR Working Group</workgroup>
    <abstract>
      <t>This document defines a YANG data module that can be used to 
        configure and manage IS-IS Segment Routing for MPLS data plane.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction" toc="default" numbered="true">
      <name>Overview</name>
      <t>YANG <xref target="RFC7950" format="default"/> is a data definition language used to
   define the contents of a conceptual data store that allows networked
   devices to be managed using NETCONF <xref target="RFC6241" format="default"/>.  YANG is proving
   relevant beyond its initial confines, as bindings to other interfaces
   (e.g., ReST) and encodings other than XML (e.g., JSON) are being
   defined.  Furthermore, YANG data models can be used as the basis for
   implementation of other interfaces, such as CLI and programmatic
   APIs.
      </t>
      <t>This document defines a YANG data module that can be used to configure
   and manage IS-IS Segment Routing <xref target="RFC8667" format="default"/> for MPLS data plane
   and it is an augmentation to the IS-IS YANG data model.</t>
      <t> The YANG modules in this document conform to the Network Management
Datastore Architecture (NMDA) <xref target="RFC8342" format="default"/>.</t>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
        "MAY", and "OPTIONAL" in this document are to be interpreted as
        described in BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/>
        when, and only when, they appear in all capitals, as shown here.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Tree Diagrams</name>
        <t>This document uses the graphical representation of data models
          defined in <xref target="RFC8340" format="default"/>.</t>
      </section>
    </section>
    <section anchor="design" toc="default" numbered="true">
      <name>IS-IS Segment Routing</name>
      <t>This document defines a model for IS-IS Segment Routing feature.  It
   is an augmentation of the IS-IS base model.</t>
      <t>The IS-IS SR YANG module requires support for the base segment routing
   module <xref target="RFC9020" format="default"/>, which defines the global segment
   routing configuration independent of any specific routing protocol configuration, and support of IS-IS base model <xref target="I-D.ietf-isis-yang-isis-cfg" format="default"/>
   which defines basic IS-IS configuration and state.</t>
      <t>The figure below describes the overall structure of the isis-sr
      YANG module:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-isis-sr
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis:
    +--rw segment-routing
    |  +--rw enabled?    boolean
    |  +--rw bindings
    |     +--rw advertise
    |     |  +--rw policies*   string
    |     +--rw receive?     boolean
    +--rw protocol-srgb {sr-mpls:protocol-srgb}?
       +--rw srgb* [lower-bound upper-bound]
          +--rw lower-bound    uint32
          +--rw upper-bound    uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:interfaces
          /isis:interface:
    +--rw segment-routing
       +--rw adjacency-sid
          +--rw adj-sids* [value]
          |  +--rw value-type?   enumeration
          |  +--rw value         uint32
          |  +--rw protected?    boolean
          +--rw advertise-adj-group-sid* [group-id]
          |  +--rw group-id    uint32
          +--rw advertise-protection?      enumeration
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:interfaces
          /isis:interface/isis:fast-reroute:
    +--rw ti-lfa {ti-lfa}?
       +--rw enable?   boolean
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:interfaces
          /isis:interface/isis:fast-reroute/isis:lfa/isis:remote-lfa:
    +--rw use-segment-routing-path?   boolean {remote-lfa-sr}?
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:interfaces
          /isis:interface/isis:adjacencies/isis:adjacency:
    +--ro adjacency-sid* [value]
       +--ro af?                     iana-rt-types:address-family
       +--ro value                   uint32
       +--ro weight?                 uint8
       +--ro protection-requested?   boolean
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp/isis:router-capabilities:
    +--ro sr-capability
    |  +--ro sr-capability
    |  |  +--ro sr-capability-bits*   identityref
    |  +--ro global-blocks
    |     +--ro global-block* []
    |        +--ro range-size?    uint32
    |        +--ro sid-sub-tlv
    |           +--ro sid?   uint32
    +--ro sr-algorithms
    |  +--ro sr-algorithm*   uint8
    +--ro local-blocks
    |  +--ro local-block* []
    |     +--ro range-size?    uint32
    |     +--ro sid-sub-tlv
    |        +--ro sid?   uint32
    +--ro srms-preference
       +--ro preference?   uint8
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database/isis:levels
          /isis:lsp/isis:extended-is-neighbor/isis:neighbor:
    +--ro sid-list* [value]
       +--ro adj-sid-flags
       |  +--ro bits*   identityref
       +--ro weight?          uint8
       +--ro neighbor-id?     isis:system-id
       +--ro value            uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp/isis:mt-is-neighbor/isis:neighbor:
    +--ro sid-list* [value]
       +--ro adj-sid-flags
       |  +--ro bits*   identityref
       +--ro weight?          uint8
       +--ro neighbor-id?     isis:system-id
       +--ro value            uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp/isis:extended-ipv4-reachability
          /isis:prefixes:
    +--ro sid-list* [value]
       +--ro perfix-sid-flags
       |  +--ro bits*   identityref
       +--ro algorithm?          uint8
       +--ro value               uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp/isis:mt-extended-ipv4-reachability
          /isis:prefixes:
    +--ro sid-list* [value]
       +--ro perfix-sid-flags
       |  +--ro bits*   identityref
       +--ro algorithm?          uint8
       +--ro value               uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp/isis:ipv6-reachability/isis:prefixes:
    +--ro sid-list* [value]
       +--ro perfix-sid-flags
       |  +--ro bits*   identityref
       +--ro algorithm?          uint8
       +--ro value               uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp/isis:mt-ipv6-reachability/isis:prefixes:
    +--ro sid-list* [value]
       +--ro perfix-sid-flags
       |  +--ro bits*   identityref
       +--ro algorithm?          uint8
       +--ro value               uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/isis:isis/isis:database
          /isis:levels/isis:lsp:
    +--ro segment-routing-bindings* [fec range]
       +--ro fec                  string
       +--ro range                uint16
       +--ro sid-binding-flags
       |  +--ro bits*   identityref
       +--ro binding
          +--ro prefix-sid
             +--ro sid-list* [value]
                +--ro perfix-sid-flags
                |  +--ro bits*   identityref
                +--ro algorithm?          uint8
                +--ro value               uint32
]]></artwork>
      <section anchor="spring" toc="default" numbered="true">
        <name>IS-IS Segment Routing configuration</name>
        <section anchor="spring-activation" toc="default" numbered="true">
          <name>Segment Routing activation</name>
          <t>
		Activation of segment-routing IS-IS is done by setting the "enable" leaf to true.
		This triggers advertisement of segment-routing extensions based on the configuration parameters that have been
		setup using the base segment routing module.
          </t>
        </section>
        <section anchor="spring-ms" toc="default" numbered="true">
          <name>Advertising mapping server policy</name>
          <t>
		The base segment routing module defines mapping server policies. 
		By default, IS-IS will not advertise nor receive any mapping server entry.
		The IS-IS segment-routing module allows to advertise one or multiple mapping server policies through the "bindings/advertise/policies"
		leaf-list.
		The "bindings/receive" leaf allows to enable the reception of mapping server entries.
          </t>
        </section>
        <section anchor="spring-ipfrr" toc="default" numbered="true">
          <name>IP Fast reroute</name>
          <t>
		IS-IS SR model augments the fast-reroute container under interface.
		It brings the ability to activate TI-LFA (topology independent LFA) and also enhances remote LFA to use
		segment-routing tunneling instead of LDP.
          </t>
        </section>
      </section>
      <section anchor="isis-sr-yang" toc="default" numbered="true">
        <name>IS-IS Segment Routing YANG Module</name>
        <sourcecode name="ietf-isis-sr@2022-08-09.yang" type="" markers="true"><![CDATA[
module ietf-isis-sr {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:"
          + "yang:ietf-isis-sr";
  prefix isis-sr;

  
  import ietf-routing {
    prefix "rt";
    reference
      "RFC 8349 - A YANG Data Model for Routing
                  Management (NMDA Version)";
  }
  
  import ietf-segment-routing-common {
    prefix "sr-cmn";
    reference
      "RFC 9020 - YANG Data Model for Segment Routing";
  }

  import ietf-segment-routing-mpls {
    prefix "sr-mpls";
    reference
      "RFC 9020 - YANG Data Model for Segment Routing";
  }
  
  import ietf-isis {
    prefix "isis";
  }
  
  import iana-routing-types {
    prefix "iana-rt-types";
    reference "RFC 8294 - Common YANG Data Types for the
               Routing Area";
  }
  
  organization
   "IETF LSR - LSR Working Group";
   
  contact
    "WG List:  <mailto:lsr@ietf.org>
    
    Editor:    Stephane Litkowski
               <mailto:stephane.litkowski@orange.com>

    Author:    Acee Lindem
               <mailto:acee@cisco.com>
    Author:    Yingzhen Qu
               <mailto:yingzhen.qu@futurewei.com>
    Author:    Pushpasis Sarkar
               <mailto:pushpasis.ietf@gmail.com>
    Author:    Ing-Wher Chen
               <mailto:ingwherchen@mitre.org>
    Author:    Jeff Tantsura
               <mailto:jefftant.ietf@gmail.com>     
    ";
  
  description 
    "The YANG module defines a generic configuration model for 
     Segment routing ISIS extensions common across all of the vendor 
     implementations.

    This YANG model conforms to the Network Management
    Datastore Architecture (NMDA) as described in RFC 8342.

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

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

    This version of this YANG module is part of RFC XXXX
    (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
    for full legal notices.

    The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
    NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
    'MAY', and 'OPTIONAL' in this document are to be interpreted as
    described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
    they appear in all capitals, as shown here.

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

  reference "RFC XXXX";

  revision 2022-08-09 {
  description
    "Initial revision.";
  reference "RFC XXXX";
  }

  
  /* Identities */
  identity sr-capability {
    description
      "Base identity for ISIS SR-Capabilities sub-TLV flgs";
  }

  identity mpls-ipv4 {
    base sr-capability;
    description
      "If set, then the router is capable of
       processing SR MPLS encapsulated IPv4 packets
       on all interfaces.";
  }

  identity mpls-ipv6 {
    base sr-capability;
    description
      "If set, then the router is capable of
       processing SR MPLS encapsulated IPv6 packets
       on all interfaces.";
  }

  identity prefix-sid-bit {
    description
      "Base identity for prefix sid sub-tlv bits.";
  }

  identity r-bit {
    base prefix-sid-bit;
    description
     "Re-advertisement Flag.";
  }

  identity n-bit {
    base prefix-sid-bit;
    description
     "Node-SID Flag.";
  }

  identity p-bit {
    base prefix-sid-bit;
    description
     "No-PHP (No Penultimate Hop-Popping) Flag.";
  }  
  
  identity e-bit {
    base prefix-sid-bit;
    description
     "Explicit NULL Flag.";
  }  

  identity v-bit {
    base prefix-sid-bit;
    description
     "Value Flag.";
  }

  identity l-bit {
    base prefix-sid-bit;
    description
     "Local Flag.";
  }

  identity adj-sid-bit {
    description
      "Base identity for adj sid sub-tlv bits.";
  }

  identity f-bit {
    base adj-sid-bit;
    description
      "Address-Family flag.";
  }
 
  identity b-bit {
    base adj-sid-bit;
    description
      "Backup flag.";
  }
  
  identity vi-bit {
    base adj-sid-bit;
    description
      "Value/Index flag.";
  }
  
  identity lo-bit {
    base adj-sid-bit;
    description
      "Local flag.";
  }
  
  identity s-bit {
    base adj-sid-bit;
    description
      "Group flag.";
  }
  
  identity pe-bit {
    base adj-sid-bit;
    description
      "Persistent flag.";
  }

  identity sid-binding-bit {
    description
      "Base identity for sid binding tlv bits.";
  }

  identity af-bit {
    base sid-binding-bit;
    description
      "Address-Family flag.";
  }
 
  identity m-bit {
    base sid-binding-bit;
    description
      "Mirror Context flag.";
  }
  
  identity sf-bit {
    base sid-binding-bit;
    description
      "S flag. If set, the binding label tlv should be flooded
       across the entire routing domain.";
  }
  
  identity d-bit {
    base sid-binding-bit;
    description
      "Leaking flag.";
  }
  
  identity a-bit {
    base sid-binding-bit;
    description
      "Attached flag.";
  }

  /* Features */
  
  feature remote-lfa-sr {
    description
     "Enhance rLFA to use SR path.";
  }

  feature ti-lfa {
    description
     "Enhance IPFRR with ti-lfa 
     support";
  } 

  /* Groupings */
 

  grouping sid-sub-tlv {
    description "SID/Label sub-TLV grouping.";
    container sid-sub-tlv {
      description
        "Used to advertise the SID/Label associated with a
      prefix or adjacency.";
      leaf sid {
        type uint32;
      description
        "Segment Identifier (SID) - A 20 bit label or
         32 bit SID.";
      }
    }
  }

  grouping sr-capability {
    description
      "SR capability grouping.";
    container sr-capability {
      description
        "Segment Routing capability.";
      container sr-capability {
        leaf-list sr-capability-bits {
          type identityref {
            base sr-capability;
          }
          description "SR Capability sub-tlv flags list.";
        }
        description
          "SR Capability Flags.";
      }
      container global-blocks {
        description 
          "Segment Routing Global Blocks.";
        list global-block {
          description "Segment Routing Global Block.";
          leaf range-size {
            type uint32;
            description "The SID range.";
          }
          uses sid-sub-tlv;
        }
      }
    }
  }

  grouping sr-algorithm {
    description
      "SR algorithm grouping.";
    container sr-algorithms {
      description "All SR algorithms.";
      leaf-list sr-algorithm {
        type uint8;
        description
          "The Segment Routing (SR) algorithms that the router is
           currently using.";
      }
    }
  }

  grouping srlb {
    description
      "SR Local Block grouping.";
    container local-blocks {
      description "List of SRLBs.";
      list local-block {
        description "Segment Routing Local Block.";
        leaf range-size {
          type uint32;
          description "The SID range.";
        }
        uses sid-sub-tlv;
      }
    }
  }

  grouping srms-preference {
    description "The SRMS preference TLV is used to advertise
                 a preference associated with the node that acts
                 as an SR Mapping Server.";
    container srms-preference {
      description "SRMS Preference TLV.";
      leaf preference {
        type uint8 {
          range "0 .. 255";
        } 
        description "SRMS preference TLV, value from 0 to 255.";
      }
    }
  }  

  grouping adjacency-state {
    description
      "This group will extend adjacency state.";
    list adjacency-sid {
      key value;
      config false;
      leaf af {
        type iana-rt-types:address-family;
        description
          "Address-family associated with the 
           segment ID";
      }
      leaf value {
        type uint32;
        description
          "Value of the Adj-SID.";
      }
      leaf weight {
        type uint8;
        description
          "Weight associated with
          the adjacency SID.";
      }
      leaf protection-requested {
        type boolean;
        description
          "Describe if the adjacency SID
           must be protected.";
      }
      description
        "List of adjacency Segment IDs.";
    }
  }

  grouping prefix-segment-id {
    description
      "This group defines segment routing extensions
       for prefixes.";
    
    list sid-list {
      key value;
      
      container perfix-sid-flags {
        leaf-list bits {
          type identityref {
            base prefix-sid-bit;
          }
          description
            "Prefix SID Sub-TLV flag bits list.";
        }
        description
          "Describes flags associated with the
           segment ID.";
      }
      
      leaf algorithm {
        type uint8;
        description
          "Algorithm to be used for path computation.";
      }
      leaf value {
        type uint32;
        description
         "Value of the prefix-SID.";
      }
      description
        "List of segments.";
    }
  }
  
  grouping adjacency-segment-id {
    description
      "This group defines segment routing extensions
       for adjacencies.";
    
    list sid-list {
      key value;
    
      container adj-sid-flags {
        leaf-list bits {
          type identityref {
            base adj-sid-bit;
          }
          description "Adj sid sub-tlv flags list.";
          }
        description "Adj-sid sub-tlv flags.";
      }

      leaf weight {
        type uint8;
        description
          "The value represents the weight of the Adj-SID
           for the purpose of load balancing.";
      }
      leaf neighbor-id {
        type isis:system-id;
        description
          "Describes the system ID of the neighbor
           associated with the SID value. This is only
           used on LAN adjacencies.";
      }
      leaf value {
        type uint32;
        description
          "Value of the Adj-SID.";
      }
      description
        "List of segments.";
    }
  }

  grouping segment-routing-binding-tlv {
    list segment-routing-bindings {     
      key "fec range";
      
      leaf fec {
        type string;
        description
        "IP (v4 or v6) range to be bound to SIDs.";
      }
      
      leaf range {
        type uint16;
        description
          "Describes number of elements to assign 
           a binding to.";
      }
      
      container sid-binding-flags {
        leaf-list bits {
          type identityref {
            base sid-binding-bit;
          }
          description
            "SID Binding TLV flag bits list.";
        }
        description
          "Binding flags.";
      }
          
      container binding {
        container prefix-sid {
          uses prefix-segment-id;
          description
            "Binding prefix SID to the range.";
        }
        description
          "Bindings associated with the range.";
      }
      
      description 
        "This container describes list of SID/Label bindings.
         ISIS reference is TLV 149.";     
    }
    description
      "Defines binding TLV for database.";
  }

  /* Cfg */
    
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol configuration
       with segment routing.";
      
    uses sr-mpls:sr-control-plane;
    container protocol-srgb {
      if-feature sr-mpls:protocol-srgb;
      uses sr-cmn:srgb;
      description
        "Per-protocol SRGB.";
    }
  }
     
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:interfaces/isis:interface" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol configuration
       with segment routing.";
    
    uses sr-mpls:igp-interface;
  }
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:interfaces/isis:interface"+
          "/isis:fast-reroute" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS IP FRR with TILFA.";
      
    container ti-lfa {
      if-feature ti-lfa;
      leaf enable {
        type boolean;
        description
          "Enables TI-LFA computation.";
      }
      description
        "TILFA configuration.";
    }
  }
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:interfaces/isis:interface"+
          "/isis:fast-reroute/isis:lfa/isis:remote-lfa" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS remoteLFA config with
       use of segment-routing path.";
      
    leaf use-segment-routing-path {
      if-feature remote-lfa-sr;
      type boolean;
      description
        "force remote LFA to use segment routing
         path instead of LDP path.";
    } 
  }
  
  /* Operational states */
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:interfaces/isis:interface" +
          "/isis:adjacencies/isis:adjacency" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol configuration
       with segment routing.";
      
    uses adjacency-state;
  }
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:router-capabilities" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB router capability.";
   
    uses sr-capability;
    uses sr-algorithm;
    uses srlb;
    uses srms-preference;
  }
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:extended-is-neighbor/isis:neighbor" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB neighbor.";
       uses adjacency-segment-id;
  }

  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:mt-is-neighbor/isis:neighbor" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB neighbor.";
       uses adjacency-segment-id;
  }
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:extended-ipv4-reachability/isis:prefixes" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB prefix.";
       uses prefix-segment-id;
  }
  
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:mt-extended-ipv4-reachability/isis:prefixes" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB prefix.";
    uses prefix-segment-id;
  }

  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:ipv6-reachability/isis:prefixes" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB prefix.";
    uses prefix-segment-id;
  }

  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:mt-ipv6-reachability/isis:prefixes" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB prefix.";
    uses prefix-segment-id;
  }

  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" { 
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB.";
    uses segment-routing-binding-tlv;
  }
  
  
  /* Notifications */  
}
]]></sourcecode>
      </section>
    </section>
    <section anchor="Security" toc="default" numbered="true">
      <name>Security Considerations</name>
      <t>The YANG module specified in this document defines a schema for data
        that is designed to be accessed via network management protocols such
        as NETCONF <xref target="RFC6241" format="default"/> or RESTCONF <xref target="RFC8040" format="default"/>.
        The lowest NETCONF layer is the secure transport layer, and the
        mandatory-to-implement secure transport is Secure Shell (SSH) <xref target="RFC6242" format="default"/>.
        The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement
        secure transport is TLS <xref target="RFC8446" format="default"/>.</t>
      <t>The NETCONF Access Control Model (NACM) <xref target="RFC8341" format="default"/> provides
        the means to restrict access for particular NETCONF or RESTCONF users
        to a pre-configured subset of all available NETCONF or RESTCONF protocol
        operations and content.</t>
      <t>There are a number of data nodes defined in this YANG module that are
        writable/creatable/deletable (i.e., config true, which is the
        default). These data nodes may be considered sensitive or vulnerable
        in some network environments. Write operations (e.g., edit-config)
        to these data nodes without proper protection can have a negative
        effect on network operations. These are the subtrees and data nodes
        and their sensitivity/vulnerability:
      </t>
      <ul empty="true" spacing="normal">
        <li>/isis:isis/segment-routing</li>
        <li>/isis:isis/protocol-srgb</li>
        <li>/isis:isis/isis:interfaces/isis:interface/segment-routing</li>
        <li>/isis:isis/isis:interfaces/isis:interface/isis:fast-reroute/ti-lfa</li>
      </ul>
      <t>Some of the readable data nodes in the modules
      may be considered sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or notification)
      to these data nodes. 
      </t>
      <ul empty="true" spacing="normal">
        <li>/isis:router-capabilities/sr-capability</li>
        <li>/isis:router-capabilities/sr-algorithms</li>
        <li>/isis:router-capabilities/local-blocks</li>
        <li>/isis:router-capabilities/srms-preference</li>
        <li>/isis:router-capabilities/node-msd-tlv</li>
        <li>And the augmentations to the ISIS link state database.</li>
      </ul>
      <t>Unauthorized access to any data node of these subtrees can disclose
        the operational state information of IS-IS protocol on this device.</t>
    </section>
    <section anchor="Contributors" toc="default" numbered="true">
      <name>Contributors</name>
      <t>Authors would like to thank 
	  Derek Yeung, Acee Lindem, Yi Yang
	  for their major contributions to the draft.</t>
    </section>
    <section anchor="Acknowledgements" toc="default" numbered="true">
      <name>Acknowledgements</name>
      <t>MITRE has approved this document for Public Release, Distribution 
        Unlimited, with Public Release Case Number 19-3033.</t>
    </section>
    <section anchor="IANA" toc="default" numbered="true">
      <name>IANA Considerations</name>
      <t>The IANA is requested to assign one new URI from the
   IETF XML registry (<xref target="RFC3688" format="default"/>). Authors are suggesting the following URI: </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
	URI: urn:ietf:params:xml:ns:yang:ietf-isis-sr
	Registrant Contact: The IESG.
	XML: N/A, the requested URI is an XML namespace
  ]]></artwork>
      <t>This document also requests one new YANG module name in the YANG Module Names registry (<xref target="RFC6020" format="default"/>) with the following suggestion :</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
	name: ietf-isis-sr
	namespace: urn:ietf:params:xml:ns:yang:ietf-isis-sr
	prefix: isis-sr
	reference: RFC XXXX
  ]]></artwork>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC6242" target="https://www.rfc-editor.org/info/rfc6242" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml">
        <front>
          <title>Using the NETCONF Protocol over Secure Shell (SSH)</title>
          <author fullname="M. Wasserman" initials="M" surname="Wasserman"/>
          <date month="June" year="2011"/>
          <abstract>
            <t>This document describes a method for invoking and running the Network Configuration Protocol (NETCONF) within a Secure Shell (SSH) session as an SSH subsystem.  This document obsoletes RFC 4742. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6242"/>
        <seriesInfo name="DOI" value="10.17487/RFC6242"/>
      </reference>
      <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml">
        <front>
          <title>RESTCONF Protocol</title>
          <author fullname="A. Bierman" initials="A" surname="Bierman"/>
          <author fullname="M. Bjorklund" initials="M" surname="Bjorklund"/>
          <author fullname="K. Watsen" initials="K" surname="Watsen"/>
          <date month="January" year="2017"/>
          <abstract>
            <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8040"/>
        <seriesInfo name="DOI" value="10.17487/RFC8040"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B" surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml">
        <front>
          <title>YANG Tree Diagrams</title>
          <author fullname="M. Bjorklund" initials="M" surname="Bjorklund"/>
          <author fullname="L. Berger" initials="L" role="editor" surname="Berger"/>
          <date month="March" year="2018"/>
          <abstract>
            <t>This document captures the current syntax used in YANG module tree diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="215"/>
        <seriesInfo name="RFC" value="8340"/>
        <seriesInfo name="DOI" value="10.17487/RFC8340"/>
      </reference>
      <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml">
        <front>
          <title>Network Configuration Access Control Model</title>
          <author fullname="A. Bierman" initials="A" surname="Bierman"/>
          <author fullname="M. Bjorklund" initials="M" surname="Bjorklund"/>
          <date month="March" year="2018"/>
          <abstract>
            <t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability. There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content. This document defines such an access control model.</t>
            <t>This document obsoletes RFC 6536.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="91"/>
        <seriesInfo name="RFC" value="8341"/>
        <seriesInfo name="DOI" value="10.17487/RFC8341"/>
      </reference>
      <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml">
        <front>
          <title>Network Management Datastore Architecture (NMDA)</title>
          <author fullname="M. Bjorklund" initials="M" surname="Bjorklund"/>
          <author fullname="J. Schoenwaelder" initials="J" surname="Schoenwaelder"/>
          <author fullname="P. Shafer" initials="P" surname="Shafer"/>
          <author fullname="K. Watsen" initials="K" surname="Watsen"/>
          <author fullname="R. Wilton" initials="R" surname="Wilton"/>
          <date month="March" year="2018"/>
          <abstract>
            <t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF.  This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8342"/>
        <seriesInfo name="DOI" value="10.17487/RFC8342"/>
      </reference>
      <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml">
        <front>
          <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
          <author fullname="E. Rescorla" initials="E" surname="Rescorla"/>
          <date month="August" year="2018"/>
          <abstract>
            <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
            <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8446"/>
        <seriesInfo name="DOI" value="10.17487/RFC8446"/>
      </reference>
      <reference anchor="RFC8667" target="https://www.rfc-editor.org/info/rfc8667" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8667.xml">
        <front>
          <title>IS-IS Extensions for Segment Routing</title>
          <author fullname="S. Previdi" initials="S" role="editor" surname="Previdi"/>
          <author fullname="L. Ginsberg" initials="L" role="editor" surname="Ginsberg"/>
          <author fullname="C. Filsfils" initials="C" surname="Filsfils"/>
          <author fullname="A. Bashandy" initials="A" surname="Bashandy"/>
          <author fullname="H. Gredler" initials="H" surname="Gredler"/>
          <author fullname="B. Decraene" initials="B" surname="Decraene"/>
          <date month="December" year="2019"/>
          <abstract>
            <t>Segment Routing (SR) allows for a flexible definition of end-to-end paths within IGP topologies by encoding paths as sequences of topological sub-paths, called "segments". These segments are advertised by the link-state routing protocols (IS-IS and OSPF).</t>
            <t>This document describes the IS-IS extensions that need to be introduced for Segment Routing operating on an MPLS data plane.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8667"/>
        <seriesInfo name="DOI" value="10.17487/RFC8667"/>
      </reference>
      <reference anchor="I-D.ietf-isis-yang-isis-cfg" target="https://www.ietf.org/archive/id/draft-ietf-isis-yang-isis-cfg-42.txt" xml:base="https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-isis-yang-isis-cfg.xml">
        <front>
          <title>YANG Data Model for IS-IS Protocol</title>
          <author fullname="Stephane Litkowski">
            <organization>Cisco Systems</organization>
          </author>
          <author fullname="Derek Yeung">
            <organization>Arrcus, Inc</organization>
          </author>
          <author fullname="Acee Lindem">
            <organization>Cisco Systems</organization>
          </author>
          <author fullname="Jeffrey Zhang">
            <organization>Juniper Networks</organization>
          </author>
          <author fullname="Ladislav Lhotka">
            <organization>CZ.NIC</organization>
          </author>
          <date day="15" month="October" year="2019"/>
          <abstract>
            <t>This document defines a YANG data model that can be used to configure and manage the IS-IS protocol on network elements.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-isis-yang-isis-cfg-42"/>
      </reference>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241">
        <front>
          <title>Network Configuration Protocol (NETCONF)</title>
          <author initials="R." surname="Enns" fullname="R. Enns" role="editor">
            <organization/>
          </author>
          <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
            <organization/>
          </author>
          <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
            <organization/>
          </author>
          <author initials="A." surname="Bierman" fullname="A. Bierman" role="editor">
            <organization/>
          </author>
          <date year="2011" month="June"/>
          <abstract>
            <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6241"/>
        <seriesInfo name="DOI" value="10.17487/RFC6241"/>
      </reference>
      <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020">
        <front>
          <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
          <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
            <organization/>
          </author>
          <date year="2010" month="October"/>
          <abstract>
            <t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6020"/>
        <seriesInfo name="DOI" value="10.17487/RFC6020"/>
      </reference>
      <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688">
        <front>
          <title>The IETF XML Registry</title>
          <author initials="M." surname="Mealling" fullname="M. Mealling">
            <organization/>
          </author>
          <date year="2004" month="January"/>
          <abstract>
            <t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="81"/>
        <seriesInfo name="RFC" value="3688"/>
        <seriesInfo name="DOI" value="10.17487/RFC3688"/>
      </reference>
      <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950">
        <front>
          <title>The YANG 1.1 Data Modeling Language</title>
          <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
            <organization/>
          </author>
          <date year="2016" month="August"/>
          <abstract>
            <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7950"/>
        <seriesInfo name="DOI" value="10.17487/RFC7950"/>
      </reference>
      <reference anchor="RFC9020" target="https://www.rfc-editor.org/info/rfc9020">
        <front>
          <title>YANG Data Model for Segment Routing</title>
          <author initials="S" surname="Litkowski" fullname="Stephane Litkowski">
            <organization/>
          </author>
          <author initials="Y" surname="Qu" fullname="Yingzhen Qu">
            <organization/>
          </author>
          <author initials="P" surname="Sarkar" fullname="Pushpasis Sarkar">
            <organization/>
          </author>
          <author initials="J" surname="Tantsura" fullname="Jeff Tantsura">
            <organization/>
          </author>
          <date month="May" year="2021"/>
          <abstract>
            <t>This document defines a YANG data model ([RFC6020], [RFC7950]) for segment routing ([I-D.ietf-spring-segment-routing]) configuration and operation.  This YANG model is intended to be used on network elements to configure or operate segment routing.  This document defines also generic containers that SHOULD be reused by IGP protocol modules to support segment routing.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9020"/>
      </reference>
    </references>
  </back>
</rfc>
